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: <CYYPR12MB8655D429C48DFB2ADB819D479C439@CYYPR12MB8655.namprd12.prod.outlook.com>
Date:   Mon, 22 May 2023 07:27:05 +0000
From:   "Yuan, Perry" <Perry.Yuan@....com>
To:     "Karny, Wyes" <Wyes.Karny@....com>
CC:     "Limonciello, Mario" <Mario.Limonciello@....com>,
        "Jinzhou.Su@....com" <Jinzhou.Su@....com>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
        "rafael@...nel.org" <rafael@...nel.org>,
        "Huang, Ray" <Ray.Huang@....com>
Subject: RE: [PATCH 2/2] cpufreq/amd-pstate: Remove unnecessary active state
 checks

[AMD Official Use Only - General]

Hi Wyse.

> -----Original Message-----
> From: Karny, Wyes <Wyes.Karny@....com>
> Sent: Monday, May 22, 2023 2:33 PM
> To: Huang, Ray <Ray.Huang@....com>; rafael@...nel.org;
> viresh.kumar@...aro.org
> Cc: Limonciello, Mario <Mario.Limonciello@....com>; Jinzhou.Su@....com;
> Yuan, Perry <Perry.Yuan@....com>; linux-pm@...r.kernel.org; linux-
> kernel@...r.kernel.org; Karny, Wyes <Wyes.Karny@....com>
> Subject: [PATCH 2/2] cpufreq/amd-pstate: Remove unnecessary active state
> checks
> 
> Some functions are only specific to amd_pstate active mode driver.  This
> functions cannot be called from passive/guided mode paths, therefore remove
> these unnecessary checks.
> 
> Fixes: d4da12f8033a ("cpufreq: amd-pstate: implement amd pstate cpu online
> and offline callback")
> Fixes: 50ddd2f78269 ("cpufreq: amd-pstate: implement suspend and resume
> callbacks")
> 
> Signed-off-by: Wyes Karny <wyes.karny@....com>
> ---
>  drivers/cpufreq/amd-pstate.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index
> 8c72f95ac315..fda66a206d26 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1209,10 +1209,8 @@ static int amd_pstate_epp_cpu_online(struct
> cpufreq_policy *policy)
> 
>  	pr_debug("AMD CPU Core %d going online\n", cpudata->cpu);
> 
> -	if (cppc_state == AMD_PSTATE_ACTIVE) {
> -		amd_pstate_epp_reenable(policy->cpu, cpudata);
> -		cpudata->suspended = false;
> -	}
> +	amd_pstate_epp_reenable(policy->cpu, cpudata);
> +	cpudata->suspended = false;
> 

Thanks for your patch to improve the pstate driver. 
Have you tested the online and offline callback can work for non-epp modes ?
If the callback works well, glad to add the review by for the patch.

Perry. 

>  	return 0;
>  }
> @@ -1255,8 +1253,7 @@ static int amd_pstate_epp_cpu_offline(struct
> cpufreq_policy *policy)
>  	if (cpudata->suspended)
>  		return 0;
> 
> -	if (cppc_state == AMD_PSTATE_ACTIVE)
> -		amd_pstate_epp_offline(policy);
> +	amd_pstate_epp_offline(policy);
> 
>  	return 0;
>  }
> @@ -1273,10 +1270,6 @@ static int amd_pstate_epp_suspend(struct
> cpufreq_policy *policy)
>  	struct amd_cpudata *cpudata = policy->driver_data;
>  	int ret;
> 
> -	/* avoid suspending when EPP is not enabled */
> -	if (cppc_state != AMD_PSTATE_ACTIVE)
> -		return 0;
> -
>  	/* set this flag to avoid setting core offline*/
>  	cpudata->suspended = true;
> 
> --
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ