diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 01:20:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 01:20:46 -0500 |
commit | 2e6e33bab6e1996a5dec9108fb467b52b841e7a8 (patch) | |
tree | 6b98b15c2fe7899cdeb2453589cdee00f7853492 /arch/powerpc/kernel/irq.c | |
parent | b7ad6d75028d021362221d9b2db19fcff995c3f8 (diff) | |
parent | b88a0b1d5560cf1959c1565617e460a45c688a08 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
[PATCH] powerpc: Add FSL SEC node to documentation
[PATCH] macintosh: tidy-up driver_register() return values
[PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
[PATCH] powerpc: via-pmu warning fix
[PATCH] macintosh: cleanup the use of i2c headers
[PATCH] powerpc: dont allow old RTC to be selected
[PATCH] powerpc: make powerbook_sleep_grackle static
[PATCH] powerpc: Fix warning in add_memory
[PATCH] powerpc: update mailing list addresses
[PATCH] powerpc: Remove calculation of io hole
[PATCH] powerpc: iseries: Add bootargs to /chosen
[PATCH] powerpc: iseries: Add /system-id, /model and /compatible
[PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
[PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
[PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
[PATCH] powerpc: iseries: mf related cleanups
[PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
[PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
[PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
[PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
...
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 32 |
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 |
376 | struct thread_info *softirq_ctx[NR_CPUS]; | 375 | struct thread_info *softirq_ctx[NR_CPUS]; |
@@ -394,10 +393,24 @@ void irq_ctx_init(void) | |||
394 | } | 393 | } |
395 | } | 394 | } |
396 | 395 | ||
396 | static 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 | |||
397 | void do_softirq(void) | 411 | void 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 | } |
417 | EXPORT_SYMBOL(do_softirq); | 430 | EXPORT_SYMBOL(do_softirq); |
418 | 431 | ||
419 | #endif /* CONFIG_IRQSTACKS */ | 432 | #ifdef CONFIG_PPC64 |
420 | |||
421 | static int __init setup_noirqdistrib(char *str) | 433 | static int __init setup_noirqdistrib(char *str) |
422 | { | 434 | { |
423 | distribute_irqs = 0; | 435 | distribute_irqs = 0; |