]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfd0ce0d57a87766c97e59f249cd6ef46004c6107
treea7e7b17b6d4569860bc48b57a712689f5f628b2b
parent45958e17df407714a3a56b9af34d2c6918360e30
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