lkml.org 
[lkml]   [2010]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] genirq: spurious irq detection for threaded irqs
On Thu, Mar 04, 2010 at 11:26:20PM +0100, Thomas Gleixner wrote:
> On Thu, 4 Mar 2010, Uwe Kleine-König wrote:
> > -void note_interrupt(unsigned int irq, struct irq_desc *desc,
> > - irqreturn_t action_ret)
> > +void note_threaded_interrupt(unsigned int irq, struct irq_desc *desc,
> > + irqreturn_t action_ret)
> > {
> > if (unlikely(action_ret != IRQ_HANDLED)) {
> > /*
> > @@ -262,6 +262,19 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
> > desc->irqs_unhandled = 0;
> > }
> >
> > +void note_interrupt(unsigned int irq, struct irq_desc *desc,
> > + irqreturn_t action_ret)
> > +{
> > + if (action_ret == IRQ_WAKE_THREAD)
> > + /* handled in irq_thread() when the threaded handler returns */
> > + return;
> > +
> > + /* don't report IRQ_WAKE_THREAD | IRQ_HANDLED as bogus return value */
> > + action_ret &= ~IRQ_WAKE_THREAD;
> > +
> > + note_threaded_interrupt(irq, desc, action_ret);
> > +}
> > +
>
> We don't need an extra function for that. A simple
>
> if (action_ret & IRQ_WAKE_THREAD)
> return;
>
> in note_interrupt() is sufficient to cover everything.
With your suggestion if action_ret == IRQ_WAKE_THREAD | IRQ_HANDLED then
the IRQ_HANDLED bit doesn't get noted. Does that matter?

But still you're right about the extra function. Assuming a threaded
handler doesn't return IRQ_WAKE_THREAD my note_interrupt does the same
as note_threaded_interrupt.

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-03-05 09:01    [W:0.099 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site