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]
Message-ID:
 <CYYPR12MB86551DC2488F5A11ADB643109C4E2@CYYPR12MB8655.namprd12.prod.outlook.com>
Date: Thu, 24 Oct 2024 05:14:17 +0000
From: "Yuan, Perry" <Perry.Yuan@....com>
To: "Ugwekar, Dhananjay" <Dhananjay.Ugwekar@....com>
CC: "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Shenoy,
 Gautham Ranjal" <gautham.shenoy@....com>, "Limonciello, Mario"
	<Mario.Limonciello@....com>, "rafael@...nel.org" <rafael@...nel.org>,
	"viresh.kumar@...aro.org" <viresh.kumar@...aro.org>
Subject: RE: [PATCH 3/4] cpufreq/amd-pstate: Call cppc_set_epp_perf in the
 reenable function

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Ugwekar, Dhananjay <Dhananjay.Ugwekar@....com>
> Sent: Wednesday, October 23, 2024 6:21 PM
> To: Shenoy, Gautham Ranjal <gautham.shenoy@....com>; Limonciello, Mario
> <Mario.Limonciello@....com>; Yuan, Perry <Perry.Yuan@....com>;
> rafael@...nel.org; viresh.kumar@...aro.org
> Cc: linux-pm@...r.kernel.org; linux-kernel@...r.kernel.org; Ugwekar, Dhananjay
> <Dhananjay.Ugwekar@....com>
> Subject: [PATCH 3/4] cpufreq/amd-pstate: Call cppc_set_epp_perf in the reenable
> function
>
> The EPP value being set in perf_ctrls.energy_perf is not being propagated to the
> shared memory, fix that.
>
> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
> ---
>  drivers/cpufreq/amd-pstate.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index
> 576251e61ce0..bbeddce90823 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1616,8 +1616,9 @@ static void amd_pstate_epp_reenable(struct
> amd_cpudata *cpudata)
>               wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
>       } else {
>               perf_ctrls.max_perf = max_perf;
> -             perf_ctrls.energy_perf =
> AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
>               cppc_set_perf(cpudata->cpu, &perf_ctrls);
> +             perf_ctrls.energy_perf =
> AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
> +             cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
>       }
>  }
>
> @@ -1658,8 +1659,9 @@ static void amd_pstate_epp_offline(struct cpufreq_policy
> *policy)
>       } else {
>               perf_ctrls.desired_perf = 0;
>               perf_ctrls.max_perf = min_perf;
> -             perf_ctrls.energy_perf =
> AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
>               cppc_set_perf(cpudata->cpu, &perf_ctrls);
> +             perf_ctrls.energy_perf =
> AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
> +             cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
>       }
>       mutex_unlock(&amd_pstate_limits_lock);
>  }
> --
> 2.34.1

LGTM, thanks.


Reviewed-by: Perry Yuan <perry.yuan@....com>


Best Regards.

Perry.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ