diff options
Diffstat (limited to 'include/asm-x86/msr.h')
-rw-r--r-- | include/asm-x86/msr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index 2c698a2e81f9..3707650a169b 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h | |||
@@ -150,6 +150,14 @@ static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high) | |||
150 | __err; \ | 150 | __err; \ |
151 | }) | 151 | }) |
152 | 152 | ||
153 | static inline int rdmsrl_safe(unsigned msr, unsigned long long *p) | ||
154 | { | ||
155 | int err; | ||
156 | |||
157 | *p = native_read_msr_safe(msr, &err); | ||
158 | return err; | ||
159 | } | ||
160 | |||
153 | #define rdtscl(low) \ | 161 | #define rdtscl(low) \ |
154 | ((low) = (u32)native_read_tsc()) | 162 | ((low) = (u32)native_read_tsc()) |
155 | 163 | ||