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.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index d1fffce86df9..24dc8117b822 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * arch/ppc/kernel/irq.c
3 *
4 * Derived from arch/i386/kernel/irq.c 2 * Derived from arch/i386/kernel/irq.c
5 * Copyright (C) 1992 Linus Torvalds 3 * Copyright (C) 1992 Linus Torvalds
6 * Adapted from arch/i386 by Gary Thomas 4 * Adapted from arch/i386 by Gary Thomas
@@ -371,6 +369,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq)
371 return NO_IRQ; 369 return NO_IRQ;
372 370
373} 371}
372#endif /* CONFIG_PPC64 */
374 373
375#ifdef CONFIG_IRQSTACKS 374#ifdef CONFIG_IRQSTACKS
376struct thread_info *softirq_ctx[NR_CPUS]; 375struct thread_info *softirq_ctx[NR_CPUS];
@@ -394,10 +393,24 @@ void irq_ctx_init(void)
394 } 393 }
395} 394}
396 395
396static inline void do_softirq_onstack(void)
397{
398 struct thread_info *curtp, *irqtp;
399
400 curtp = current_thread_info();
401 irqtp = softirq_ctx[smp_processor_id()];
402 irqtp->task = curtp->task;
403 call_do_softirq(irqtp);
404 irqtp->task = NULL;
405}
406
407#else
408#define do_softirq_onstack() __do_softirq()
409#endif /* CONFIG_IRQSTACKS */
410
397void do_softirq(void) 411void do_softirq(void)
398{ 412{
399 unsigned long flags; 413 unsigned long flags;
400 struct thread_info *curtp, *irqtp;
401 414
402 if (in_interrupt()) 415 if (in_interrupt())
403 return; 416 return;
@@ -405,19 +418,18 @@ void do_softirq(void)
405 local_irq_save(flags); 418 local_irq_save(flags);
406 419
407 if (local_softirq_pending()) { 420 if (local_softirq_pending()) {
408 curtp = current_thread_info(); 421 account_system_vtime(current);
409 irqtp = softirq_ctx[smp_processor_id()]; 422 local_bh_disable();
410 irqtp->task = curtp->task; 423 do_softirq_onstack();
411 call_do_softirq(irqtp); 424 account_system_vtime(current);
412 irqtp->task = NULL; 425 __local_bh_enable();
413 } 426 }
414 427
415 local_irq_restore(flags); 428 local_irq_restore(flags);
416} 429}
417EXPORT_SYMBOL(do_softirq); 430EXPORT_SYMBOL(do_softirq);
418 431
419#endif /* CONFIG_IRQSTACKS */ 432#ifdef CONFIG_PPC64
420
421static int __init setup_noirqdistrib(char *str) 433static int __init setup_noirqdistrib(char *str)
422{ 434{
423 distribute_irqs = 0; 435 distribute_irqs = 0;