Commit 3b8967d713d7426e9dd107d065208b84adface91
Committed by
Linus Torvalds
1 parent
e831cbfc1a
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
include/linux/smp.h:on_each_cpu(): switch back to a C function
Revert commit c846ef7deba2 ("include/linux/smp.h:on_each_cpu(): switch back to a macro"). It turns out that the problematic linux/irqflags.h include was fixed within ia64 and mn10300. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David Daney <david.daney@cavium.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 12 additions and 8 deletions Side-by-side Diff
include/linux/smp.h
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | #include <linux/list.h> |
12 | 12 | #include <linux/cpumask.h> |
13 | 13 | #include <linux/init.h> |
14 | +#include <linux/irqflags.h> | |
14 | 15 | |
15 | 16 | extern void cpu_idle(void); |
16 | 17 | |
... | ... | @@ -139,14 +140,17 @@ |
139 | 140 | } |
140 | 141 | #define smp_call_function(func, info, wait) \ |
141 | 142 | (up_smp_call_function(func, info)) |
142 | -#define on_each_cpu(func, info, wait) \ | |
143 | - ({ \ | |
144 | - unsigned long __flags; \ | |
145 | - local_irq_save(__flags); \ | |
146 | - func(info); \ | |
147 | - local_irq_restore(__flags); \ | |
148 | - 0; \ | |
149 | - }) | |
143 | + | |
144 | +static inline int on_each_cpu(smp_call_func_t func, void *info, int wait) | |
145 | +{ | |
146 | + unsigned long flags; | |
147 | + | |
148 | + local_irq_save(flags); | |
149 | + func(info); | |
150 | + local_irq_restore(flags); | |
151 | + return 0; | |
152 | +} | |
153 | + | |
150 | 154 | /* |
151 | 155 | * Note we still need to test the mask even for UP |
152 | 156 | * because we actually can get an empty mask from |