diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 19:22:27 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 19:22:27 -0400 |
| commit | 05bf58ca4b8f0be7d7af830f943f6d6b2c9ccee1 (patch) | |
| tree | 9c87f7ffb9bbd2d54dd1e3bbfd8ef4eaeec8063b /include/linux | |
| parent | d23082257d83e4bc89727d5aedee197e907999d2 (diff) | |
| parent | a1d028bd6d2b7789d15eddfd07c5bea2aaf36040 (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.h | 23 |
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 |
| 121 | extern void disable_cpuidle(void); | 121 | extern void disable_cpuidle(void); |
| 122 | extern int cpuidle_idle_call(void); | 122 | |
| 123 | extern int cpuidle_enabled(struct cpuidle_driver *drv, | ||
| 124 | struct cpuidle_device *dev); | ||
| 125 | extern int cpuidle_select(struct cpuidle_driver *drv, | ||
| 126 | struct cpuidle_device *dev); | ||
| 127 | extern int cpuidle_enter(struct cpuidle_driver *drv, | ||
| 128 | struct cpuidle_device *dev, int index); | ||
| 129 | extern void cpuidle_reflect(struct cpuidle_device *dev, int index); | ||
| 130 | |||
| 123 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | 131 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); |
| 124 | extern struct cpuidle_driver *cpuidle_get_driver(void); | 132 | extern struct cpuidle_driver *cpuidle_get_driver(void); |
| 125 | extern struct cpuidle_driver *cpuidle_driver_ref(void); | 133 | extern struct cpuidle_driver *cpuidle_driver_ref(void); |
| @@ -141,7 +149,16 @@ extern int cpuidle_play_dead(void); | |||
| 141 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | 149 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); |
| 142 | #else | 150 | #else |
| 143 | static inline void disable_cpuidle(void) { } | 151 | static inline void disable_cpuidle(void) { } |
| 144 | static inline int cpuidle_idle_call(void) { return -ENODEV; } | 152 | static inline int cpuidle_enabled(struct cpuidle_driver *drv, |
| 153 | struct cpuidle_device *dev) | ||
| 154 | {return -ENODEV; } | ||
| 155 | static inline int cpuidle_select(struct cpuidle_driver *drv, | ||
| 156 | struct cpuidle_device *dev) | ||
| 157 | {return -ENODEV; } | ||
| 158 | static inline int cpuidle_enter(struct cpuidle_driver *drv, | ||
| 159 | struct cpuidle_device *dev, int index) | ||
| 160 | {return -ENODEV; } | ||
| 161 | static inline void cpuidle_reflect(struct cpuidle_device *dev, int index) { } | ||
| 145 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) | 162 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) |
| 146 | {return -ENODEV; } | 163 | {return -ENODEV; } |
| 147 | static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } | 164 | static 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; } |
| 164 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 181 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
| 165 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | 182 | static inline int cpuidle_play_dead(void) {return -ENODEV; } |
| 183 | static 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 |
