aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/irq.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-11-16 02:53:29 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:50:11 -0500
commite199500c6280aadf98c185db99fd24ab61ebe0c7 (patch)
tree43d7314137408fa18102a3a81384b3cb36e55f1e /arch/powerpc/kernel/irq.c
parent853f828cfd29d3d486d9f4b4df91d99ce509e3b5 (diff)
powerpc: partly merge iseries do_IRQ
Hide some of the iseries details in iSeries_get_irq. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r--arch/powerpc/kernel/irq.c71
1 files changed, 16 insertions, 55 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 5a71ed9612f..9540c454ff0 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -78,10 +78,6 @@ EXPORT_SYMBOL(__irq_offset_value);
78 78
79static int ppc_spurious_interrupts; 79static int ppc_spurious_interrupts;
80 80
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 81#ifdef CONFIG_PPC32
86#define NR_MASK_WORDS ((NR_IRQS + 31) / 32) 82#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
87 83
@@ -195,49 +191,6 @@ void fixup_irqs(cpumask_t map)
195} 191}
196#endif 192#endif
197 193
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) 194void do_IRQ(struct pt_regs *regs)
242{ 195{
243 int irq; 196 int irq;
@@ -286,16 +239,24 @@ void do_IRQ(struct pt_regs *regs)
286 } else 239 } else
287#endif 240#endif
288 __do_IRQ(irq, regs); 241 __do_IRQ(irq, regs);
289 } else 242 } else if (irq != -2)
290#ifdef CONFIG_PPC32 243 /* That's not SMP safe ... but who cares ? */
291 if (irq != -2) 244 ppc_spurious_interrupts++;
292#endif 245
293 /* That's not SMP safe ... but who cares ? */
294 ppc_spurious_interrupts++;
295 irq_exit(); 246 irq_exit();
296}
297 247
298#endif /* CONFIG_PPC_ISERIES */ 248#ifdef CONFIG_PPC_ISERIES
249 {
250 struct paca_struct *lpaca = get_paca();
251
252 if (lpaca->lppaca.int_dword.fields.decr_int) {
253 lpaca->lppaca.int_dword.fields.decr_int = 0;
254 /* Signal a fake decrementer interrupt */
255 timer_interrupt(regs);
256 }
257 }
258#endif
259}
299 260
300void __init init_IRQ(void) 261void __init init_IRQ(void)
301{ 262{