|| ||Linus Torvalds <firstname.lastname@example.org>|
|| ||Heads-up: device driver irq routine change in 2.5.x|
|| ||Sun, 20 Apr 2003 15:28:54 -0700 (PDT)|
I've added a "irq status" return value to irq handlers, so that the irq
layer in the kernel can automatically notice when some interrupt line is
"screaming" and has irq handlers attached, but none of the handlers can do
anything about it. This can happen with shared PCI irq lines, when an
interrupt gets mis-allocated or when the driver just incorrectly enabled
the interrupt before it attached the proper handler - and somebody else is
already attached to it.
The reason I'm mentioning it here is that the change results in most
device drivers having to change a
if (!(status & MY_IRQFLAG))
if (!(status & MY_IRQFLAG)
(the "IRQ_NONE" return is optional, but preferred: if the handler
literally does nothing, and thinks that the interrupt was for somebody
else, it should preferably return IRQ_NONE to tell the irq layer about it.
HOWEVER - returning IRQ_NONE when you _should_ return IRQ_HANDLED is a
real bug, so it's safer to return IRQ_HANDLED if you're not sure about
It's fairly boring and largely repetitive work, and I only did it for the
drivers I use myself. The good news is that the compiler will warn about
missing conversions, and the conversion is usually pretty easy and
straightforward. Any takers? The code is in the current BK archives, and
should show up in the normal daily snapshots for non-BK users.
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
Kernel-janitor-discuss mailing list