aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/fpu/init.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-04-25 08:35:53 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-19 15:47:41 +0200
commit2507e1c03f577173d613d6728329eb220724c577 (patch)
tree6320b786671fc3519f384f08df6b9a5c2bffdadd /arch/x86/kernel/fpu/init.c
parentx86/fpu: Do fpu__init_system_xstate only from fpu__init_system() (diff)
downloadlinux-dev-2507e1c03f577173d613d6728329eb220724c577.tar.xz
linux-dev-2507e1c03f577173d613d6728329eb220724c577.zip
x86/fpu: Set up the legacy FPU init image from fpu__init_system()
The legacy FPU init image is used on older CPUs who don't run xstate init. But the init code is called within setup_init_fpu_buf(), an xstate method. Move this legacy init out of the xstate code and put it into fpu/init.c. Reviewed-by: Borislav Petkov <bp@alien8.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/fpu/init.c')
-rw-r--r--arch/x86/kernel/fpu/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
index c1b2d1cfe745..30d2d5d03cb0 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
@@ -158,6 +158,12 @@ void fpu__init_system(void)
/* The FPU has to be operational for some of the later FPU init activities: */
fpu__init_cpu();
+ /*
+ * Set up the legacy init FPU context. (xstate init might overwrite this
+ * with a more modern format, if the CPU supports it.)
+ */
+ fx_finit(&init_xstate_ctx.i387);
+
mxcsr_feature_mask_init();
fpu__init_system_xstate();
eager_fpu_init();