]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/xsave.c
Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / arch / x86 / kernel / xsave.c
index ada87a329edcde71763601e19b1fc4a8c9062f3d..d6c28acdf99c19abd1f5554561b1b3030c057b3b 100644 (file)
@@ -243,7 +243,7 @@ int save_xstate_sig(void __user *buf, void __user *buf_fx, int size)
        if (!access_ok(VERIFY_WRITE, buf, size))
                return -EACCES;
 
-       if (!HAVE_HWFP)
+       if (!static_cpu_has(X86_FEATURE_FPU))
                return fpregs_soft_get(current, NULL, 0,
                        sizeof(struct user_i387_ia32_struct), NULL,
                        (struct _fpstate_ia32 __user *) buf) ? -1 : 1;
@@ -350,11 +350,10 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)
        if (!used_math() && init_fpu(tsk))
                return -1;
 
-       if (!HAVE_HWFP) {
+       if (!static_cpu_has(X86_FEATURE_FPU))
                return fpregs_soft_set(current, NULL,
                                       0, sizeof(struct user_i387_ia32_struct),
                                       NULL, buf) != 0;
-       }
 
        if (use_xsave()) {
                struct _fpx_sw_bytes fx_sw_user;