genirq: Prepare the handling of shared oneshot interrupts
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Feb 2011 23:52:13 +0000 (23:52 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 25 Feb 2011 19:24:21 +0000 (20:24 +0100)
commitb5faba21a6805c33b40e258d36f57997ee1de131
treec84ef3357ecd6e1b1cfda623136529db0e5fab6f
parent1204e95689f9fbd245a4ce5c1b0cd0a9b77f8d25
genirq: Prepare the handling of shared oneshot interrupts

For level type interrupts we need to track how many threads are on
flight to avoid useless interrupt storms when not all thread handlers
have finished yet. Keep track of the woken threads and only unmask
when there are no more threads in flight.

Yes, I'm lazy and using a bitfield. But not only because I'm lazy, the
main reason is that it's way simpler than using a refcount. A refcount
based solution would need to keep track of various things like
crashing the irq thread, spurious interrupts coming in,
disables/enables, free_irq() and some more. The bitfield keeps the
tracking simple and makes things just work. It's also nicely confined
to the thread code pathes and does not require additional checks all
over the place.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110223234956.388095876@linutronix.de>
include/linux/interrupt.h
include/linux/irqdesc.h
kernel/irq/handle.c
kernel/irq/manage.c
This page took 0.026568 seconds and 5 git commands to generate.