From patchwork Fri Oct 9 15:30:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 52751 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n99FZv9T026553 for ; Fri, 9 Oct 2009 15:35:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933465AbZJIPbJ (ORCPT ); Fri, 9 Oct 2009 11:31:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933320AbZJIPbJ (ORCPT ); Fri, 9 Oct 2009 11:31:09 -0400 Received: from xenotime.net ([72.52.64.118]:41742 "HELO xenotime.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933034AbZJIPbI (ORCPT ); Fri, 9 Oct 2009 11:31:08 -0400 Received: from chimera.site ([96.253.169.185]) by xenotime.net for ; Fri, 9 Oct 2009 08:30:28 -0700 Date: Fri, 9 Oct 2009 08:30:28 -0700 From: Randy Dunlap To: Jiri Slaby , akpm Cc: linux-kernel@vger.kernel.org, Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org Subject: Re: [was: mmotm 2009-10-09-01-07 uploaded] Message-Id: <20091009083028.61f44133.rdunlap@xenotime.net> In-Reply-To: <4ACF09D7.9030901@gmail.com> References: <200910090830.n998Ubvv020464@imap1.linux-foundation.org> <4ACF09D7.9030901@gmail.com> Organization: YPO4 X-Mailer: Sylpheed 2.7.1 (GTK+ 2.12.0; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org --- 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