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/x86 | |
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/x86')
-rw-r--r-- | arch/x86/kernel/process_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index a3d0dc59067b..7a3b65107a27 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/uaccess.h> | 38 | #include <linux/uaccess.h> |
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/kdebug.h> | 40 | #include <linux/kdebug.h> |
41 | #include <linux/cpuidle.h> | ||
41 | 42 | ||
42 | #include <asm/pgtable.h> | 43 | #include <asm/pgtable.h> |
43 | #include <asm/system.h> | 44 | #include <asm/system.h> |
@@ -109,7 +110,8 @@ void cpu_idle(void) | |||
109 | local_irq_disable(); | 110 | local_irq_disable(); |
110 | /* Don't trace irqs off for idle */ | 111 | /* Don't trace irqs off for idle */ |
111 | stop_critical_timings(); | 112 | stop_critical_timings(); |
112 | pm_idle(); | 113 | if (cpuidle_idle_call()) |
114 | pm_idle(); | ||
113 | start_critical_timings(); | 115 | start_critical_timings(); |
114 | } | 116 | } |
115 | tick_nohz_restart_sched_tick(); | 117 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index ca6f7ab8df33..f693e44e1bf6 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | #include <linux/ftrace.h> | 39 | #include <linux/ftrace.h> |
40 | #include <linux/cpuidle.h> | ||
40 | 41 | ||
41 | #include <asm/pgtable.h> | 42 | #include <asm/pgtable.h> |
42 | #include <asm/system.h> | 43 | #include <asm/system.h> |
@@ -136,7 +137,8 @@ void cpu_idle(void) | |||
136 | enter_idle(); | 137 | enter_idle(); |
137 | /* Don't trace irqs off for idle */ | 138 | /* Don't trace irqs off for idle */ |
138 | stop_critical_timings(); | 139 | stop_critical_timings(); |
139 | pm_idle(); | 140 | if (cpuidle_idle_call()) |
141 | pm_idle(); | ||
140 | start_critical_timings(); | 142 | start_critical_timings(); |
141 | 143 | ||
142 | /* In many cases the interrupt that ended idle | 144 | /* In many cases the interrupt that ended idle |