Re: [RFC][PATCH] irq: remove IRQF_DISABLED

From: Benjamin Herrenschmidt
Date: Fri Mar 06 2009 - 05:06:35 EST



> No, you don't get unlimited IRQ nesting, at least not on sane archs with
> a decent PIC that does things like what I described above :-)

Note that if unlimited nesting is what you are afraid of, you can do
something along the lines of:

- if (!(action->flags & IRQF_DISABLED))
+ if (arch_nest_irq() && !(action->flags & IRQF_DISABLED))
local_irq_enable_in_hardirq();

With arch_nest_irq() then set to always return 0 if you want, or be
smarter and check how much stack space is left, and return 1 only if
above a reasonable threshold.

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/