diff options
-rw-r--r-- | arch/i386/kernel/irq.c | 5 | ||||
-rw-r--r-- | include/linux/irq.h | 27 |
2 files changed, 21 insertions, 11 deletions
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 3336cef9605a..16b491703967 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c | |||
@@ -82,6 +82,10 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) | |||
82 | } | 82 | } |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | if (!irq_desc[irq].handle_irq) { | ||
86 | __do_IRQ(irq, regs); | ||
87 | goto out_exit; | ||
88 | } | ||
85 | #ifdef CONFIG_4KSTACKS | 89 | #ifdef CONFIG_4KSTACKS |
86 | 90 | ||
87 | curctx = (union irq_ctx *) current_thread_info(); | 91 | curctx = (union irq_ctx *) current_thread_info(); |
@@ -121,6 +125,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) | |||
121 | #endif | 125 | #endif |
122 | __do_IRQ(irq, regs); | 126 | __do_IRQ(irq, regs); |
123 | 127 | ||
128 | out_exit: | ||
124 | irq_exit(); | 129 | irq_exit(); |
125 | 130 | ||
126 | return 1; | 131 | return 1; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 437f2c635db6..b40771dd114a 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -176,17 +176,6 @@ typedef struct irq_desc irq_desc_t; | |||
176 | */ | 176 | */ |
177 | #include <asm/hw_irq.h> | 177 | #include <asm/hw_irq.h> |
178 | 178 | ||
179 | /* | ||
180 | * Architectures call this to let the generic IRQ layer | ||
181 | * handle an interrupt: | ||
182 | */ | ||
183 | static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) | ||
184 | { | ||
185 | struct irq_desc *desc = irq_desc + irq; | ||
186 | |||
187 | desc->handle_irq(irq, desc, regs); | ||
188 | } | ||
189 | |||
190 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 179 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
191 | 180 | ||
192 | #ifdef CONFIG_GENERIC_HARDIRQS | 181 | #ifdef CONFIG_GENERIC_HARDIRQS |
@@ -324,6 +313,22 @@ handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, | |||
324 | */ | 313 | */ |
325 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); | 314 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); |
326 | 315 | ||
316 | /* | ||
317 | * Architectures call this to let the generic IRQ layer | ||
318 | * handle an interrupt. If the descriptor is attached to an | ||
319 | * irqchip-style controller then we call the ->handle_irq() handler, | ||
320 | * and it calls __do_IRQ() if it's attached to an irqtype-style controller. | ||
321 | */ | ||
322 | static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) | ||
323 | { | ||
324 | struct irq_desc *desc = irq_desc + irq; | ||
325 | |||
326 | if (likely(desc->handle_irq)) | ||
327 | desc->handle_irq(irq, desc, regs); | ||
328 | else | ||
329 | __do_IRQ(irq, regs); | ||
330 | } | ||
331 | |||
327 | /* Handling of unhandled and spurious interrupts: */ | 332 | /* Handling of unhandled and spurious interrupts: */ |
328 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | 333 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, |
329 | int action_ret, struct pt_regs *regs); | 334 | int action_ret, struct pt_regs *regs); |