Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eeec4f...
Commit: eeec4fad963490821348a331cca6102ae1c4a7a3
Parent: 04321587584272f4e8b9818f319f40caf8eeee13
Author: Rusty Russell <rusty@rustcorp.com.au>
AuthorDate: Mon Jul 28 12:16:30 2008 -0500
Committer: Rusty Russell <rusty@rustcorp.com.au>
CommitDate: Mon Jul 28 12:16:30 2008 +1000
stop_machine(): stop_machine_run() changed to use cpu mask
Instead of a "cpu" arg with magic values NR_CPUS (any cpu) and ~0 (all
cpus), pass a cpumask_t. Allow NULL for the common case (where we
don't care which CPU the function is run on): temporary cpumask_t's
are usually considered bad for stack space.
This deprecates stop_machine_run, to be removed soon when all the
callers are dead.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
include/linux/stop_machine.h | 34 ++++++++++++++++++++++++----------
kernel/cpu.c | 3 ++-
kernel/stop_machine.c | 27 +++++++++++++--------------
3 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 36c2c72..f1cb0ba 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -5,19 +5,19 @@
(and more). So the "read" side to such a lock is anything which
diables preeempt. */
#include <linux/cpu.h>
+#include <linux/cpumask.h>
#include <asm/system.h>
#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP)
+/* Deprecated, but useful for transition. */
#define ALL_CPUS ~0U
/**
- * stop_machine_run: freeze the machine on all CPUs and run this function
+ * stop_machine: freeze the machine on all CPUs and run this function
* @fn: the function to run
* @data: the data ptr for the @fn()
- * @cpu: if @cpu == n, run @fn() on cpu n
- * if @cpu == NR_CPUS, run @fn() on any cpu
- * if @cpu == ALL_CPUS, run ...