diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2009-10-26 19:49:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-29 10:39:24 -0400 |
commit | 2eca40a8ccd4160dbfaa5cbd61038d921d0e5f13 (patch) | |
tree | e4136b7e9c87486f12643b9389f11de718cb2bb2 | |
parent | 964fe080d94db82a3268443e9b9ece4c60246414 (diff) |
cpufreq: add cpufreq_get() stub for CONFIG_CPU_FREQ=n
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'
(Needed in linux-next's KVM tree, but it's correct in 2.6.32).
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Tested-by: Eric Paris <eparis@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/cpufreq.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 44717eb47639..79a2340d83cd 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -291,8 +291,15 @@ struct global_attr { | |||
291 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 291 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
292 | int cpufreq_update_policy(unsigned int cpu); | 292 | int cpufreq_update_policy(unsigned int cpu); |
293 | 293 | ||
294 | #ifdef CONFIG_CPU_FREQ | ||
294 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 295 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
295 | unsigned int cpufreq_get(unsigned int cpu); | 296 | unsigned int cpufreq_get(unsigned int cpu); |
297 | #else | ||
298 | static inline unsigned int cpufreq_get(unsigned int cpu) | ||
299 | { | ||
300 | return 0; | ||
301 | } | ||
302 | #endif | ||
296 | 303 | ||
297 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ | 304 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
298 | #ifdef CONFIG_CPU_FREQ | 305 | #ifdef CONFIG_CPU_FREQ |