PERFORCE change 94357 for review

John Baldwin jhb at FreeBSD.org
Fri Mar 31 16:55:42 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=94357

Change 94357 by jhb at jhb_slimer on 2006/03/31 16:54:47

	Fixup comments.

Affected files ...

.. //depot/projects/smpng/sys/i386/isa/npx.c#53 edit

Differences ...

==== //depot/projects/smpng/sys/i386/isa/npx.c#53 (text+ko) ====

@@ -236,7 +236,7 @@
 /*
  * Probe routine.  Initialize cr0 to give correct behaviour for [f]wait
  * whether the device exists or not (XXX should be elsewhere).  Set flags
- * to tell npxattach() what to do.  Modify device struct if npx doesn't
+ * to tell npxattach() what to do.  Setup an interrupt handler if npx does
  * need to use interrupts.  Return 0 if device exists.
  */
 static int
@@ -252,11 +252,18 @@
 
 	KASSERT((rcr0() & (CR0_MP | CR0_NE)) == (CR0_MP | CR0_NE),
 	    ("cr0 busted"));
+
+	/*
+	 * 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.
+	 */
 	if (cpu_feature & CPUID_FPU) {
 		hw_float = npx_exists = 1;
 		npx_ex16 = 1;
 		return (0);
 	}
+
 	save_idt_npxtrap = idt[IDT_MF];
 	setidt(IDT_MF, probetrap, SDT_SYS386TGT, SEL_KPL,
 	    GSEL(GCODE_SEL, SEL_KPL));


More information about the p4-projects mailing list