Skip to content

Commit 31dbb6b

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
irqchip/gic-v4.1: Use readx_poll_timeout_atomic() to fix sleep in atomic
readx_poll_timeout() can sleep if @sleep_us is specified by the caller, and is therefore unsafe to be used inside the atomic context, which is this case when we use it to poll the GICR_VPENDBASER.Dirty bit in irq_set_vcpu_affinity() callback. Let's convert to its atomic version instead which helps to get the v4.1 board back to life! Fixes: 9680622 ("irqchip/gic-v4.1: Add support for VPENDBASER's Dirty+Valid signaling") Signed-off-by: Zenghui Yu <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a23df9a commit 31dbb6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3797,10 +3797,10 @@ static void its_wait_vpt_parse_complete(void)
37973797
if (!gic_rdists->has_vpend_valid_dirty)
37983798
return;
37993799

3800-
WARN_ON_ONCE(readq_relaxed_poll_timeout(vlpi_base + GICR_VPENDBASER,
3801-
val,
3802-
!(val & GICR_VPENDBASER_Dirty),
3803-
10, 500));
3800+
WARN_ON_ONCE(readq_relaxed_poll_timeout_atomic(vlpi_base + GICR_VPENDBASER,
3801+
val,
3802+
!(val & GICR_VPENDBASER_Dirty),
3803+
10, 500));
38043804
}
38053805

38063806
static void its_vpe_schedule(struct its_vpe *vpe)

0 commit comments

Comments
 (0)