summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2012-07-24 16:05:28 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-09-18 15:51:26 -0700
commit0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b (patch)
tree97c8e2c62d1be5fd66c2a6da28d439255bd37ed1 /arch/x86/kernel
parent050902c011712ad4703038fa4489ec4edd87d396 (diff)
downloadop-kernel-dev-0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b.zip
op-kernel-dev-0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b.tar.gz
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/kernel')
-rw-r--r--arch/x86/kernel/xsave.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 9e1a8a7..7a3d4df 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -176,8 +176,10 @@ int save_i387_xstate(void __user *buf)
else
err = fxsave_user(buf);
- if (err)
+ if (unlikely(err)) {
+ __clear_user(buf, xstate_size);
return err;
+ }
user_fpu_end();
} else {
sanitize_i387_state(tsk);
OpenPOWER on IntegriCloud