mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
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>
This commit is contained in:
committed by
Len Brown
parent
e07510585a
commit
1a022e3f1b
@@ -51,6 +51,8 @@ struct cpuidle_state {
|
||||
int (*enter) (struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv,
|
||||
int index);
|
||||
|
||||
int (*enter_dead) (struct cpuidle_device *dev, int index);
|
||||
};
|
||||
|
||||
/* Idle State Flags */
|
||||
@@ -147,6 +149,8 @@ extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv, int index,
|
||||
int (*enter)(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv, int index));
|
||||
extern int cpuidle_play_dead(void);
|
||||
|
||||
#else
|
||||
static inline void disable_cpuidle(void) { }
|
||||
static inline int cpuidle_idle_call(void) { return -ENODEV; }
|
||||
@@ -168,6 +172,7 @@ static inline int cpuidle_wrap_enter(struct cpuidle_device *dev,
|
||||
int (*enter)(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv, int index))
|
||||
{ return -ENODEV; }
|
||||
static inline int cpuidle_play_dead(void) {return -ENODEV; }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user