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:   Thu, 15 Jun 2023 17:57:26 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Perry Yuan <perry.yuan@....com>
Cc:     rafael.j.wysocki@...el.com, viresh.kumar@...aro.org,
        Ray.Huang@....com, Mario.Limonciello@....com,
        Deepak.Sharma@....com, Wyes.Karny@....com, gautham.shenoy@....com,
        Sunpeng.Li@....com, Xinmei.Huang@....com, Xiaojian.Du@....com,
        Li.Meng@....com, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] cpufreq: intel_pstate: Use the acpi_pm_profile_server()
 symbol

On Thu, Jun 15, 2023 at 8:35 AM Perry Yuan <perry.yuan@....com> wrote:
>
> From: Mario Limonciello <mario.limonciello@....com>
>
> Avoid duplication of functionality by using the generic symbol.
> This does have a functional change that intel-pstate will now
> match "SOHO server" as well.

And why do you think that it is a good idea to change this behavior?

> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> Signed-off-by: Perry Yuan <Perry.Yuan@....com>
> ---
>  drivers/cpufreq/intel_pstate.c | 19 ++++---------------
>  1 file changed, 4 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 2548ec92faa2..6401338971c7 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -313,18 +313,9 @@ static DEFINE_MUTEX(intel_pstate_limits_lock);
>
>  #ifdef CONFIG_ACPI
>
> -static bool intel_pstate_acpi_pm_profile_server(void)
> -{
> -       if (acpi_gbl_FADT.preferred_profile == PM_ENTERPRISE_SERVER ||
> -           acpi_gbl_FADT.preferred_profile == PM_PERFORMANCE_SERVER)
> -               return true;
> -
> -       return false;
> -}
> -
>  static bool intel_pstate_get_ppc_enable_status(void)
>  {
> -       if (intel_pstate_acpi_pm_profile_server())
> +       if (acpi_pm_profile_server())
>                 return true;
>
>         return acpi_ppc;
> @@ -481,10 +472,6 @@ static inline void intel_pstate_exit_perf_limits(struct cpufreq_policy *policy)
>  {
>  }
>
> -static inline bool intel_pstate_acpi_pm_profile_server(void)
> -{
> -       return false;
> -}
>  #endif /* CONFIG_ACPI */
>
>  #ifndef CONFIG_ACPI_CPPC_LIB
> @@ -2407,8 +2394,10 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
>                 if (hwp_active) {
>                         intel_pstate_hwp_enable(cpu);
>
> -                       if (intel_pstate_acpi_pm_profile_server())
> +#ifdef CONFIG_ACPI
> +                       if (acpi_pm_profile_server())
>                                 hwp_boost = true;
> +#endif
>                 }
>         } else if (hwp_active) {
>                 /*
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ