* pm-cpuidle: cpuidle-haltpoll: Enable kvm guest polling when dedicated physical CPUs are available cpuidle-haltpoll: do not set an owner to allow modunload cpuidle-haltpoll: return -ENODEV on modinit failure cpuidle-haltpoll: set haltpoll as preferred governor cpuidle: allow governor switch on cpuidle_register_driver() powercap: idle_inject: Use higher resolution for idle injection cpuidle: play_idle: Increase the resolution to usec cpuidle-haltpoll: vcpu hotplug support cpuidle: teo: Get rid of redundant check in teo_update() cpuidle: teo: Allow tick to be stopped if PM QoS is used cpuidle: menu: Allow tick to be stopped if PM QoS is used cpuidle: header file stubs must be "static inline" cpuidle-haltpoll: disable host side polling when kvm virtualized cpuidle: add haltpoll governor governors: unify last_state_idx cpuidle: add poll_limit_ns to cpuidle_device structure add cpuidle-haltpoll driver
Showing the changes to include/linux (4 of 26 files). Show all
Unified · Split
| @@ -179,7 +179,7 @@ void arch_cpu_idle_dead(void); · 178 unmodified lines | |||
| 179 | int cpu_report_state(int cpu); | 179 | int cpu_report_state(int cpu); |
| 180 | int cpu_check_up_prepare(int cpu); | 180 | int cpu_check_up_prepare(int cpu); |
| 181 | void cpu_set_state_online(int cpu); | 181 | void cpu_set_state_online(int cpu); |
| 182 | void play_idle(unsigned long duration_ms); | 182 | void play_idle(unsigned long duration_us); |
| 183 | 183 | ||
| 184 | #ifdef CONFIG_HOTPLUG_CPU | 184 | #ifdef CONFIG_HOTPLUG_CPU |
| 185 | bool cpu_wait_death(unsigned int cpu, int seconds); | 185 | bool cpu_wait_death(unsigned int cpu, int seconds); |
| @@ -85,7 +85,9 @@ struct cpuidle_device { · 84 unmodified lines | |||
| 85 | unsigned int cpu; | 85 | unsigned int cpu; |
| 86 | ktime_t next_hrtimer; | 86 | ktime_t next_hrtimer; |
| 87 | 87 | ||
| 88 | int last_state_idx; | ||
| 88 | int last_residency; | 89 | int last_residency; |
| 90 | u64 poll_limit_ns; | ||
| 89 | struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX]; | 91 | struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX]; |
| 90 | struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX]; | 92 | struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX]; |
| 91 | struct cpuidle_driver_kobj *kobj_driver; | 93 | struct cpuidle_driver_kobj *kobj_driver; |
| @@ -119,6 +121,9 @@ struct cpuidle_driver { · 27 unmodified lines | |||
| 119 | 121 | ||
| 120 | /* the driver handles the cpus in cpumask */ | 122 | /* the driver handles the cpus in cpumask */ |
| 121 | struct cpumask *cpumask; | 123 | struct cpumask *cpumask; |
| 124 | |||
| 125 | /* preferred governor to switch at register time */ | ||
| 126 | const char *governor; | ||
| 122 | }; | 127 | }; |
| 123 | 128 | ||
| 124 | #ifdef CONFIG_CPU_IDLE | 129 | #ifdef CONFIG_CPU_IDLE |
| @@ -132,6 +137,8 @@ extern int cpuidle_select(struct cpuidle_driver *drv, · 7 unmodified lines | |||
| 132 | extern int cpuidle_enter(struct cpuidle_driver *drv, | 137 | extern int cpuidle_enter(struct cpuidle_driver *drv, |
| 133 | struct cpuidle_device *dev, int index); | 138 | struct cpuidle_device *dev, int index); |
| 134 | extern void cpuidle_reflect(struct cpuidle_device *dev, int index); | 139 | extern void cpuidle_reflect(struct cpuidle_device *dev, int index); |
| 140 | extern u64 cpuidle_poll_time(struct cpuidle_driver *drv, | ||
| 141 | struct cpuidle_device *dev); | ||
| 135 | 142 | ||
| 136 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | 143 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); |
| 137 | extern struct cpuidle_driver *cpuidle_get_driver(void); | 144 | extern struct cpuidle_driver *cpuidle_get_driver(void); |
| @@ -166,6 +173,9 @@ static inline int cpuidle_enter(struct cpuidle_driver *drv, · 28 unmodified lines | |||
| 166 | struct cpuidle_device *dev, int index) | 173 | struct cpuidle_device *dev, int index) |
| 167 | {return -ENODEV; } | 174 | {return -ENODEV; } |
| 168 | static inline void cpuidle_reflect(struct cpuidle_device *dev, int index) { } | 175 | static inline void cpuidle_reflect(struct cpuidle_device *dev, int index) { } |
| 176 | static inline u64 cpuidle_poll_time(struct cpuidle_driver *drv, | ||
| 177 | struct cpuidle_device *dev) | ||
| 178 | {return 0; } | ||
| 169 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) | 179 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) |
| 170 | {return -ENODEV; } | 180 | {return -ENODEV; } |
| 171 | static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } | 181 | static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } |
| @@ -0,0 +1,16 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef _CPUIDLE_HALTPOLL_H | ||
| 3 | #define _CPUIDLE_HALTPOLL_H | ||
| 4 | |||
| 5 | #ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL | ||
| 6 | #include <asm/cpuidle_haltpoll.h> | ||
| 7 | #else | ||
| 8 | static inline void arch_haltpoll_enable(unsigned int cpu) | ||
| 9 | { | ||
| 10 | } | ||
| 11 | |||
| 12 | static inline void arch_haltpoll_disable(unsigned int cpu) | ||
| 13 | { | ||
| 14 | } | ||
| 15 | #endif | ||
| 16 | #endif | ||
| @@ -20,10 +20,10 @@ int idle_inject_start(struct idle_inject_device *ii_dev); · 19 unmodified lines | |||
| 20 | void idle_inject_stop(struct idle_inject_device *ii_dev); | 20 | void idle_inject_stop(struct idle_inject_device *ii_dev); |
| 21 | 21 | ||
| 22 | void idle_inject_set_duration(struct idle_inject_device *ii_dev, | 22 | void idle_inject_set_duration(struct idle_inject_device *ii_dev, |
| 23 | unsigned int run_duration_ms, | 23 | unsigned int run_duration_us, |
| 24 | unsigned int idle_duration_ms); | 24 | unsigned int idle_duration_us); |
| 25 | 25 | ||
| 26 | void idle_inject_get_duration(struct idle_inject_device *ii_dev, | 26 | void idle_inject_get_duration(struct idle_inject_device *ii_dev, |
| 27 | unsigned int *run_duration_ms, | 27 | unsigned int *run_duration_us, |
| 28 | unsigned int *idle_duration_ms); | 28 | unsigned int *idle_duration_us); |
| 29 | #endif /* __IDLE_INJECT_H__ */ | 29 | #endif /* __IDLE_INJECT_H__ */ |