All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Jiri Slaby <jirislaby@gmail.com>, akpm <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [was: mmotm 2009-10-09-01-07 uploaded]
Date: Fri, 9 Oct 2009 08:30:28 -0700	[thread overview]
Message-ID: <20091009083028.61f44133.rdunlap@xenotime.net> (raw)
In-Reply-To: <4ACF09D7.9030901@gmail.com>

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

  reply	other threads:[~2009-10-09 15:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  8:07 mmotm 2009-10-09-01-07 uploaded akpm
2009-10-09 10:00 ` [was: mmotm 2009-10-09-01-07 uploaded] Jiri Slaby
2009-10-09 15:30   ` Randy Dunlap [this message]
2009-10-09 15:32     ` kvm build failure " Jiri Slaby
2009-10-09 23:15     ` Andrew Morton
2009-10-09 22:47 ` mmotm 2009-10-09-01-07 uploaded (b43) Randy Dunlap
2009-10-10  3:55   ` Larry Finger
2009-10-09 23:10 ` [PATCH -mmotm] cmpc_acpi: depends on ACPI Randy Dunlap
2009-10-11 14:44   ` Thadeu Lima de Souza Cascardo
2009-10-09 23:10 ` [PATCH -mmotm] synchro-test: add missing header file Randy Dunlap
2009-10-10  0:12 ` mmotm 2009-10-09-01-07 - iwl3945 fails to do firmware load request Valdis.Kletnieks
2009-10-10  0:42   ` Zhu Yi
2009-10-10  5:22     ` Valdis.Kletnieks
2009-10-12 10:51 ` [PATCH -mmotm] synchro-test: add missing header file David Howells
2009-10-12 23:20   ` Andrew Morton
2009-10-13  2:24     ` Stephen Rothwell
2009-10-13  2:33       ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091009083028.61f44133.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=jirislaby@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.