diff options
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
| -rw-r--r-- | arch/powerpc/kernel/irq.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index d1fffce86df9..771a59cbd213 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 |
| @@ -137,9 +135,8 @@ skip: | |||
| 137 | #ifdef CONFIG_TAU_INT | 135 | #ifdef CONFIG_TAU_INT |
| 138 | if (tau_initialized){ | 136 | if (tau_initialized){ |
| 139 | seq_puts(p, "TAU: "); | 137 | seq_puts(p, "TAU: "); |
| 140 | for (j = 0; j < NR_CPUS; j++) | 138 | for_each_online_cpu(j) |
| 141 | if (cpu_online(j)) | 139 | seq_printf(p, "%10u ", tau_interrupts(j)); |
| 142 | seq_printf(p, "%10u ", tau_interrupts(j)); | ||
| 143 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); | 140 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); |
| 144 | } | 141 | } |
| 145 | #endif | 142 | #endif |
| @@ -371,6 +368,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq) | |||
| 371 | return NO_IRQ; | 368 | return NO_IRQ; |
| 372 | 369 | ||
| 373 | } | 370 | } |
| 371 | #endif /* CONFIG_PPC64 */ | ||
| 374 | 372 | ||
| 375 | #ifdef CONFIG_IRQSTACKS | 373 | #ifdef CONFIG_IRQSTACKS |
| 376 | struct thread_info *softirq_ctx[NR_CPUS]; | 374 | struct thread_info *softirq_ctx[NR_CPUS]; |
| @@ -394,10 +392,24 @@ void irq_ctx_init(void) | |||
| 394 | } | 392 | } |
| 395 | } | 393 | } |
| 396 | 394 | ||
| 395 | static inline void do_softirq_onstack(void) | ||
| 396 | { | ||
| 397 | struct thread_info *curtp, *irqtp; | ||
| 398 | |||
| 399 | curtp = current_thread_info(); | ||
| 400 | irqtp = softirq_ctx[smp_processor_id()]; | ||
| 401 | irqtp->task = curtp->task; | ||
| 402 | call_do_softirq(irqtp); | ||
| 403 | irqtp->task = NULL; | ||
| 404 | } | ||
| 405 | |||
| 406 | #else | ||
| 407 | #define do_softirq_onstack() __do_softirq() | ||
| 408 | #endif /* CONFIG_IRQSTACKS */ | ||
| 409 | |||
| 397 | void do_softirq(void) | 410 | void do_softirq(void) |
| 398 | { | 411 | { |
| 399 | unsigned long flags; | 412 | unsigned long flags; |
| 400 | struct thread_info *curtp, *irqtp; | ||
| 401 | 413 | ||
| 402 | if (in_interrupt()) | 414 | if (in_interrupt()) |
| 403 | return; | 415 | return; |
| @@ -405,19 +417,18 @@ void do_softirq(void) | |||
| 405 | local_irq_save(flags); | 417 | local_irq_save(flags); |
| 406 | 418 | ||
| 407 | if (local_softirq_pending()) { | 419 | if (local_softirq_pending()) { |
| 408 | curtp = current_thread_info(); | 420 | account_system_vtime(current); |
| 409 | irqtp = softirq_ctx[smp_processor_id()]; | 421 | local_bh_disable(); |
| 410 | irqtp->task = curtp->task; | 422 | do_softirq_onstack(); |
| 411 | call_do_softirq(irqtp); | 423 | account_system_vtime(current); |
| 412 | irqtp->task = NULL; | 424 | __local_bh_enable(); |
| 413 | } | 425 | } |
| 414 | 426 | ||
| 415 | local_irq_restore(flags); | 427 | local_irq_restore(flags); |
| 416 | } | 428 | } |
| 417 | EXPORT_SYMBOL(do_softirq); | 429 | EXPORT_SYMBOL(do_softirq); |
| 418 | 430 | ||
| 419 | #endif /* CONFIG_IRQSTACKS */ | 431 | #ifdef CONFIG_PPC64 |
| 420 | |||
| 421 | static int __init setup_noirqdistrib(char *str) | 432 | static int __init setup_noirqdistrib(char *str) |
| 422 | { | 433 | { |
| 423 | distribute_irqs = 0; | 434 | distribute_irqs = 0; |
