diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-03-22 19:13:54 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-03-22 19:13:54 -0500 |
| commit | f01c18456993bab43067b678f56c87ca954aa43b (patch) | |
| tree | 3e0cd0cdf1a57618202b46a7126125902e3ab832 /kernel/softirq.c | |
| parent | 949ec2c8e6b7b89179b85baf6309c009e1a1b951 (diff) | |
| parent | 1c2e02750b992703a8a18634e08b04353face243 (diff) | |
Merge branch 'master'
Diffstat (limited to 'kernel/softirq.c')
| -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 @@ #include <linux/cpu.h> #include <linux/kthread.h> #include <linux/rcupdate.h> +#include <linux/smp.h> #include <asm/irq.h> /* @@ -495,3 +496,22 @@ __init int spawn_ksoftirqd(void) register_cpu_notifier(&cpu_nfb); return 0; } + +#ifdef CONFIG_SMP +/* + * Call a function on all processors + */ +int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait) +{ + int ret = 0; + + preempt_disable(); + ret = smp_call_function(func, info, retry, wait); + local_irq_disable(); + func(info); + local_irq_enable(); + preempt_enable(); + return ret; +} +EXPORT_SYMBOL(on_each_cpu); +#endif |
