diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-02 17:58:19 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:08 -0500 |
commit | b738a50a202639614c98b5763b01bf9201779e50 (patch) | |
tree | fa1f0314db4d1a7d6a482d5845da2ffa1d99dd73 /kernel/irq | |
parent | 1082687e8d6292a61759eb83358e7db39fed1bf4 (diff) |
genirq: Warn when handler enables interrupts
We run all handlers with interrupts disabled and expect them not to
enable them. Warn when we catch one who does.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/handle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 3540a7190122..cdd6fbbe771c 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -68,6 +68,9 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action) | |||
68 | ret = action->handler(irq, action->dev_id); | 68 | ret = action->handler(irq, action->dev_id); |
69 | trace_irq_handler_exit(irq, action, ret); | 69 | trace_irq_handler_exit(irq, action, ret); |
70 | 70 | ||
71 | if (WARN_ON_ONCE(!irqs_disabled())) | ||
72 | local_irq_disable(); | ||
73 | |||
71 | switch (ret) { | 74 | switch (ret) { |
72 | case IRQ_WAKE_THREAD: | 75 | case IRQ_WAKE_THREAD: |
73 | /* | 76 | /* |
@@ -114,7 +117,6 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action) | |||
114 | 117 | ||
115 | if (status & IRQF_SAMPLE_RANDOM) | 118 | if (status & IRQF_SAMPLE_RANDOM) |
116 | add_interrupt_randomness(irq); | 119 | add_interrupt_randomness(irq); |
117 | local_irq_disable(); | ||
118 | 120 | ||
119 | return retval; | 121 | return retval; |
120 | } | 122 | } |