Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 2006 16:55:38 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 94357 for review
Message-ID:  <200603311655.k2VGtc7P096244@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94357

Change 94357 by jhb@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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603311655.k2VGtc7P096244>