diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/softirq.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index ad3295cdded5..ec8fed42a86f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/kthread.h> | 17 | #include <linux/kthread.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/smp.h> | ||
19 | 20 | ||
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
21 | /* | 22 | /* |
@@ -495,3 +496,22 @@ __init int spawn_ksoftirqd(void) | |||
495 | register_cpu_notifier(&cpu_nfb); | 496 | register_cpu_notifier(&cpu_nfb); |
496 | return 0; | 497 | return 0; |
497 | } | 498 | } |
499 | |||
500 | #ifdef CONFIG_SMP | ||
501 | /* | ||
502 | * Call a function on all processors | ||
503 | */ | ||
504 | int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait) | ||
505 | { | ||
506 | int ret = 0; | ||
507 | |||
508 | preempt_disable(); | ||
509 | ret = smp_call_function(func, info, retry, wait); | ||
510 | local_irq_disable(); | ||
511 | func(info); | ||
512 | local_irq_enable(); | ||
513 | preempt_enable(); | ||
514 | return ret; | ||
515 | } | ||
516 | EXPORT_SYMBOL(on_each_cpu); | ||
517 | #endif | ||