提交 b738a50a 编写于 作者: T Thomas Gleixner

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: NThomas Gleixner <tglx@linutronix.de>
上级 1082687e
......@@ -68,6 +68,9 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
ret = action->handler(irq, action->dev_id);
trace_irq_handler_exit(irq, action, ret);
if (WARN_ON_ONCE(!irqs_disabled()))
local_irq_disable();
switch (ret) {
case IRQ_WAKE_THREAD:
/*
......@@ -114,7 +117,6 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
if (status & IRQF_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
local_irq_disable();
return retval;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册