All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 10/12] cpufreq: cpufreq: export cpufreq cpu release and acquire
@ 2022-07-07 17:01 Perry Yuan
  2022-07-07 19:40 ` Nathan Fontenot
  0 siblings, 1 reply; 3+ messages in thread
From: Perry Yuan @ 2022-07-07 17:01 UTC (permalink / raw)
  To: rafael.j.wysocki, viresh.kumar, Ray.Huang, Rafael J. Wysocki,
	linux-pm, linux-kernel
  Cc: Deepak.Sharma, Mario.Limonciello, Nathan.Fontenot,
	Alexander.Deucher, Jinzhou.Su, Xinmei.Huang, Xiaojian.Du,
	Li.Meng, Perry Yuan

cpufreq_cpu_release" and "cpufreq_cpu_acquire" are only used internally by
drivers/cpufreq/cpufreq.c currently.
Export them so that other drivers such as the AMD P-state driver can use them as well.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
---
 drivers/cpufreq/cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 73432360e6e9..4d3c83da29b7 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -262,6 +262,7 @@ void cpufreq_cpu_release(struct cpufreq_policy *policy)
 
 	cpufreq_cpu_put(policy);
 }
+EXPORT_SYMBOL_GPL(cpufreq_cpu_release);
 
 /**
  * cpufreq_cpu_acquire - Find policy for a CPU, mark it as busy and lock it.
@@ -291,6 +292,7 @@ struct cpufreq_policy *cpufreq_cpu_acquire(unsigned int cpu)
 
 	return policy;
 }
+EXPORT_SYMBOL_GPL(cpufreq_cpu_acquire);
 
 /*********************************************************************
  *            EXTERNALLY AFFECTING FREQUENCY CHANGES                 *
-- 
2.25.1


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

* Re: [PATCH 10/12] cpufreq: cpufreq: export cpufreq cpu release and acquire
  2022-07-07 17:01 [PATCH 10/12] cpufreq: cpufreq: export cpufreq cpu release and acquire Perry Yuan
@ 2022-07-07 19:40 ` Nathan Fontenot
  2022-07-08 11:46   ` Yuan, Perry
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Fontenot @ 2022-07-07 19:40 UTC (permalink / raw)
  To: Perry Yuan, rafael.j.wysocki, viresh.kumar, Ray.Huang,
	Rafael J. Wysocki, linux-pm, linux-kernel
  Cc: Deepak.Sharma, Mario.Limonciello, Nathan.Fontenot,
	Alexander.Deucher, Jinzhou.Su, Xinmei.Huang, Xiaojian.Du,
	Li.Meng

On 7/7/22 12:01, Perry Yuan wrote:
> cpufreq_cpu_release" and "cpufreq_cpu_acquire" are only used internally by
> drivers/cpufreq/cpufreq.c currently.
> Export them so that other drivers such as the AMD P-state driver can use them as well.
> 

Can you provide more information on why this is needed for the amd-pstate driver?

This patch exports the acquire/release functions but I don't see that the amd-pstate
driver is updated to use them.

-Nathan

> Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
> ---
>  drivers/cpufreq/cpufreq.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 73432360e6e9..4d3c83da29b7 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -262,6 +262,7 @@ void cpufreq_cpu_release(struct cpufreq_policy *policy)
>  
>  	cpufreq_cpu_put(policy);
>  }
> +EXPORT_SYMBOL_GPL(cpufreq_cpu_release);
>  
>  /**
>   * cpufreq_cpu_acquire - Find policy for a CPU, mark it as busy and lock it.
> @@ -291,6 +292,7 @@ struct cpufreq_policy *cpufreq_cpu_acquire(unsigned int cpu)
>  
>  	return policy;
>  }
> +EXPORT_SYMBOL_GPL(cpufreq_cpu_acquire);
>  
>  /*********************************************************************
>   *            EXTERNALLY AFFECTING FREQUENCY CHANGES                 *

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

* RE: [PATCH 10/12] cpufreq: cpufreq: export cpufreq cpu release and acquire
  2022-07-07 19:40 ` Nathan Fontenot
@ 2022-07-08 11:46   ` Yuan, Perry
  0 siblings, 0 replies; 3+ messages in thread
From: Yuan, Perry @ 2022-07-08 11:46 UTC (permalink / raw)
  To: Fontenot, Nathan, rafael.j.wysocki, viresh.kumar, Huang, Ray,
	Rafael J. Wysocki, linux-pm, linux-kernel
  Cc: Sharma, Deepak, Limonciello, Mario, Deucher, Alexander, Su,
	Jinzhou (Joe), Huang, Shimmer, Du, Xiaojian, Meng, Li (Jassmine)

[AMD Official Use Only - General]

Hi Nathon. 

> -----Original Message-----
> From: Fontenot, Nathan <Nathan.Fontenot@amd.com>
> Sent: Friday, July 8, 2022 3:40 AM
> To: Yuan, Perry <Perry.Yuan@amd.com>; rafael.j.wysocki@intel.com;
> viresh.kumar@linaro.org; Huang, Ray <Ray.Huang@amd.com>; Rafael J.
> Wysocki <rafael@kernel.org>; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Cc: Sharma, Deepak <Deepak.Sharma@amd.com>; Limonciello, Mario
> <Mario.Limonciello@amd.com>; Fontenot, Nathan
> <Nathan.Fontenot@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Su, Jinzhou (Joe) <Jinzhou.Su@amd.com>;
> Huang, Shimmer <Shimmer.Huang@amd.com>; Du, Xiaojian
> <Xiaojian.Du@amd.com>; Meng, Li (Jassmine) <Li.Meng@amd.com>
> Subject: Re: [PATCH 10/12] cpufreq: cpufreq: export cpufreq cpu release and
> acquire
> 
> On 7/7/22 12:01, Perry Yuan wrote:
> > cpufreq_cpu_release" and "cpufreq_cpu_acquire" are only used
> > internally by drivers/cpufreq/cpufreq.c currently.
> > Export them so that other drivers such as the AMD P-state driver can use
> them as well.
> >
> 
> Can you provide more information on why this is needed for the amd-
> pstate driver?
> 
> This patch exports the acquire/release functions but I don't see that the
> amd-pstate driver is updated to use them.
> 
> -Nathan

It is used in the next CPPC EPP patch set which will be sent out soon.
As the amd-pstate is built as module driver, this patch exports the symbol to pstate driver. 

Perry.

> 
> > Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
> > ---
> >  drivers/cpufreq/cpufreq.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index 73432360e6e9..4d3c83da29b7 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -262,6 +262,7 @@ void cpufreq_cpu_release(struct cpufreq_policy
> > *policy)
> >
> >  	cpufreq_cpu_put(policy);
> >  }
> > +EXPORT_SYMBOL_GPL(cpufreq_cpu_release);
> >
> >  /**
> >   * cpufreq_cpu_acquire - Find policy for a CPU, mark it as busy and lock it.
> > @@ -291,6 +292,7 @@ struct cpufreq_policy
> > *cpufreq_cpu_acquire(unsigned int cpu)
> >
> >  	return policy;
> >  }
> > +EXPORT_SYMBOL_GPL(cpufreq_cpu_acquire);
> >
> >
> /**************************************************************
> *******
> >   *            EXTERNALLY AFFECTING FREQUENCY CHANGES                 *

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

end of thread, other threads:[~2022-07-08 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 17:01 [PATCH 10/12] cpufreq: cpufreq: export cpufreq cpu release and acquire Perry Yuan
2022-07-07 19:40 ` Nathan Fontenot
2022-07-08 11:46   ` Yuan, Perry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.