mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Modify the function to et the highest_perf value
@ 2023-08-01  0:47 Meng Li
  2023-08-01  1:10 ` Mario Limonciello
  0 siblings, 1 reply; 3+ messages in thread
From: Meng Li @ 2023-08-01  0:47 UTC (permalink / raw)
  To: Rafael J . Wysocki, Huang Rui, linux-pm
  Cc: Shuah Khan, linux-kselftest, Nathan Fontenot, Deepak Sharma,
	Alex Deucher, Mario Limonciello, Shimmer Huang, Perry Yuan,
	Xiaojian Du, Viresh Kumar, Borislav Petkov, linux-kernel,
	Meng Li

The previous function will be deprecated.

Signed-off-by: Meng Li <li.meng@amd.com>
---
 drivers/cpufreq/amd-pstate-ut.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
index 7f3fe2048981..9c889a4a0177 100644
--- a/drivers/cpufreq/amd-pstate-ut.c
+++ b/drivers/cpufreq/amd-pstate-ut.c
@@ -145,8 +145,6 @@ static void amd_pstate_ut_check_perf(u32 index)
 	struct cpufreq_policy *policy = NULL;
 	struct amd_cpudata *cpudata = NULL;
 
-	highest_perf = amd_get_highest_perf();
-
 	for_each_possible_cpu(cpu) {
 		policy = cpufreq_cpu_get(cpu);
 		if (!policy)
@@ -161,6 +159,7 @@ static void amd_pstate_ut_check_perf(u32 index)
 				return;
 			}
 
+			highest_perf = cppc_perf.highest_perf;
 			nominal_perf = cppc_perf.nominal_perf;
 			lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf;
 			lowest_perf = cppc_perf.lowest_perf;
@@ -172,6 +171,7 @@ static void amd_pstate_ut_check_perf(u32 index)
 				return;
 			}
 
+			highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
 			nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1);
 			lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1);
 			lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Modify the function to et the highest_perf value
  2023-08-01  0:47 [PATCH] Modify the function to et the highest_perf value Meng Li
@ 2023-08-01  1:10 ` Mario Limonciello
  2023-08-01  8:52   ` Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2023-08-01  1:10 UTC (permalink / raw)
  To: Meng Li, Rafael J . Wysocki, Huang Rui, linux-pm
  Cc: Shuah Khan, linux-kselftest, Nathan Fontenot, Deepak Sharma,
	Alex Deucher, Shimmer Huang, Perry Yuan, Xiaojian Du,
	Viresh Kumar, Borislav Petkov, linux-kernel

On 7/31/23 19:47, Meng Li wrote:
> The previous function will be deprecated.
> 
> Signed-off-by: Meng Li <li.meng@amd.com>
> ---

This actually has functional impact; doesn't it?  Can you better 
describe the reasoning and expected impact in the commit message?

>   drivers/cpufreq/amd-pstate-ut.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
> index 7f3fe2048981..9c889a4a0177 100644
> --- a/drivers/cpufreq/amd-pstate-ut.c
> +++ b/drivers/cpufreq/amd-pstate-ut.c
> @@ -145,8 +145,6 @@ static void amd_pstate_ut_check_perf(u32 index)
>   	struct cpufreq_policy *policy = NULL;
>   	struct amd_cpudata *cpudata = NULL;
>   
> -	highest_perf = amd_get_highest_perf();
> -
>   	for_each_possible_cpu(cpu) {
>   		policy = cpufreq_cpu_get(cpu);
>   		if (!policy)
> @@ -161,6 +159,7 @@ static void amd_pstate_ut_check_perf(u32 index)
>   				return;
>   			}
>   
> +			highest_perf = cppc_perf.highest_perf;
>   			nominal_perf = cppc_perf.nominal_perf;
>   			lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf;
>   			lowest_perf = cppc_perf.lowest_perf;
> @@ -172,6 +171,7 @@ static void amd_pstate_ut_check_perf(u32 index)
>   				return;
>   			}
>   
> +			highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
>   			nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1);
>   			lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1);
>   			lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Modify the function to et the highest_perf value
  2023-08-01  1:10 ` Mario Limonciello
@ 2023-08-01  8:52   ` Viresh Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2023-08-01  8:52 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Meng Li, Rafael J . Wysocki, Huang Rui, linux-pm, Shuah Khan,
	linux-kselftest, Nathan Fontenot, Deepak Sharma, Alex Deucher,
	Shimmer Huang, Perry Yuan, Xiaojian Du, Borislav Petkov,
	linux-kernel

On 31-07-23, 20:10, Mario Limonciello wrote:
> On 7/31/23 19:47, Meng Li wrote:
> > The previous function will be deprecated.
> > 
> > Signed-off-by: Meng Li <li.meng@amd.com>
> > ---
> 
> This actually has functional impact; doesn't it?  Can you better describe
> the reasoning and expected impact in the commit message?

Also write the $Subject properly like:

cpufreq: amd-pstate-ut: ...

-- 
viresh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-01  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01  0:47 [PATCH] Modify the function to et the highest_perf value Meng Li
2023-08-01  1:10 ` Mario Limonciello
2023-08-01  8:52   ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®