diff options
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r-- | include/linux/cpuidle.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index dcf77fa826b5..1be416bbbb82 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -52,6 +52,8 @@ struct cpuidle_state { | |||
52 | #define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */ | 52 | #define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */ |
53 | #define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */ | 53 | #define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */ |
54 | #define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */ | 54 | #define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */ |
55 | #define CPUIDLE_FLAG_IGNORE (0x100) /* ignore during this idle period */ | ||
56 | #define CPUIDLE_FLAG_TLB_FLUSHED (0x200) /* tlb will be flushed */ | ||
55 | 57 | ||
56 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 58 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
57 | 59 | ||
@@ -84,6 +86,7 @@ struct cpuidle_state_kobj { | |||
84 | struct cpuidle_device { | 86 | struct cpuidle_device { |
85 | unsigned int registered:1; | 87 | unsigned int registered:1; |
86 | unsigned int enabled:1; | 88 | unsigned int enabled:1; |
89 | unsigned int power_specified:1; | ||
87 | unsigned int cpu; | 90 | unsigned int cpu; |
88 | 91 | ||
89 | int last_residency; | 92 | int last_residency; |
@@ -97,6 +100,8 @@ struct cpuidle_device { | |||
97 | struct completion kobj_unregister; | 100 | struct completion kobj_unregister; |
98 | void *governor_data; | 101 | void *governor_data; |
99 | struct cpuidle_state *safe_state; | 102 | struct cpuidle_state *safe_state; |
103 | |||
104 | int (*prepare) (struct cpuidle_device *dev); | ||
100 | }; | 105 | }; |
101 | 106 | ||
102 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); | 107 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); |
@@ -125,6 +130,7 @@ struct cpuidle_driver { | |||
125 | #ifdef CONFIG_CPU_IDLE | 130 | #ifdef CONFIG_CPU_IDLE |
126 | 131 | ||
127 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | 132 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); |
133 | struct cpuidle_driver *cpuidle_get_driver(void); | ||
128 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | 134 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); |
129 | extern int cpuidle_register_device(struct cpuidle_device *dev); | 135 | extern int cpuidle_register_device(struct cpuidle_device *dev); |
130 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); | 136 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); |
@@ -137,16 +143,17 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev); | |||
137 | #else | 143 | #else |
138 | 144 | ||
139 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) | 145 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) |
140 | {return 0;} | 146 | {return -ENODEV; } |
147 | static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } | ||
141 | static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } | 148 | static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } |
142 | static inline int cpuidle_register_device(struct cpuidle_device *dev) | 149 | static inline int cpuidle_register_device(struct cpuidle_device *dev) |
143 | {return 0;} | 150 | {return -ENODEV; } |
144 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } | 151 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } |
145 | 152 | ||
146 | static inline void cpuidle_pause_and_lock(void) { } | 153 | static inline void cpuidle_pause_and_lock(void) { } |
147 | static inline void cpuidle_resume_and_unlock(void) { } | 154 | static inline void cpuidle_resume_and_unlock(void) { } |
148 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) | 155 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) |
149 | {return 0;} | 156 | {return -ENODEV; } |
150 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 157 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
151 | 158 | ||
152 | #endif | 159 | #endif |