The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Trilok Soni <soni.trilok@gmail.com>, Pavel Machek <pavel@ucw.cz>,
	Brian Swetland <swetland@google.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	m.szyprowski@samsung.com, t.fujak@samsung.com,
	kyungmin.park@samsung.com, David Brownell <david-b@pacbell.net>,
	Daniel Ribeiro <drwyrm@gmail.com>,
	arve@android.com, Barry Song <21cnbao@gmail.com>
Subject: Re: [RFC patch 1/3] genirq: Add oneshot support
Date: Sat, 15 Aug 2009 22:00:45 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0908152150370.1283@localhost.localdomain> (raw)
In-Reply-To: <20090815201354.835D3526EA5@mailhub.coreip.homeip.net>

Dmitry,

On Sat, 15 Aug 2009, Dmitry Torokhov wrote:
> Hi Thomas,
> 
> On Sat, Aug 15, 2009 at 05:48:33PM -0000, Thomas Gleixner wrote:
> >  
> >  /**
> > + *	irq_oneshot_primary_handler - Handle oneshot interrupt primary handler
> > + *	@irq:		the interrupt number
> > + *	@dev_id:	cookie to identify the device
> > + *
> > + *	For oneshot interrupts which keep the interrupt line masked
> > + *	until the threaded handler has been executed, the only
> > + *	functionality of the primary handler is to return
> > + *	IRQ_WAKE_THREAD. This is the generic implementation which
> > + *	avoids lots of duplicates all over the place
> > + */
> > +irqreturn_t irq_oneshot_primary_handler(int irq, void *dev_id)
> > +{
> > +	return IRQ_WAKE_THREAD;
> > +}
> > +EXPORT_SYMBOL_GPL(irq_oneshot_primary_handler);
> 
> This kind of handler is useful not only for users of oneshot interrupts
> but also other drivers using threaded IRQs. So maybe we should rename it
> to default_threaded_irq_handler() and instead of exporting it simply
> have it installed automatically when driver requests NULL in place of
> IRQ handler in request_threaded_irq()?

Good point. If handler == NULL and thread_fn != NULL. That's
reasonable. Will rework.
 
> Also, if IRQF_ONESHOT definition would make into mainline sooner than
> later that would be great - then I'd be able to put all the drivers that
> will end up using it into my next branch and not be concerned of
> breaking linux-next.

Hmm, the ONESHOT definition alone won't give you the testing you
want. If all involved folks agree on the patch series I can commit it
into a standalone branch which can be pulled into the development
branches of interested driver maintainers. Git will deal with that
just fine.

@Andrew: any opinion on that ?

Thanks,

	tglx

  reply	other threads:[~2009-08-15 20:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-15 17:48 [RFC patch 0/3] Support for irq chips on slow busses (i2c, spi) - V2 Thomas Gleixner
2009-08-15 17:48 ` [RFC patch 1/3] genirq: Add oneshot support Thomas Gleixner
2009-08-15 19:42   ` Dmitry Torokhov
2009-08-15 20:00     ` Thomas Gleixner [this message]
2009-08-15 17:48 ` [RFC patch 2/3] genirq: Add buslock support Thomas Gleixner
2009-08-15 17:48 ` [RFC patch 3/3] genirq: Support nested threaded irq handling Thomas Gleixner
2009-08-15 22:19 ` [RFC patch 0/3] Support for irq chips on slow busses (i2c, spi) - V2 Pavel Machek
2009-08-24 19:38 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2009-08-13 19:40 [RFC patch 0/3] Support for irq chips on slow busses (i2c, spi) Thomas Gleixner
2009-08-13 19:40 ` [RFC patch 1/3] genirq: Add oneshot support Thomas Gleixner

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=alpine.LFD.2.00.0908152150370.1283@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arve@android.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=david-b@pacbell.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=drwyrm@gmail.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=soni.trilok@gmail.com \
    --cc=swetland@google.com \
    --cc=t.fujak@samsung.com \
    /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