|
@@ -34,6 +34,7 @@ struct cpuidle_driver;
|
|
struct cpuidle_state_usage {
|
|
struct cpuidle_state_usage {
|
|
void *driver_data;
|
|
void *driver_data;
|
|
|
|
|
|
|
|
+ unsigned long long disable;
|
|
unsigned long long usage;
|
|
unsigned long long usage;
|
|
unsigned long long time; /* in US */
|
|
unsigned long long time; /* in US */
|
|
};
|
|
};
|
|
@@ -46,7 +47,6 @@ struct cpuidle_state {
|
|
unsigned int exit_latency; /* in US */
|
|
unsigned int exit_latency; /* in US */
|
|
int power_usage; /* in mW */
|
|
int power_usage; /* in mW */
|
|
unsigned int target_residency; /* in US */
|
|
unsigned int target_residency; /* in US */
|
|
- unsigned int disable;
|
|
|
|
|
|
|
|
int (*enter) (struct cpuidle_device *dev,
|
|
int (*enter) (struct cpuidle_device *dev,
|
|
struct cpuidle_driver *drv,
|
|
struct cpuidle_driver *drv,
|
|
@@ -136,13 +136,17 @@ struct cpuidle_driver {
|
|
extern void disable_cpuidle(void);
|
|
extern void disable_cpuidle(void);
|
|
extern int cpuidle_idle_call(void);
|
|
extern int cpuidle_idle_call(void);
|
|
extern int cpuidle_register_driver(struct cpuidle_driver *drv);
|
|
extern int cpuidle_register_driver(struct cpuidle_driver *drv);
|
|
-struct cpuidle_driver *cpuidle_get_driver(void);
|
|
|
|
|
|
+extern struct cpuidle_driver *cpuidle_get_driver(void);
|
|
|
|
+extern struct cpuidle_driver *cpuidle_driver_ref(void);
|
|
|
|
+extern void cpuidle_driver_unref(void);
|
|
extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
|
|
extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
|
|
extern int cpuidle_register_device(struct cpuidle_device *dev);
|
|
extern int cpuidle_register_device(struct cpuidle_device *dev);
|
|
extern void cpuidle_unregister_device(struct cpuidle_device *dev);
|
|
extern void cpuidle_unregister_device(struct cpuidle_device *dev);
|
|
|
|
|
|
extern void cpuidle_pause_and_lock(void);
|
|
extern void cpuidle_pause_and_lock(void);
|
|
extern void cpuidle_resume_and_unlock(void);
|
|
extern void cpuidle_resume_and_unlock(void);
|
|
|
|
+extern void cpuidle_pause(void);
|
|
|
|
+extern void cpuidle_resume(void);
|
|
extern int cpuidle_enable_device(struct cpuidle_device *dev);
|
|
extern int cpuidle_enable_device(struct cpuidle_device *dev);
|
|
extern void cpuidle_disable_device(struct cpuidle_device *dev);
|
|
extern void cpuidle_disable_device(struct cpuidle_device *dev);
|
|
extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
|
|
extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
|
|
@@ -157,6 +161,8 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; }
|
|
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
|
|
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
|
|
{return -ENODEV; }
|
|
{return -ENODEV; }
|
|
static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
|
|
static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
|
|
|
|
+static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
|
|
|
|
+static inline void cpuidle_driver_unref(void) {}
|
|
static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
|
|
static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
|
|
static inline int cpuidle_register_device(struct cpuidle_device *dev)
|
|
static inline int cpuidle_register_device(struct cpuidle_device *dev)
|
|
{return -ENODEV; }
|
|
{return -ENODEV; }
|
|
@@ -164,6 +170,8 @@ static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }
|
|
|
|
|
|
static inline void cpuidle_pause_and_lock(void) { }
|
|
static inline void cpuidle_pause_and_lock(void) { }
|
|
static inline void cpuidle_resume_and_unlock(void) { }
|
|
static inline void cpuidle_resume_and_unlock(void) { }
|
|
|
|
+static inline void cpuidle_pause(void) { }
|
|
|
|
+static inline void cpuidle_resume(void) { }
|
|
static inline int cpuidle_enable_device(struct cpuidle_device *dev)
|
|
static inline int cpuidle_enable_device(struct cpuidle_device *dev)
|
|
{return -ENODEV; }
|
|
{return -ENODEV; }
|
|
static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
|
|
static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
|
|
@@ -202,14 +210,7 @@ struct cpuidle_governor {
|
|
extern int cpuidle_register_governor(struct cpuidle_governor *gov);
|
|
extern int cpuidle_register_governor(struct cpuidle_governor *gov);
|
|
extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
|
|
extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
|
|
|
|
|
|
-#ifdef CONFIG_INTEL_IDLE
|
|
|
|
-extern int intel_idle_cpu_init(int cpu);
|
|
|
|
#else
|
|
#else
|
|
-static inline int intel_idle_cpu_init(int cpu) { return -1; }
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-static inline int intel_idle_cpu_init(int cpu) { return -1; }
|
|
|
|
|
|
|
|
static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
|
|
static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
|
|
{return 0;}
|
|
{return 0;}
|