Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2008 11:56:52 GMT
From:      Ed Schouten <ed@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 152009 for review
Message-ID:  <200810271156.m9RBuqji089396@repoman.freebsd.org>

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

Change 152009 by ed@ed_dull on 2008/10/27 11:55:59

	IFC.

Affected files ...

.. //depot/projects/mpsafetty/etc/rc.subr#2 integrate
.. //depot/projects/mpsafetty/sys/amd64/amd64/local_apic.c#3 integrate
.. //depot/projects/mpsafetty/sys/arm/at91/at91.c#4 integrate
.. //depot/projects/mpsafetty/sys/conf/files.powerpc#6 integrate
.. //depot/projects/mpsafetty/sys/dev/adb/adb.h#1 branch
.. //depot/projects/mpsafetty/sys/dev/adb/adb_bus.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/adb/adb_hb_if.m#1 branch
.. //depot/projects/mpsafetty/sys/dev/adb/adb_if.m#1 branch
.. //depot/projects/mpsafetty/sys/dev/adb/adb_kbd.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/adb/adb_mouse.c#1 branch
.. //depot/projects/mpsafetty/sys/dev/adb/adbvar.h#1 branch
.. //depot/projects/mpsafetty/sys/dev/ata/ata-queue.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/cfe/cfe_console.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/ofw/ofw_console.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/xen/console/console.c#9 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum.c#2 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum.h#3 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_drive.c#5 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_init.c#2 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_plex.c#2 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_raid5.c#2 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_rm.c#3 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_state.c#2 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_subr.c#3 integrate
.. //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_volume.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/local_apic.c#5 integrate
.. //depot/projects/mpsafetty/sys/kern/subr_param.c#2 integrate
.. //depot/projects/mpsafetty/sys/net80211/ieee80211_node.c#5 integrate
.. //depot/projects/mpsafetty/sys/net80211/ieee80211_scan_sta.c#4 integrate
.. //depot/projects/mpsafetty/sys/netinet/in.c#4 integrate
.. //depot/projects/mpsafetty/sys/netinet/tcp_input.c#10 integrate
.. //depot/projects/mpsafetty/sys/netinet/tcp_sack.c#4 integrate
.. //depot/projects/mpsafetty/sys/netinet/tcp_syncache.c#12 integrate
.. //depot/projects/mpsafetty/sys/netinet6/frag6.c#4 integrate
.. //depot/projects/mpsafetty/sys/netinet6/ip6_var.h#4 integrate
.. //depot/projects/mpsafetty/sys/pc98/pc98/pc98_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/pc98/pc98/pc98_machdep.h#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/aim/locore.S#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/booke/locore.S#3 integrate
.. //depot/projects/mpsafetty/sys/powerpc/booke/trap.c#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/conf/GENERIC#7 integrate
.. //depot/projects/mpsafetty/sys/powerpc/include/cpu.h#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/include/profile.h#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powermac/ata_kauai.c#4 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powermac/cuda.c#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/cudavar.h#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/macgpio.c#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/macgpiovar.h#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/macio.c#3 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powermac/pmu.c#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/pmuvar.h#1 branch
.. //depot/projects/mpsafetty/sys/powerpc/powermac/viareg.h#1 branch
.. //depot/projects/mpsafetty/sys/security/mac/mac_framework.h#4 integrate
.. //depot/projects/mpsafetty/sys/security/mac/mac_inet6.c#2 integrate
.. //depot/projects/mpsafetty/sys/security/mac/mac_policy.h#4 integrate
.. //depot/projects/mpsafetty/sys/security/mac_biba/mac_biba.c#5 integrate
.. //depot/projects/mpsafetty/sys/security/mac_bsdextended/ugidfw_system.c#1 branch
.. //depot/projects/mpsafetty/sys/security/mac_bsdextended/ugidfw_vnode.c#1 branch
.. //depot/projects/mpsafetty/sys/security/mac_lomac/mac_lomac.c#7 integrate
.. //depot/projects/mpsafetty/sys/security/mac_mls/mac_mls.c#5 integrate
.. //depot/projects/mpsafetty/sys/security/mac_stub/mac_stub.c#4 integrate
.. //depot/projects/mpsafetty/sys/security/mac_test/mac_test.c#4 integrate
.. //depot/projects/mpsafetty/sys/sys/cons.h#2 integrate

Differences ...

==== //depot/projects/mpsafetty/etc/rc.subr#2 (text+ko) ====

@@ -1,5 +1,5 @@
 # $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $
-# $FreeBSD: src/etc/rc.subr,v 1.86 2008/06/23 05:09:10 mtm Exp $
+# $FreeBSD: src/etc/rc.subr,v 1.87 2008/10/27 01:05:09 thompsa Exp $
 #
 # Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -913,6 +913,7 @@
 			else
 				( trap "echo Script $_file interrupted; kill -QUIT $$" 3
 				  trap "echo Script $_file interrupted; exit 1" 2
+				  trap "echo Script $_file running" 29
 				  set $_arg; . $_file )
 			fi
 		fi

==== //depot/projects/mpsafetty/sys/amd64/amd64/local_apic.c#3 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.46 2008/08/23 12:35:43 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.47 2008/10/26 18:58:04 sobomax Exp $");
 
 #include "opt_hwpmc_hooks.h"
 #include "opt_kdtrace.h"
@@ -401,7 +401,11 @@
 		lapic_timer_hz = hz * 2;
 	else
 		lapic_timer_hz = hz * 4;
-	stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+	if (lapic_timer_hz < 128) {
+		stathz = 128;
+	} else {
+		stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+	}
 	profhz = lapic_timer_hz;
 	lapic_timer_period = value / lapic_timer_hz;
 

==== //depot/projects/mpsafetty/sys/arm/at91/at91.c#4 (text) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.18 2008/09/05 22:27:10 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.20 2008/10/26 22:53:59 stas Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -168,6 +168,42 @@
 	generic_armv4_bs_c_2,
 	NULL,
 	NULL,
+
+	/* read (single) stream */
+	generic_bs_r_1,
+	generic_armv4_bs_r_2,
+	generic_bs_r_4,
+	NULL,
+
+	/* read multiple stream */
+	generic_bs_rm_1,
+	generic_armv4_bs_rm_2,
+	generic_bs_rm_4,
+	NULL,
+
+	/* read region stream */
+	generic_bs_rr_1,
+	generic_armv4_bs_rr_2,
+	generic_bs_rr_4,
+	NULL,
+
+	/* write (single) stream */
+	generic_bs_w_1,
+	generic_armv4_bs_w_2,
+	generic_bs_w_4,
+	NULL,
+
+	/* write multiple stream */
+	generic_bs_wm_1,
+	generic_armv4_bs_wm_2,
+	generic_bs_wm_4,
+	NULL,
+
+	/* write region stream */
+	NULL,
+	generic_armv4_bs_wr_2,
+	generic_bs_wr_4,
+	NULL,
 };
 
 static int
@@ -534,8 +570,10 @@
 	case SYS_RES_MEMORY:
 		rle->res = rman_reserve_resource(&sc->sc_mem_rman,
 		    start, end, count, flags, child);
-		rman_set_bustag(rle->res, &at91_bs_tag);
-		rman_set_bushandle(rle->res, start);
+		if (rle->res != NULL) {
+			rman_set_bustag(rle->res, &at91_bs_tag);
+			rman_set_bushandle(rle->res, start);
+		}
 		break;
 	}
 	if (rle->res) {

==== //depot/projects/mpsafetty/sys/conf/files.powerpc#6 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.powerpc,v 1.84 2008/10/25 06:18:12 marcel Exp $
+# $FreeBSD: src/sys/conf/files.powerpc,v 1.85 2008/10/26 19:37:38 nwhitehorn Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -28,6 +28,11 @@
 crypto/blowfish/bf_enc.c	optional	crypto | ipsec
 crypto/des/des_enc.c		optional	crypto | ipsec | netsmb
 dev/bm/if_bm.c			optional	bm powermac
+dev/adb/adb_bus.c		optional	adb
+dev/adb/adb_kbd.c		optional	adb
+dev/adb/adb_mouse.c		optional	adb
+dev/adb/adb_hb_if.m		optional	adb
+dev/adb/adb_if.m		optional	adb
 dev/cfi/cfi_bus_lbc.c		optional	cfi
 dev/fb/fb.c			optional	sc
 dev/hwpmc/hwpmc_powerpc.c	optional	hwpmc
@@ -119,6 +124,9 @@
 powerpc/powermac/openpic_macio.c optional	powermac pci
 powerpc/powermac/pswitch.c	optional	powermac pswitch
 powerpc/powermac/uninorth.c	optional	powermac pci
+powerpc/powermac/cuda.c		optional	powermac cuda
+powerpc/powermac/pmu.c		optional	powermac pmu 
+powerpc/powermac/macgpio.c	optional	powermac pci 
 powerpc/powerpc/atomic.S	standard
 powerpc/powerpc/autoconf.c	standard
 powerpc/powerpc/bcopy.c		standard

==== //depot/projects/mpsafetty/sys/dev/ata/ata-queue.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.73 2008/04/21 10:35:19 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.74 2008/10/27 09:26:24 sos Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -503,7 +503,8 @@
 	request->flags |= ATA_R_TIMEOUT;
 	mtx_unlock(&ch->state_mtx);
 	ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
-	ch->dma.unload(request);
+	if (ch->dma.unload)
+	    ch->dma.unload(request);
 	ata_finish(request);
     }
     else {

==== //depot/projects/mpsafetty/sys/dev/cfe/cfe_console.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cfe/cfe_console.c,v 1.4 2008/09/28 03:33:01 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cfe/cfe_console.c,v 1.5 2008/10/27 11:45:31 ed Exp $");
 
 #include "opt_comconsole.h"
 
@@ -173,8 +173,7 @@
 cfe_cninit(struct consdev *cp)
 {
 
-	sprintf(cp->cn_name, "cfecons");
-	cp->cn_tp = cfe_tp;
+	strcpy(cp->cn_name, "cfecons");
 }
 
 static void

==== //depot/projects/mpsafetty/sys/dev/ofw/ofw_console.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ofw/ofw_console.c,v 1.40 2008/08/20 08:31:58 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ofw/ofw_console.c,v 1.41 2008/10/27 11:45:31 ed Exp $");
 
 #include "opt_comconsole.h"
 #include "opt_ofw.h"
@@ -60,7 +60,6 @@
 	.tsw_outwakeup	= ofwtty_outwakeup,
 };
 
-static struct tty		*ofw_tp = NULL;
 static int			polltime;
 static struct callout_handle	ofw_timeouthandle
     = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle);
@@ -186,8 +185,7 @@
 {
 
 	/* XXX: This is the alias, but that should be good enough */
-	sprintf(cp->cn_name, "ofwcons");
-	cp->cn_tp = ofw_tp;
+	strcpy(cp->cn_name, "ofwcons");
 }
 
 static void

==== //depot/projects/mpsafetty/sys/dev/xen/console/console.c#9 (text+ko) ====

@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/xen/console/console.c,v 1.5 2008/09/27 08:51:18 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/xen/console/console.c,v 1.6 2008/10/27 11:45:31 ed Exp $");
 
 #include <sys/param.h>
 #include <sys/module.h>
@@ -107,7 +107,6 @@
 xccnprobe(struct consdev *cp)
 {
 	cp->cn_pri = CN_REMOTE;
-	cp->cn_tp = xccons;
 	sprintf(cp->cn_name, "%s0", driver_name);
 }
 

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.21 2006/03/30 14:01:25 le Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.22 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -35,6 +35,7 @@
 #include <sys/malloc.h>
 #include <sys/module.h>
 #include <sys/mutex.h>
+#include <sys/sysctl.h>
 #include <sys/systm.h>
 
 #include <geom/geom.h>
@@ -42,12 +43,12 @@
 #include <geom/vinum/geom_vinum.h>
 #include <geom/vinum/geom_vinum_share.h>
 
-#if 0
 SYSCTL_DECL(_kern_geom);
 SYSCTL_NODE(_kern_geom, OID_AUTO, vinum, CTLFLAG_RW, 0, "GEOM_VINUM stuff");
-SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &gv_debug, 0,
+u_int g_vinum_debug = 0;
+TUNABLE_INT("kern.geom.vinum.debug", &g_vinum_debug);
+SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &g_vinum_debug, 0,
     "Debug level");
-#endif
 
 int	gv_create(struct g_geom *, struct gctl_req *);
 
@@ -363,7 +364,7 @@
 			 */
 			pp = g_provider_by_name(d->device);
 			if (pp == NULL) {
-				printf("geom_vinum: %s: drive disapeared?\n",
+				G_VINUM_DEBUG(0, "%s: drive disappeared?",
 				    d->device);
 				continue;
 			}

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum.h#3 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/geom/vinum/geom_vinum.h,v 1.14 2008/10/01 14:50:36 lulf Exp $
+ * $FreeBSD: src/sys/geom/vinum/geom_vinum.h,v 1.15 2008/10/26 17:20:37 lulf Exp $
  */
 
 #ifndef	_GEOM_VINUM_H_
@@ -96,4 +96,30 @@
 off_t	gv_vol_size(struct gv_volume *);
 off_t	gv_plex_size(struct gv_plex *);
 
+extern	u_int	g_vinum_debug;
+
+#define	G_VINUM_DEBUG(lvl, ...)	do {					\
+	if (g_vinum_debug >= (lvl)) {					\
+		printf("GEOM_VINUM");					\
+		if (g_vinum_debug > 0)					\
+			printf("[%u]", lvl);				\
+		printf(": ");						\
+		printf(__VA_ARGS__);					\
+		printf("\n");						\
+	}								\
+} while (0)
+
+#define	G_VINUM_LOGREQ(lvl, bp, ...)	do {				\
+	if (g_vinum_debug >= (lvl)) {					\
+		printf("GEOM_VINUM");					\
+		if (g_vinum_debug > 0)					\
+			printf("[%u]", lvl);				\
+		printf(": ");						\
+		printf(__VA_ARGS__);					\
+		printf(" ");						\
+		g_print_bio(bp);					\
+		printf("\n");						\
+	}								\
+} while (0)
+
 #endif /* !_GEOM_VINUM_H_ */

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_drive.c#5 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_drive.c,v 1.31 2008/10/02 09:35:47 lulf Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_drive.c,v 1.32 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -172,7 +172,7 @@
 		g_free(d_hdr);
 		return (-1);
 	} else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_SPARC64) {
-		printf("VINUM: detected legacy sparc64 header\n");
+		G_VINUM_DEBUG(1, "detected legacy sparc64 header");
 		m_hdr->magic = GV_MAGIC;
 		/* Legacy sparc64 on-disk header */
 		m_hdr->config_length = GV_GET64(be);
@@ -186,7 +186,7 @@
 		m_hdr->label.last_update.tv_usec = GV_GET64(be);
 		m_hdr->label.drive_size = GV_GET64(be);
 	} else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_POWERPC) {
-		printf("VINUM: detected legacy PowerPC header\n");
+		G_VINUM_DEBUG(1, "detected legacy PowerPC header");
 		m_hdr->magic = GV_MAGIC;
 		/* legacy 32-bit big endian on-disk header */
 		m_hdr->config_length = GV_GET32(be);
@@ -200,7 +200,7 @@
 		m_hdr->label.last_update.tv_usec = GV_GET32(be);
 		m_hdr->label.drive_size = GV_GET64(be);
 	} else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_I386) {
-		printf("VINUM: detected legacy i386 header\n");
+		G_VINUM_DEBUG(1, "detected legacy i386 header");
 		m_hdr->magic = GV_MAGIC;
 		/* legacy i386 on-disk header */
 		m_hdr->config_length = GV_GET32(le);
@@ -214,7 +214,7 @@
 		m_hdr->label.last_update.tv_usec = GV_GET32(le);
 		m_hdr->label.drive_size = GV_GET64(le);
 	} else {
-		printf("VINUM: detected legacy amd64 header\n");
+		G_VINUM_DEBUG(1, "detected legacy amd64 header");
 		m_hdr->magic = GV_MAGIC;
 		/* legacy amd64 on-disk header */
 		m_hdr->config_length = GV_GET64(le);
@@ -354,7 +354,7 @@
 
 	hdr = d->hdr;
 	if (hdr == NULL) {
-		printf("GEOM_VINUM: drive %s has NULL hdr\n", d->name);
+		G_VINUM_DEBUG(0, "drive %s has NULL hdr", d->name);
 		g_free(vhdr);
 		return;
 	}
@@ -367,7 +367,7 @@
 
 	error = g_access(cp2, 0, 1, 0);
 	if (error) {
-		printf("GEOM_VINUM: g_access failed on drive %s, errno %d\n",
+		G_VINUM_DEBUG(0, "g_access failed on drive %s, errno %d",
 		    d->name, error);
 		sbuf_delete(sb);
 		g_free(vhdr);
@@ -378,7 +378,7 @@
 	do {
 		error = gv_write_header(cp2, vhdr);
 		if (error) {
-			printf("GEOM_VINUM: writing vhdr failed on drive %s, "
+			G_VINUM_DEBUG(0, "writing vhdr failed on drive %s, "
 			    "errno %d", d->name, error);
 			break;
 		}
@@ -386,7 +386,7 @@
 		error = g_write_data(cp2, GV_CFG_OFFSET, sbuf_data(sb),
 		    GV_CFG_LEN);
 		if (error) {
-			printf("GEOM_VINUM: writing first config copy failed "
+			G_VINUM_DEBUG(0, "writing first config copy failed "
 			    "on drive %s, errno %d", d->name, error);
 			break;
 		}
@@ -394,7 +394,7 @@
 		error = g_write_data(cp2, GV_CFG_OFFSET + GV_CFG_LEN,
 		    sbuf_data(sb), GV_CFG_LEN);
 		if (error)
-			printf("GEOM_VINUM: writing second config copy failed "
+			G_VINUM_DEBUG(0, "writing second config copy failed "
 			    "on drive %s, errno %d", d->name, error);
 	} while (0);
 
@@ -836,8 +836,8 @@
 
 	LIST_FOREACH(cp, &gp->consumer, consumer) {
 		if (cp->nstart != cp->nend) {
-			printf("GEOM_VINUM: dead drive '%s' has still "
-			    "active requests, can't detach consumer\n",
+			G_VINUM_DEBUG(0, "dead drive '%s' still has "
+			    "active requests, cannot detach consumer",
 			    d->name);
 			g_post_event(gv_drive_dead, d, M_WAITOK, d,
 			    NULL);
@@ -847,7 +847,7 @@
 			g_access(cp, -cp->acr, -cp->acw, -cp->ace);
 	}
 
-	printf("GEOM_VINUM: lost drive '%s'\n", d->name);
+	G_VINUM_DEBUG(1, "lost drive '%s'", d->name);
 	d->geom = NULL;
 	LIST_FOREACH(s, &d->subdisks, from_drive) {
 		s->provider = NULL;

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_init.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_init.c,v 1.12 2007/10/20 23:23:20 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_init.c,v 1.13 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -420,15 +420,15 @@
 	error = g_access(cp, 1, 1, 0);
 	if (error) {
 		g_topology_unlock();
-		printf("GEOM_VINUM: rebuild of %s failed to access consumer: "
-		    "%d\n", p->name, error);
+		G_VINUM_DEBUG(0, "rebuild of %s failed to access consumer: "
+		    "%d", p->name, error);
 		kproc_exit(error);
 	}
 	g_topology_unlock();
 
 	buf = g_malloc(sync->syncsize, M_WAITOK);
 
-	printf("GEOM_VINUM: rebuild of %s started\n", p->name);
+	G_VINUM_DEBUG(1, "rebuild of %s started", p->name);
 	i = 0;
 	for (i = 0; i < p->size; i += (p->stripesize * (p->sdcount - 1))) {
 /*
@@ -437,8 +437,8 @@
 */
 		bp = g_new_bio();
 		if (bp == NULL) {
-			printf("GEOM_VINUM: rebuild of %s failed creating bio: "
-			    "out of memory\n", p->name);
+			G_VINUM_DEBUG(0, "rebuild of %s failed creating bio: "
+			    "out of memory", p->name);
 			break;
 		}
 		bp->bio_cmd = BIO_WRITE;
@@ -454,8 +454,8 @@
 		/* ... and wait for the result. */
 		error = biowait(bp, "gwrite");
 		if (error) {
-			printf("GEOM_VINUM: rebuild of %s failed at offset %jd "
-			    "errno: %d\n", p->name, i, error);
+			G_VINUM_DEBUG(0, "rebuild of %s failed at offset %jd "
+			    "errno: %d", p->name, i, error);
 			break;
 		}
 		g_destroy_bio(bp);
@@ -477,7 +477,7 @@
 
 	/* Successful initialization. */
 	if (!error)
-		printf("GEOM_VINUM: rebuild of %s finished\n", p->name);
+		G_VINUM_DEBUG(1, "rebuild of %s finished", p->name);
 
 	g_free(sync);
 	kproc_exit(error);
@@ -508,8 +508,8 @@
 	error = g_access(from, 1, 0, 0);
 	if (error) {
 		g_topology_unlock();
-		printf("GEOM_VINUM: sync from '%s' failed to access "
-		    "consumer: %d\n", sync->from->name, error);
+		G_VINUM_DEBUG(0, "sync from '%s' failed to access "
+		    "consumer: %d", sync->from->name, error);
 		g_free(sync);
 		kproc_exit(error);
 	}
@@ -517,21 +517,21 @@
 	if (error) {
 		g_access(from, -1, 0, 0);
 		g_topology_unlock();
-		printf("GEOM_VINUM: sync to '%s' failed to access "
-		    "consumer: %d\n", p->name, error);
+		G_VINUM_DEBUG(0, "sync to '%s' failed to access "
+		    "consumer: %d", p->name, error);
 		g_free(sync);
 		kproc_exit(error);
 	}
 	g_topology_unlock();
 
-	printf("GEOM_VINUM: plex sync %s -> %s started\n", sync->from->name,
+	G_VINUM_DEBUG(1, "plex sync %s -> %s started", sync->from->name,
 	    sync->to->name);
 	for (i = 0; i < p->size; i+= sync->syncsize) {
 		/* Read some bits from the good plex. */
 		buf = g_read_data(from, i, sync->syncsize, &error);
 		if (buf == NULL) {
-			printf("GEOM_VINUM: sync read from '%s' failed at "
-			    "offset %jd; errno: %d\n", sync->from->name, i,
+			G_VINUM_DEBUG(0, "sync read from '%s' failed at "
+			    "offset %jd; errno: %d", sync->from->name, i,
 			    error);
 			break;
 		}
@@ -544,8 +544,8 @@
 		 */
 		bp = g_new_bio();
 		if (bp == NULL) {
-			printf("GEOM_VINUM: sync write to '%s' failed at "
-			    "offset %jd; out of memory\n", p->name, i);
+			G_VINUM_DEBUG(0, "sync write to '%s' failed at "
+			    "offset %jd; out of memory", p->name, i);
 			g_free(buf);
 			break;
 		}
@@ -569,7 +569,7 @@
 		g_destroy_bio(bp);
 		g_free(buf);
 		if (error) {
-			printf("GEOM_VINUM: sync write to '%s' failed at "
+			G_VINUM_DEBUG(0, "sync write to '%s' failed at "
 			    "offset %jd; errno: %d\n", p->name, i, error);
 			break;
 		}
@@ -586,7 +586,7 @@
 
 	/* Successful initialization. */
 	if (!error)
-		printf("GEOM_VINUM: plex sync %s -> %s finished\n",
+		G_VINUM_DEBUG(1, "plex sync %s -> %s finished",
 		    sync->from->name, sync->to->name);
 
 	p->flags &= ~GV_PLEX_SYNCING;
@@ -630,8 +630,8 @@
 	if (error) {
 		s->init_error = error;
 		g_topology_unlock();
-		printf("GEOM_VINUM: subdisk '%s' init: failed to access "
-		    "consumer; error: %d\n", s->name, error);
+		G_VINUM_DEBUG(0, "subdisk '%s' init: failed to access "
+		    "consumer; error: %d", s->name, error);
 		kproc_exit(error);
 	}
 	g_topology_unlock();
@@ -639,8 +639,8 @@
 	for (i = start; i < offset + length; i += init_size) {
 		error = g_write_data(cp, i, buf, init_size);
 		if (error) {
-			printf("GEOM_VINUM: subdisk '%s' init: write failed"
-			    " at offset %jd (drive offset %jd); error %d\n",
+			G_VINUM_DEBUG(0, "subdisk '%s' init: write failed"
+			    " at offset %jd (drive offset %jd); error %d",
 			    s->name, (intmax_t)s->initialized, (intmax_t)i,
 			    error);
 			break;
@@ -664,7 +664,7 @@
 		gv_set_sd_state(s, GV_SD_UP, GV_SETSTATE_CONFIG);
 		g_topology_unlock();
 		s->initialized = 0;
-		printf("GEOM_VINUM: subdisk '%s' init: finished successfully\n",
+		G_VINUM_DEBUG(1, "subdisk '%s' init: finished successfully",
 		    s->name);
 	}
 	kproc_exit(error);

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_plex.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_plex.c,v 1.18 2007/10/20 23:23:20 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_plex.c,v 1.19 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -189,7 +189,7 @@
 		if (!(bp->bio_cflags & GV_BIO_SYNCREQ))
 			return (ENXIO);
 
-		printf("GEOM_VINUM: sd %s is initializing\n", s->name);
+		G_VINUM_DEBUG(1, "sd %s is initializing", s->name);
 		gv_set_sd_state(s, GV_SD_INITIALIZING, GV_SETSTATE_FORCE);
 		break;
 
@@ -558,9 +558,7 @@
 			 * clean up a lot.
  			 */
  			if (err) {
-				printf("GEOM_VINUM: plex request failed for ");
-				g_print_bio(bp);
-				printf("\n");
+				G_VINUM_LOGREQ(0, bp, "plex request failed.");
 				TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) {
 					TAILQ_REMOVE(&wp->bits, bq, queue);
 					g_free(bq);
@@ -620,9 +618,7 @@
 
 			/* Building the sub-request failed. */
 			if (err) {
-				printf("GEOM_VINUM: plex request failed for ");
-				g_print_bio(bp);
-				printf("\n");
+				G_VINUM_LOGREQ(0, bp, "plex request failed.");
 				cbp = bp->bio_driver1;
 				while (cbp != NULL) {
 					pbp = cbp->bio_caller1;
@@ -719,7 +715,7 @@
 	/* Now find the correct plex where this subdisk belongs to. */
 	p = gv_find_plex(sc, s->plex);
 	if (p == NULL) {
-		printf("gv_plex_taste: NULL p for '%s'\n", s->name);
+		G_VINUM_DEBUG(0, "%s: NULL p for '%s'", __func__, s->name);
 		return (NULL);
 	}
 
@@ -740,7 +736,7 @@
 		cp = g_new_consumer(gp);
 		error = g_attach(cp, pp);
 		if (error) {
-			printf("geom_vinum: couldn't attach consumer to %s\n",
+			G_VINUM_DEBUG(0, "unable to attach consumer to %s",
 			    pp->name);
 			g_destroy_consumer(cp);
 			return (NULL);
@@ -749,8 +745,8 @@
 		if ((cp2 != NULL) && (cp2->acr || cp2->acw || cp2->ace)) {
 			error = g_access(cp, cp2->acr, cp2->acw, cp2->ace);
 			if (error) {
-				printf("geom_vinum: couldn't set access counts"
-				    " for consumer on %s\n", pp->name);
+				G_VINUM_DEBUG(0, "unable to set access counts"
+				    " for consumer on %s", pp->name);
 				g_detach(cp);
 				g_destroy_consumer(cp);
 				return (NULL);

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_raid5.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_raid5.c,v 1.10 2004/11/26 11:59:51 le Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_raid5.c,v 1.11 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -208,7 +208,7 @@
 		if (!(bp->bio_cflags & GV_BIO_REBUILD))
 			return (ENXIO);
 
-		printf("GEOM_VINUM: sd %s is reviving\n", broken->name);
+		G_VINUM_DEBUG(1, "sd %s is reviving", broken->name);
 		gv_set_sd_state(broken, GV_SD_REVIVING, GV_SETSTATE_FORCE);
 		break;
 

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_rm.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_rm.c,v 1.14 2008/10/02 10:01:05 lulf Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_rm.c,v 1.15 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/libkern.h>
@@ -351,8 +351,8 @@
 	cp = LIST_FIRST(&gp->consumer);
 	err = g_access(cp, 0, 1, 0);
 	if (err) {
-		printf("GEOM_VINUM: gv_rm_drive: couldn't access '%s', errno: "
-		    "%d\n", cp->provider->name, err);
+		G_VINUM_DEBUG(0, "%s: unable to access '%s', errno: "
+		    "%d", __func__, cp->provider->name, err);
 		return (err);
 	}
 
@@ -361,8 +361,8 @@
 	g_topology_unlock();
 	err = gv_write_header(cp, d->hdr);
 	if (err) {
-		printf("GEOM_VINUM: gv_rm_drive: couldn't write header to '%s'"
-		    ", errno: %d\n", cp->provider->name, err);
+		G_VINUM_DEBUG(0, "%s: unable to write header to '%s'"
+		    ", errno: %d", __func__, cp->provider->name, err);
 		d->hdr->magic = GV_MAGIC;
 	}
 	g_topology_lock();

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_state.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_state.c,v 1.8 2006/03/30 14:01:25 le Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_state.c,v 1.9 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -280,8 +280,8 @@
 		s->state = GV_SD_UP;
 	
 	if (s->state != oldstate)
-		printf("GEOM_VINUM: subdisk %s state change: %s -> %s\n",
-		    s->name, gv_sdstate(oldstate), gv_sdstate(s->state));
+		G_VINUM_DEBUG(1, "subdisk %s state change: %s -> %s", s->name,
+		    gv_sdstate(oldstate), gv_sdstate(s->state));
 
 	/* Update the plex, if we have one. */
 	if (s->plex_sc != NULL)
@@ -324,7 +324,7 @@
 		p->state = GV_PLEX_DOWN;
 
 	if (p->state != oldstate)
-		printf("GEOM_VINUM: plex %s state change: %s -> %s\n", p->name,
+		G_VINUM_DEBUG(1, "plex %s state change: %s -> %s", p->name,
 		    gv_plexstate(oldstate), gv_plexstate(p->state));
 
 	/* Update our volume, if we have one. */

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_subr.c#3 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_subr.c,v 1.17 2008/07/11 16:46:29 lulf Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_subr.c,v 1.18 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -113,7 +113,7 @@
 			if (!strcmp(token[0], "volume")) {
 				v = gv_new_volume(tokens, token);
 				if (v == NULL) {
-					printf("geom_vinum: failed volume\n");
+					G_VINUM_DEBUG(0, "failed volume");
 					break;
 				}
 
@@ -132,7 +132,7 @@
 			} else if (!strcmp(token[0], "plex")) {
 				p = gv_new_plex(tokens, token);
 				if (p == NULL) {
-					printf("geom_vinum: failed plex\n");
+					G_VINUM_DEBUG(0, "failed plex");
 					break;
 				}
 
@@ -152,7 +152,7 @@
 				s = gv_new_sd(tokens, token);
 
 				if (s == NULL) {
-					printf("geom_vinum: failed subdisk\n");
+					G_VINUM_DEBUG(0, "failed subdisk");
 					break;
 				}
 
@@ -265,8 +265,8 @@
 	/* Check correct size of this subdisk. */
 	s2 = LIST_FIRST(&p->subdisks);
 	if (s2 != NULL && gv_is_striped(p) && (s2->size != s->size)) {
-		printf("GEOM_VINUM: need equal sized subdisks for "
-		    "this plex organisation - %s (%jd) <-> %s (%jd)\n",
+		G_VINUM_DEBUG(0, "need equal sized subdisks for "
+		    "this plex organisation - %s (%jd) <-> %s (%jd)",
 		    s2->name, s2->size, s->name, s->size);
 		return (-1);
 	}
@@ -439,8 +439,8 @@
 		s = LIST_FIRST(&p->subdisks);
 		LIST_FOREACH(s2, &p->subdisks, in_plex) {
 			if (s->size != s2->size) {
-				printf("geom_vinum: subdisk size mismatch "
-				    "%s (%jd) <> %s (%jd)\n", s->name, s->size,
+				G_VINUM_DEBUG(0, "subdisk size mismatch %s"
+				    "(%jd) <> %s (%jd)", s->name, s->size,
 				    s2->name, s2->size);
 				state = GV_PLEX_DOWN;
 			}
@@ -450,10 +450,9 @@
 		LIST_FOREACH(s, &p->subdisks, in_plex) {
 			remainder = s->size % p->stripesize;
 			if (remainder) {
-				printf("gvinum: size of sd %s is not a "
+				G_VINUM_DEBUG(1, "size of sd %s is not a "
 				    "multiple of plex stripesize, taking off "
-				    "%jd bytes\n", s->name,
-				    (intmax_t)remainder);
+				    "%jd bytes", s->name, (intmax_t)remainder);
 				gv_adjust_freespace(s, remainder);
 			}
 		}
@@ -544,7 +543,7 @@
 
 		/* No good slot found? */
 		if (s->size == -1) {
-			snprintf(errstr, errlen, "couldn't autosize '%s' on "
+			snprintf(errstr, errlen, "could not autosize '%s' on "
 			    "'%s'", s->name, d->name);
 			return (-1);
 		}

==== //depot/projects/mpsafetty/sys/geom/vinum/geom_vinum_volume.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_volume.c,v 1.12 2007/10/20 23:23:20 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_volume.c,v 1.13 2008/10/26 17:20:37 lulf Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -385,8 +385,8 @@
 	if ((ocp != NULL) && (ocp->acr > 0 || ocp->acw > 0 || ocp->ace > 0)) {
 		error = g_access(cp, ocp->acr, ocp->acw, ocp->ace);
 		if (error) {
-			printf("GEOM_VINUM: failed g_access %s -> %s; "
-			    "errno %d\n", v->name, p->name, error);
+			G_VINUM_DEBUG(0, "failed g_access %s -> %s; "
+			    "errno %d", v->name, p->name, error);
 			g_detach(cp);
 			g_destroy_consumer(cp);
 			if (first)

==== //depot/projects/mpsafetty/sys/i386/i386/local_apic.c#5 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.49 2008/09/10 07:11:08 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.50 2008/10/26 18:58:04 sobomax Exp $");
 
 #include "opt_hwpmc_hooks.h"
 #include "opt_kdtrace.h"
@@ -403,7 +403,11 @@
 		lapic_timer_hz = hz * 2;
 	else
 		lapic_timer_hz = hz * 4;
-	stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+	if (lapic_timer_hz < 128) {
+		stathz = 128;
+	} else {
+		stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+	}
 	profhz = lapic_timer_hz;
 	lapic_timer_period = value / lapic_timer_hz;
 

==== //depot/projects/mpsafetty/sys/kern/subr_param.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_param.c,v 1.76 2008/07/04 19:36:58 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_param.c,v 1.79 2008/10/27 08:09:05 sobomax Exp $");
 
 #include "opt_param.h"
 #include "opt_maxusers.h"
@@ -57,6 +57,13 @@
 #  else
 #    define	HZ 100
 #  endif
+#  ifndef HZ_VM
+#    define	HZ_VM 10
+#  endif
+#else
+#  ifndef HZ_VM
+#    define	HZ_VM HZ
+#  endif
 #endif
 #define	NPROC (20 + 16 * maxusers)
 #ifndef NBUF
@@ -111,6 +118,30 @@
  */
 struct	buf *swbuf;
 
+static const char *const vm_pnames[] = {
+	"VMware Virtual Platform",	/* VMWare VM */
+	"Virtual Machine",		/* Microsoft VirtualPC */
+	"VirtualBox",			/* Sun xVM VirtualBox */
+	"Parallels Virtual Platform",	/* Parallels VM */
+	NULL
+};
+
+static int
+detect_virtual(void)
+{

>>> TRUNCATED FOR MAIL (1000 lines) <<<



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