[PATCH] i386/x86_64: ACPI cpu_idle_wait() fix
[deliverable/linux.git] / arch / x86_64 / kernel / process.c
index f6226055d53de3b84e2812785bc699ae17394beb..7451a4c43c1681639c0aa5fbb2640d509ccac603 100644 (file)
@@ -144,7 +144,7 @@ static void poll_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();
@@ -167,6 +167,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.025797 seconds and 5 git commands to generate.