From 643b982c4f1aac840fa7ddbecac0c6bb0cc156bc Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 19 Nov 2010 20:37:53 +0100 Subject: [PATCH] --- yaml --- r: 223999 b: refs/heads/master c: 51a96c77815e7f139892a6e9c8275a50e9baebdf h: refs/heads/master i: 223997: 10868aafdb37454fe670afa261d8252de0e322e7 223995: cd03ad3016ebe2e37419e2fb238cfc4df9c76462 223991: 0d93270f77dbaea03feb05a581f7f7f79e3174da 223983: 4c2204d2d9907bfd7029c5bdc4d6fcb9622bff1c 223967: 32f3822db22fd0ae37f299e18226398884c002be 223935: 739b857adf5f1be1b273c247bf4e809265979017 223871: 91249362cfbe20e49aa35b514d8250e578df1144 223743: 63afd0d8de012fe33e9b9bfe9a7264d17a5abe23 v: v3 --- [refs] | 2 +- trunk/kernel/cpu.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1dc10d1e9e2f..3071d435b3ca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e01f4740a874b6085da6ebf541e7ffde9a72bf2 +refs/heads/master: 51a96c77815e7f139892a6e9c8275a50e9baebdf diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index 3945066fc01d..cb7a1efa9c2b 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -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);