PERFORCE change 94358 for review

John Baldwin jhb at FreeBSD.org
Fri Mar 31 16:57:45 UTC 2006


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

Change 94358 by jhb at jhb_slimer on 2006/03/31 16:57:25

	- Fix setting of device description in common case.
	- Shut npx up for modern systems, it just adds needless clutter to
	  the dmesg.

Affected files ...

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

Differences ...

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

@@ -253,6 +253,8 @@
 	KASSERT((rcr0() & (CR0_MP | CR0_NE)) == (CR0_MP | CR0_NE),
 	    ("cr0 busted"));
 
+	device_set_desc(dev, "math processor");
+
 	/*
 	 * Modern CPUs all have an FPU that uses the INT16 interface
 	 * and provide a simple way to verify that, so handle the
@@ -261,6 +263,7 @@
 	if (cpu_feature & CPUID_FPU) {
 		hw_float = npx_exists = 1;
 		npx_ex16 = 1;
+		device_quiet(dev);
 		return (0);
 	}
 
@@ -317,8 +320,6 @@
 	 */
 	fninit();
 
-	device_set_desc(dev, "math processor");
-
 	/*
 	 * Don't use fwait here because it might hang.
 	 * Don't use fnop here because it usually hangs if there is no FPU.
@@ -418,12 +419,14 @@
 
 	flags = device_get_flags(dev);
 
-	if (npx_irq13)
-		device_printf(dev, "IRQ 13 interface\n");
-	else if (npx_ex16)
-		device_printf(dev, "INT 16 interface\n");
-	else
-		device_printf(dev, "WARNING: no FPU!\n");
+	if (!device_is_quiet(dev) || bootverbose) {
+		if (npx_irq13)
+			device_printf(dev, "IRQ 13 interface\n");
+		else if (npx_ex16)
+			device_printf(dev, "INT 16 interface\n");
+		else
+			device_printf(dev, "WARNING: no FPU!\n");
+	}
 
 	npxinit(__INITIAL_NPXCW__);
 


More information about the p4-projects mailing list