[tip: irq/core] genirq/spurious: Recognize handled IRQs with threaded wakeups

From: tip-bot2 for Avi Weiss

Date: Sun Nov 08 2026 - 11:43:48 EST


The following commit has been merged into the irq/core branch of tip:

Commit-ID: 6c62ec6029c1480262b9691d8792ff0aa04adba5
Gitweb: https://git.kernel.org/tip/6c62ec6029c1480262b9691d8792ff0aa04adba5
Author: Avi Weiss <thnkslprpt@xxxxxxxxx>
AuthorDate: Mon, 26 Oct 2026 09:40:04 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Sun, 08 Nov 2026 17:39:43 +01:00

genirq/spurious: Recognize handled IRQs with threaded wakeups

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>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20261026074003.2805797-2-thnkslprpt@xxxxxxxxx
---
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 73280cc..48d3ef3 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;