]> Git Repo - linux.git/commitdiff
genirq: Set IRQF_COND_ONESHOT in request_irq()
authorRafael J. Wysocki <[email protected]>
Thu, 11 Jul 2024 10:20:04 +0000 (12:20 +0200)
committerThomas Gleixner <[email protected]>
Mon, 15 Jul 2024 13:13:56 +0000 (15:13 +0200)
The callers of request_irq() don't care about IRQF_ONESHOT because they
don't provide threaded handlers, but if they happen to share the IRQ with
the ACPI SCI, which has a threaded handler and sets IRQF_ONESHOT,
request_irq() will fail for them due to a flags mismatch.

Address this by making request_irq() add IRQF_COND_ONESHOT to the flags
passed to request_threaded_irq() for all of its callers.

Fixes: 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI")
Reported-by: Stefan Seyfried <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Stefan Seyfried <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Closes: https://lore.kernel.org/lkml/[email protected]
include/linux/interrupt.h

index 5c9bdd3ffccc89254fcc31c1b1f34d81f8374234..dac7466de5f35e93cf4066e737a61d7b6d8e21f9 100644 (file)
@@ -168,7 +168,7 @@ static inline int __must_check
 request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
            const char *name, void *dev)
 {
-       return request_threaded_irq(irq, handler, NULL, flags, name, dev);
+       return request_threaded_irq(irq, handler, NULL, flags | IRQF_COND_ONESHOT, name, dev);
 }
 
 extern int __must_check
This page took 0.059133 seconds and 4 git commands to generate.