Skip to content

Commit b2cb11f

Browse files
Heyi GuoMarc Zyngier
authored andcommitted
irqchip/gic-v4: Use Inner-Shareable attributes for virtual pending tables
There is no special reason to set virtual LPI pending table as non-shareable. If we choose to hard code the shareability without probing, Inner-Shareable is likely to be a better choice, as the VPEs can move around and benefit from having the redistributors snooping each other's cache, if that's something they can do. Furthermore, Hisilicon hip08 ends up with unspecified errors when mixing shareability attributes. So let's move to IS attributes for the VPT. This has also been tested on D05 and didn't show any regression. Signed-off-by: Heyi Guo <[email protected]> [maz: rewrote commit message] Signed-off-by: Marc Zyngier <[email protected]> Tested-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 486562d commit b2cb11f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3560,7 +3560,7 @@ static void its_vpe_schedule(struct its_vpe *vpe)
35603560
val = virt_to_phys(page_address(vpe->vpt_page)) &
35613561
GENMASK_ULL(51, 16);
35623562
val |= GICR_VPENDBASER_RaWaWb;
3563-
val |= GICR_VPENDBASER_NonShareable;
3563+
val |= GICR_VPENDBASER_InnerShareable;
35643564
/*
35653565
* There is no good way of finding out if the pending table is
35663566
* empty as we can race against the doorbell interrupt very

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@
320320
#define GICR_VPENDBASER_NonShareable \
321321
GIC_BASER_SHAREABILITY(GICR_VPENDBASER, NonShareable)
322322

323+
#define GICR_VPENDBASER_InnerShareable \
324+
GIC_BASER_SHAREABILITY(GICR_VPENDBASER, InnerShareable)
325+
323326
#define GICR_VPENDBASER_nCnB GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nCnB)
324327
#define GICR_VPENDBASER_nC GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nC)
325328
#define GICR_VPENDBASER_RaWt GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWt)

0 commit comments

Comments
 (0)