msm: pm-8x60: Unconditionally support WFI hotplug
Using the irqsoff tracer and hotplugging a CPU with nothing in
the 'suspend allowed' mask causes the preempt count for the new
CPU to become less than 0 (0xfffffffe usually). This is because
the hotplug code is never actually doing any sort of hotplug.
Instead it's running a tight loop of
msm_pm_cpu_enter_lowpower()
if (pen_release == cpu_logical_map(cpu)) {
...
}
dmac_inv_range(&pen_release);
and ftrace is recording the branching back and forth to
msm_pm_cpu_enter_lowpower(). While this is going on, the other
CPU that's bringing the "not actually" hotplugged CPU back online
goes and reinitializes the idle task for the hotplugged CPU. The
assumption in the cpu bringup code is that the CPU is not
actually running so it's safe to mess with that CPUs idle task.
This assumption is broken when no sorts of hotplug are allowed.
Fix this by unconditionally supporting WFI hotplug. This way, no
matter what, hotplug will put the CPU into some low power state
where it's safe to modify the CPUs idle task state.
Change-Id: I456673a3223dd294585a12da0fd0641a84626c52
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/pm-8x60.c b/arch/arm/mach-msm/pm-8x60.c
index e203667..d73764f 100644
--- a/arch/arm/mach-msm/pm-8x60.c
+++ b/arch/arm/mach-msm/pm-8x60.c
@@ -819,7 +819,7 @@
msm_pm_power_collapse_standalone(false);
else if (allow[MSM_PM_SLEEP_MODE_RETENTION])
msm_pm_retention();
- else if (allow[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT])
+ else
msm_pm_swfi();
}