* [PATCH v1] irq: Set IRQF_COND_ONESHOT in request_irq()
@ 2024-07-11 10:20 Rafael J. Wysocki
2024-07-11 20:32 ` Thomas Gleixner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2024-07-11 10:20 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Linux ACPI, Stefan Seyfried
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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")
Closes: https://lore.kernel.org/lkml/205bd84a-fe8e-4963-968e-0763285f35ba@message-id.googlemail.com
Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
include/linux/interrupt.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-pm/include/linux/interrupt.h
===================================================================
--- linux-pm.orig/include/linux/interrupt.h
+++ linux-pm/include/linux/interrupt.h
@@ -168,7 +168,8 @@ 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] irq: Set IRQF_COND_ONESHOT in request_irq()
2024-07-11 10:20 [PATCH v1] irq: Set IRQF_COND_ONESHOT in request_irq() Rafael J. Wysocki
@ 2024-07-11 20:32 ` Thomas Gleixner
2024-07-11 21:04 ` [tip: irq/core] genirq: " tip-bot2 for Rafael J. Wysocki
2024-07-15 13:20 ` tip-bot2 for Rafael J. Wysocki
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2024-07-11 20:32 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: LKML, Linux ACPI, Stefan Seyfried
On Thu, Jul 11 2024 at 12:20, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> 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.
In principle that should work. We'll see whether there are dragons
lurking :)
Thanks,
tglx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip: irq/core] genirq: Set IRQF_COND_ONESHOT in request_irq()
2024-07-11 10:20 [PATCH v1] irq: Set IRQF_COND_ONESHOT in request_irq() Rafael J. Wysocki
2024-07-11 20:32 ` Thomas Gleixner
@ 2024-07-11 21:04 ` tip-bot2 for Rafael J. Wysocki
2024-07-15 13:20 ` tip-bot2 for Rafael J. Wysocki
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Rafael J. Wysocki @ 2024-07-11 21:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: Stefan Seyfried, Rafael J. Wysocki, Thomas Gleixner, stable, x86,
linux-kernel, maz
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 513fbe762f644872cc2ff47407cbc24422a33fb5
Gitweb: https://git.kernel.org/tip/513fbe762f644872cc2ff47407cbc24422a33fb5
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
AuthorDate: Thu, 11 Jul 2024 12:20:04 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 11 Jul 2024 22:59:33 +02:00
genirq: Set IRQF_COND_ONESHOT in request_irq()
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 <stefan.seyfried@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Cc: stable@vger.kerel.org
Link: https://lore.kernel.org/r/5800834.DvuYhMxLoT@rjwysocki.net
Closes: https://lore.kernel.org/lkml/205bd84a-fe8e-4963-968e-0763285f35ba@message-id.googlemail.com
---
include/linux/interrupt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5c9bdd3..dac7466 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: irq/core] genirq: Set IRQF_COND_ONESHOT in request_irq()
2024-07-11 10:20 [PATCH v1] irq: Set IRQF_COND_ONESHOT in request_irq() Rafael J. Wysocki
2024-07-11 20:32 ` Thomas Gleixner
2024-07-11 21:04 ` [tip: irq/core] genirq: " tip-bot2 for Rafael J. Wysocki
@ 2024-07-15 13:20 ` tip-bot2 for Rafael J. Wysocki
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Rafael J. Wysocki @ 2024-07-15 13:20 UTC (permalink / raw)
To: linux-tip-commits
Cc: Stefan Seyfried, Rafael J. Wysocki, Thomas Gleixner, stable, x86,
linux-kernel, maz
The following commit has been merged into the irq/core branch of tip:
Commit-ID: c37927a203fa283950f6045602b9f71328ad786c
Gitweb: https://git.kernel.org/tip/c37927a203fa283950f6045602b9f71328ad786c
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
AuthorDate: Thu, 11 Jul 2024 12:20:04 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 15 Jul 2024 15:13:56 +02:00
genirq: Set IRQF_COND_ONESHOT in request_irq()
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 <stefan.seyfried@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Cc: stable@vger.kerel.org
Link: https://lore.kernel.org/r/5800834.DvuYhMxLoT@rjwysocki.net
Closes: https://lore.kernel.org/lkml/205bd84a-fe8e-4963-968e-0763285f35ba@message-id.googlemail.com
---
include/linux/interrupt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 5c9bdd3..dac7466 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-15 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 10:20 [PATCH v1] irq: Set IRQF_COND_ONESHOT in request_irq() Rafael J. Wysocki
2024-07-11 20:32 ` Thomas Gleixner
2024-07-11 21:04 ` [tip: irq/core] genirq: " tip-bot2 for Rafael J. Wysocki
2024-07-15 13:20 ` tip-bot2 for Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.