public inbox for cpufreq@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n
@ 2013-10-08  8:56 Daniel Vetter
  2013-10-16 23:00 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2013-10-08  8:56 UTC (permalink / raw)
  To: Intel Graphics Development
  Cc: Chris Wilson, Daniel Vetter, kbuild test robot, Rafael J. Wysocki,
	Viresh Kumar, cpufreq, linux-pm, linux-kernel

The drm/i915 driver wants to adjust it's own power policies using the
cpu policies as a guideline (we can implicitly boost the cpus through
the gpus on some platforms). To avoid a dreaded select (since a
depends will leave users wondering where where their driver has gone
too) add dummy functions.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild test robot <fengguang.wu@intel.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: cpufreq@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
A quick ack for merging this this through the drm-intel tree is
probably the simplest way forward.
-Daniel
---
 include/linux/cpufreq.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index fcabc42..5ad9a4e 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -93,8 +93,16 @@ struct cpufreq_policy {
 #define CPUFREQ_SHARED_TYPE_ALL	 (2) /* All dependent CPUs should set freq */
 #define CPUFREQ_SHARED_TYPE_ANY	 (3) /* Freq can be set from any dependent CPU*/
 
+#ifdef CONFIG_CPU_FREQ
 struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
 void cpufreq_cpu_put(struct cpufreq_policy *policy);
+#else
+static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
+{
+	return NULL;
+}
+static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { }
+#endif
 
 static inline bool policy_is_shared(struct cpufreq_policy *policy)
 {
-- 
1.8.4.rc3


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

* Re: [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n
  2013-10-08  8:56 [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n Daniel Vetter
@ 2013-10-16 23:00 ` Rafael J. Wysocki
  2013-10-17  7:08   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-10-16 23:00 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics Development, Chris Wilson, kbuild test robot,
	Viresh Kumar, cpufreq, linux-pm, linux-kernel

On Tuesday, October 08, 2013 10:56:11 AM Daniel Vetter wrote:
> The drm/i915 driver wants to adjust it's own power policies using the
> cpu policies as a guideline (we can implicitly boost the cpus through
> the gpus on some platforms). To avoid a dreaded select (since a
> depends will leave users wondering where where their driver has gone
> too) add dummy functions.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: kbuild test robot <fengguang.wu@intel.com>
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: cpufreq@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> A quick ack for merging this this through the drm-intel tree is
> probably the simplest way forward.

Well, ACK, or please let me know if you want me to take this.

Thanks!

> ---
>  include/linux/cpufreq.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index fcabc42..5ad9a4e 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -93,8 +93,16 @@ struct cpufreq_policy {
>  #define CPUFREQ_SHARED_TYPE_ALL	 (2) /* All dependent CPUs should set freq */
>  #define CPUFREQ_SHARED_TYPE_ANY	 (3) /* Freq can be set from any dependent CPU*/
>  
> +#ifdef CONFIG_CPU_FREQ
>  struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
>  void cpufreq_cpu_put(struct cpufreq_policy *policy);
> +#else
> +static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
> +{
> +	return NULL;
> +}
> +static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { }
> +#endif
>  
>  static inline bool policy_is_shared(struct cpufreq_policy *policy)
>  {
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n
  2013-10-16 23:00 ` Rafael J. Wysocki
@ 2013-10-17  7:08   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2013-10-17  7:08 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Daniel Vetter, Intel Graphics Development, Chris Wilson,
	kbuild test robot, Viresh Kumar, cpufreq, linux-pm, linux-kernel

On Thu, Oct 17, 2013 at 01:00:42AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, October 08, 2013 10:56:11 AM Daniel Vetter wrote:
> > The drm/i915 driver wants to adjust it's own power policies using the
> > cpu policies as a guideline (we can implicitly boost the cpus through
> > the gpus on some platforms). To avoid a dreaded select (since a
> > depends will leave users wondering where where their driver has gone
> > too) add dummy functions.
> > 
> > Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > Cc: kbuild test robot <fengguang.wu@intel.com>
> > Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Cc: cpufreq@vger.kernel.org
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> > A quick ack for merging this this through the drm-intel tree is
> > probably the simplest way forward.
> 
> Well, ACK, or please let me know if you want me to take this.

I've merged it, thanks for tacking a quick look.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2013-10-17  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08  8:56 [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n Daniel Vetter
2013-10-16 23:00 ` Rafael J. Wysocki
2013-10-17  7:08   ` Daniel Vetter

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