On Fri, 9 Oct 2009 08:30:28 -0700
Randy Dunlap <[email protected]> wrote:

> From: Randy Dunlap <[email protected]>
> 
> When CONFIG_CPU_FREQ is disabled, cpufreq_get() needs a stub.
> Used by kvm (although it looks like a bit of the kvm code could
> be omitted when CONFIG_CPU_FREQ is disabled).
> 
> arch/x86/built-in.o: In function `kvm_arch_init':
> (.text+0x10de7): undefined reference to `cpufreq_get'
>  
> Signed-off-by: Randy Dunlap <[email protected]>
> Tested-by: Eric Paris <[email protected]>
> ---
>  include/linux/cpufreq.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- linux-next-20091006.orig/include/linux/cpufreq.h
> +++ linux-next-20091006/include/linux/cpufreq.h
> @@ -291,8 +291,15 @@ struct global_attr {
>  int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
>  int cpufreq_update_policy(unsigned int cpu);
>  
> +#ifdef CONFIG_CPU_FREQ
>  /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't 
> detect it */
>  unsigned int cpufreq_get(unsigned int cpu);
> +#else
> +static inline unsigned int cpufreq_get(unsigned int cpu)
> +{
> +     return 0;
> +}
> +#endif

Thanks.  I'll merge this into mainline in the next batch I think.  It's
only needed by the KVM development tree but it's the correct thing to
do anyway and having it in minaline will simplify life for everyone.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to