aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2013-07-30 14:25:23 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:00:47 -0400
commit3b1087692afbf476df0fcc68cb24405568ac36e9 (patch)
treed28a0253c4cda0e6669351652001e4407b1702ea /arch/arm/kernel
parent8a03a96fba08f591ce57a32ee5fd39e565fb3aee (diff)
ENGR00273073-1 arm: add cpu idle notification callback
Some modules may need to know cpu idle status and take actions before and after cpu idle, so we can add notification callback when enter/exit cpu idle, then modules only need to register this notification callback, everytime cpu enter/exit idle, the callback chain will be executed. Currently only cpufreq interactive governor use this notification, as it wants to save power, the timers of interactive governor are only enabled when cpu is not in idle. Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index ac4c2e5e17e4..e59e24ae8f7b 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -170,8 +170,10 @@ void arch_cpu_idle_dead(void)
170 */ 170 */
171void arch_cpu_idle(void) 171void arch_cpu_idle(void)
172{ 172{
173 idle_notifier_call_chain(IDLE_START);
173 if (cpuidle_idle_call()) 174 if (cpuidle_idle_call())
174 default_idle(); 175 default_idle();
176 idle_notifier_call_chain(IDLE_END);
175} 177}
176 178
177static char reboot_mode = 'h'; 179static char reboot_mode = 'h';