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.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 480c14dc1ddd..8f0406230a0a 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -17,7 +17,7 @@
17#include <linux/completion.h> 17#include <linux/completion.h>
18#include <linux/hrtimer.h> 18#include <linux/hrtimer.h>
19 19
20#define CPUIDLE_STATE_MAX 8 20#define CPUIDLE_STATE_MAX 10
21#define CPUIDLE_NAME_LEN 16 21#define CPUIDLE_NAME_LEN 16
22#define CPUIDLE_DESC_LEN 32 22#define CPUIDLE_DESC_LEN 32
23 23
@@ -57,6 +57,7 @@ struct cpuidle_state {
57/* Idle State Flags */ 57/* Idle State Flags */
58#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ 58#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
59#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ 59#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */
60#define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */
60 61
61#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) 62#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
62 63
@@ -104,8 +105,8 @@ struct cpuidle_driver {
104 struct module *owner; 105 struct module *owner;
105 int refcnt; 106 int refcnt;
106 107
107 /* set to 1 to use the core cpuidle time keeping (for all states). */ 108 /* used by the cpuidle framework to setup the broadcast timer */
108 unsigned int en_core_tk_irqen:1; 109 unsigned int bctimer:1;
109 /* states array must be ordered in decreasing power consumption */ 110 /* states array must be ordered in decreasing power consumption */
110 struct cpuidle_state states[CPUIDLE_STATE_MAX]; 111 struct cpuidle_state states[CPUIDLE_STATE_MAX];
111 int state_count; 112 int state_count;
@@ -122,17 +123,15 @@ extern void cpuidle_driver_unref(void);
122extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); 123extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
123extern int cpuidle_register_device(struct cpuidle_device *dev); 124extern int cpuidle_register_device(struct cpuidle_device *dev);
124extern void cpuidle_unregister_device(struct cpuidle_device *dev); 125extern void cpuidle_unregister_device(struct cpuidle_device *dev);
125 126extern int cpuidle_register(struct cpuidle_driver *drv,
127 const struct cpumask *const coupled_cpus);
128extern void cpuidle_unregister(struct cpuidle_driver *drv);
126extern void cpuidle_pause_and_lock(void); 129extern void cpuidle_pause_and_lock(void);
127extern void cpuidle_resume_and_unlock(void); 130extern void cpuidle_resume_and_unlock(void);
128extern void cpuidle_pause(void); 131extern void cpuidle_pause(void);
129extern void cpuidle_resume(void); 132extern void cpuidle_resume(void);
130extern int cpuidle_enable_device(struct cpuidle_device *dev); 133extern int cpuidle_enable_device(struct cpuidle_device *dev);
131extern void cpuidle_disable_device(struct cpuidle_device *dev); 134extern void cpuidle_disable_device(struct cpuidle_device *dev);
132extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
133 struct cpuidle_driver *drv, int index,
134 int (*enter)(struct cpuidle_device *dev,
135 struct cpuidle_driver *drv, int index));
136extern int cpuidle_play_dead(void); 135extern int cpuidle_play_dead(void);
137 136
138extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); 137extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
@@ -151,7 +150,10 @@ static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
151static inline int cpuidle_register_device(struct cpuidle_device *dev) 150static inline int cpuidle_register_device(struct cpuidle_device *dev)
152{return -ENODEV; } 151{return -ENODEV; }
153static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } 152static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }
154 153static inline int cpuidle_register(struct cpuidle_driver *drv,
154 const struct cpumask *const coupled_cpus)
155{return -ENODEV; }
156static inline void cpuidle_unregister(struct cpuidle_driver *drv) { }
155static inline void cpuidle_pause_and_lock(void) { } 157static inline void cpuidle_pause_and_lock(void) { }
156static inline void cpuidle_resume_and_unlock(void) { } 158static inline void cpuidle_resume_and_unlock(void) { }
157static inline void cpuidle_pause(void) { } 159static inline void cpuidle_pause(void) { }
@@ -159,11 +161,6 @@ static inline void cpuidle_resume(void) { }
159static inline int cpuidle_enable_device(struct cpuidle_device *dev) 161static inline int cpuidle_enable_device(struct cpuidle_device *dev)
160{return -ENODEV; } 162{return -ENODEV; }
161static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } 163static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
162static inline int cpuidle_wrap_enter(struct cpuidle_device *dev,
163 struct cpuidle_driver *drv, int index,
164 int (*enter)(struct cpuidle_device *dev,
165 struct cpuidle_driver *drv, int index))
166{ return -ENODEV; }
167static inline int cpuidle_play_dead(void) {return -ENODEV; } 164static inline int cpuidle_play_dead(void) {return -ENODEV; }
168#endif 165#endif
169 166