Re: [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Cc: kbuild test robot <fengguang.wu@xxxxxxxxx>
> Cc: "Rafael J. Wysocki" <rjw@xxxxxxx>
> Cc: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> Cc: cpufreq@xxxxxxxxxxxxxxx
> Cc: linux-pm@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
> 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.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux