From 7dcee2dc40f4ed5131f9f4738b221c7e193da027 Mon Sep 17 00:00:00 2001 From: Maulik Shah Date: Mon, 21 Nov 2022 11:33:03 +0530 Subject: [PATCH] cpuidle: governors: qcom-lpm: Do not disable CPUidle during suspend CPUidle was disabled during suspend to avoid runtime PM not updating the cluster genpd sd counter post late suspend phase. The issue is now fixed with commit a2bd7be12b9e ("PM: sleep: Fix runtime PM based cpuidle support"). Remove the changes so CPU idle states can be allowed post late suspend stage. Change-Id: Ie9f01a49326a560e579f34b6412989c573ce6094 Signed-off-by: Maulik Shah --- drivers/cpuidle/governors/qcom-lpm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpuidle/governors/qcom-lpm.c b/drivers/cpuidle/governors/qcom-lpm.c index 30f1ce160d76..3158de1c765b 100644 --- a/drivers/cpuidle/governors/qcom-lpm.c +++ b/drivers/cpuidle/governors/qcom-lpm.c @@ -3,6 +3,7 @@ * Copyright (C) 2006-2007 Adam Belay * Copyright (C) 2009 Intel Corporation * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -61,9 +62,6 @@ static bool lpm_disallowed(s64 sleep_ns, int cpu) uint64_t bias_time = 0; #endif - if (suspend_in_progress) - return true; - if (!check_cpu_isactive(cpu)) return false; @@ -764,22 +762,14 @@ static void lpm_disable_device(struct cpuidle_driver *drv, static void qcom_lpm_suspend_trace(void *unused, const char *action, int event, bool start) { - int cpu; - if (start && !strcmp("dpm_suspend_late", action)) { suspend_in_progress = true; - for_each_online_cpu(cpu) - wake_up_if_idle(cpu); return; } - if (!start && !strcmp("dpm_resume_early", action)) { + if (!start && !strcmp("dpm_resume_early", action)) suspend_in_progress = false; - - for_each_online_cpu(cpu) - wake_up_if_idle(cpu); - } } static struct cpuidle_governor lpm_governor = {