[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1352826175.15558.1662.camel@cliu38-desktop-build>
Date: Wed, 14 Nov 2012 01:02:55 +0800
From: Chuansheng Liu <chuansheng.liu@...el.com>
To: tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] genirq: Fix the case of irqflag with IRQF_SHARED and
IRQF_NO_THREAD
When one shared irq is requested as below:
req1: request_irq(irqnb, cb1, IRQF_SHARED, ...);
then:
req2: request_irq(irqnb, cb2, IRQF_SHARED|IRQF_NO_THREAD, ...);
Both req1 and req2 will be successful.
But if we passed threadirqs in commandline, and executing req1 and req2,
the req2 will fail. The reason is req1 without IRQF_NO_THREAD, then
the IRQF_ONESHOT will be added into flag, while req2 will has no IRQS_ONESHOT
flag, it cause type mismatch case for shared interrupt.
Here add the check of agreeing on NO_THREAD, to make sure the req1/req2
can work well for both scenerio.
Signed-off-by: liu chuansheng <chuansheng.liu@...el.com>
---
kernel/irq/manage.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 4c69326..dda0f26 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -971,7 +971,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
*/
if (!((old->flags & new->flags) & IRQF_SHARED) ||
((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
- ((old->flags ^ new->flags) & IRQF_ONESHOT))
+ ((old->flags ^ new->flags) & IRQF_ONESHOT) ||
+ ((old->flags ^ new->flags) & IRQF_NO_THREAD))
goto mismatch;
/* All handlers must agree on per-cpuness */
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists