aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/i387.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-07-21 13:03:57 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2010-08-12 17:16:54 -0400
commit1f999ab5a1360afc388868cc0ef9afe8edeef3be (patch)
treee69f4699550930a1f97f8c1770dba0d0d9f6f3db /arch/x86/kernel/i387.c
parentad41a1e0cab07c5125456e8d38e5b1ab148d04aa (diff)
x86, xsave: Disable xsave in i387 emulation mode
xsave is broken for (!HAVE_HWFP). This is the case if config MATH_EMULATION is enabled, 'no387' kernel parameter is set and xsave exists. xsave will not work because x86/math-emu and xsave share the same memory. As this case can be treated as corner case we simply disable xsave then. Signed-off-by: Robert Richter <robert.richter@amd.com> LKML-Reference: <1279731838-1522-7-git-send-email-robert.richter@amd.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/i387.c')
-rw-r--r--arch/x86/kernel/i387.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index 1f11f5ce668f..2605c50b11d3 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -67,6 +67,12 @@ static void __cpuinit init_thread_xstate(void)
67 */ 67 */
68 68
69 if (!HAVE_HWFP) { 69 if (!HAVE_HWFP) {
70 /*
71 * Disable xsave as we do not support it if i387
72 * emulation is enabled.
73 */
74 setup_clear_cpu_cap(X86_FEATURE_XSAVE);
75 setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
70 xstate_size = sizeof(struct i387_soft_struct); 76 xstate_size = sizeof(struct i387_soft_struct);
71 return; 77 return;
72 } 78 }