[PATCH] genirq: Disable suspended irqs when restoring affinity

From: David Stevens
Date: Thu Apr 18 2024 - 03:47:28 EST


In irq_restore_affinity_of_irq(), after initializing an affinity
managed irq, disable the irq if it should be suspended. This ensures
that irqs are not delivered to drivers during the noirq phase of
resuming from S3, after non-boot CPUs are brought back online.

Signed-off-by: David Stevens <stevensd@xxxxxxxxxxxx>
---
kernel/irq/cpuhotplug.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c
index 1ed2b1739363..c00132013708 100644
--- a/kernel/irq/cpuhotplug.c
+++ b/kernel/irq/cpuhotplug.c
@@ -197,6 +197,8 @@ static void irq_restore_affinity_of_irq(struct irq_desc *desc, unsigned int cpu)

if (irqd_is_managed_and_shutdown(data)) {
irq_startup(desc, IRQ_RESEND, IRQ_START_COND);
+ if (desc->istate & IRQS_SUSPENDED)
+ __disable_irq(desc);
return;
}


base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
--
2.44.0.683.g7961c838ac-goog