]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/cpu.c
OMAP: dmtimer: enable all timers to be wakeup events
[linux-2.6-omap-h63xx.git] / kernel / cpu.c
index 30e74dd6d01b3e9bbe3f096ad638eb3d1b89fb10..395b6974dc8d56ccb2d91ede756069fe9b10c975 100644 (file)
@@ -281,7 +281,7 @@ int __ref cpu_down(unsigned int cpu)
                goto out;
        }
 
-       cpu_clear(cpu, cpu_active_map);
+       set_cpu_active(cpu, false);
 
        /*
         * Make sure the all cpus did the reschedule and are not
@@ -296,7 +296,7 @@ int __ref cpu_down(unsigned int cpu)
        err = _cpu_down(cpu, 0);
 
        if (cpu_online(cpu))
-               cpu_set(cpu, cpu_active_map);
+               set_cpu_active(cpu, true);
 
 out:
        cpu_maps_update_done();
@@ -333,7 +333,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
                goto out_notify;
        BUG_ON(!cpu_online(cpu));
 
-       cpu_set(cpu, cpu_active_map);
+       set_cpu_active(cpu, true);
 
        /* Now call notifier in preparation. */
        raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
@@ -379,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
@@ -409,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;
 }