aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3945066fc01d..cb7a1efa9c2b 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -249,8 +249,11 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
249 * The migration_call() CPU_DYING callback will have removed all 249 * The migration_call() CPU_DYING callback will have removed all
250 * runnable tasks from the cpu, there's only the idle task left now 250 * runnable tasks from the cpu, there's only the idle task left now
251 * that the migration thread is done doing the stop_machine thing. 251 * that the migration thread is done doing the stop_machine thing.
252 *
253 * Wait for the stop thread to go away.
252 */ 254 */
253 BUG_ON(!idle_cpu(cpu)); 255 while (!idle_cpu(cpu))
256 cpu_relax();
254 257
255 /* This actually kills the CPU. */ 258 /* This actually kills the CPU. */
256 __cpu_die(cpu); 259 __cpu_die(cpu);