Re: [PATCH v2] genirq: spurious irq detection for threaded irqs

From: Uwe Kleine-König
Date: Mon Mar 08 2010 - 04:01:49 EST


Hey Thomas,

On Fri, Mar 05, 2010 at 09:16:53PM +0100, Thomas Gleixner wrote:
> On Fri, 5 Mar 2010, Uwe Kleine-König wrote:
>
> > For threaded irqs the top half returns IRQ_WAKE_THREAD. Don't treat
> > that value like IRQ_HANDLED for the spurious check. Instead check the
> > return value of the threaded handler to be able to detect stuck irqs
> > that only have threaded handlers and no top half that can detect the
> > problem.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: Ingo Molnar <mingo@xxxxxxx>
> > ---
> > Hello,
> >
> > changed since v1:
> >
> > - use note_interrupt for the threaded handler's return value, getting rid of
> > note_threaded_interrupt. The only downside is that a threaded handler
> > returning IRQ_WAKE_THREAD remains uncatched now.
>
> Well that's easy to fix.
>
> > + if (!noirqdebug)
> > + note_interrupt(action->irq, desc, action_ret);
>
> note_interrupt(action->irq, desc,
> action_ret & ~IRQ_WAKE_THREAD);
Hmmm, this makes IRQ_WAKE_THREAD be noted as IRQ_NONE.
If this is intended it IMHO deserves a comment. Something like:

/*
* The threaded handler must return IRQ_NONE or IRQ_HANDLED.
* As IRQ_WAKE_THREAD is handled special by note_interrupt
* report it as IRQ_NONE.
*/

Well and with that approach (IRQ_WAKE_THREAD | IRQ_HANDLED) is handled
as IRQ_HANDLED, but I think I start wasting time.

Actually I don't care what we do here, should I resend with action_ret &
~IRQ_WAKE_THREAD and the comment?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
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/