cpufreq: intel_pstate: Clean up frequency computations
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 16 Mar 2021 15:52:43 +0000 (16:52 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 23 Mar 2021 18:41:14 +0000 (19:41 +0100)
commitde5bcf404acee6218f8f49c9d6dc1f6031a62fa6
treea7e7b17b6d4569860bc48b57a712689f5f628b2b
parent4c56f573bd941dcdcbbcd58d91489e994715eb47
cpufreq: intel_pstate: Clean up frequency computations

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@intel.com>
Tested-by: Chen Yu <yu.c.chen@intel.com>
drivers/cpufreq/intel_pstate.c