Commit 087a4eb55971dfcc8df18312faf9393d0a479f3a
Committed by
Ingo Molnar
1 parent
fd02e6f7ae
Exists in
master
and in
4 other branches
stopmachine: Define __stop_machine when CONFIG_STOP_MACHINE=n
Define dummy __stop_machine() function even when CONFIG_STOP_MACHINE=n. This getcpu-required version of stop_machine() will be used from poke_text_smp(). Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: 2nddept-manager@sdl.hitachi.co.jp Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20101014031030.4100.34156.stgit@ltc236.sdl.hitachi.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 1 changed file with 8 additions and 2 deletions Side-by-side Diff
include/linux/stop_machine.h
| ... | ... | @@ -126,14 +126,20 @@ |
| 126 | 126 | |
| 127 | 127 | #else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
| 128 | 128 | |
| 129 | -static inline int stop_machine(int (*fn)(void *), void *data, | |
| 130 | - const struct cpumask *cpus) | |
| 129 | +static inline int __stop_machine(int (*fn)(void *), void *data, | |
| 130 | + const struct cpumask *cpus) | |
| 131 | 131 | { |
| 132 | 132 | int ret; |
| 133 | 133 | local_irq_disable(); |
| 134 | 134 | ret = fn(data); |
| 135 | 135 | local_irq_enable(); |
| 136 | 136 | return ret; |
| 137 | +} | |
| 138 | + | |
| 139 | +static inline int stop_machine(int (*fn)(void *), void *data, | |
| 140 | + const struct cpumask *cpus) | |
| 141 | +{ | |
| 142 | + return __stop_machine(fn, data, cpus); | |
| 137 | 143 | } |
| 138 | 144 | |
| 139 | 145 | #endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |