Re: [PATCH v3 2/4] cpufreq: CPPC: Avoid using CPUFREQ_ETERNAL as transition delay

From: Jie Zhan

Date: Sat Sep 27 2025 - 21:59:20 EST




On 9/26/2025 6:19 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> If cppc_get_transition_latency() returns CPUFREQ_ETERNAL to indicate a
> failure to retrieve the transition latency value from the platform
> firmware, the CPPC cpufreq driver will use that value (converted to
> microseconds) as the policy transition delay, but it is way too large
> for any practical use.
>
> Address this by making the driver use the cpufreq's default
> transition latency value (in microseconds) as the transition delay
> if CPUFREQ_ETERNAL is returned by cppc_get_transition_latency().
>
> Fixes: d4f3388afd48 ("cpufreq / CPPC: Set platform specific transition_delay_us")
> Cc: 5.19+ <stable@xxxxxxxxxxxxxxx> # 5.19
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> Reviewed-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>
Reviewed-by: Jie Zhan <zhanjie9@xxxxxxxxxxxxx>
> ---
>
> v1 -> v3:
> * Change the name of the new function (Jie Zhan)
> * Add a tag from Mario Limonciello
>
> ---
> drivers/cpufreq/cppc_cpufreq.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)