mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-15 17:14:00 +08:00
x86/fpu: Do CLTS fpu__init_system()
mxcsr_feature_mask_init() depends on TS being cleared, as it executes an FXSAVE instruction. After later changes we will move the TS setup into fpu__init_cpu(), which will interact with this - so clear the TS flag explicitly. 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>
This commit is contained in:
parent
011545b570
commit
530b37e43c
@ -213,6 +213,13 @@ void fpu__init_system(void)
|
||||
/* The FPU has to be operational for some of the later FPU init activities: */
|
||||
fpu__init_cpu();
|
||||
|
||||
/*
|
||||
* But don't leave CR0::TS set yet, as some of the FPU setup methods depend
|
||||
* on being able to execute FPU instructions that will fault on a set TS,
|
||||
* such as the FXSAVE in mxcsr_feature_mask_init().
|
||||
*/
|
||||
clts();
|
||||
|
||||
/*
|
||||
* Set up the legacy init FPU context. (xstate init might overwrite this
|
||||
* with a more modern format, if the CPU supports it.)
|
||||
|
Loading…
Reference in New Issue
Block a user