forked from Openwrt/openwrt
2260ec4fb7
Manually refreshed: * 309-linksys-status-led.patch * 310-linksys-use-eth0-as-cpu-port.patch * 320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch * 701-mvpp2-read-mac-address-from-nvmem.patch * 902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch All other patches automatically refreshed. Signed-off-by: Stijn Segers <foss@volatilesystems.org>
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From c28b2d367da8a471482e6a4aa8337ab6369a80c2 Mon Sep 17 00:00:00 2001
|
|
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
|
Date: Sat, 3 Oct 2015 09:13:05 +0100
|
|
Subject: cpuidle: mvebu: indicate failure to enter deeper sleep states
|
|
|
|
The cpuidle ->enter method expects the return value to be the sleep
|
|
state we entered. Returning negative numbers or other codes is not
|
|
permissible since coupled CPU idle was merged.
|
|
|
|
At least some of the mvebu_v7_cpu_suspend() implementations return the
|
|
value from cpu_suspend(), which returns zero if the CPU vectors back
|
|
into the kernel via cpu_resume() (the success case), or the non-zero
|
|
return value of the suspend actor, or one (failure cases).
|
|
|
|
We do not want to be returning the failure case value back to CPU idle
|
|
as that indicates that we successfully entered one of the deeper idle
|
|
states. Always return zero instead, indicating that we slept for the
|
|
shortest amount of time.
|
|
|
|
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
|
---
|
|
drivers/cpuidle/cpuidle-mvebu-v7.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/cpuidle/cpuidle-mvebu-v7.c
|
|
+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
|
|
@@ -42,8 +42,12 @@ static __cpuidle int mvebu_v7_enter_idle
|
|
|
|
cpu_pm_exit();
|
|
|
|
+ /*
|
|
+ * If we failed to enter the desired state, indicate that we
|
|
+ * slept lightly.
|
|
+ */
|
|
if (ret)
|
|
- return ret;
|
|
+ return 0;
|
|
|
|
return index;
|
|
}
|