summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2013-07-30 14:25:23 -0400
committerJason Liu <r64343@freescale.com>2013-10-30 09:53:58 +0800
commitfc325e614c6815e387d995df58c80d4979624810 (patch)
tree752586907cbd5de1bc4c7bb509339d6cd035b81f /arch/arm/kernel/process.c
parentdcb7e61054b959dc4d601a96cce5cc85ad1568ef (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/process.c')
-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 ab1fe3bb31f0..b1eebda41705 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -170,8 +170,10 @@ void arch_cpu_idle_dead(void)
*/
void arch_cpu_idle(void)
{
+ idle_notifier_call_chain(IDLE_START);
if (cpuidle_idle_call())
default_idle();
+ idle_notifier_call_chain(IDLE_END);
}
static char reboot_mode = 'h';