Skip to content

Commit 82f499c

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
irqchip/gic-v3-its: Fix reprogramming of redistributors on CPU hotplug
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: 6eb486b ("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]
1 parent 205e065 commit 82f499c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3427,6 +3427,16 @@ static int redist_disable_lpis(void)
34273427
u64 timeout = USEC_PER_SEC;
34283428
u64 val;
34293429

3430+
/*
3431+
* If coming via a CPU hotplug event, we don't need to disable
3432+
* LPIs before trying to re-enable them. They are already
3433+
* configured and all is well in the world. Detect this case
3434+
* by checking the allocation of the pending table for the
3435+
* current CPU.
3436+
*/
3437+
if (gic_data_rdist()->pend_page)
3438+
return 0;
3439+
34303440
if (!gic_rdists_supports_plpis()) {
34313441
pr_info("CPU%d: LPIs not supported\n", smp_processor_id());
34323442
return -ENXIO;

0 commit comments

Comments
 (0)