aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-04-04 21:11:06 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:58 -0400
commitf70316dace2bb99730800d47044acb818c6735f6 (patch)
tree03c0178c8d6c0213a82b800f4a3e00c2da9a4d5c /kernel/cpu.c
parentfc0e474840d1fd96f28fbd76d4f36b80e7ad1cc3 (diff)
generic: use new set_cpus_allowed_ptr function
* Use new set_cpus_allowed_ptr() function added by previous patch, which instead of passing the "newly allowed cpus" cpumask_t arg by value, pass it by pointer: -int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) +int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask) * Modify CPU_MASK_ALL Depends on: [sched-devel]: sched: add new set_cpus_allowed_ptr function Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 2eff3f63abed..2011ad8d2697 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -232,9 +232,9 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen)
232 232
233 /* Ensure that we are not runnable on dying cpu */ 233 /* Ensure that we are not runnable on dying cpu */
234 old_allowed = current->cpus_allowed; 234 old_allowed = current->cpus_allowed;
235 tmp = CPU_MASK_ALL; 235 cpus_setall(tmp);
236 cpu_clear(cpu, tmp); 236 cpu_clear(cpu, tmp);
237 set_cpus_allowed(current, tmp); 237 set_cpus_allowed_ptr(current, &tmp);
238 238
239 p = __stop_machine_run(take_cpu_down, &tcd_param, cpu); 239 p = __stop_machine_run(take_cpu_down, &tcd_param, cpu);
240 240
@@ -268,7 +268,7 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen)
268out_thread: 268out_thread:
269 err = kthread_stop(p); 269 err = kthread_stop(p);
270out_allowed: 270out_allowed:
271 set_cpus_allowed(current, old_allowed); 271 set_cpus_allowed_ptr(current, &old_allowed);
272out_release: 272out_release:
273 cpu_hotplug_done(); 273 cpu_hotplug_done();
274 return err; 274 return err;