aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1972b161c61e..d46b4dae0ca0 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -408,8 +408,10 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
408 * 408 *
409 * Wait for the stop thread to go away. 409 * Wait for the stop thread to go away.
410 */ 410 */
411 while (!idle_cpu(cpu)) 411 while (!per_cpu(cpu_dead_idle, cpu))
412 cpu_relax(); 412 cpu_relax();
413 smp_mb(); /* Read from cpu_dead_idle before __cpu_die(). */
414 per_cpu(cpu_dead_idle, cpu) = false;
413 415
414 /* This actually kills the CPU. */ 416 /* This actually kills the CPU. */
415 __cpu_die(cpu); 417 __cpu_die(cpu);