Re: [PATCH v2 3/4] cpufreq: Remove driver default policy->min/max init
From: Jie Zhan
Date: Wed May 20 2026 - 04:39:17 EST
On 5/11/2026 9:55 PM, Pierre Gondois wrote:
> Prior to [1], drivers were setting policy->min/max and
> the value was used as a QoS constraint. After that change,
> the values were only temporarily used: cpufreq_set_policy()
> ultimately overriding them through:
> cpufreq_policy_online()
> \-cpufreq_init_policy()
> \-cpufreq_set_policy()
> \-/* Set policy->min/max */
>
> This patch reinstate the initial behaviour. This will allow
> drivers to request min/max QoS frequencies if desired.
> For instance, the cppc driver advertises a lowest non-linear
> frequency, which should be used as a min QoS value.
>
> To avoid having drivers setting policy->min/max to default
> values which are considered as QoS values (i.e. the reason
> why [1] was introduced), remove the initialization of
> policy->min/max in .init() callbacks wherever the
> policy->min/max values are identical to the
> policy->cpuinfo.min/max_freq.
>
> Indeed, the previous patch ("cpufreq: Set default
> policy->min/max values for all drivers") makes this initialization
> redundant.
>
> The only drivers where these values are different are:
> - gx-suspmod.c (min)
> - cppc-cpufreq.c (min)
> - longrun.c
>
> [1]
> commit 521223d8b3ec ("cpufreq: Fix initialization of min and
> max frequency QoS requests")
>
Acked-by: Jie Zhan <zhanjie9@xxxxxxxxxxxxx>
for the CPPC part, though the rest looks fine but in case I miss something.
> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> ---
> drivers/cpufreq/amd-pstate.c | 14 ++++++--------
> drivers/cpufreq/cppc_cpufreq.c | 5 ++---
> drivers/cpufreq/cpufreq-nforce2.c | 4 ++--
> drivers/cpufreq/freq_table.c | 7 +++----
> drivers/cpufreq/gx-suspmod.c | 2 +-
> drivers/cpufreq/intel_pstate.c | 3 ---
> drivers/cpufreq/pcc-cpufreq.c | 10 ++++------
> drivers/cpufreq/pxa3xx-cpufreq.c | 5 ++---
> drivers/cpufreq/sh-cpufreq.c | 6 ++----
> drivers/cpufreq/virtual-cpufreq.c | 5 +----
> 10 files changed, 23 insertions(+), 38 deletions(-)
>
[ ... ]