Skip to content

Commit c6a3aea

Browse files
cdleonardrafaeljw
authored andcommitted
PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX
QOS requests for DEFAULT_VALUE are supposed to be ignored but this is not the case for FREQ_QOS_MAX. Adding one request for MAX_DEFAULT_VALUE and one for a real value will cause freq_qos_read_value to unexpectedly return MAX_DEFAULT_VALUE (-1). This happens because freq_qos max value is aggregated with PM_QOS_MIN but FREQ_QOS_MAX_DEFAULT_VALUE is (-1) so it's smaller than other values. Fix this by redefining FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX. Looking at current users for freq_qos it seems that none of them create requests for FREQ_QOS_MAX_DEFAULT_VALUE. Fixes: 77751a4 ("PM: QoS: Introduce frequency QoS") Signed-off-by: Leonard Crestez <[email protected]> Reported-by: Matthias Kaehlcke <[email protected]> Reviewed-by: Matthias Kaehlcke <[email protected]> Cc: 5.4+ <[email protected]> # 5.4+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 6e9f879 commit c6a3aea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/pm_qos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static inline s32 dev_pm_qos_raw_resume_latency(struct device *dev)
256256
#endif
257257

258258
#define FREQ_QOS_MIN_DEFAULT_VALUE 0
259-
#define FREQ_QOS_MAX_DEFAULT_VALUE (-1)
259+
#define FREQ_QOS_MAX_DEFAULT_VALUE S32_MAX
260260

261261
enum freq_qos_req_type {
262262
FREQ_QOS_MIN = 1,

0 commit comments

Comments
 (0)