diff mbox series

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

Message ID c9653c82afd9a11a7d3fa466f60d64d7e457968c.1710322310.git.perry.yuan@amd.com (mailing list archive)
State Changes Requested, archived
Headers show
Series AMD Pstate Driver Core Performance Boost | expand

Commit Message

Yuan, Perry March 13, 2024, 10:04 a.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   | 2 --
 2 files changed, 3 deletions(-)

Comments

Gautham R. Shenoy March 14, 2024, 10:07 a.m. UTC | #1
Hello Perry,

On Wed, Mar 13, 2024 at 06:04:43PM +0800, Perry Yuan wrote:
> With new freqency boost interface supported, legacy boost control
> doesn't make sense any more which only support passive mode.

Why is the legacy boost control restricted only to the passive mode ?

Can we not add .set_boost to amd_pstate_set_boost in
amd_pstate_epp_driver ?

--
Thanks and Regards
gautham.

> 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   | 2 --
>  2 files changed, 3 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index d7afbded6e3d..4a24db868cb1 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1689,7 +1689,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,
>  	.update_limits	= amd_pstate_update_limits,
>  	.name		= "amd-pstate",
>  	.attr		= amd_pstate_attr,
> diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
> index c6e2a97913de..7130b297c522 100644
> --- a/include/linux/amd-pstate.h
> +++ b/include/linux/amd-pstate.h
> @@ -56,7 +56,6 @@ struct amd_aperf_mperf {
>   * @cur: Difference of Aperf/Mperf/tsc count between last and current sample
>   * @prev: Last Aperf/Mperf/tsc count value read from register
>   * @freq: current cpu frequency value
> - * @boost_supported: check whether the Processor or SBIOS supports boost mode
>   * @hw_prefcore: check whether HW supports preferred core featue.
>   * 		  Only when hw_prefcore and early prefcore param are true,
>   * 		  AMD P-State driver supports preferred core featue.
> @@ -93,7 +92,6 @@ struct amd_cpudata {
>  	struct amd_aperf_mperf prev;
>  
>  	u64	freq;
> -	bool	boost_supported;
>  	bool	hw_prefcore;
>  
>  	/* EPP feature related attributes*/
> -- 
> 2.34.1
>
Yuan, Perry March 14, 2024, 10:15 a.m. UTC | #2
[AMD Official Use Only - General]

> -----Original Message-----
> From: Shenoy, Gautham Ranjal <gautham.shenoy@amd.com>
> Sent: Thursday, March 14, 2024 6:07 PM
> To: Yuan, Perry <Perry.Yuan@amd.com>
> Cc: rafael.j.wysocki@intel.com; Limonciello, Mario
> <Mario.Limonciello@amd.com>; viresh.kumar@linaro.org; Huang, Ray
> <Ray.Huang@amd.com>; Petkov, Borislav <Borislav.Petkov@amd.com>;
> Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Shimmer
> <Shimmer.Huang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Meng,
> Li (Jassmine) <Li.Meng@amd.com>; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v4 6/7] cpufreq: amd-pstate: remove legacy set_boost
> callback for passive mode
>
> Hello Perry,
>
> On Wed, Mar 13, 2024 at 06:04:43PM +0800, Perry Yuan wrote:
> > With new freqency boost interface supported, legacy boost control
> > doesn't make sense any more which only support passive mode.
>
> Why is the legacy boost control restricted only to the passive mode ?
>
> Can we not add .set_boost to amd_pstate_set_boost in
> amd_pstate_epp_driver ?
>
> --
> Thanks and Regards
> gautham.

The new interface is more meaningful to amd-pstate driver, I would like to put the control interface into unique directory like intel dose.
There will be other interfaces to be added, put them into together is more reasonable to control and maintain.

Perry.

>
> > 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   | 2 --
> >  2 files changed, 3 deletions(-)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c
> > b/drivers/cpufreq/amd-pstate.c index d7afbded6e3d..4a24db868cb1
> 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -1689,7 +1689,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,
> >     .update_limits  = amd_pstate_update_limits,
> >     .name           = "amd-pstate",
> >     .attr           = amd_pstate_attr,
> > diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
> > index c6e2a97913de..7130b297c522 100644
> > --- a/include/linux/amd-pstate.h
> > +++ b/include/linux/amd-pstate.h
> > @@ -56,7 +56,6 @@ struct amd_aperf_mperf {
> >   * @cur: Difference of Aperf/Mperf/tsc count between last and current
> sample
> >   * @prev: Last Aperf/Mperf/tsc count value read from register
> >   * @freq: current cpu frequency value
> > - * @boost_supported: check whether the Processor or SBIOS supports
> boost mode
> >   * @hw_prefcore: check whether HW supports preferred core featue.
> >   *                   Only when hw_prefcore and early prefcore param are true,
> >   *                   AMD P-State driver supports preferred core featue.
> > @@ -93,7 +92,6 @@ struct amd_cpudata {
> >     struct amd_aperf_mperf prev;
> >
> >     u64     freq;
> > -   bool    boost_supported;
> >     bool    hw_prefcore;
> >
> >     /* EPP feature related attributes*/
> > --
> > 2.34.1
> >
diff mbox series

Patch

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index d7afbded6e3d..4a24db868cb1 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1689,7 +1689,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,
 	.update_limits	= amd_pstate_update_limits,
 	.name		= "amd-pstate",
 	.attr		= amd_pstate_attr,
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
index c6e2a97913de..7130b297c522 100644
--- a/include/linux/amd-pstate.h
+++ b/include/linux/amd-pstate.h
@@ -56,7 +56,6 @@  struct amd_aperf_mperf {
  * @cur: Difference of Aperf/Mperf/tsc count between last and current sample
  * @prev: Last Aperf/Mperf/tsc count value read from register
  * @freq: current cpu frequency value
- * @boost_supported: check whether the Processor or SBIOS supports boost mode
  * @hw_prefcore: check whether HW supports preferred core featue.
  * 		  Only when hw_prefcore and early prefcore param are true,
  * 		  AMD P-State driver supports preferred core featue.
@@ -93,7 +92,6 @@  struct amd_cpudata {
 	struct amd_aperf_mperf prev;
 
 	u64	freq;
-	bool	boost_supported;
 	bool	hw_prefcore;
 
 	/* EPP feature related attributes*/