summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/fpu/init.c6
-rw-r--r--arch/x86/kernel/fpu/xsave.c6
2 files changed, 6 insertions, 6 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();
diff --git a/arch/x86/kernel/fpu/xsave.c b/arch/x86/kernel/fpu/xsave.c
index fa9b954eb23a..6be0a98238f6 100644
--- a/arch/x86/kernel/fpu/xsave.c
+++ b/arch/x86/kernel/fpu/xsave.c
@@ -576,12 +576,6 @@ static void setup_init_fpu_buf(void)
return;
on_boot_cpu = 0;
- /*
- * Setup init_xstate_ctx to represent the init state of
- * all the features managed by the xsave
- */
- fx_finit(&init_xstate_ctx.i387);
-
if (!cpu_has_xsave)
return;