The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] genirq: spurious irq detection for threaded irqs
Date: Fri, 5 Mar 2010 08:58:39 +0100	[thread overview]
Message-ID: <20100305075839.GA15810@pengutronix.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1003042323090.2014@localhost.localdomain>

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

  reply	other threads:[~2010-03-05  7:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 10:30 [PATCH] genirq: spurious irq detection for threaded irqs Uwe Kleine-König
2010-03-04 22:26 ` Thomas Gleixner
2010-03-05  7:58   ` Uwe Kleine-König [this message]
2010-03-05 15:18   ` [PATCH v2] " Uwe Kleine-König
2010-03-05 20:16     ` Thomas Gleixner
2010-03-08  9:01       ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100305075839.GA15810@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox