* [PATCH v2 1/1] acpi-cpufreq: Honor _PSD table setting in CPU frequency control
@ 2020-10-19 3:57 Wei Huang
2020-10-19 15:29 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Wei Huang @ 2020-10-19 3:57 UTC (permalink / raw)
To: linux-kernel; +Cc: rjw, rafael, linux-pm, viresh.kumar, wei.huang2
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")
Signed-off-by: Wei Huang <wei.huang2@amd.com>
---
drivers/cpufreq/acpi-cpufreq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index e4ff681faaaa..1e4fbb002a31 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -691,7 +691,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,
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] acpi-cpufreq: Honor _PSD table setting in CPU frequency control
2020-10-19 3:57 [PATCH v2 1/1] acpi-cpufreq: Honor _PSD table setting in CPU frequency control Wei Huang
@ 2020-10-19 15:29 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-10-19 15:29 UTC (permalink / raw)
To: Wei Huang
Cc: Linux Kernel Mailing List, Rafael J. Wysocki, Rafael J. Wysocki,
Linux PM, Viresh Kumar
On Mon, Oct 19, 2020 at 5:57 AM Wei Huang <wei.huang2@amd.com> wrote:
>
> 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")
> Signed-off-by: Wei Huang <wei.huang2@amd.com>
> ---
> drivers/cpufreq/acpi-cpufreq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> index e4ff681faaaa..1e4fbb002a31 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -691,7 +691,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,
> --
Applied as 5.10-rc material under edited subject, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-19 15:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 3:57 [PATCH v2 1/1] acpi-cpufreq: Honor _PSD table setting in CPU frequency control Wei Huang
2020-10-19 15:29 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).