aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/process.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index f6226055d53d..7451a4c43c16 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -144,7 +144,7 @@ static void poll_idle (void)
144void cpu_idle_wait(void) 144void cpu_idle_wait(void)
145{ 145{
146 unsigned int cpu, this_cpu = get_cpu(); 146 unsigned int cpu, this_cpu = get_cpu();
147 cpumask_t map; 147 cpumask_t map, tmp = current->cpus_allowed;
148 148
149 set_cpus_allowed(current, cpumask_of_cpu(this_cpu)); 149 set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
150 put_cpu(); 150 put_cpu();
@@ -167,6 +167,8 @@ void cpu_idle_wait(void)
167 } 167 }
168 cpus_and(map, map, cpu_online_map); 168 cpus_and(map, map, cpu_online_map);
169 } while (!cpus_empty(map)); 169 } while (!cpus_empty(map));
170
171 set_cpus_allowed(current, tmp);
170} 172}
171EXPORT_SYMBOL_GPL(cpu_idle_wait); 173EXPORT_SYMBOL_GPL(cpu_idle_wait);
172 174