diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-04-25 06:41:07 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 15:47:39 +0200 |
commit | e84611fc96c67d3a073e327be44d0f9ee3e981ef (patch) | |
tree | 92271f73e30b3014a75306748ec43af91ddbfe12 /arch/x86/kernel/fpu/xsave.c | |
parent | 55cc4678b7ee2edd3e6a9411250530eb871bc61d (diff) | |
download | lwn-e84611fc96c67d3a073e327be44d0f9ee3e981ef.tar.gz lwn-e84611fc96c67d3a073e327be44d0f9ee3e981ef.zip |
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: 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>
Diffstat (limited to 'arch/x86/kernel/fpu/xsave.c')
-rw-r--r-- | arch/x86/kernel/fpu/xsave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/fpu/xsave.c b/arch/x86/kernel/fpu/xsave.c index 961c25850c7f..0610f431f77f 100644 --- a/arch/x86/kernel/fpu/xsave.c +++ b/arch/x86/kernel/fpu/xsave.c @@ -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); |