aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2015-04-07 18:13:51 +0000
committerImre Kaloz <kaloz@openwrt.org>2015-04-07 18:13:51 +0000
commitf60fea192338c898305102581db4282d14a653bb (patch)
tree5d486e5bd8d3983196923f017a7790b86ce95c26 /target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch
parent503d845522a6173ff60b826a10c5d49089026ce0 (diff)
downloadupstream-f60fea192338c898305102581db4282d14a653bb.tar.gz
upstream-f60fea192338c898305102581db4282d14a653bb.tar.bz2
upstream-f60fea192338c898305102581db4282d14a653bb.zip
Upstream commits 43b68879de27b1993518687fbc6013da80cdcbfe and ce6031c89a35cffd5a5992b08377b77f49a004b9 improve the cpuidle driver on Armada XP. The latter commit improves performance at the slight expense of power consumption.
Signed-off-by: Claudio Leite <leitec@staticky.com> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 45294
Diffstat (limited to 'target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch')
-rw-r--r--target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch b/target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch
new file mode 100644
index 0000000000..afd66179a4
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/060-cpuidle-mvebu-Fix-the-CPU-PM-notifier-usage.patch
@@ -0,0 +1,38 @@
+From 43b68879de27b1993518687fbc6013da80cdcbfe Mon Sep 17 00:00:00 2001
+From: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Date: Thu, 26 Feb 2015 18:20:48 +0100
+Subject: [PATCH] cpuidle: mvebu: Fix the CPU PM notifier usage
+
+As stated in kernel/cpu_pm.c, "Platform is responsible for ensuring
+that cpu_pm_enter is not called twice on the same CPU before
+cpu_pm_exit is called.". In the current code in case of failure when
+calling mvebu_v7_cpu_suspend, the function cpu_pm_exit() is never
+called whereas cpu_pm_enter() was called just before.
+
+This patch moves the cpu_pm_exit() in order to balance the
+cpu_pm_enter() calls.
+
+Cc: stable@vger.kernel.org
+Reported-by: Fulvio Benini <fbf@libero.it>
+Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+---
+ drivers/cpuidle/cpuidle-mvebu-v7.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/cpuidle/cpuidle-mvebu-v7.c
++++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
+@@ -37,11 +37,11 @@ static int mvebu_v7_enter_idle(struct cp
+ deepidle = true;
+
+ ret = mvebu_v7_cpu_suspend(deepidle);
++ cpu_pm_exit();
++
+ if (ret)
+ return ret;
+
+- cpu_pm_exit();
+-
+ return index;
+ }
+