]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/cpu.c
cpu: Remove incorrect BUG_ON
[mv-sheeva.git] / kernel / cpu.c
index 3945066fc01d3f6e615462540e0af09979158a4e..cb7a1efa9c2b51ac2d97f02a82887638ffa2bf67 100644 (file)
@@ -249,8 +249,11 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
         * The migration_call() CPU_DYING callback will have removed all
         * runnable tasks from the cpu, there's only the idle task left now
         * that the migration thread is done doing the stop_machine thing.
+        *
+        * Wait for the stop thread to go away.
         */
-       BUG_ON(!idle_cpu(cpu));
+       while (!idle_cpu(cpu))
+               cpu_relax();
 
        /* This actually kills the CPU. */
        __cpu_die(cpu);