summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2017-07-27 09:15:31 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit1a6b5f39bf791bcf95232cb9ca804a1caa4cb5b8 (patch)
tree236fa1031c6fb37cd8b31ca4f35059cd02385a44 /arch/arm/mach-imx
parent045381d19cc34464d34401a0de8690042cc3d62d (diff)
MLK-16750-6 arm: imx7d: cpuidle: Fix missing decrement of master_lpi
This fixes commit ("MLK15034: ARM: cpuidle imx7d: Check IPIs manually before LPI"). In this patch, also need to take care of psci part. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/cpuidle-imx7d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/cpuidle-imx7d.c b/arch/arm/mach-imx/cpuidle-imx7d.c
index 9b0fd7d301f3..6e12ebd93708 100644
--- a/arch/arm/mach-imx/cpuidle-imx7d.c
+++ b/arch/arm/mach-imx/cpuidle-imx7d.c
@@ -172,6 +172,7 @@ static int imx7d_enter_low_power_idle(struct cpuidle_device *dev,
spin_lock(&psci_lock);
if (atomic_inc_return(&master_lpi) == num_online_cpus()) {
if (imx7d_gic_sgis_pending()) {
+ atomic_dec(&master_lpi);
index = -1;
goto psci_skip_lpi_flow;
}
@@ -209,6 +210,7 @@ psci_skip_lpi_flow:
* any additional IPIs.
*/
if (imx7d_gic_sgis_pending()) {
+ atomic_dec(&master_lpi);
index = -1;
goto skip_lpi_flow;
}