Skip to content

Commit 92a3e42

Browse files
spandruvadarafaeljw
authored andcommitted
cpufreq: intel_pstate: Also use CPPC nominal_perf for base_frequency
The ACPI specification states that if the "Guaranteed Performance Register" is not implemented, the OSPM assumes guaranteed performance to always be equal to nominal performance. So for invalid or unimplemented guaranteed performance register, use nominal performance as guaranteed performance. This change will fall back to nominal_perf when guranteed_perf is invalid. If nominal_perf is also invalid or not present, fall back to the existing implementation, which is to read from HWP Capabilities MSR. Fixes: 86d333a ("cpufreq: intel_pstate: Add base_frequency attribute") Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: 4.20+ <stable@vger.kernel.org> # 4.20+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent edef1ef commit 92a3e42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ static int intel_pstate_get_cppc_guranteed(int cpu)
385385
if (ret)
386386
return ret;
387387

388-
return cppc_perf.guaranteed_perf;
388+
if (cppc_perf.guaranteed_perf)
389+
return cppc_perf.guaranteed_perf;
390+
391+
return cppc_perf.nominal_perf;
389392
}
390393

391394
#else /* CONFIG_ACPI_CPPC_LIB */

0 commit comments

Comments
 (0)