• Rafael J. Wysocki's avatar
    cpufreq: intel_pstate: hybrid: Use known scaling factor for P-cores · f5c8cf2a
    Rafael J. Wysocki authored
    Commit 46573fd6 ("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: 46573fd6 ("cpufreq: intel_pstate: hybrid: Rework HWP calibration")
    Reported-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Tested-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Cc: 5.15+ <stable@vger.kernel.org> # 5.15+
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    f5c8cf2a
intel_pstate.c 89.6 KB