summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/xsave.h
diff options
context:
space:
mode:
authorSuresh Siddha2012-07-25 01:05:28 +0200
committerH. Peter Anvin2012-09-19 00:51:26 +0200
commit0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b (patch)
tree97c8e2c62d1be5fd66c2a6da28d439255bd37ed1 /arch/x86/include/asm/xsave.h
parentx86, signal: Cleanup ifdefs and is_ia32, is_x32 (diff)
downloadkernel-qcow2-linux-0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b.tar.gz
kernel-qcow2-linux-0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b.tar.xz
kernel-qcow2-linux-0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b.zip
x86, fpu: Consolidate inline asm routines for saving/restoring fpu state
Consolidate x86, x86_64 inline asm routines saving/restoring fpu state using config_enabled(). Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Link: http://lkml.kernel.org/r/1343171129-2747-3-git-send-email-suresh.b.siddha@intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/xsave.h')
-rw-r--r--arch/x86/include/asm/xsave.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
index 8a1b6f9b594a..aaac810e8613 100644
--- a/arch/x86/include/asm/xsave.h
+++ b/arch/x86/include/asm/xsave.h
@@ -42,9 +42,8 @@ extern int check_for_xstate(struct i387_fxsave_struct __user *buf,
void __user *fpstate,
struct _fpx_sw_bytes *sw);
-static inline int fpu_xrstor_checking(struct fpu *fpu)
+static inline int fpu_xrstor_checking(struct xsave_struct *fx)
{
- struct xsave_struct *fx = &fpu->state->xsave;
int err;
asm volatile("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n\t"
@@ -84,9 +83,6 @@ static inline int xsave_user(struct xsave_struct __user *buf)
: [err] "=r" (err)
: "D" (buf), "a" (-1), "d" (-1), "0" (0)
: "memory");
- if (unlikely(err) && __clear_user(buf, xstate_size))
- err = -EFAULT;
- /* No need to clear here because the caller clears USED_MATH */
return err;
}