diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-03-23 13:28:15 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-03-24 07:15:23 -0400 |
commit | 3aa551c9b4c40018f0e261a178e3d25478dc04a9 (patch) | |
tree | 2a696109273fcc421d774cc8fefa4180331a85ad /include/linux/hardirq.h | |
parent | 80c5520811d3805adcb15c570ea5e2d489fa5d0b (diff) |
genirq: add threaded interrupt handler support
Add support for threaded interrupt handlers:
A device driver can request that its main interrupt handler runs in a
thread. To achive this the device driver requests the interrupt with
request_threaded_irq() and provides additionally to the handler a
thread function. The handler function is called in hard interrupt
context and needs to check whether the interrupt originated from the
device. If the interrupt originated from the device then the handler
can either return IRQ_HANDLED or IRQ_WAKE_THREAD. IRQ_HANDLED is
returned when no further action is required. IRQ_WAKE_THREAD causes
the genirq code to invoke the threaded (main) handler. When
IRQ_WAKE_THREAD is returned handler must have disabled the interrupt
on the device level. This is mandatory for shared interrupt handlers,
but we need to do it as well for obscure x86 hardware where disabling
an interrupt on the IO_APIC level redirects the interrupt to the
legacy PIC interrupt lines.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r-- | include/linux/hardirq.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index f83288347dda..2dfaadbdb2ac 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -105,7 +105,7 @@ | |||
105 | # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET | 105 | # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET |
106 | #endif | 106 | #endif |
107 | 107 | ||
108 | #ifdef CONFIG_SMP | 108 | #if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS) |
109 | extern void synchronize_irq(unsigned int irq); | 109 | extern void synchronize_irq(unsigned int irq); |
110 | #else | 110 | #else |
111 | # define synchronize_irq(irq) barrier() | 111 | # define synchronize_irq(irq) barrier() |