]> Git Repo - linux.git/commitdiff
irqchip/gic-v3-its: Fix reprogramming of redistributors on CPU hotplug
authorMarc Zyngier <[email protected]>
Fri, 22 Jun 2018 09:52:54 +0000 (10:52 +0100)
committerThomas Gleixner <[email protected]>
Fri, 22 Jun 2018 12:22:02 +0000 (14:22 +0200)
Enabling LPIs was made a lot stricter recently, by checking that they are
disabled before enabling them. By doing so, the CPU hotplug case was missed
altogether, which leaves LPIs enabled on hotplug off (expecting the CPU to
eventually come back), and won't write a different value anyway on hotplug
on.

So skip that check if that particular case is detected

Fixes: 6eb486b66a30 ("irqchip/gic-v3: Ensure GICR_CTLR.EnableLPI=0 is observed before enabling")
Reported-by: Sumit Garg <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Sumit Garg <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Yang Yingliang <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
drivers/irqchip/irq-gic-v3-its.c

index 0269ffb93f6ea3459ee43e800411a440959fd715..d7842d312d3eacd7d07853caa6a529a1c8080c99 100644 (file)
@@ -3427,6 +3427,16 @@ static int redist_disable_lpis(void)
        u64 timeout = USEC_PER_SEC;
        u64 val;
 
+       /*
+        * If coming via a CPU hotplug event, we don't need to disable
+        * LPIs before trying to re-enable them. They are already
+        * configured and all is well in the world. Detect this case
+        * by checking the allocation of the pending table for the
+        * current CPU.
+        */
+       if (gic_data_rdist()->pend_page)
+               return 0;
+
        if (!gic_rdists_supports_plpis()) {
                pr_info("CPU%d: LPIs not supported\n", smp_processor_id());
                return -ENXIO;
This page took 0.062452 seconds and 4 git commands to generate.