aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2013-03-04 15:16:19 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-04-02 19:03:32 -0400
commit1423bed239415edd1562c25be8a7408858fdbb19 (patch)
treea8dceb828b5a141e34ae4f9b80e55491a6a8c7a4 /arch/x86
parentaca91bfc67fe356544eb1cfc483c09b27ce49fa9 (diff)
x86, msr: Unify variable names
Make sure all MSR-accessing primitives which split MSR values in two 32-bit parts have their variables called 'low' and 'high' for consistence with the rest of the code and for ease of staring. Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/1362428180-8865-5-git-send-email-bp@alien8.de Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/msr.h14
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) \
141do { \ 141do { \
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
147static inline void wrmsr(unsigned msr, unsigned low, unsigned high) 147static 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