*/
fninit();
-#ifdef SMP
+ device_set_desc(dev, "math processor");
/*
- * Exception 16 MUST work for SMP.
+ * Modern CPUs all have an FPU that uses the INT16 interface
+ * and provide a simple way to verify that, so handle the
+ * common case right away.
*/
- npx_irq13 = 0;
- npx_ex16 = hw_float = npx_exists = 1;
- device_set_desc(dev, "math processor");
- return (0);
-
-#else /* !SMP */
- device_set_desc(dev, "math processor");
+ if (cpu_feature & CPUID_FPU) {
+ npx_irq13 = 0;
+ npx_ex16 = hw_float = npx_exists = 1;
+ return (0);
+ }
+#ifndef SMP
/*
* Don't use fwait here because it might hang.
* Don't use fnop here because it usually hangs if there is no FPU.