summaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-07-28 12:16:30 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-07-28 12:16:30 +1000
commiteeec4fad963490821348a331cca6102ae1c4a7a3 (patch)
tree163a7d9414d719fccac096d1ba822416f705b397 /kernel/cpu.c
parent04321587584272f4e8b9818f319f40caf8eeee13 (diff)
downloadblackbird-op-linux-eeec4fad963490821348a331cca6102ae1c4a7a3.tar.gz
blackbird-op-linux-eeec4fad963490821348a331cca6102ae1c4a7a3.zip
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>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 53cf508f975a..29510d68338a 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -248,8 +248,9 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
cpus_setall(tmp);
cpu_clear(cpu, tmp);
set_cpus_allowed_ptr(current, &tmp);
+ tmp = cpumask_of_cpu(cpu);
- err = __stop_machine_run(take_cpu_down, &tcd_param, cpu);
+ err = __stop_machine(take_cpu_down, &tcd_param, &tmp);
if (err) {
/* CPU didn't die: tell everyone. Can't complain. */
if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED | mod,
OpenPOWER on IntegriCloud