]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/process.c
Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / process.c
index 62fc75b67e450cb368e41c4bf34685f0cbe069bd..ca989158e847936e893c7110b4a328ea1549d452 100644 (file)
@@ -328,7 +328,7 @@ void stop_this_cpu(void *dummy)
        /*
         * Remove this CPU:
         */
-       cpu_clear(smp_processor_id(), cpu_online_map);
+       set_cpu_online(smp_processor_id(), false);
        disable_local_APIC();
 
        for (;;) {
@@ -478,12 +478,13 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
        return 1;
 }
 
-static cpumask_t c1e_mask = CPU_MASK_NONE;
+static cpumask_var_t c1e_mask;
 static int c1e_detected;
 
 void c1e_remove_cpu(int cpu)
 {
-       cpu_clear(cpu, c1e_mask);
+       if (c1e_mask != NULL)
+               cpumask_clear_cpu(cpu, c1e_mask);
 }
 
 /*
@@ -512,8 +513,8 @@ static void c1e_idle(void)
        if (c1e_detected) {
                int cpu = smp_processor_id();
 
-               if (!cpu_isset(cpu, c1e_mask)) {
-                       cpu_set(cpu, c1e_mask);
+               if (!cpumask_test_cpu(cpu, c1e_mask)) {
+                       cpumask_set_cpu(cpu, c1e_mask);
                        /*
                         * Force broadcast so ACPI can not interfere. Needs
                         * to run with interrupts enabled as it uses
@@ -565,6 +566,15 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
                pm_idle = default_idle;
 }
 
+void __init init_c1e_mask(void)
+{
+       /* If we're using c1e_idle, we need to allocate c1e_mask. */
+       if (pm_idle == c1e_idle) {
+               alloc_cpumask_var(&c1e_mask, GFP_KERNEL);
+               cpumask_clear(c1e_mask);
+       }
+}
+
 static int __init idle_setup(char *str)
 {
        if (!str)