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

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

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



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