From patchwork Thu Apr 23 13:03:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 19627 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 n3ND3gcZ002303 for ; Thu, 23 Apr 2009 13:03:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755521AbZDWNDM (ORCPT ); Thu, 23 Apr 2009 09:03:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755517AbZDWNDL (ORCPT ); Thu, 23 Apr 2009 09:03:11 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43703 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756042AbZDWNDH (ORCPT ); Thu, 23 Apr 2009 09:03:07 -0400 Received: from Relay2.suse.de (relay-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 6602F86445; Thu, 23 Apr 2009 15:03:05 +0200 (CEST) From: Thomas Renninger To: lenb@kernel.org Cc: venkatesh.pallipadi@intel.com, linux-acpi@vger.kernel.org, cpufreq@vger.kernel.org, Thomas Renninger Subject: [PATCH 2/3] X86: Introduce mperf_aperf X86_FEATURE Date: Thu, 23 Apr 2009 15:03:03 +0200 Message-Id: <1240491784-29933-3-git-send-email-trenn@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1240491784-29933-1-git-send-email-trenn@suse.de> References: <1240491784-29933-1-git-send-email-trenn@suse.de> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Users of the newly introduced: EXPORT_SYMBOL_GPL(get_average_perf); function must check for this feature to make sure it can be used. Signed-off-by: Thomas Renninger --- arch/x86/include/asm/cpufeature.h | 1 + arch/x86/kernel/cpu/addon_cpuid_features.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) mode change 100644 => 100755 arch/x86/kernel/cpu/mkcapflags.pl diff --git a/arch/x86/kernel/cpu/mkcapflags.pl b/arch/x86/kernel/cpu/mkcapflags.pl old mode 100644 new mode 100755 diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb83b1c..b1c4bd8 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -155,6 +155,7 @@ */ #define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */ #define X86_FEATURE_ARAT (7*32+ 1) /* Always Running APIC Timer */ +#define X86_FEATURE_APERF_MPERF (7*32+ 3) /* APERF/MPERF average freq MSRs */ /* Virtualization flags: Linux defined */ #define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */ diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index c965e52..e91c357 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c @@ -32,6 +32,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) static const struct cpuid_bit __cpuinitconst cpuid_bits[] = { { X86_FEATURE_IDA, CR_EAX, 1, 0x00000006 }, { X86_FEATURE_ARAT, CR_EAX, 2, 0x00000006 }, + { X86_FEATURE_APERF_MPERF, CR_ECX, 0, 0x00000006 }, { 0, 0, 0, 0 } };