Commit 1423bed2 authored by Borislav Petkov's avatar Borislav Petkov Committed by H. Peter Anvin

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: default avatarBorislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1362428180-8865-5-git-send-email-bp@alien8.deSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent aca91bfc
...@@ -137,11 +137,11 @@ static inline unsigned long long native_read_pmc(int counter) ...@@ -137,11 +137,11 @@ static inline unsigned long long native_read_pmc(int counter)
* pointer indirection), this allows gcc to optimize better * pointer indirection), this allows gcc to optimize better
*/ */
#define rdmsr(msr, val1, val2) \ #define rdmsr(msr, low, high) \
do { \ do { \
u64 __val = native_read_msr((msr)); \ u64 __val = native_read_msr((msr)); \
(void)((val1) = (u32)__val); \ (void)((low) = (u32)__val); \
(void)((val2) = (u32)(__val >> 32)); \ (void)((high) = (u32)(__val >> 32)); \
} while (0) } while (0)
static inline void wrmsr(unsigned msr, unsigned low, unsigned high) 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,12 +162,12 @@ static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high)
} }
/* rdmsr with exception handling */ /* rdmsr with exception handling */
#define rdmsr_safe(msr, p1, p2) \ #define rdmsr_safe(msr, low, high) \
({ \ ({ \
int __err; \ int __err; \
u64 __val = native_read_msr_safe((msr), &__err); \ u64 __val = native_read_msr_safe((msr), &__err); \
(*p1) = (u32)__val; \ (*low) = (u32)__val; \
(*p2) = (u32)(__val >> 32); \ (*high) = (u32)(__val >> 32); \
__err; \ __err; \
}) })
...@@ -208,7 +208,7 @@ do { \ ...@@ -208,7 +208,7 @@ do { \
#define wrmsrl_safe(msr, val) wrmsr_safe((msr), (u32)(val), \ #define wrmsrl_safe(msr, val) wrmsr_safe((msr), (u32)(val), \
(u32)((val) >> 32)) (u32)((val) >> 32))
#define write_tsc(val1, val2) wrmsr(MSR_IA32_TSC, (val1), (val2)) #define write_tsc(low, high) wrmsr(MSR_IA32_TSC, (low), (high))
#define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0) #define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment