diff options
author | Boris Ostrovsky <boris.ostrovsky@amd.com> | 2012-03-13 14:55:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-30 03:23:01 -0400 |
commit | 1a022e3f1be11730bd8747b1af96a0274bf6356e (patch) | |
tree | d3c95b68626ac7d963ac3a85a07dae1cfc011906 /include/linux/cpuidle.h | |
parent | e07510585a88c0f6c6c728e2e006aa913496d4ae (diff) |
idle, x86: Allow off-lined CPU to enter deeper C states
Currently when a CPU is off-lined it enters either MWAIT-based idle or,
if MWAIT is not desired or supported, HLT-based idle (which places the
processor in C1 state). This patch allows processors without MWAIT
support to stay in states deeper than C1.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r-- | include/linux/cpuidle.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index f3ebbba368b3..d557bcd0ada7 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -51,6 +51,8 @@ struct cpuidle_state { | |||
51 | int (*enter) (struct cpuidle_device *dev, | 51 | int (*enter) (struct cpuidle_device *dev, |
52 | struct cpuidle_driver *drv, | 52 | struct cpuidle_driver *drv, |
53 | int index); | 53 | int index); |
54 | |||
55 | int (*enter_dead) (struct cpuidle_device *dev, int index); | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | /* Idle State Flags */ | 58 | /* Idle State Flags */ |
@@ -147,6 +149,8 @@ extern int cpuidle_wrap_enter(struct cpuidle_device *dev, | |||
147 | struct cpuidle_driver *drv, int index, | 149 | struct cpuidle_driver *drv, int index, |
148 | int (*enter)(struct cpuidle_device *dev, | 150 | int (*enter)(struct cpuidle_device *dev, |
149 | struct cpuidle_driver *drv, int index)); | 151 | struct cpuidle_driver *drv, int index)); |
152 | extern int cpuidle_play_dead(void); | ||
153 | |||
150 | #else | 154 | #else |
151 | static inline void disable_cpuidle(void) { } | 155 | static inline void disable_cpuidle(void) { } |
152 | static inline int cpuidle_idle_call(void) { return -ENODEV; } | 156 | static inline int cpuidle_idle_call(void) { return -ENODEV; } |
@@ -168,6 +172,7 @@ static inline int cpuidle_wrap_enter(struct cpuidle_device *dev, | |||
168 | int (*enter)(struct cpuidle_device *dev, | 172 | int (*enter)(struct cpuidle_device *dev, |
169 | struct cpuidle_driver *drv, int index)) | 173 | struct cpuidle_driver *drv, int index)) |
170 | { return -ENODEV; } | 174 | { return -ENODEV; } |
175 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | ||
171 | 176 | ||
172 | #endif | 177 | #endif |
173 | 178 | ||