Staging: hv: remove custom rdmsrl and wrmsrl functions
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 29 Jul 2009 22:38:00 +0000 (15:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:53 +0000 (12:01 -0700)
Use the ones that the kernel provides, they do it correctly.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/Hv.h
drivers/staging/hv/include/osd.h

index b5ea3dcc6f1b43ae23b316f65c1c7e7a557afc29..694c96b8b06b360b50fc6f106d3dc452607609b0 100644 (file)
@@ -133,14 +133,14 @@ static inline unsigned long long ReadMsr(int msr)
 {
        unsigned long long val;
 
-       RDMSR(msr, val);
+       rdmsrl(msr, val);
 
        return val;
 }
 
 static inline void WriteMsr(int msr, u64 val)
 {
-       WRMSR(msr, val);
+       wrmsrl(msr, val);
 
        return;
 }
index 0444c18990d050e37b6610bb99251051e5f45c45..a3e2e29cf3319b12b9bb8b256a4a7dda6f966c89 100644 (file)
@@ -66,41 +66,6 @@ struct osd_timer {
 };
 
 
-
-#ifdef __x86_64__
-
-#define RDMSR(reg, v) {                                                        \
-    u32 h, l;                                                                 \
-     __asm__ __volatile__("rdmsr"                                                               \
-    : "=a" (l), "=d" (h)                                                       \
-    : "c" (reg));                                                              \
-    v = (((u64)h) << 32) | l;                                                         \
-}
-
-#define WRMSR(reg, v) {                                                        \
-    u32 h, l;                                                               \
-    l = (u32)(((u64)(v)) & 0xFFFFFFFF);                                  \
-    h = (u32)((((u64)(v)) >> 32) & 0xFFFFFFFF);                          \
-     __asm__ __volatile__("wrmsr"                                              \
-    : /* no outputs */                                                         \
-    : "c" (reg), "a" (l), "d" (h));                                            \
-}
-
-#else
-
-#define RDMSR(reg, v)                                                                 \
-     __asm__ __volatile__("rdmsr"                                                 \
-    : "=A" (v)                                                                                \
-    : "c" (reg))
-
-#define WRMSR(reg, v)                                                                 \
-     __asm__ __volatile__("wrmsr"                                                 \
-    : /* no outputs */                                                                            \
-    : "c" (reg), "A" ((u64)v))
-
-#endif
-
-
 /* Osd routines */
 
 extern void* VirtualAllocExec(unsigned int size);