From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: Threaded interrupts for synaptic touchscreen in HTC dream Date: Wed, 22 Jul 2009 16:18:26 +0200 (CEST) Message-ID: References: <5d5443650907151033w36008b71pe4b32bcea9489b75@mail.gmail.com> <20090721105924.GK4133@elf.ucw.cz> <20090721113642.GC13286@sirena.org.uk> <5d5443650907210518i6ee4df1evdc04d9ae9453707c@mail.gmail.com> <5d5443650907210530x4aaa03d6gd47ef5f79a3ef8a4@mail.gmail.com> <20090721124933.GA5668@rakim.wolfsonmicro.main> <20090721160436.GD4352@dtor-d630.eng.vmware.com> <20090721222547.GA1948@opensource.wolfsonmicro.com> <20090722121800.GD21171@rakim.wolfsonmicro.main> <1248269443.27058.1449.camel@twins> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1248269443.27058.1449.camel@twins> Sender: linux-input-owner@vger.kernel.org To: Peter Zijlstra Cc: Mark Brown , Dmitry Torokhov , Trilok Soni , Pavel Machek , Arve Hj?nnev?g , kernel list , Brian Swetland , linux-input@vger.kernel.org, Andrew Morton , linux-i2c@vger.kernel.org, Joonyoung Shim , m.szyprowski@samsung.com, t.fujak@samsung.com, kyungmin.park@samsung.com, David Brownell , Daniel Ribeiro List-Id: linux-i2c@vger.kernel.org On Wed, 22 Jul 2009, Peter Zijlstra wrote: > On Wed, 2009-07-22 at 14:58 +0200, Thomas Gleixner wrote: > > Thinking further we should even provide some infrastructure for that > > in the common code which would handle the completion and attach it to > > the interrupts in question, so the driver authors would not have to > > deal with that at all. They just would return from thread_fn and let > > the generic code deal with the notification. The notification has to > > be set up by the interrupt controller code. That way you can use the > > same device driver code w/o knowledge of the interrupt controller > > implementation it is attached to. > > Wouldn't it be better if we could express the nesting property from > within genirq, so that we can do things like: > > register_chip_nested(parent_chip, parent_irq, slave_chip); > > And let genirq set-up the needed magic to make the nesting work. Good point. > Also, how important is it that subhandler1..n run in their own thread? > That is, can't we let them run from the thread that is otherwise waiting > for the completino anyway? In those cases I suspect we can do that. I guess there can be async handling as well: the main handler queries the pending interrupts, masks them, wakes the handlers and returns. No wait for all threads to finish necessary before unmasking the main interrupt line. Thanks, tglx