aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/stop_machine.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 18af011c13af..36c2c7284eb3 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -17,13 +17,12 @@
17 * @data: the data ptr for the @fn() 17 * @data: the data ptr for the @fn()
18 * @cpu: if @cpu == n, run @fn() on cpu n 18 * @cpu: if @cpu == n, run @fn() on cpu n
19 * if @cpu == NR_CPUS, run @fn() on any cpu 19 * if @cpu == NR_CPUS, run @fn() on any cpu
20 * if @cpu == ALL_CPUS, run @fn() first on the calling cpu, and then 20 * if @cpu == ALL_CPUS, run @fn() on every online CPU.
21 * concurrently on all the other cpus
22 * 21 *
23 * Description: This causes a thread to be scheduled on every other cpu, 22 * Description: This causes a thread to be scheduled on every cpu,
24 * each of which disables interrupts, and finally interrupts are disabled 23 * each of which disables interrupts. The result is that noone is
25 * on the current CPU. The result is that noone is holding a spinlock 24 * holding a spinlock or inside any other preempt-disabled region when
26 * or inside any other preempt-disabled region when @fn() runs. 25 * @fn() runs.
27 * 26 *
28 * This can be thought of as a very heavy write lock, equivalent to 27 * This can be thought of as a very heavy write lock, equivalent to
29 * grabbing every spinlock in the kernel. */ 28 * grabbing every spinlock in the kernel. */
@@ -35,13 +34,10 @@ int stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu);
35 * @data: the data ptr for the @fn 34 * @data: the data ptr for the @fn
36 * @cpu: the cpu to run @fn on (or any, if @cpu == NR_CPUS. 35 * @cpu: the cpu to run @fn on (or any, if @cpu == NR_CPUS.
37 * 36 *
38 * Description: This is a special version of the above, which returns the 37 * Description: This is a special version of the above, which assumes cpus
39 * thread which has run @fn(): kthread_stop will return the return value 38 * won't come or go while it's being called. Used by hotplug cpu.
40 * of @fn(). Used by hotplug cpu.
41 */ 39 */
42struct task_struct *__stop_machine_run(int (*fn)(void *), void *data, 40int __stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu);
43 unsigned int cpu);
44
45#else 41#else
46 42
47static inline int stop_machine_run(int (*fn)(void *), void *data, 43static inline int stop_machine_run(int (*fn)(void *), void *data,