* [was: mmotm 2009-10-09-01-07 uploaded]
[not found] <200910090830.n998Ubvv020464@imap1.linux-foundation.org>
@ 2009-10-09 10:00 ` Jiri Slaby
2009-10-09 15:30 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Slaby @ 2009-10-09 10:00 UTC (permalink / raw)
To: linux-kernel; +Cc: mm-commits, Avi Kivity, Marcelo Tosatti, kvm
On 10/09/2009 10:07 AM, akpm@linux-foundation.org wrote:
> The mm-of-the-moment snapshot 2009-10-09-01-07 has been uploaded to
Hi, build fails with:
ERROR: "cpufreq_get" [arch/x86/kvm/kvm.ko] undefined!
because of
CONFIG_KVM=m
...
# CONFIG_CPU_FREQ is not set
Should cpufreq_get be defined as inline return 0 the same as
cpufreq_quick_get on !CONFIG_CPU_FREQ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [was: mmotm 2009-10-09-01-07 uploaded]
2009-10-09 10:00 ` [was: mmotm 2009-10-09-01-07 uploaded] Jiri Slaby
@ 2009-10-09 15:30 ` Randy Dunlap
2009-10-09 15:32 ` kvm build failure " Jiri Slaby
2009-10-09 23:15 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Randy Dunlap @ 2009-10-09 15:30 UTC (permalink / raw)
To: Jiri Slaby, akpm; +Cc: linux-kernel, Avi Kivity, Marcelo Tosatti, kvm
On Fri, 09 Oct 2009 12:00:55 +0200 Jiri Slaby wrote:
> On 10/09/2009 10:07 AM, akpm@linux-foundation.org wrote:
> > The mm-of-the-moment snapshot 2009-10-09-01-07 has been uploaded to
>
> Hi, build fails with:
> ERROR: "cpufreq_get" [arch/x86/kvm/kvm.ko] undefined!
> because of
> CONFIG_KVM=m
> ...
> # CONFIG_CPU_FREQ is not set
>
> Should cpufreq_get be defined as inline return 0 the same as
> cpufreq_quick_get on !CONFIG_CPU_FREQ?
I submitted a patch for that several days ago, against
linux-next-20091006. (below again)
---
From: Randy Dunlap <randy.dunlap@oracle.com>
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 <randy.dunlap@oracle.com>
Tested-by: Eric Paris <eparis@redhat.com>
---
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
/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
#ifdef CONFIG_CPU_FREQ
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kvm build failure [was: mmotm 2009-10-09-01-07 uploaded]
2009-10-09 15:30 ` Randy Dunlap
@ 2009-10-09 15:32 ` Jiri Slaby
2009-10-09 23:15 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2009-10-09 15:32 UTC (permalink / raw)
To: Randy Dunlap; +Cc: akpm, linux-kernel, Avi Kivity, Marcelo Tosatti, kvm
On 10/09/2009 05:30 PM, Randy Dunlap wrote:
> I submitted a patch for that several days ago, against
> linux-next-20091006. (below again)
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [was: mmotm 2009-10-09-01-07 uploaded]
2009-10-09 15:30 ` Randy Dunlap
2009-10-09 15:32 ` kvm build failure " Jiri Slaby
@ 2009-10-09 23:15 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2009-10-09 23:15 UTC (permalink / raw)
To: Randy Dunlap
Cc: Jiri Slaby, linux-kernel, Avi Kivity, Marcelo Tosatti, kvm,
Dave Jones
On Fri, 9 Oct 2009 08:30:28 -0700
Randy Dunlap <rdunlap@xenotime.net> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> 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 <randy.dunlap@oracle.com>
> Tested-by: Eric Paris <eparis@redhat.com>
> ---
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-09 23:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200910090830.n998Ubvv020464@imap1.linux-foundation.org>
2009-10-09 10:00 ` [was: mmotm 2009-10-09-01-07 uploaded] Jiri Slaby
2009-10-09 15:30 ` Randy Dunlap
2009-10-09 15:32 ` kvm build failure " Jiri Slaby
2009-10-09 23:15 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).