aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c81
1 files changed, 17 insertions, 64 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 5a71ed9612fe..5651032d8706 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -31,7 +31,6 @@
31 * to reduce code space and undefined function references. 31 * to reduce code space and undefined function references.
32 */ 32 */
33 33
34#include <linux/errno.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/threads.h> 35#include <linux/threads.h>
37#include <linux/kernel_stat.h> 36#include <linux/kernel_stat.h>
@@ -44,18 +43,12 @@
44#include <linux/config.h> 43#include <linux/config.h>
45#include <linux/init.h> 44#include <linux/init.h>
46#include <linux/slab.h> 45#include <linux/slab.h>
47#include <linux/pci.h>
48#include <linux/delay.h> 46#include <linux/delay.h>
49#include <linux/irq.h> 47#include <linux/irq.h>
50#include <linux/proc_fs.h>
51#include <linux/random.h>
52#include <linux/seq_file.h> 48#include <linux/seq_file.h>
53#include <linux/cpumask.h> 49#include <linux/cpumask.h>
54#include <linux/profile.h> 50#include <linux/profile.h>
55#include <linux/bitops.h> 51#include <linux/bitops.h>
56#ifdef CONFIG_PPC64
57#include <linux/kallsyms.h>
58#endif
59 52
60#include <asm/uaccess.h> 53#include <asm/uaccess.h>
61#include <asm/system.h> 54#include <asm/system.h>
@@ -66,8 +59,7 @@
66#include <asm/prom.h> 59#include <asm/prom.h>
67#include <asm/ptrace.h> 60#include <asm/ptrace.h>
68#include <asm/machdep.h> 61#include <asm/machdep.h>
69#ifdef CONFIG_PPC64 62#ifdef CONFIG_PPC_ISERIES
70#include <asm/iseries/it_lp_queue.h>
71#include <asm/paca.h> 63#include <asm/paca.h>
72#endif 64#endif
73 65
@@ -78,10 +70,6 @@ EXPORT_SYMBOL(__irq_offset_value);
78 70
79static int ppc_spurious_interrupts; 71static int ppc_spurious_interrupts;
80 72
81#if defined(CONFIG_PPC_ISERIES) && defined(CONFIG_SMP)
82extern void iSeries_smp_message_recv(struct pt_regs *);
83#endif
84
85#ifdef CONFIG_PPC32 73#ifdef CONFIG_PPC32
86#define NR_MASK_WORDS ((NR_IRQS + 31) / 32) 74#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
87 75
@@ -195,49 +183,6 @@ void fixup_irqs(cpumask_t map)
195} 183}
196#endif 184#endif
197 185
198#ifdef CONFIG_PPC_ISERIES
199void do_IRQ(struct pt_regs *regs)
200{
201 struct paca_struct *lpaca;
202
203 irq_enter();
204
205#ifdef CONFIG_DEBUG_STACKOVERFLOW
206 /* Debugging check for stack overflow: is there less than 2KB free? */
207 {
208 long sp;
209
210 sp = __get_SP() & (THREAD_SIZE-1);
211
212 if (unlikely(sp < (sizeof(struct thread_info) + 2048))) {
213 printk("do_IRQ: stack overflow: %ld\n",
214 sp - sizeof(struct thread_info));
215 dump_stack();
216 }
217 }
218#endif
219
220 lpaca = get_paca();
221#ifdef CONFIG_SMP
222 if (lpaca->lppaca.int_dword.fields.ipi_cnt) {
223 lpaca->lppaca.int_dword.fields.ipi_cnt = 0;
224 iSeries_smp_message_recv(regs);
225 }
226#endif /* CONFIG_SMP */
227 if (hvlpevent_is_pending())
228 process_hvlpevents(regs);
229
230 irq_exit();
231
232 if (lpaca->lppaca.int_dword.fields.decr_int) {
233 lpaca->lppaca.int_dword.fields.decr_int = 0;
234 /* Signal a fake decrementer interrupt */
235 timer_interrupt(regs);
236 }
237}
238
239#else /* CONFIG_PPC_ISERIES */
240
241void do_IRQ(struct pt_regs *regs) 186void do_IRQ(struct pt_regs *regs)
242{ 187{
243 int irq; 188 int irq;
@@ -286,16 +231,24 @@ void do_IRQ(struct pt_regs *regs)
286 } else 231 } else
287#endif 232#endif
288 __do_IRQ(irq, regs); 233 __do_IRQ(irq, regs);
289 } else 234 } else if (irq != -2)
290#ifdef CONFIG_PPC32 235 /* That's not SMP safe ... but who cares ? */
291 if (irq != -2) 236 ppc_spurious_interrupts++;
292#endif 237
293 /* That's not SMP safe ... but who cares ? */
294 ppc_spurious_interrupts++;
295 irq_exit(); 238 irq_exit();
296}
297 239
298#endif /* CONFIG_PPC_ISERIES */ 240#ifdef CONFIG_PPC_ISERIES
241 {
242 struct paca_struct *lpaca = get_paca();
243
244 if (lpaca->lppaca.int_dword.fields.decr_int) {
245 lpaca->lppaca.int_dword.fields.decr_int = 0;
246 /* Signal a fake decrementer interrupt */
247 timer_interrupt(regs);
248 }
249 }
250#endif
251}
299 252
300void __init init_IRQ(void) 253void __init init_IRQ(void)
301{ 254{