aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpuidle.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r--include/linux/cpuidle.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index cb95f5a9075a..c8eb8c71809e 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -46,9 +46,10 @@ struct cpuidle_state {
46/* Idle State Flags */ 46/* Idle State Flags */
47#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ 47#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
48#define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */ 48#define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */
49#define CPUIDLE_FLAG_SHALLOW (0x10) /* low latency, minimal savings */ 49#define CPUIDLE_FLAG_POLL (0x10) /* no latency, no savings */
50#define CPUIDLE_FLAG_BALANCED (0x20) /* medium latency, moderate savings */ 50#define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */
51#define CPUIDLE_FLAG_DEEP (0x40) /* high latency, large savings */ 51#define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */
52#define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */
52 53
53#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) 54#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
54 55
@@ -92,7 +93,7 @@ struct cpuidle_state_kobj {
92}; 93};
93 94
94struct cpuidle_device { 95struct cpuidle_device {
95 int enabled:1; 96 unsigned int enabled:1;
96 unsigned int cpu; 97 unsigned int cpu;
97 98
98 int last_residency; 99 int last_residency;
@@ -105,6 +106,7 @@ struct cpuidle_device {
105 struct kobject kobj; 106 struct kobject kobj;
106 struct completion kobj_unregister; 107 struct completion kobj_unregister;
107 void *governor_data; 108 void *governor_data;
109 struct cpuidle_state *safe_state;
108}; 110};
109 111
110DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); 112DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
@@ -190,4 +192,10 @@ static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { }
190 192
191#endif 193#endif
192 194
195#ifdef CONFIG_ARCH_HAS_CPU_RELAX
196#define CPUIDLE_DRIVER_STATE_START 1
197#else
198#define CPUIDLE_DRIVER_STATE_START 0
199#endif
200
193#endif /* _LINUX_CPUIDLE_H */ 201#endif /* _LINUX_CPUIDLE_H */