This is a note to let you know that I've just added the patch titled PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pm-qos-redefine-freq_qos_max_default_value-to-s32_max.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c6a3aea93571a5393602256d8f74772bd64c8225 Mon Sep 17 00:00:00 2001 From: Leonard Crestez <leonard.crestez@xxxxxxx> Date: Tue, 26 Nov 2019 17:17:11 +0200 Subject: PM / QoS: Redefine FREQ_QOS_MAX_DEFAULT_VALUE to S32_MAX From: Leonard Crestez <leonard.crestez@xxxxxxx> commit c6a3aea93571a5393602256d8f74772bd64c8225 upstream. 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: 77751a466ebd ("PM: QoS: Introduce frequency QoS") Signed-off-by: Leonard Crestez <leonard.crestez@xxxxxxx> Reported-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx> Reviewed-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx> Cc: 5.4+ <stable@xxxxxxxxxxxxxxx> # 5.4+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/linux/pm_qos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -256,7 +256,7 @@ static inline s32 dev_pm_qos_raw_resume_ #endif #define FREQ_QOS_MIN_DEFAULT_VALUE 0 -#define FREQ_QOS_MAX_DEFAULT_VALUE (-1) +#define FREQ_QOS_MAX_DEFAULT_VALUE S32_MAX enum freq_qos_req_type { FREQ_QOS_MIN = 1, Patches currently in stable-queue which might be from leonard.crestez@xxxxxxx are queue-5.4/pm-qos-redefine-freq_qos_max_default_value-to-s32_max.patch