Re: test for "spurious" IRQ ignores possible IRQ_WAKE_THREAD value

From: Cyrill Gorcunov
Date: Thu Sep 17 2009 - 16:18:22 EST


[Robert P. J. Day - Thu, Sep 17, 2009 at 04:08:32PM -0400]
...
| > Hi Robert,
| >
| > It could that IRQ_WAKE_THREAD is just missed here. I suppose it was
| > brough there as thread irq merged. But I think only Thomas know for
| > sure, I definitely miss something :) CC'ed
|
| actually, after a bit more reading, i found this in
| kernel/irq/handle.c:
| ...
| switch (ret) {
| case IRQ_WAKE_THREAD:
| /*
| * Set result to handled so the spurious check
| * does not trigger.
| */
| ret = IRQ_HANDLED;
| ...
|
| so it looks like that value of IRQ_WAKE_THREAD is simply "mapped" to
| IRQ_HANDLED, and perhaps that's done before __report_bad_irq is ever
| called so that that latter routine never sees a value of
| IRQ_WAKE_THREAD. but that's just a guess.
|
| rday
| --

yeah, Thomas just pointed it too :) The note_interrupt is
called after handle_IRQ_event (except a few drivers which
don;t use threaded irq) so it doesnt reach bad irq state
with IRQ_WAKE_THREAD, for now at least.

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