lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Oct 2020 16:58:16 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Wei Huang <wei.huang2@....com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 1/1] acpi-cpufreq: Honor _PSD table setting in CPU
 frequency control

On Wed, Oct 7, 2020 at 10:44 PM Wei Huang <wei.huang2@....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@....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..1e6e2abde428 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) && (c->x86 < 0x19) &&

Why don't you use boot_cpu_data instead of *c?

And why don't you do the extra check in check_amd_hwpstate_cpu()?

Also the parens around it are not necessary here and is there any
chance for having a proper symbol instead of the raw 0x19 in that
check?

> +           !acpi_pstate_strict) {
>                 cpumask_clear(policy->cpus);
>                 cpumask_set_cpu(cpu, policy->cpus);
>                 cpumask_copy(data->freqdomain_cpus,
> --
> 2.26.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ