[PATCH] i386/x86_64: ACPI cpu_idle_wait() fix
[deliverable/linux.git] / arch / i386 / kernel / process.c
index 1e1fa3e391a3889ec822c869c19bd9feb76e5e36..dd53c58f64f1bd944dd65190fc5d8f98bf6c8643 100644 (file)
@@ -205,7 +205,7 @@ void cpu_idle(void)
 void cpu_idle_wait(void)
 {
        unsigned int cpu, this_cpu = get_cpu();
-       cpumask_t map;
+       cpumask_t map, tmp = current->cpus_allowed;
 
        set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
        put_cpu();
@@ -227,6 +227,8 @@ void cpu_idle_wait(void)
                }
                cpus_and(map, map, cpu_online_map);
        } while (!cpus_empty(map));
+
+       set_cpus_allowed(current, tmp);
 }
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
This page took 0.025404 seconds and 5 git commands to generate.