Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e84611fc authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86/fpu: Move CPU capability check into fpu__init_cpu_xstate()



fpu__init_system_xstate() does an FPU capability check that is better
done in fpu__init_cpu_xstate(). This will allow us to call
fpu__init_cpu_xstate() directly on legacy CPUs as well.

Reviewed-by: default avatarBorislav 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: default avatarIngo Molnar <mingo@kernel.org>
parent 55cc4678
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ static void prepare_fx_sw_frame(void)
 */
void fpu__init_cpu_xstate(void)
{
	if (!xfeatures_mask)
	if (!cpu_has_xsave || !xfeatures_mask)
		return;

	cr4_set_bits(X86_CR4_OSXSAVE);