ia64/xen-unstable

changeset 3959:da3bec7765d1

bitkeeper revision 1.1236.1.42 (4224bb8fOnbAClkv82bfZwfayrn5Rw)

Fix error-code generation in rdmsr_user and wrmsr_user.
Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
author kaf24@scramble.cl.cam.ac.uk
date Tue Mar 01 18:59:27 2005 +0000 (2005-03-01)
parents 5da9d0d86aef
children 09c70b5f2e07
files xen/include/asm-x86/msr.h
line diff
     1.1 --- a/xen/include/asm-x86/msr.h	Tue Mar 01 17:49:40 2005 +0000
     1.2 +++ b/xen/include/asm-x86/msr.h	Tue Mar 01 18:59:27 2005 +0000
     1.3 @@ -12,7 +12,7 @@
     1.4  			  : "c" (msr), "a" (val1), "d" (val2))
     1.5  
     1.6  #define rdmsr_user(msr,val1,val2) ({\
     1.7 -    int _rc = 0; \
     1.8 +    int _rc; \
     1.9      __asm__ __volatile__( \
    1.10          "1: rdmsr\n2:\n" \
    1.11          ".section .fixup,\"ax\"\n" \
    1.12 @@ -22,12 +22,12 @@
    1.13          "   "__FIXUP_ALIGN"\n" \
    1.14          "   "__FIXUP_WORD" 1b,3b\n" \
    1.15          ".previous\n" \
    1.16 -        : "=a" (val1), "=d" (val2), "=r" (_rc) \
    1.17 -        : "c" (msr)); \
    1.18 +        : "=a" (val1), "=d" (val2), "=&r" (_rc) \
    1.19 +        : "c" (msr), "2" (0)); \
    1.20      _rc; })
    1.21  
    1.22  #define wrmsr_user(msr,val1,val2) ({\
    1.23 -    int _rc = 0; \
    1.24 +    int _rc; \
    1.25      __asm__ __volatile__( \
    1.26          "1: wrmsr\n2:\n" \
    1.27          ".section .fixup,\"ax\"\n" \
    1.28 @@ -37,8 +37,8 @@
    1.29          "   "__FIXUP_ALIGN"\n" \
    1.30          "   "__FIXUP_WORD" 1b,3b\n" \
    1.31          ".previous\n" \
    1.32 -        : "=r" (_rc) \
    1.33 -        : "c" (msr), "a" (val1), "d" (val2)); \
    1.34 +        : "=&r" (_rc) \
    1.35 +        : "c" (msr), "a" (val1), "d" (val2), "0" (0)); \
    1.36      _rc; })
    1.37  
    1.38  #define rdtsc(low,high) \