diff options
author | Gary King <gking@nvidia.com> | 2010-03-24 14:46:53 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-10-03 23:08:57 -0700 |
commit | 1512cef47070413a175399c73c5f3636e4902162 (patch) | |
tree | 7abb75dc9e7a03eb19fe94d7f8635e054f356f56 /arch/arm/kernel/process.c | |
parent | ea4fd77392475507475ed141b74fbf0aa690226a (diff) |
ARM: enable CONFIG_CPU_IDLE support
add ARCH_HAS_CPU_IDLE_WAIT and ARCH_HAS_DEFAULT_IDLE configuration,
and expose default_idle and cpu_idle_wait
cpu_idle_wait implementation based on the implementation in the x86 tree
Signed-off-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r-- | arch/arm/kernel/process.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 401e38be1f78..69141f0b8388 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -140,12 +140,13 @@ EXPORT_SYMBOL_GPL(arm_pm_restart); * This is our default idle handler. We need to disable * interrupts here to ensure we don't miss a wakeup call. */ -static void default_idle(void) +void default_idle(void) { if (!need_resched()) arch_idle(); local_irq_enable(); } +EXPORT_SYMBOL(default_idle); void (*pm_idle)(void) = default_idle; EXPORT_SYMBOL(pm_idle); @@ -195,6 +196,19 @@ void cpu_idle(void) } } +#if defined(CONFIG_ARCH_HAS_CPU_IDLE_WAIT) +static void do_nothing(void *unused) +{ +} + +void cpu_idle_wait(void) +{ + smp_mb(); + smp_call_function(do_nothing, NULL, 1); +} +#endif + + static char reboot_mode = 'h'; int __init reboot_setup(char *str) |