[PATCH] genirq/spurious: Recognize handled IRQs with threaded wakeups
From: Avi Weiss
Date: Mon Oct 26 2026 - 03:40:18 EST
try_one_irq() compares the result of handle_irq_event() with IRQ_HANDLED.
For shared IRQs, one handler may return IRQ_HANDLED while another
returns IRQ_WAKE_THREAD. The combined result fails the equality check,
so misrouted IRQ recovery does not credit an interrupt that was handled.
Check the IRQ_HANDLED bit instead. Leave IRQ_WAKE_THREAD-only results
unchanged.
Fixes: 3a43e05f4d06 ("irq: Handle spurios irq detection for threaded irqs")
Signed-off-by: Avi Weiss <thnkslprpt@xxxxxxxxx>
---
Tested with simulated shared IRQ handlers under QEMU using
irqfixup=1 on Linux 7.3.0-rc5+.
The unhandled counts for IRQ_NONE, IRQ_HANDLED, IRQ_WAKE_THREAD,
and the combined result were 1/0/1/1 before the fix and
1/0/1/0 afterward (as expected).
Both primary handlers and the IRQ thread executed in the mixed
case before and after the patch.
kernel/irq/spurious.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 73280ccb74b08..48d3ef35e763f 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -68,7 +68,7 @@ static bool try_one_irq(struct irq_desc *desc, bool force)
/* Mark it poll in progress */
desc->istate |= IRQS_POLL_INPROGRESS;
do {
- if (handle_irq_event(desc) == IRQ_HANDLED)
+ if (handle_irq_event(desc) & IRQ_HANDLED)
ret = true;
/* Make sure that there is still a valid action */
action = desc->action;
base-commit: e74798f2f8e1562f2bbd2fed8d81929eeef39ffc
--
2.43.0