aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 30e74dd6d01b..79e40f00dcb8 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -379,8 +379,11 @@ static cpumask_var_t frozen_cpus;
379 379
380int disable_nonboot_cpus(void) 380int disable_nonboot_cpus(void)
381{ 381{
382 int cpu, first_cpu, error = 0; 382 int cpu, first_cpu, error;
383 383
384 error = stop_machine_create();
385 if (error)
386 return error;
384 cpu_maps_update_begin(); 387 cpu_maps_update_begin();
385 first_cpu = cpumask_first(cpu_online_mask); 388 first_cpu = cpumask_first(cpu_online_mask);
386 /* We take down all of the non-boot CPUs in one shot to avoid races 389 /* We take down all of the non-boot CPUs in one shot to avoid races
@@ -409,6 +412,7 @@ int disable_nonboot_cpus(void)
409 printk(KERN_ERR "Non-boot CPUs are not disabled\n"); 412 printk(KERN_ERR "Non-boot CPUs are not disabled\n");
410 } 413 }
411 cpu_maps_update_done(); 414 cpu_maps_update_done();
415 stop_machine_destroy();
412 return error; 416 return error;
413} 417}
414 418