Re: Threaded interrupts for synaptic touchscreen in HTC dream

From: Thomas Gleixner
Date: Wed Jul 22 2009 - 10:19:49 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/