diff mbox

[2/3] X86: Introduce mperf_aperf X86_FEATURE

Message ID 1240491784-29933-3-git-send-email-trenn@suse.de (mailing list archive)
State RFC, archived
Headers show

Commit Message

Thomas Renninger April 23, 2009, 1:03 p.m. UTC
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 <trenn@suse.de>
---
 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 mbox

Patch

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 }
 	};