RE: 2.6.9-rc2-mm4 e100 enable_irq unbalanced from

From: Alan Cox
Date: Wed Sep 29 2004 - 08:19:59 EST


On Mer, 2004-09-29 at 04:06, Paul Fulghum wrote:
> It is interesting behavior for request_irq.
> I don't know if it was planned that way,
> or is an unexpected artifact.
> It makes the effect of the disable_irq call
> indeterminate (to the driver) if made
> before registering with the interrupt.

Essentially the code believes that you cannot use
disable_irq() until you've requested it. You can
however in 2.6 call request_irq with local interrupts
disabled.

We have a fundamental API design problem going back to
day one. The API IMHO should really be

struct irq *irq;
irq = allocate_irq(5, ...)
enable_irq(irq);

That would fix
- Drivers failing to load/init under freak low memory situations
- How to cleanly report irqs (because each irq can now have ->name)
- How to tell which shared irq users are disabled/enabled for the irq
poll/recovery code I posted (and is testing in -mm).

Unfortunately it would require changes to rather a lot of code.

-
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/