[PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The upstream commit fa048c59bf1b ("PM: QoS: Add CPU latency QoS API
wrappers") add the new cpu_latency_qos_* functions. In the initial
commit they are just calling the functions from the old API. Use this
first step to backport these functions. They are used by the ath10k and
ipw2100 driver.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/pm_qos.h | 29 ++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/backport/backport-include/linux/pm_qos.h b/backport/backport-include/linux/pm_qos.h
index d5bfc9bc..18cbbace 100644
--- a/backport/backport-include/linux/pm_qos.h
+++ b/backport/backport-include/linux/pm_qos.h
@@ -13,4 +13,33 @@
 #define PM_QOS_DEFAULT_VALUE -1
 #endif
 
+#if LINUX_VERSION_IS_LESS(5,7,0)
+static inline void cpu_latency_qos_add_request(struct pm_qos_request *req,
+                                              s32 value)
+{
+	pm_qos_add_request(req, PM_QOS_CPU_DMA_LATENCY, value);
+}
+
+static inline void cpu_latency_qos_update_request(struct pm_qos_request *req,
+                                                 s32 new_value)
+{
+	pm_qos_update_request(req, new_value);
+}
+
+static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req)
+{
+	pm_qos_remove_request(req);
+}
+
+static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req)
+{
+	return pm_qos_request_active(req);
+}
+
+static inline s32 cpu_latency_qos_limit(void)
+{
+	return pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
+}
+#endif /* < 5.7 */
+
 #endif	/* _COMPAT_LINUX_PM_QOS_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux