Skip to content

Commit 8b718d4

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
irqchip/gic-v4.1: Set vpe_l1_base for all redistributors
Currently, we will not set vpe_l1_page for the current RD if we can inherit the vPE configuration table from another RD (or ITS), which results in an inconsistency between RDs within the same CommonLPIAff group. Let's rename it to vpe_l1_base to indicate the base address of the vPE configuration table of this RD, and set it properly for *all* v4.1 redistributors. Signed-off-by: Zenghui Yu <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e88bd31 commit 8b718d4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2376,6 +2376,8 @@ static u64 inherit_vpe_l1_table_from_its(void)
23762376
continue;
23772377

23782378
/* We have a winner! */
2379+
gic_data_rdist()->vpe_l1_base = its->tables[2].base;
2380+
23792381
val = GICR_VPROPBASER_4_1_VALID;
23802382
if (baser & GITS_BASER_INDIRECT)
23812383
val |= GICR_VPROPBASER_4_1_INDIRECT;
@@ -2432,6 +2434,7 @@ static u64 inherit_vpe_l1_table_from_rd(cpumask_t **mask)
24322434
val = gits_read_vpropbaser(base + SZ_128K + GICR_VPROPBASER);
24332435
val &= ~GICR_VPROPBASER_4_1_Z;
24342436

2437+
gic_data_rdist()->vpe_l1_base = gic_data_rdist_cpu(cpu)->vpe_l1_base;
24352438
*mask = gic_data_rdist_cpu(cpu)->vpe_table_mask;
24362439

24372440
return val;
@@ -2542,7 +2545,7 @@ static int allocate_vpe_l1_table(void)
25422545
if (!page)
25432546
return -ENOMEM;
25442547

2545-
gic_data_rdist()->vpe_l1_page = page;
2548+
gic_data_rdist()->vpe_l1_base = page_address(page);
25462549
pa = virt_to_phys(page_address(page));
25472550
WARN_ON(!IS_ALIGNED(pa, psz));
25482551

include/linux/irqchip/arm-gic-v3.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,10 +652,10 @@ struct rdists {
652652
struct {
653653
void __iomem *rd_base;
654654
struct page *pend_page;
655-
struct page *vpe_l1_page;
656655
phys_addr_t phys_base;
657656
bool lpi_enabled;
658657
cpumask_t *vpe_table_mask;
658+
void *vpe_l1_base;
659659
} __percpu *rdist;
660660
phys_addr_t prop_table_pa;
661661
void *prop_table_va;

0 commit comments

Comments
 (0)