Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366216
b: refs/heads/master
c: 1423bed
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and H. Peter Anvin committed Apr 2, 2013
1 parent 932b693 commit 0b60718
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aca91bfc67fe356544eb1cfc483c09b27ce49fa9
refs/heads/master: 1423bed239415edd1562c25be8a7408858fdbb19
14 changes: 7 additions & 7 deletions trunk/arch/x86/include/asm/msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ static inline unsigned long long native_read_pmc(int counter)
* pointer indirection), this allows gcc to optimize better
*/

#define rdmsr(msr, val1, val2) \
#define rdmsr(msr, low, high) \
do { \
u64 __val = native_read_msr((msr)); \
(void)((val1) = (u32)__val); \
(void)((val2) = (u32)(__val >> 32)); \
(void)((low) = (u32)__val); \
(void)((high) = (u32)(__val >> 32)); \
} while (0)

static inline void wrmsr(unsigned msr, unsigned low, unsigned high)
Expand All @@ -162,12 +162,12 @@ static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high)
}

/* rdmsr with exception handling */
#define rdmsr_safe(msr, p1, p2) \
#define rdmsr_safe(msr, low, high) \
({ \
int __err; \
u64 __val = native_read_msr_safe((msr), &__err); \
(*p1) = (u32)__val; \
(*p2) = (u32)(__val >> 32); \
(*low) = (u32)__val; \
(*high) = (u32)(__val >> 32); \
__err; \
})

Expand Down Expand Up @@ -208,7 +208,7 @@ do { \
#define wrmsrl_safe(msr, val) wrmsr_safe((msr), (u32)(val), \
(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)

Expand Down

0 comments on commit 0b60718

Please sign in to comment.