summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/fpu/xsave.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/kernel/fpu/xsave.c b/arch/x86/kernel/fpu/xsave.c
index 0610f431f77f..fd656cbdd315 100644
--- a/arch/x86/kernel/fpu/xsave.c
+++ b/arch/x86/kernel/fpu/xsave.c
@@ -653,6 +653,11 @@ void fpu__init_system_xstate(void)
{
unsigned int eax, ebx, ecx, edx;
+ if (!cpu_has_xsave) {
+ pr_info("x86/fpu: Legacy x87 FPU detected.\n");
+ return;
+ }
+
if (boot_cpu_data.cpuid_level < XSTATE_CPUID) {
WARN(1, "x86/fpu: XSTATE_CPUID missing!\n");
return;
@@ -711,14 +716,6 @@ void xsave_init(void)
{
static char on_boot_cpu = 1;
- if (!cpu_has_xsave) {
- if (on_boot_cpu) {
- on_boot_cpu = 0;
- pr_info("x86/fpu: Legacy x87 FPU detected.\n");
- }
- return;
- }
-
if (on_boot_cpu) {
on_boot_cpu = 0;
fpu__init_system_xstate();