diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-02-12 00:37:11 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-02-14 10:37:27 +0100 |
commit | 814d51f8889bc4afa75f647eeffd5ff0a5620e8d (patch) | |
tree | 40c7ea7b29fe0f741507792237cb5bbdc87d810e /include/linux/pm_qos.h | |
parent | b8e6e27c626e60bb5708ce8c974b58c485c32ac7 (diff) | |
download | linux-814d51f8889bc4afa75f647eeffd5ff0a5620e8d.tar.gz linux-814d51f8889bc4afa75f647eeffd5ff0a5620e8d.tar.bz2 linux-814d51f8889bc4afa75f647eeffd5ff0a5620e8d.zip |
PM: QoS: Make CPU latency QoS depend on CONFIG_CPU_IDLE
Because cpuidle is the only user of the effective constraint coming
from the CPU latency QoS, add #ifdef CONFIG_CPU_IDLE around that code
to avoid building it unnecessarily.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Amit Kucheria <amit.kucheria@linaro.org>
Diffstat (limited to 'include/linux/pm_qos.h')
-rw-r--r-- | include/linux/pm_qos.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index df065db3f57a..4a69d4af3ff8 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -143,11 +143,24 @@ bool pm_qos_update_flags(struct pm_qos_flags *pqf, struct pm_qos_flags_request *req, enum pm_qos_req_action action, s32 val); +#ifdef CONFIG_CPU_IDLE s32 cpu_latency_qos_limit(void); bool cpu_latency_qos_request_active(struct pm_qos_request *req); void cpu_latency_qos_add_request(struct pm_qos_request *req, s32 value); void cpu_latency_qos_update_request(struct pm_qos_request *req, s32 new_value); void cpu_latency_qos_remove_request(struct pm_qos_request *req); +#else +static inline s32 cpu_latency_qos_limit(void) { return INT_MAX; } +static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req) +{ + return false; +} +static inline void cpu_latency_qos_add_request(struct pm_qos_request *req, + s32 value) {} +static inline void cpu_latency_qos_update_request(struct pm_qos_request *req, + s32 new_value) {} +static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req) {} +#endif #ifdef CONFIG_PM enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, s32 mask); |