trace: set max latency variable to zero on default
[safe/jmp/linux-2.6] / kernel / cpu.c
index 47fff3b..79e40f0 100644 (file)
@@ -269,8 +269,11 @@ out_release:
 
 int __ref cpu_down(unsigned int cpu)
 {
-       int err = 0;
+       int err;
 
+       err = stop_machine_create();
+       if (err)
+               return err;
        cpu_maps_update_begin();
 
        if (cpu_hotplug_disabled) {
@@ -297,6 +300,7 @@ int __ref cpu_down(unsigned int cpu)
 
 out:
        cpu_maps_update_done();
+       stop_machine_destroy();
        return err;
 }
 EXPORT_SYMBOL(cpu_down);
@@ -375,8 +379,11 @@ static cpumask_var_t frozen_cpus;
 
 int disable_nonboot_cpus(void)
 {
-       int cpu, first_cpu, error = 0;
+       int cpu, first_cpu, error;
 
+       error = stop_machine_create();
+       if (error)
+               return error;
        cpu_maps_update_begin();
        first_cpu = cpumask_first(cpu_online_mask);
        /* We take down all of the non-boot CPUs in one shot to avoid races
@@ -405,6 +412,7 @@ int disable_nonboot_cpus(void)
                printk(KERN_ERR "Non-boot CPUs are not disabled\n");
        }
        cpu_maps_update_done();
+       stop_machine_destroy();
        return error;
 }