]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
cpufreq: intel_pstate: hybrid: Use known scaling factor for P-cores
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 24 Oct 2022 19:22:48 +0000 (21:22 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 28 Nov 2022 14:18:06 +0000 (15:18 +0100)
commit2360ae5e6eec22654afce1e287fdd22eecc289dc
tree31d531bf8df8352e21e822206d103a8ec94aa07b
parent6f845e4c9e896a15082c9ed29c830c0fe7ae9e10
cpufreq: intel_pstate: hybrid: Use known scaling factor for P-cores

BugLink: https://bugs.launchpad.net/bugs/1997981
commit f5c8cf2a4992dd929fa0c2f25c09ee69b8dcbce1 upstream.

Commit 46573fd6369f ("cpufreq: intel_pstate: hybrid: Rework HWP
calibration") attempted to use the information from CPPC (the nominal
performance in particular) to obtain the scaling factor allowing the
frequency to be computed if the HWP performance level of the given CPU
is known or vice versa.

However, it turns out that on some platforms this doesn't work, because
the CPPC information on them does not align with the contents of the
MSR_HWP_CAPABILITIES registers.

This basically means that the only way to make intel_pstate work on all
of the hybrid platforms to date is to use the observation that on all
of them the scaling factor between the HWP performance levels and
frequency for P-cores is 78741 (approximately 100000/1.27).  For
E-cores it is 100000, which is the same as for all of the non-hybrid
"core" platforms and does not require any changes.

Accordingly, make intel_pstate use 78741 as the scaling factor between
HWP performance levels and frequency for P-cores on all hybrid platforms
and drop the dependency of the HWP calibration code on CPPC.

Fixes: 46573fd6369f ("cpufreq: intel_pstate: hybrid: Rework HWP calibration")
Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 5.15+ <stable@vger.kernel.org> # 5.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/cpufreq/intel_pstate.c