Linux-Next discussions
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
	Dave Jones <davej@redhat.com>, Avi Kivity <avi@redhat.com>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	cpufreq@vger.kernel.org
Subject: [PATCH -next] cpufreq: provide cpufreq_get stub
Date: Tue, 6 Oct 2009 11:02:11 -0700	[thread overview]
Message-ID: <20091006110211.139b91e5.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20091006165220.b5cb1c44.sfr@canb.auug.org.au>

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>
---
 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
---
~Randy

  reply	other threads:[~2009-10-06 18:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06  5:52 linux-next: Tree for October 6 Stephen Rothwell
2009-10-06 18:02 ` Randy Dunlap [this message]
2009-10-06 20:29   ` [PATCH -next] cpufreq: provide cpufreq_get stub Eric Paris
2009-10-06 20:27 ` [PATCH -next] wireless: fix CFG80211_WEXT build problems Randy Dunlap
2009-10-06 21:33   ` Johannes Berg

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=20091006110211.139b91e5.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=avi@redhat.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox