[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-044d408409cc4e1bc75c886e27ca85c270db104c@git.kernel.org>
Date: Mon, 2 Mar 2009 23:15:45 GMT
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
akpm@...ux-foundation.org, a.p.zijlstra@...llo.nl,
tglx@...utronix.de, mingo@...e.hu
Subject: [tip:irq/genirq] genirq: assert that irq handlers are indeed running in hardirq context
Commit-ID: 044d408409cc4e1bc75c886e27ca85c270db104c
Gitweb: http://git.kernel.org/tip/044d408409cc4e1bc75c886e27ca85c270db104c
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Mon, 2 Mar 2009 16:13:32 +0100
Commit: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 3 Mar 2009 00:05:45 +0100
genirq: assert that irq handlers are indeed running in hardirq context
Make sure the genirq layer handlers are indeed running handlers
in hardirq context. That is the genirq expectation and doing
anything else is broken.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Andrew Morton <akpm@...ux-foundation.org>
LKML-Reference: <1236006812.5330.632.camel@...top>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/irq/handle.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 3aba8d1..a2ee682 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -328,6 +328,8 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0;
+ WARN_ONCE(!in_irq(), "BUG: IRQ handler called from non-hardirq context!");
+
if (!(action->flags & IRQF_DISABLED))
local_irq_enable_in_hardirq();
--
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