diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-07-25 12:16:16 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-07-25 12:16:16 +0200 |
commit | fb4405ae6e1c66277b7d69d2c7a34215671da585 (patch) | |
tree | 95a24efe3a3ca90a4b041d5ca548c2d37eac1ae8 /arch/x86/kernel/fpu/core.c | |
parent | c9a1ff316bc9b1d1806a4366d0aef6e18833ba52 (diff) | |
parent | ba47d845d715a010f7b51f6f89bae32845e6acb7 (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.c | 6 |
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(¤t->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); |