提交 61e9916e 编写于 作者: J Johannes Berg 提交者: Benjamin Herrenschmidt

powerpc: Fix failure to shutdown with CPU hotplug

I tracked down the shutdown regression to CPUs not dying
when being shut down during power-off. This turns out to
be due to the system_state being SYSTEM_POWER_OFF, which
this code doesn't take as a valid state for shutting off
CPUs in.

This has never made sense to me, but when I added hotplug
code to implement hibernate I only "made it work" and did
not question the need to check the system_state. Thomas
Gleixner helped me dig, but the only thing we found is
that it was added with the original commit that added CPU
hotplug support.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Acked-by: NJoel Schopp <jschopp@austin.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 ad611045
...@@ -34,11 +34,7 @@ ...@@ -34,11 +34,7 @@
#include <asm/smp.h> #include <asm/smp.h>
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
/* this is used for software suspend, and that shuts down #define cpu_should_die() cpu_is_offline(smp_processor_id())
* CPUs even while the system is still booting... */
#define cpu_should_die() (cpu_is_offline(smp_processor_id()) && \
(system_state == SYSTEM_RUNNING \
|| system_state == SYSTEM_BOOTING))
#else #else
#define cpu_should_die() 0 #define cpu_should_die() 0
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册