diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-12-06 17:48:57 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-12-06 17:48:57 +0100 |
commit | af50dd63cf8da47205045757e2357717eb4d0388 (patch) | |
tree | 445538c4ac45b37adfc68e0217bac394427224c3 /xen/include/asm-x86/msr.h | |
parent | b978d1410ab951e54b8b12738ca917d6dd3d7507 (diff) | |
download | xen-af50dd63cf8da47205045757e2357717eb4d0388.tar.gz xen-af50dd63cf8da47205045757e2357717eb4d0388.tar.bz2 xen-af50dd63cf8da47205045757e2357717eb4d0388.zip |
Pull nmi/traps changes from Linux 2.6.14.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/msr.h')
-rw-r--r-- | xen/include/asm-x86/msr.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xen/include/asm-x86/msr.h b/xen/include/asm-x86/msr.h index b3162182e7..d98ec40579 100644 --- a/xen/include/asm-x86/msr.h +++ b/xen/include/asm-x86/msr.h @@ -1,6 +1,8 @@ #ifndef __ASM_MSR_H #define __ASM_MSR_H +#ifndef __ASSEMBLY__ + #define rdmsr(msr,val1,val2) \ __asm__ __volatile__("rdmsr" \ : "=a" (val1), "=d" (val2) \ @@ -18,7 +20,13 @@ : /* no outputs */ \ : "c" (msr), "a" (val1), "d" (val2)) -#define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) +static inline void wrmsrl(unsigned int msr, __u64 val) +{ + __u32 lo, hi; + lo = (__u32)val; + hi = (__u32)(val >> 32); + wrmsr(msr, lo, hi); +} #define rdmsr_user(msr,val1,val2) ({\ int _rc; \ @@ -74,6 +82,8 @@ : "=a" (low), "=d" (high) \ : "c" (counter)) +#endif /* !__ASSEMBLY__ */ + /* symbolic names for some interesting MSRs */ /* Intel defined MSRs. */ #define MSR_IA32_P5_MC_ADDR 0 |