aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChristian Neumüller <cn00@gmx.at>2014-12-20 23:59:48 +0100
committerChristian Neumüller <cn00@gmx.at>2014-12-30 12:53:44 +0100
commitc426a2fdfd6caff7ef2cd4fd5d54cf8e7a5b6ebb (patch)
tree473e47fa9b2e517afb9b79ca5bff8a005699fc97 /arch
parent55485801fb3b431743f029c5f8d0e9b1a2f8367f (diff)
downloadkernel_samsung_smdk4412-c426a2fdfd6caff7ef2cd4fd5d54cf8e7a5b6ebb.zip
kernel_samsung_smdk4412-c426a2fdfd6caff7ef2cd4fd5d54cf8e7a5b6ebb.tar.gz
kernel_samsung_smdk4412-c426a2fdfd6caff7ef2cd4fd5d54cf8e7a5b6ebb.tar.bz2
ARM: Exynos: Call cpu_pm_enter/exit in Low Power States.
In low power cpuidle states, the FPU registers get corrupted. By calling cpu_pm_enter, the VFP module gets notified so that it saves the FPU state and restores it from RAM the next time a thread uses it. The comments at cpu_pm_enter/exit indicate that these functions must be called with interrupts disabled, so place the calls between local_irq_disable/local_irq_enble. See http://forum.xda-developers.com/showthread.php?p=57637134 to http://forum.xda-developers.com/showthread.php?p=57643086. Change-Id: Icde0ab93734cf2a4febfabc3c04e77ce955bd9da
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-exynos/cpuidle-exynos4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/cpuidle-exynos4.c b/arch/arm/mach-exynos/cpuidle-exynos4.c
index 2fd7953..88b941f 100644
--- a/arch/arm/mach-exynos/cpuidle-exynos4.c
+++ b/arch/arm/mach-exynos/cpuidle-exynos4.c
@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/cpu_pm.h>
#include <linux/cpuidle.h>
#include <linux/io.h>
#include <linux/suspend.h>
@@ -568,6 +569,8 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
local_irq_disable();
+ cpu_pm_enter();
+
if (log_en)
pr_info("+++aftr\n");
@@ -630,6 +633,8 @@ early_wakeup:
if (log_en)
pr_info("---aftr\n");
+ cpu_pm_exit();
+
local_irq_enable();
idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
(after.tv_usec - before.tv_usec);
@@ -663,6 +668,8 @@ static int exynos4_enter_core0_lpa(struct cpuidle_device *dev,
#endif
local_irq_disable();
+ cpu_pm_enter();
+
#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
gpio_set_value(GPIO_PDA_ACTIVE, 0);
#endif
@@ -763,6 +770,8 @@ early_wakeup:
gpio_set_value(GPIO_PDA_ACTIVE, 1);
#endif
+ cpu_pm_exit();
+
local_irq_enable();
idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
(after.tv_usec - before.tv_usec);