diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/msr.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 9264802e2824..cb7502852acb 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h | |||
@@ -137,11 +137,11 @@ static inline unsigned long long native_read_pmc(int counter) | |||
137 | * pointer indirection), this allows gcc to optimize better | 137 | * pointer indirection), this allows gcc to optimize better |
138 | */ | 138 | */ |
139 | 139 | ||
140 | #define rdmsr(msr, val1, val2) \ | 140 | #define rdmsr(msr, low, high) \ |
141 | do { \ | 141 | do { \ |
142 | u64 __val = native_read_msr((msr)); \ | 142 | u64 __val = native_read_msr((msr)); \ |
143 | (void)((val1) = (u32)__val); \ | 143 | (void)((low) = (u32)__val); \ |
144 | (void)((val2) = (u32)(__val >> 32)); \ | 144 | (void)((high) = (u32)(__val >> 32)); \ |
145 | } while (0) | 145 | } while (0) |
146 | 146 | ||
147 | static inline void wrmsr(unsigned msr, unsigned low, unsigned high) | 147 | static inline void wrmsr(unsigned msr, unsigned low, unsigned high) |
@@ -162,12 +162,12 @@ static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | /* rdmsr with exception handling */ | 164 | /* rdmsr with exception handling */ |
165 | #define rdmsr_safe(msr, p1, p2) \ | 165 | #define rdmsr_safe(msr, low, high) \ |
166 | ({ \ | 166 | ({ \ |
167 | int __err; \ | 167 | int __err; \ |
168 | u64 __val = native_read_msr_safe((msr), &__err); \ | 168 | u64 __val = native_read_msr_safe((msr), &__err); \ |
169 | (*p1) = (u32)__val; \ | 169 | (*low) = (u32)__val; \ |
170 | (*p2) = (u32)(__val >> 32); \ | 170 | (*high) = (u32)(__val >> 32); \ |
171 | __err; \ | 171 | __err; \ |
172 | }) | 172 | }) |
173 | 173 | ||
@@ -208,7 +208,7 @@ do { \ | |||
208 | #define wrmsrl_safe(msr, val) wrmsr_safe((msr), (u32)(val), \ | 208 | #define wrmsrl_safe(msr, val) wrmsr_safe((msr), (u32)(val), \ |
209 | (u32)((val) >> 32)) | 209 | (u32)((val) >> 32)) |
210 | 210 | ||
211 | #define write_tsc(val1, val2) wrmsr(MSR_IA32_TSC, (val1), (val2)) | 211 | #define write_tsc(low, high) wrmsr(MSR_IA32_TSC, (low), (high)) |
212 | 212 | ||
213 | #define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0) | 213 | #define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0) |
214 | 214 | ||