summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/msr.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2012-06-05 17:56:50 -0700
committerIngo Molnar <mingo@kernel.org>2012-06-06 17:23:27 +0200
commit1ff4d58a192aea7f245981e2579765f961f6eb9c (patch)
treed925939440c4c36bf6f46d5aeb4eb609c4f3038f /arch/x86/include/asm/msr.h
parent1c2ac3fde3e35279958e7b0408e2dcf866465301 (diff)
x86: Add rdpmcl()
Add a version of rdpmc() that directly reads into a u64 Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1338944211-28275-4-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/msr.h')
-rw-r--r--arch/x86/include/asm/msr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 084ef95274c..e489c1475be 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -237,6 +237,8 @@ do { \
(high) = (u32)(_l >> 32); \
} while (0)
+#define rdpmcl(counter, val) ((val) = native_read_pmc(counter))
+
#define rdtscp(low, high, aux) \
do { \
unsigned long long _val = native_read_tscp(&(aux)); \