|
@@ -21,11 +21,15 @@ static double __initdata y = 3145727.0;
|
|
|
* We should really only care about bugs here
|
|
|
* anyway. Not features.
|
|
|
*/
|
|
|
-static void __init check_fpu(void)
|
|
|
+void __init fpu__init_check_bugs(void)
|
|
|
{
|
|
|
u32 cr0_saved;
|
|
|
s32 fdiv_bug;
|
|
|
|
|
|
+ /* kernel_fpu_begin/end() relies on patched alternative instructions. */
|
|
|
+ if (!boot_cpu_has(X86_FEATURE_FPU))
|
|
|
+ return;
|
|
|
+
|
|
|
/* We might have CR0::TS set already, clear it: */
|
|
|
cr0_saved = read_cr0();
|
|
|
write_cr0(cr0_saved & ~X86_CR0_TS);
|
|
@@ -59,13 +63,3 @@ static void __init check_fpu(void)
|
|
|
pr_warn("Hmm, FPU with FDIV bug\n");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-void __init fpu__init_check_bugs(void)
|
|
|
-{
|
|
|
- /*
|
|
|
- * kernel_fpu_begin/end() in check_fpu() relies on the patched
|
|
|
- * alternative instructions.
|
|
|
- */
|
|
|
- if (boot_cpu_has(X86_FEATURE_FPU))
|
|
|
- check_fpu();
|
|
|
-}
|