]> Git Repo - linux.git/commitdiff
irqchip/gic-v4.1: Use readx_poll_timeout_atomic() to fix sleep in atomic
authorZenghui Yu <[email protected]>
Fri, 5 Jun 2020 05:23:45 +0000 (13:23 +0800)
committerMarc Zyngier <[email protected]>
Sun, 21 Jun 2020 14:13:11 +0000 (15:13 +0100)
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: 96806229ca03 ("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]
drivers/irqchip/irq-gic-v3-its.c

index cd685f521c77ac1041ad0a1576e8b26e4c875740..6a5a87fc4601f434db09409a0e75d16f74fbe7ae 100644 (file)
@@ -3797,10 +3797,10 @@ static void its_wait_vpt_parse_complete(void)
        if (!gic_rdists->has_vpend_valid_dirty)
                return;
 
-       WARN_ON_ONCE(readq_relaxed_poll_timeout(vlpi_base + GICR_VPENDBASER,
-                                               val,
-                                               !(val & GICR_VPENDBASER_Dirty),
-                                               10, 500));
+       WARN_ON_ONCE(readq_relaxed_poll_timeout_atomic(vlpi_base + GICR_VPENDBASER,
+                                                      val,
+                                                      !(val & GICR_VPENDBASER_Dirty),
+                                                      10, 500));
 }
 
 static void its_vpe_schedule(struct its_vpe *vpe)
This page took 0.094865 seconds and 4 git commands to generate.