aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/irq.c')
-rw-r--r--arch/parisc/kernel/irq.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 61e51ac85659..810f9cf89e48 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -358,6 +358,29 @@ static inline void stack_overflow_check(struct pt_regs *regs)
358#endif 358#endif
359} 359}
360 360
361#ifdef CONFIG_IRQSTACKS
362DEFINE_PER_CPU(union irq_stack_union, irq_stack_union);
363
364static void execute_on_irq_stack(void *func, unsigned long param1)
365{
366 unsigned long *irq_stack_start;
367 unsigned long irq_stack;
368 int cpu = smp_processor_id();
369
370 irq_stack_start = &per_cpu(irq_stack_union, cpu).stack[0];
371 irq_stack = (unsigned long) irq_stack_start;
372 irq_stack = ALIGN(irq_stack, 16); /* align for stack frame usage */
373
374 BUG_ON(*irq_stack_start); /* report bug if we were called recursive. */
375 *irq_stack_start = 1;
376
377 /* This is where we switch to the IRQ stack. */
378 call_on_stack(param1, func, irq_stack);
379
380 *irq_stack_start = 0;
381}
382#endif /* CONFIG_IRQSTACKS */
383
361/* ONLY called from entry.S:intr_extint() */ 384/* ONLY called from entry.S:intr_extint() */
362void do_cpu_irq_mask(struct pt_regs *regs) 385void do_cpu_irq_mask(struct pt_regs *regs)
363{ 386{
@@ -393,7 +416,12 @@ void do_cpu_irq_mask(struct pt_regs *regs)
393 } 416 }
394#endif 417#endif
395 stack_overflow_check(regs); 418 stack_overflow_check(regs);
419
420#ifdef CONFIG_IRQSTACKS
421 execute_on_irq_stack(&generic_handle_irq, irq);
422#else
396 generic_handle_irq(irq); 423 generic_handle_irq(irq);
424#endif /* CONFIG_IRQSTACKS */
397 425
398 out: 426 out:
399 irq_exit(); 427 irq_exit();