diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-08-31 17:23:29 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-08-31 18:15:23 -0400 |
commit | 0cc0213e73af5963eca259c84876937c20689dbd (patch) | |
tree | 2e3db62cc241269fbb3ee3313e568239cf4c9bd0 /arch/x86/include | |
parent | 79c5dca3619d6ae15815eec14cd7a43db5f38b47 (diff) |
x86, msr: Have the _safe MSR functions return -EIO, not -EFAULT
For some reason, the _safe MSR functions returned -EFAULT, not -EIO.
However, the only user which cares about the return code as anything
other than a boolean is the MSR driver, which wants -EIO. Change it
to -EIO across the board.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/msr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 09c5ca70d49d..943fdd572e16 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h | |||
@@ -67,7 +67,7 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr, | |||
67 | ".previous\n\t" | 67 | ".previous\n\t" |
68 | _ASM_EXTABLE(2b, 3b) | 68 | _ASM_EXTABLE(2b, 3b) |
69 | : [err] "=r" (*err), EAX_EDX_RET(val, low, high) | 69 | : [err] "=r" (*err), EAX_EDX_RET(val, low, high) |
70 | : "c" (msr), [fault] "i" (-EFAULT)); | 70 | : "c" (msr), [fault] "i" (-EIO)); |
71 | return EAX_EDX_VAL(val, low, high); | 71 | return EAX_EDX_VAL(val, low, high); |
72 | } | 72 | } |
73 | 73 | ||
@@ -90,7 +90,7 @@ notrace static inline int native_write_msr_safe(unsigned int msr, | |||
90 | _ASM_EXTABLE(2b, 3b) | 90 | _ASM_EXTABLE(2b, 3b) |
91 | : [err] "=a" (err) | 91 | : [err] "=a" (err) |
92 | : "c" (msr), "0" (low), "d" (high), | 92 | : "c" (msr), "0" (low), "d" (high), |
93 | [fault] "i" (-EFAULT) | 93 | [fault] "i" (-EIO) |
94 | : "memory"); | 94 | : "memory"); |
95 | return err; | 95 | return err; |
96 | } | 96 | } |