From: Peter Zijlstra Date: Mon, 2 Mar 2009 15:13:32 +0000 (+0100) Subject: genirq: assert that irq handlers are indeed running in hardirq context X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=044d408409cc4e1bc75c886e27ca85c270db104c;p=linux-beck.git 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 Cc: Andrew Morton LKML-Reference: <1236006812.5330.632.camel@laptop> Signed-off-by: Ingo Molnar --- diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 3aba8d12f328..a2ee682bca2e 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();