diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-09-18 16:04:33 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-09-18 16:04:33 +1000 |
commit | caa1d631fc99940f866480c2bb88a6f5a235e7a2 (patch) | |
tree | d09d648dbccaa7bf23deb336e8cf52acbc360b8d /arch/powerpc/kernel/smp.c | |
parent | 1e38b7140185e384da216aff66a711df09b5afc9 (diff) | |
parent | 905e75c46dba5f3061049277e4eb7110beedba43 (diff) | |
download | linux-caa1d631fc99940f866480c2bb88a6f5a235e7a2.tar.gz |
Merge remote-tracking branch 'kumar/next' into next
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r-- | arch/powerpc/kernel/smp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 8d4214afc21d..a51ed205016e 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -102,7 +102,7 @@ int __devinit smp_generic_kick_cpu(int nr) * Ok it's not there, so it might be soft-unplugged, let's * try to bring it back */ - per_cpu(cpu_state, nr) = CPU_UP_PREPARE; + generic_set_cpu_up(nr); smp_wmb(); smp_send_reschedule(nr); #endif /* CONFIG_HOTPLUG_CPU */ @@ -413,6 +413,16 @@ void generic_set_cpu_dead(unsigned int cpu) per_cpu(cpu_state, cpu) = CPU_DEAD; } +/* + * The cpu_state should be set to CPU_UP_PREPARE in kick_cpu(), otherwise + * the cpu_state is always CPU_DEAD after calling generic_set_cpu_dead(), + * which makes the delay in generic_cpu_die() not happen. + */ +void generic_set_cpu_up(unsigned int cpu) +{ + per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; +} + int generic_check_cpu_restart(unsigned int cpu) { return per_cpu(cpu_state, cpu) == CPU_UP_PREPARE; |