diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-03 05:32:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-03 05:55:12 -0400 |
commit | b9e5b4e6a991a5a6d521f2e20a65835404b4169f (patch) | |
tree | a0ac972faae4bf9133f576d842667bb134190341 /arch/powerpc/kernel/irq.c | |
parent | 5a43a066b11ac2fe84cf67307f20b83bea390f83 (diff) |
[POWERPC] Use the genirq framework
This adapts the generic powerpc interrupt handling code, and all of
the platforms except for the embedded 6xx machines, to use the new
genirq framework.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 525baab45d2d..91248559099a 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -62,28 +62,27 @@ | |||
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | int __irq_offset_value; | 64 | int __irq_offset_value; |
65 | #ifdef CONFIG_PPC32 | ||
66 | EXPORT_SYMBOL(__irq_offset_value); | ||
67 | #endif | ||
68 | |||
69 | static int ppc_spurious_interrupts; | 65 | static int ppc_spurious_interrupts; |
70 | 66 | ||
71 | #ifdef CONFIG_PPC32 | 67 | #ifdef CONFIG_PPC32 |
72 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | 68 | EXPORT_SYMBOL(__irq_offset_value); |
69 | atomic_t ppc_n_lost_interrupts; | ||
73 | 70 | ||
71 | #ifndef CONFIG_PPC_MERGE | ||
72 | #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) | ||
74 | unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; | 73 | unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; |
75 | atomic_t ppc_n_lost_interrupts; | 74 | #endif |
76 | 75 | ||
77 | #ifdef CONFIG_TAU_INT | 76 | #ifdef CONFIG_TAU_INT |
78 | extern int tau_initialized; | 77 | extern int tau_initialized; |
79 | extern int tau_interrupts(int); | 78 | extern int tau_interrupts(int); |
80 | #endif | 79 | #endif |
80 | #endif /* CONFIG_PPC32 */ | ||
81 | 81 | ||
82 | #if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE) | 82 | #if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE) |
83 | extern atomic_t ipi_recv; | 83 | extern atomic_t ipi_recv; |
84 | extern atomic_t ipi_sent; | 84 | extern atomic_t ipi_sent; |
85 | #endif | 85 | #endif |
86 | #endif /* CONFIG_PPC32 */ | ||
87 | 86 | ||
88 | #ifdef CONFIG_PPC64 | 87 | #ifdef CONFIG_PPC64 |
89 | EXPORT_SYMBOL(irq_desc); | 88 | EXPORT_SYMBOL(irq_desc); |
@@ -219,15 +218,19 @@ void do_IRQ(struct pt_regs *regs) | |||
219 | curtp = current_thread_info(); | 218 | curtp = current_thread_info(); |
220 | irqtp = hardirq_ctx[smp_processor_id()]; | 219 | irqtp = hardirq_ctx[smp_processor_id()]; |
221 | if (curtp != irqtp) { | 220 | if (curtp != irqtp) { |
221 | struct irq_desc *desc = irq_desc + irq; | ||
222 | void *handler = desc->handle_irq; | ||
223 | if (handler == NULL) | ||
224 | handler = &__do_IRQ; | ||
222 | irqtp->task = curtp->task; | 225 | irqtp->task = curtp->task; |
223 | irqtp->flags = 0; | 226 | irqtp->flags = 0; |
224 | call___do_IRQ(irq, regs, irqtp); | 227 | call_handle_irq(irq, desc, regs, irqtp, handler); |
225 | irqtp->task = NULL; | 228 | irqtp->task = NULL; |
226 | if (irqtp->flags) | 229 | if (irqtp->flags) |
227 | set_bits(irqtp->flags, &curtp->flags); | 230 | set_bits(irqtp->flags, &curtp->flags); |
228 | } else | 231 | } else |
229 | #endif | 232 | #endif |
230 | __do_IRQ(irq, regs); | 233 | generic_handle_irq(irq, regs); |
231 | } else if (irq != -2) | 234 | } else if (irq != -2) |
232 | /* That's not SMP safe ... but who cares ? */ | 235 | /* That's not SMP safe ... but who cares ? */ |
233 | ppc_spurious_interrupts++; | 236 | ppc_spurious_interrupts++; |
@@ -245,15 +248,6 @@ void do_IRQ(struct pt_regs *regs) | |||
245 | 248 | ||
246 | void __init init_IRQ(void) | 249 | void __init init_IRQ(void) |
247 | { | 250 | { |
248 | #ifdef CONFIG_PPC64 | ||
249 | static int once = 0; | ||
250 | |||
251 | if (once) | ||
252 | return; | ||
253 | |||
254 | once++; | ||
255 | |||
256 | #endif | ||
257 | ppc_md.init_IRQ(); | 251 | ppc_md.init_IRQ(); |
258 | #ifdef CONFIG_PPC64 | 252 | #ifdef CONFIG_PPC64 |
259 | irq_ctx_init(); | 253 | irq_ctx_init(); |