aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 19:22:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 19:22:27 -0400
commit05bf58ca4b8f0be7d7af830f943f6d6b2c9ccee1 (patch)
tree9c87f7ffb9bbd2d54dd1e3bbfd8ef4eaeec8063b /include/linux
parentd23082257d83e4bc89727d5aedee197e907999d2 (diff)
parenta1d028bd6d2b7789d15eddfd07c5bea2aaf36040 (diff)
Merge branch 'sched-idle-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull sched/idle changes from Ingo Molnar: "More idle code reorganization, to prepare for more integration. (Sent separately because it depended on pending timer work, which is now upstream)" * 'sched-idle-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/idle: Add more comments to the code sched/idle: Move idle conditions in cpuidle_idle main function sched/idle: Reorganize the idle loop cpuidle/idle: Move the cpuidle_idle_call function to idle.c idle/cpuidle: Split cpuidle_idle_call main function into smaller functions
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpuidle.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 50fcbb0ac4e7..b0238cba440b 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -119,7 +119,15 @@ struct cpuidle_driver {
119 119
120#ifdef CONFIG_CPU_IDLE 120#ifdef CONFIG_CPU_IDLE
121extern void disable_cpuidle(void); 121extern void disable_cpuidle(void);
122extern int cpuidle_idle_call(void); 122
123extern int cpuidle_enabled(struct cpuidle_driver *drv,
124 struct cpuidle_device *dev);
125extern int cpuidle_select(struct cpuidle_driver *drv,
126 struct cpuidle_device *dev);
127extern int cpuidle_enter(struct cpuidle_driver *drv,
128 struct cpuidle_device *dev, int index);
129extern void cpuidle_reflect(struct cpuidle_device *dev, int index);
130
123extern int cpuidle_register_driver(struct cpuidle_driver *drv); 131extern int cpuidle_register_driver(struct cpuidle_driver *drv);
124extern struct cpuidle_driver *cpuidle_get_driver(void); 132extern struct cpuidle_driver *cpuidle_get_driver(void);
125extern struct cpuidle_driver *cpuidle_driver_ref(void); 133extern struct cpuidle_driver *cpuidle_driver_ref(void);
@@ -141,7 +149,16 @@ extern int cpuidle_play_dead(void);
141extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); 149extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
142#else 150#else
143static inline void disable_cpuidle(void) { } 151static inline void disable_cpuidle(void) { }
144static inline int cpuidle_idle_call(void) { return -ENODEV; } 152static inline int cpuidle_enabled(struct cpuidle_driver *drv,
153 struct cpuidle_device *dev)
154{return -ENODEV; }
155static inline int cpuidle_select(struct cpuidle_driver *drv,
156 struct cpuidle_device *dev)
157{return -ENODEV; }
158static inline int cpuidle_enter(struct cpuidle_driver *drv,
159 struct cpuidle_device *dev, int index)
160{return -ENODEV; }
161static inline void cpuidle_reflect(struct cpuidle_device *dev, int index) { }
145static inline int cpuidle_register_driver(struct cpuidle_driver *drv) 162static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
146{return -ENODEV; } 163{return -ENODEV; }
147static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } 164static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
@@ -163,6 +180,8 @@ static inline int cpuidle_enable_device(struct cpuidle_device *dev)
163{return -ENODEV; } 180{return -ENODEV; }
164static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } 181static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
165static inline int cpuidle_play_dead(void) {return -ENODEV; } 182static inline int cpuidle_play_dead(void) {return -ENODEV; }
183static inline struct cpuidle_driver *cpuidle_get_cpu_driver(
184 struct cpuidle_device *dev) {return NULL; }
166#endif 185#endif
167 186
168#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED 187#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED