ACPI: CPPC: Drop compliance checks involving nominal performance
Rafael J. Wysocki
maintainerPATCH v3 1/1 ACPI: CPPC: Drop compliance checks involving nominal performance
From: "Rafael J. Wysocki" <[email protected]>
On a number of Intel platforms in the field, the nominal performance value in ACPI _CPC (which is an integer embedded in the _CPC package) is less than the guaranteed performance value, and it may even be less than the minimum nonlinear performance value or greater than the highest performance value (that all come from register reads).
The new specification compliance checks involving those values added by commit 32299b29a887 ("ACPI: CPPC: Validate _CPC entry and control semantics") cause the CPPC library to refuse to work for some CPUs on the affected systems which in turn causes the intel_pstate driver to overestimate the maximum performance levels for those CPUs. One of the affected systems is Dell Pro 5 14 P514260.
In this particular case, the fact that the specification is not exactly followed has no implications and the checks enforcing compliance are not really useful, so drop the checks in question from the CPPC library.
If really necessary, they will need to be done elsewhere.
---
Sorry for the quick turnaround, but Sashiko has made a good point that the ordering between high, min_nonlinear and low, and high, guaranteed, and low should still be checked:
https://sashiko.dev/#/patchset/2869679.mvXUDI8C0e%40rafael.j.wysocki
--- drivers/acpi/cppc_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/cppc_acpi.c +2 -2
@@ -2940,9 +2940,9 @@ int cppc_get_perf_caps(int cpunum, strucif (!high || !low || !nom || !ref || !min_nonlinear || high >U32_MAX || low >U32_MAX || guaranteed >U32_MAX || nom >U32_MAX || ref >U32_MAX || min_nonlinear >U32_MAX || - high < nom || nom < min_nonlinear || min_nonlinear < low || + high < min_nonlinear || min_nonlinear < low || (CPC_SUPPORTED (guaranteed_reg) && - (guaranteed < low || guaranteed > nom))) { + (guaranteed < low || guaranteed > high))) { ret = -EFAULT ; goto out_err; }