Skip to contentSkip to conversation

acpi-cpufreq: Honor _PSD table setting on new AMD CPUs

RHEL8.4 bz1886943 Terry Bowman 3 participants 3 messages Dec 17, 2020 – Dec 20, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Bugzilla: http://bugzilla.redhat.com/1886943
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=33761621
Upstream: 5.10-rc, https://lkml.org/lkml/2020/10/19/488
Test: Manual testing looking for PSD override in dmesg.
Using amd-daytona-01.khw1.lab.eng.bos.redhat.com, EPYC Milan

commit 5368512abe08 ("acpi-cpufreq: Honor _PSD table setting on new AMD CPUs")

Author: Wei Huang <[email protected]>
Date:   Sun Oct 18 22:57:41 2020 -0500

acpi-cpufreq: Honor _PSD table setting on new AMD CPUs

acpi-cpufreq has a old quirk that overrides the _PSD table supplied by BIOS on AMD CPUs. However the _PSD table of new AMD CPUs (Family 19h+) now accurately reports the P-state dependency of CPU cores. Hence this quirk needs to be fixed in order to support new CPUs' frequency control.

Fixes acd316248205 ("acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs")
[ rjw: Subject edit ]
Cc 3.10+ <[email protected]> # 3.10+
[ tb: reformat for checkpatch ]
Cc Al Stone <[email protected]>
Cc Lenny Szubowicz <[email protected]>
Cc Prarit Bhargava <[email protected]>
Cc David Arcari <[email protected]>
---
 drivers/cpufreq/acpi-cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/acpi-cpufreq.c +2 -1
index 2705b4c86a83..3a4efb282807 100644
@@ -686,7 +686,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
 		cpumask_copy(policy->cpus, topology_core_cpumask(cpu));
 	}
 
-	if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) {
+	if (check_amd_hwpstate_cpu(cpu) && boot_cpu_data.x86 < 0x19 &&
+	    !acpi_pstate_strict) {
 		cpumask_clear(policy->cpus);
 		cpumask_set_cpu(cpu, policy->cpus);
 		cpumask_copy(data->freqdomain_cpus,
Signature · 1 line
2.27.0
#1 lore raw
Quoted 12 lines · Terry Bowman

Bugzilla: http://bugzilla.redhat.com/1886943
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=33761621
Upstream: 5.10-rc, https://lkml.org/lkml/2020/10/19/488
Test: Manual testing looking for PSD override in dmesg.
Using amd-daytona-01.khw1.lab.eng.bos.redhat.com, EPYC Milan

commit 5368512abe08 ("acpi-cpufreq: Honor _PSD table setting on new AMD CPUs")

Author: Wei Huang <[email protected]>
Date:   Sun Oct 18 22:57:41 2020 -0500

acpi-cpufreq: Honor _PSD table setting on new AMD CPUs

Quoted 7 lines

acpi-cpufreq has a old quirk that overrides the _PSD table supplied by BIOS on AMD CPUs. However the _PSD table of new AMD CPUs (Family 19h+) now accurately reports the P-state dependency of CPU cores. Hence this quirk needs to be fixed in order to support new CPUs' frequency control.

Fixes acd316248205 ("acpi-cpufreq: Add quirk to disable _PSD usage on all AMD

CPUs")

Quoted 7 lines
[ rjw: Subject edit ]
Cc 3.10+ <[email protected]> # 3.10+
[ tb: reformat for checkpatch ]

P.

#2 lore raw
In reply to Terry Bowman

Hi,

This is a friendly email about rhcheckpatch. Please consult the data below for more info.

SUMMARY: This patch series has 1 ERRORS and 0 WARNINGS.
Subject: [RHEL8.4 bz1886943] acpi-cpufreq: Honor _PSD table setting on new AMD CPUs
E Commit: no valid id found! (if not upstream, add RHEL-only and explain why)

1 patch(es) checked, ERRORS: 1, WARNINGS: 0

--
# Generated by 'rhcheckpatch.py'
# For source: https://gitlab.cee.redhat.com/cki-project/rhel-tools
# For documentation read
# https://gitlab.cee.redhat.com/cki-project/rhel-tools/blob/main/README.md