diff options
author | Len Brown <len.brown@intel.com> | 2011-04-01 19:34:59 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-08-03 19:06:37 -0400 |
commit | a0bfa1373859e9d11dc92561a8667588803e42d8 (patch) | |
tree | ef5768a313ac16a211830efc3edb9ca95487cb6a /arch/sh | |
parent | 4bfc8288bc4a64529c5547d17349a2a1f4675507 (diff) |
cpuidle: stop depending on pm_idle
cpuidle users should call cpuidle_call_idle() directly
rather than via (pm_idle)() function pointer.
Architecture may choose to continue using (pm_idle)(),
but cpuidle need not depend on it:
my_arch_cpu_idle()
...
if(cpuidle_call_idle())
pm_idle();
cc: Kevin Hilman <khilman@deeprootsystems.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: x86@kernel.org
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/idle.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 425d604e3a28..9c7099ebfe14 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -16,12 +16,13 @@ | |||
16 | #include <linux/thread_info.h> | 16 | #include <linux/thread_info.h> |
17 | #include <linux/irqflags.h> | 17 | #include <linux/irqflags.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/cpuidle.h> | ||
19 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
20 | #include <asm/system.h> | 21 | #include <asm/system.h> |
21 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
22 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
23 | 24 | ||
24 | void (*pm_idle)(void) = NULL; | 25 | static void (*pm_idle)(void); |
25 | 26 | ||
26 | static int hlt_counter; | 27 | static int hlt_counter; |
27 | 28 | ||
@@ -100,7 +101,8 @@ void cpu_idle(void) | |||
100 | local_irq_disable(); | 101 | local_irq_disable(); |
101 | /* Don't trace irqs off for idle */ | 102 | /* Don't trace irqs off for idle */ |
102 | stop_critical_timings(); | 103 | stop_critical_timings(); |
103 | pm_idle(); | 104 | if (cpuidle_call_idle()) |
105 | pm_idle(); | ||
104 | /* | 106 | /* |
105 | * Sanity check to ensure that pm_idle() returns | 107 | * Sanity check to ensure that pm_idle() returns |
106 | * with IRQs enabled | 108 | * with IRQs enabled |