aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/msr.h6
-rw-r--r--include/asm-x86/paravirt.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index b6262e99fc8e..effb7319c0a5 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -94,10 +94,10 @@ static inline unsigned long long native_read_tsc(void)
94 return val; 94 return val;
95} 95}
96 96
97static inline unsigned long long native_read_pmc(void) 97static inline unsigned long long native_read_pmc(int counter)
98{ 98{
99 unsigned long long val; 99 unsigned long long val;
100 asm volatile("rdpmc" : "=A" (val)); 100 asm volatile("rdpmc" : "=A" (val) : "c" (counter));
101 return val; 101 return val;
102} 102}
103 103
@@ -154,7 +154,7 @@ static inline int wrmsr_safe(u32 __msr, u32 __low, u32 __high)
154 154
155#define rdpmc(counter,low,high) \ 155#define rdpmc(counter,low,high) \
156 do { \ 156 do { \
157 u64 _l = native_read_pmc(); \ 157 u64 _l = native_read_pmc(counter); \
158 (low) = (u32)_l; \ 158 (low) = (u32)_l; \
159 (high) = (u32)(_l >> 32); \ 159 (high) = (u32)(_l >> 32); \
160 } while(0) 160 } while(0)
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index d1780e32722e..4782be68d0fa 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -118,7 +118,7 @@ struct pv_cpu_ops {
118 int (*write_msr)(unsigned int msr, u64 val); 118 int (*write_msr)(unsigned int msr, u64 val);
119 119
120 u64 (*read_tsc)(void); 120 u64 (*read_tsc)(void);
121 u64 (*read_pmc)(void); 121 u64 (*read_pmc)(int counter);
122 122
123 /* These two are jmp to, not actually called. */ 123 /* These two are jmp to, not actually called. */
124 void (*irq_enable_syscall_ret)(void); 124 void (*irq_enable_syscall_ret)(void);