OSDN Git Service

lpm_levels: Return true for CPU WFI mode allow check
authorSrinivas Rao L <lsrao@codeaurora.org>
Fri, 13 Oct 2017 18:11:58 +0000 (23:41 +0530)
committerArian <arian.kulmer@web.de>
Tue, 19 Nov 2019 14:36:12 +0000 (15:36 +0100)
As it's a general understanding across all architectures to have
a WFI (or equalivalent) mode always present and never disabled
for cpuidle, return true for CPU WFI mode allow check.

Change-Id: Ic55571488f845e4aaf997faaac3b2e0f22368d4e
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
drivers/cpuidle/lpm-levels-of.c

index b4675df..83334b4 100644 (file)
@@ -359,6 +359,9 @@ bool lpm_cpu_mode_allow(unsigned int cpu,
 {
        struct lpm_level_avail *avail = cpu_level_available[cpu];
 
+       if (lpm_pdev && !index)
+               return 1;
+
        if (!lpm_pdev || !avail)
                return !from_idle;