msm: hotplug: Wait for power collapse completion in platform_cpu_kill()
Call msm_pm_wait_cpu_shutdown() to wait for the CPU to be fully
power-collapsed before returning from platform_cpu_kill(). This is
necessary to prevent CPU_DEAD and CPU_DEAD_FROZEN notifiers from
executing until the CPU is fully collapsed. Otherwise, some drivers
may turn off hardware resources before it is safe to do so. For
example, acpuclock-8960's hotplug handler turns off CPU clocks as
part of CPU_DEAD. If this happens before the collapse is complete,
it may result in a hang.
The call to msm_pm_wait_cpu_shutdown() will return immediately for
hotplugs that do not involve power-collapse and therefore has no
impact for those scenarios.
Change-Id: I88bf28f01fb02ad7dfcb8234c745570e5085585a
Signed-off-by:
Matt Wagantall <mattw@codeaurora.org>
Loading
Please sign in to comment