Skip to content

Commit

Permalink
irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZE
Browse files Browse the repository at this point in the history
The Size field of GICv4.1 VPROPBASER register indicates number of
pages minus one and together Page_Size and Size control the vPEID
width. Let's respect this requirement of the architecture.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200206075711.1275-2-yuzenghui@huawei.com
  • Loading branch information
Zenghui Yu authored and Marc Zyngier committed Feb 8, 2020
1 parent 1079452 commit e88bd31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-gic-v3-its.c
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ static int allocate_vpe_l1_table(void)
npg = 1;
}

val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg);
val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg - 1);

/* Right, that's the number of CPU pages we need for L1 */
np = DIV_ROUND_UP(npg * psz, PAGE_SIZE);
Expand Down

0 comments on commit e88bd31

Please sign in to comment.