Re: [patch 1/2] genirq: Run irq handlers with interrupts disabled

Thomas Gleixner
2010-03-26T13:07:46Z

On Fri, 26 Mar 2010, Andi Kleen wrote:

> > Drivers for whacky hardware still can reenable them in the handler
> > itself, if the need arises. (They do already due to lockdep)
>
> Can you please explain that lockdep reference?
> I don't think lockdep really forces on interrupts, does it?

Lockdep forces interrupts off. It yells at anyone enabling irqs in the
handler. The ones which do that have been annotated with
local_irq_enable_in_hardirq(), which is a nop for lockdep.

> BTW the one problem I have with this patchkit is that it's clearly
> no stable candidate and I was hoping for a stable fix too.
> Any chance to at least approve my original patch for .32/.33 only?

Why not simply force IRQF_DISABLED for all MSI interrupts. That still
allows nesting for non MSI ones, but it limits the chance of throwing
up reasonably well. That's a two liner.

Can you please test whether it resolves the issue at hand ?

Thanks,

tglx
---
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index eb6078c..1d55e92 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -735,6 +735,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
if (new->flags & IRQF_ONESHOT)
desc->status |= IRQ_ONESHOT;

+ if (desc->msi_desc)
+ new->flags |= IRQF_DISABLED;
+
if (!(desc->status & IRQ_NOAUTOEN)) {
desc->depth = 0;
desc->status &= ~IRQ_DISABLED;