History

PM: QoS: Add CPU latency QoS API wrappers

Introduce (temporary) wrappers around pm_qos_request(), pm_qos_request_active() and pm_qos_add/update/remove_request() to provide replacements for them with function signatures that will be used in the final CPU latency QoS API, so that the users of it can be switched over to the new arrangement one by one before the API is finally set. No intentional functional impact.

Rafael J. Wysocki committed 6 years ago

Commit fa048c51 parent e033b6c1 file · +27 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/pm_qos.h+27−0
@@ -152,6 +152,33 @@ void pm_qos_remove_request(struct pm_qos_request *req); · 151 unmodified lines
152152 s32 pm_qos_request(int pm_qos_class);
153153 int pm_qos_request_active(struct pm_qos_request *req);
154154
155+static inline void cpu_latency_qos_add_request(struct pm_qos_request *req,
156+ s32 value)
157+{
158+ pm_qos_add_request(req, PM_QOS_CPU_DMA_LATENCY, value);
159+}
160+
161+static inline void cpu_latency_qos_update_request(struct pm_qos_request *req,
162+ s32 new_value)
163+{
164+ pm_qos_update_request(req, new_value);
165+}
166+
167+static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req)
168+{
169+ pm_qos_remove_request(req);
170+}
171+
172+static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req)
173+{
174+ return pm_qos_request_active(req);
175+}
176+
177+static inline s32 cpu_latency_qos_limit(void)
178+{
179+ return pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
180+}
181+
155182 #ifdef CONFIG_PM
156183 enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, s32 mask);
157184 enum pm_qos_flags_status dev_pm_qos_flags(struct device *dev, s32 mask);