Prev: dump/restore not supported for ext4
Next: Stage: hv: Corrected all header comments to follow kernel-doc format-CORRECTED
From: Thomas Gleixner on 4 Mar 2010 17:30 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. Thanks, tglx
From: Uwe Kleine-König on 5 Mar 2010 03:00 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(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Thomas Gleixner on 5 Mar 2010 15:20 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(a)pengutronix.de> > Cc: Thomas Gleixner <tglx(a)linutronix.de> > Cc: Ingo Molnar <mingo(a)elte.hu> > --- > 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); Thanks, tglx
From: Uwe Kleine-König on 8 Mar 2010 04:10
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(a)pengutronix.de> > > Cc: Thomas Gleixner <tglx(a)linutronix.de> > > Cc: Ingo Molnar <mingo(a)elte.hu> > > --- > > 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(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |