Home | History | Annotate | Download | only in asm-x86

Lines Matching refs:msr

4 #include <asm/msr-index.h>
17 static inline unsigned long long native_read_msr(unsigned int msr)
21 asm volatile("rdmsr" : "=A" (val) : "c" (msr));
25 static inline unsigned long long native_read_msr_safe(unsigned int msr,
40 : "c" (msr), "i" (-EFAULT));
45 static inline void native_write_msr(unsigned int msr, unsigned long long val)
47 asm volatile("wrmsr" : : "c" (msr), "A"(val));
50 static inline int native_write_msr_safe(unsigned int msr,
64 : "c" (msr), "0" ((u32)val), "d" ((u32)(val>>32)),
93 #define rdmsr(msr,val1,val2) \
95 u64 __val = native_read_msr(msr); \
105 #define rdmsrl(msr,val) \
106 ((val) = native_read_msr(msr))
108 #define wrmsrl(msr,val) native_write_msr(msr, val)
117 #define rdmsr_safe(msr,p1,p2) \
120 u64 __val = native_read_msr_safe(msr, &__err); \
178 #define rdmsr(msr,val1,val2) \
181 : "c" (msr))
184 #define rdmsrl(msr,val) do { unsigned long a__,b__; \
187 : "c" (msr)); \
191 #define wrmsr(msr,val1,val2) \
194 : "c" (msr), "a" (val1), "d" (val2))
196 #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32)
299 #define wrmsr_safe(msr,a,b) ({ int ret__; \
310 : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \
313 #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32))
315 #define rdmsr_safe(msr,a,b) \
327 :"c"(msr), "i"(-EIO), "0"(0)); \