diff options
| -rw-r--r-- | include/linux/smp.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index e6564c1dc552..c8488763277f 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
| 12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
| 13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 14 | #include <linux/irqflags.h> | ||
| 14 | 15 | ||
| 15 | extern void cpu_idle(void); | 16 | extern void cpu_idle(void); |
| 16 | 17 | ||
| @@ -139,13 +140,17 @@ static inline int up_smp_call_function(smp_call_func_t func, void *info) | |||
| 139 | } | 140 | } |
| 140 | #define smp_call_function(func, info, wait) \ | 141 | #define smp_call_function(func, info, wait) \ |
| 141 | (up_smp_call_function(func, info)) | 142 | (up_smp_call_function(func, info)) |
| 142 | #define on_each_cpu(func,info,wait) \ | 143 | |
| 143 | ({ \ | 144 | static inline int on_each_cpu(smp_call_func_t func, void *info, int wait) |
| 144 | local_irq_disable(); \ | 145 | { |
| 145 | func(info); \ | 146 | unsigned long flags; |
| 146 | local_irq_enable(); \ | 147 | |
| 147 | 0; \ | 148 | local_irq_save(flags); |
| 148 | }) | 149 | func(info); |
| 150 | local_irq_restore(flags); | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 149 | /* | 154 | /* |
| 150 | * Note we still need to test the mask even for UP | 155 | * Note we still need to test the mask even for UP |
| 151 | * because we actually can get an empty mask from | 156 | * because we actually can get an empty mask from |
