]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/include/asm/xsave.h
x86, fpu: Consolidate inline asm routines for saving/restoring fpu state
[karo-tx-linux.git] / arch / x86 / include / asm / xsave.h
index 8a1b6f9b594a71bbf960635dc1dbfeb07eecbd52..aaac810e8613feb179a47c2986274fd5dd210896 100644 (file)
@@ -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;
 }