diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/stop_machine.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 14d3524d1274..e0f2da25d751 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -126,15 +126,19 @@ int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | |||
126 | */ | 126 | */ |
127 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); | 127 | int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus); |
128 | 128 | ||
129 | int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data, | ||
130 | const struct cpumask *cpus); | ||
131 | |||
129 | #else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ | 132 | #else /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
130 | 133 | ||
131 | static inline int __stop_machine(int (*fn)(void *), void *data, | 134 | static inline int __stop_machine(int (*fn)(void *), void *data, |
132 | const struct cpumask *cpus) | 135 | const struct cpumask *cpus) |
133 | { | 136 | { |
137 | unsigned long flags; | ||
134 | int ret; | 138 | int ret; |
135 | local_irq_disable(); | 139 | local_irq_save(flags); |
136 | ret = fn(data); | 140 | ret = fn(data); |
137 | local_irq_enable(); | 141 | local_irq_restore(flags); |
138 | return ret; | 142 | return ret; |
139 | } | 143 | } |
140 | 144 | ||
@@ -144,5 +148,11 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
144 | return __stop_machine(fn, data, cpus); | 148 | return __stop_machine(fn, data, cpus); |
145 | } | 149 | } |
146 | 150 | ||
151 | static inline int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data, | ||
152 | const struct cpumask *cpus) | ||
153 | { | ||
154 | return __stop_machine(fn, data, cpus); | ||
155 | } | ||
156 | |||
147 | #endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ | 157 | #endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */ |
148 | #endif /* _LINUX_STOP_MACHINE */ | 158 | #endif /* _LINUX_STOP_MACHINE */ |