diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2017-02-28 10:21:52 +0000 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2017-02-28 10:21:52 +0000 |
commit | 40bb1d399e3ff345d8b1393283956a346a4e6b16 (patch) | |
tree | 9ce414d114522fe336c0aeb37df12b8c5cd9808f | |
parent | 3f5cd0650db43970803e3723f807288d1fc4706f (diff) |
pm: msm: Replace calls to wfi() with calls to cpu_do_idle()
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r-- | drivers/cpuidle/lpm-levels.c | 6 | ||||
-rw-r--r-- | drivers/soc/qcom/cpu_ops.c | 4 | ||||
-rw-r--r-- | include/soc/qcom/pm.h | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c index 717ee270afec..15f8668e8f34 100644 --- a/drivers/cpuidle/lpm-levels.c +++ b/drivers/cpuidle/lpm-levels.c @@ -1007,12 +1007,12 @@ bool psci_enter_sleep(struct lpm_cluster *cluster, int idx, bool from_idle) stop_critical_timings(); #ifdef CONFIG_HTC_POWER_DEBUG time = sched_clock(); - wfi(); + cpu_do_idle(); time = sched_clock() - time; do_div(time,1000); htc_idle_stat_add(idx, (u32)time); #else - wfi(); + cpu_do_idle(); #endif start_critical_timings(); return 1; @@ -1108,7 +1108,7 @@ bool psci_enter_sleep(struct lpm_cluster *cluster, int idx, bool from_idle) { if (!idx) { stop_critical_timings(); - wfi(); + cpu_do_idle(); start_critical_timings(); return 1; } else { diff --git a/drivers/soc/qcom/cpu_ops.c b/drivers/soc/qcom/cpu_ops.c index 4b82de57ed3c..189660b6bbec 100644 --- a/drivers/soc/qcom/cpu_ops.c +++ b/drivers/soc/qcom/cpu_ops.c @@ -149,7 +149,7 @@ static void msm8953_wfi_cpu_die(unsigned int cpu) BUG(); } for (;;) { - wfi(); + cpu_do_idle(); if (secondary_holding_pen_release == cpu_logical_map(cpu)) break; /*Proper wake up */ @@ -182,7 +182,7 @@ static void msm8937_wfi_cpu_die(unsigned int cpu) BUG(); } for (;;) { - wfi(); + cpu_do_idle(); if (secondary_holding_pen_release == cpu_logical_map(cpu)) { /*Proper wake up */ break; diff --git a/include/soc/qcom/pm.h b/include/soc/qcom/pm.h index ea19c2562f66..9194267773e8 100644 --- a/include/soc/qcom/pm.h +++ b/include/soc/qcom/pm.h @@ -117,8 +117,7 @@ bool msm_pm_retention_enabled(void); bool msm_cpu_pm_enter_sleep(enum msm_pm_sleep_mode mode, bool from_idle); static inline void msm_arch_idle(void) { - mb(); - wfi(); + cpu_do_idle(); } #ifdef CONFIG_MSM_PM |