|
@@ -114,23 +114,11 @@ static inline int try_stop_cpus(const struct cpumask *cpumask,
|
|
* grabbing every spinlock in the kernel. */
|
|
* grabbing every spinlock in the kernel. */
|
|
int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus);
|
|
int stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus);
|
|
|
|
|
|
-/**
|
|
|
|
- * __stop_machine: freeze the machine on all CPUs and run this function
|
|
|
|
- * @fn: the function to run
|
|
|
|
- * @data: the data ptr for the @fn
|
|
|
|
- * @cpus: the cpus to run the @fn() on (NULL = any online cpu)
|
|
|
|
- *
|
|
|
|
- * Description: This is a special version of the above, which assumes cpus
|
|
|
|
- * won't come or go while it's being called. Used by hotplug cpu.
|
|
|
|
- */
|
|
|
|
-int __stop_machine(int (*fn)(void *), void *data, const struct cpumask *cpus);
|
|
|
|
-
|
|
|
|
int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data,
|
|
int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data,
|
|
const struct cpumask *cpus);
|
|
const struct cpumask *cpus);
|
|
-
|
|
|
|
#else /* CONFIG_STOP_MACHINE && CONFIG_SMP */
|
|
#else /* CONFIG_STOP_MACHINE && CONFIG_SMP */
|
|
|
|
|
|
-static inline int __stop_machine(int (*fn)(void *), void *data,
|
|
|
|
|
|
+static inline int stop_machine(int (*fn)(void *), void *data,
|
|
const struct cpumask *cpus)
|
|
const struct cpumask *cpus)
|
|
{
|
|
{
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
@@ -141,16 +129,10 @@ static inline int __stop_machine(int (*fn)(void *), void *data,
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-static inline int stop_machine(int (*fn)(void *), void *data,
|
|
|
|
- const struct cpumask *cpus)
|
|
|
|
-{
|
|
|
|
- return __stop_machine(fn, data, cpus);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static inline int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data,
|
|
static inline int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data,
|
|
const struct cpumask *cpus)
|
|
const struct cpumask *cpus)
|
|
{
|
|
{
|
|
- return __stop_machine(fn, data, cpus);
|
|
|
|
|
|
+ return stop_machine(fn, data, cpus);
|
|
}
|
|
}
|
|
|
|
|
|
#endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */
|
|
#endif /* CONFIG_STOP_MACHINE && CONFIG_SMP */
|