summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/fpu/core.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-07-25 12:16:16 +0200
committerIngo Molnar <mingo@kernel.org>2020-07-25 12:16:16 +0200
commitfb4405ae6e1c66277b7d69d2c7a34215671da585 (patch)
tree95a24efe3a3ca90a4b041d5ca548c2d37eac1ae8 /arch/x86/kernel/fpu/core.c
parentc9a1ff316bc9b1d1806a4366d0aef6e18833ba52 (diff)
parentba47d845d715a010f7b51f6f89bae32845e6acb7 (diff)
Merge tag 'v5.8-rc6' into x86/cpu, to refresh the branch before adding new commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/fpu/core.c')
-rw-r--r--arch/x86/kernel/fpu/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 06c818967bb6..15247b96c6ea 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -101,6 +101,12 @@ void kernel_fpu_begin(void)
copy_fpregs_to_fpstate(&current->thread.fpu);
}
__cpu_invalidate_fpregs_state();
+
+ if (boot_cpu_has(X86_FEATURE_XMM))
+ ldmxcsr(MXCSR_DEFAULT);
+
+ if (boot_cpu_has(X86_FEATURE_FPU))
+ asm volatile ("fninit");
}
EXPORT_SYMBOL_GPL(kernel_fpu_begin);