Re: [PATCH] cpufreq: intel_pstate: Clean up frequency computations

From: Chen Yu
Date: Tue Mar 23 2021 - 00:57:49 EST


On Tue, Mar 16, 2021 at 04:52:43PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Notice that some computations related to frequency in intel_pstate
> can be simplified if (a) intel_pstate_get_hwp_max() updates the
> relevant members of struct cpudata by itself and (b) the "turbo
> disabled" check is moved from it to its callers, so modify the code
> accordingly and while at it rename intel_pstate_get_hwp_max() to
> intel_pstate_get_hwp_cap() which better reflects its purpose and
> provide a simplified variat of it, __intel_pstate_get_hwp_cap(),
> suitable for the initialization path.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Tested-by: Chen Yu <yu.c.chen@xxxxxxxxx>

thanks,
Chenyu