mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-31 08:46:59 +08:00
21 lines
610 B
Diff
21 lines
610 B
Diff
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
|
|
index 1d7770447b3e..1691311e5b23 100644
|
|
--- a/arch/x86/kernel/fpu/xstate.c
|
|
+++ b/arch/x86/kernel/fpu/xstate.c
|
|
@@ -705,8 +705,14 @@ void __init fpu__init_system_xstate(void)
|
|
WARN_ON_FPU(!on_boot_cpu);
|
|
on_boot_cpu = 0;
|
|
|
|
+ if (!boot_cpu_has(X86_FEATURE_FPU)) {
|
|
+ pr_info("x86/fpu: No FPU detected.\n");
|
|
+ return;
|
|
+ }
|
|
+
|
|
if (!boot_cpu_has(X86_FEATURE_XSAVE)) {
|
|
- pr_info("x86/fpu: Legacy x87 FPU detected.\n");
|
|
+ pr_info("x86/fpu: x87 FPU will use %s.\n",
|
|
+ boot_cpu_has(X86_FEATURE_FXSR) ? "FXSAVE" : "FSAVE");
|
|
return;
|
|
}
|
|
|