[v2,6/6] cpufreq: amd-pstate: remove legacy set_boost callback for passive mode

Message ID e0746643c781f638c9e9cb8a6d2ceebeeb906f95.1707047943.git.perry.yuan@amd.com
State New
Headers
Series AMD Pstate Driver Core Performance Boost |

Commit Message

Yuan, Perry Feb. 4, 2024, 12:12 p.m. UTC
  With new freqency boost interface supported, legacy boost control
doesn't make sense any more which only support passive mode.
so it can remove the legacy set_boost interface from amd-pstate driver
in case of there is conflict with new boost control logic.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
---
 drivers/cpufreq/amd-pstate.c | 1 -
 include/linux/amd-pstate.h   | 1 -
 2 files changed, 2 deletions(-)
  

Comments

Oleksandr Natalenko Feb. 4, 2024, 2:57 p.m. UTC | #1
Hello.

On neděle 4. února 2024 13:12:57 CET Perry Yuan wrote:
> With new freqency boost interface supported, legacy boost control
> doesn't make sense any more which only support passive mode.
> so it can remove the legacy set_boost interface from amd-pstate driver
> in case of there is conflict with new boost control logic.
> 
> Signed-off-by: Perry Yuan <perry.yuan@amd.com>
> ---
>  drivers/cpufreq/amd-pstate.c | 1 -
>  include/linux/amd-pstate.h   | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 02a76b8fb298..4e377efdd4ed 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1492,7 +1492,6 @@ static struct cpufreq_driver amd_pstate_driver = {
>  	.exit		= amd_pstate_cpu_exit,
>  	.suspend	= amd_pstate_cpu_suspend,
>  	.resume		= amd_pstate_cpu_resume,
> -	.set_boost	= amd_pstate_set_boost,
>  	.name		= "amd-pstate",
>  	.attr		= amd_pstate_attr,
>  };
> diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
> index 446394f84606..66d939a344b1 100644
> --- a/include/linux/amd-pstate.h
> +++ b/include/linux/amd-pstate.h
> @@ -80,7 +80,6 @@ struct amd_cpudata {
>  	struct amd_aperf_mperf prev;
>  
>  	u64	freq;
> -	bool	boost_supported;

This leaves amd_pstate_ut_check_freq() in drivers/cpufreq/amd-pstate-ut.c broken. Likely, the whole `if (cpudata->boost_supported) {` hunk should be removed there too.

Also, in the header file, there's kernel-doc before `struct amd_cpudata`, where boost_supported is mentioned. It should be removed too then.

>  
>  	/* EPP feature related attributes*/
>  	s16	epp_policy;
>
  
Mario Limonciello Feb. 5, 2024, 4:28 p.m. UTC | #2
On 2/4/2024 08:57, Oleksandr Natalenko wrote:
> Hello.
> 
> On neděle 4. února 2024 13:12:57 CET Perry Yuan wrote:
>> With new freqency boost interface supported, legacy boost control
>> doesn't make sense any more which only support passive mode.
>> so it can remove the legacy set_boost interface from amd-pstate driver
>> in case of there is conflict with new boost control logic.
>>
>> Signed-off-by: Perry Yuan <perry.yuan@amd.com>
>> ---
>>   drivers/cpufreq/amd-pstate.c | 1 -
>>   include/linux/amd-pstate.h   | 1 -
>>   2 files changed, 2 deletions(-)
>>
>> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
>> index 02a76b8fb298..4e377efdd4ed 100644
>> --- a/drivers/cpufreq/amd-pstate.c
>> +++ b/drivers/cpufreq/amd-pstate.c
>> @@ -1492,7 +1492,6 @@ static struct cpufreq_driver amd_pstate_driver = {
>>   	.exit		= amd_pstate_cpu_exit,
>>   	.suspend	= amd_pstate_cpu_suspend,
>>   	.resume		= amd_pstate_cpu_resume,
>> -	.set_boost	= amd_pstate_set_boost,
>>   	.name		= "amd-pstate",
>>   	.attr		= amd_pstate_attr,
>>   };
>> diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
>> index 446394f84606..66d939a344b1 100644
>> --- a/include/linux/amd-pstate.h
>> +++ b/include/linux/amd-pstate.h
>> @@ -80,7 +80,6 @@ struct amd_cpudata {
>>   	struct amd_aperf_mperf prev;
>>   
>>   	u64	freq;
>> -	bool	boost_supported;
> 
> This leaves amd_pstate_ut_check_freq() in drivers/cpufreq/amd-pstate-ut.c broken. Likely, the whole `if (cpudata->boost_supported) {` hunk should be removed there too.
> 
> Also, in the header file, there's kernel-doc before `struct amd_cpudata`, where boost_supported is mentioned. It should be removed too then.

Yeah; I though the kernel robot caught this on v1 too.  Make sure you 
run the unit tests at *each* patch so that this code remains bisectable.

> 
>>   
>>   	/* EPP feature related attributes*/
>>   	s16	epp_policy;
>>
> 
>
  

Patch

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 02a76b8fb298..4e377efdd4ed 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1492,7 +1492,6 @@  static struct cpufreq_driver amd_pstate_driver = {
 	.exit		= amd_pstate_cpu_exit,
 	.suspend	= amd_pstate_cpu_suspend,
 	.resume		= amd_pstate_cpu_resume,
-	.set_boost	= amd_pstate_set_boost,
 	.name		= "amd-pstate",
 	.attr		= amd_pstate_attr,
 };
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
index 446394f84606..66d939a344b1 100644
--- a/include/linux/amd-pstate.h
+++ b/include/linux/amd-pstate.h
@@ -80,7 +80,6 @@  struct amd_cpudata {
 	struct amd_aperf_mperf prev;
 
 	u64	freq;
-	bool	boost_supported;
 
 	/* EPP feature related attributes*/
 	s16	epp_policy;