CVS commit: src/usr.sbin/pstat

2009-09-16 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Sep 16 07:27:41 UTC 2009

Modified Files:
src/usr.sbin/pstat: pstat.c

Log Message:
Distinguish between UFS1 and UFS2 inodes by reading the ufsmount structure,
the previous heuristic of comparing the size fields of inode and dinode
failed.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/usr.sbin/pstat/pstat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/pstat/pstat.c
diff -u src/usr.sbin/pstat/pstat.c:1.114 src/usr.sbin/pstat/pstat.c:1.115
--- src/usr.sbin/pstat/pstat.c:1.114	Sat Apr 18 08:05:18 2009
+++ src/usr.sbin/pstat/pstat.c	Wed Sep 16 07:27:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pstat.c,v 1.114 2009/04/18 08:05:18 lukem Exp $	*/
+/*	$NetBSD: pstat.c,v 1.115 2009/09/16 07:27:41 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)pstat.c	8.16 (Berkeley) 5/9/95;
 #else
-__RCSID($NetBSD: pstat.c,v 1.114 2009/04/18 08:05:18 lukem Exp $);
+__RCSID($NetBSD: pstat.c,v 1.115 2009/09/16 07:27:41 mlelstv Exp $);
 #endif
 #endif /* not lint */
 
@@ -52,11 +52,12 @@
 #include sys/ucred.h
 #include stdbool.h
 #define _KERNEL
-#include sys/file.h
-#include ufs/ufs/inode.h
 #define NFS
 #include sys/mount.h
 #undef NFS
+#include sys/file.h
+#include ufs/ufs/inode.h
+#include ufs/ufs/ufsmount.h
 #include sys/uio.h
 #include miscfs/genfs/layer.h
 #undef _KERNEL
@@ -476,6 +477,7 @@
 		struct ufs1_dinode dp1;
 		struct ufs2_dinode dp2;
 	} dip;
+	struct ufsmount ump;
 	char flags[sizeof(ufs_flags) / sizeof(ufs_flags[0])];
 	char dev[4 + 1 + 7 + 1]; /* 12bit marjor + 20bit minor */
 	char *name;
@@ -483,13 +485,15 @@
 	dev_t rdev;
 
 	KGETRET(VTOI(vp), inode, sizeof(struct inode), vnode's inode);
-	KGETRET(ip-i_din.ffs1_din, dip, sizeof (struct ufs1_dinode),
-	inode's dinode);
+	KGETRET(ip-i_ump, ump, sizeof(struct ufsmount),
+	vnode's mount point);
 
-	if (ip-i_size == dip.dp1.di_size)
+	if (ump.um_fstype == UFS1) {
+		KGETRET(ip-i_din.ffs1_din, dip, sizeof (struct ufs1_dinode),
+		inode's dinode);
 		rdev = dip.dp1.di_rdev;
-	else {
-		KGETRET(ip-i_din.ffs1_din, dip, sizeof (struct ufs2_dinode),
+	} else {
+		KGETRET(ip-i_din.ffs2_din, dip, sizeof (struct ufs2_dinode),
 		inode's UFS2 dinode);
 		rdev = dip.dp2.di_rdev;
 	}



CVS commit: src/distrib/alpha/instkernel/ramdisk

2009-09-16 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Wed Sep 16 10:40:02 UTC 2009

Modified Files:
src/distrib/alpha/instkernel/ramdisk: install.sh

Log Message:
The ramdisk includes dmesg, so use it in preference to /kern/msgbuf


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/alpha/instkernel/ramdisk/install.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/alpha/instkernel/ramdisk/install.sh
diff -u src/distrib/alpha/instkernel/ramdisk/install.sh:1.4 src/distrib/alpha/instkernel/ramdisk/install.sh:1.5
--- src/distrib/alpha/instkernel/ramdisk/install.sh:1.4	Fri Apr 23 02:48:12 2004
+++ src/distrib/alpha/instkernel/ramdisk/install.sh	Wed Sep 16 10:40:02 2009
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: install.sh,v 1.4 2004/04/23 02:48:12 simonb Exp $
+# $NetBSD: install.sh,v 1.5 2009/09/16 10:40:02 abs Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -176,7 +176,7 @@
 getresp n
 case $resp in
 	y*|Y*)
-		more /kern/msgbuf
+		dmesg | more
 		;;
 	*)
 		echo	



CVS commit: src/sys

2009-09-16 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Sep 16 10:47:55 UTC 2009

Modified Files:
src/sys/arch/i386/acpi: vald_acpi.c
src/sys/arch/x86/x86: mpacpi.c
src/sys/dev/acpi: acpi.c acpi_bat.c acpi_ec.c acpi_pci_link.c
acpi_powerres.c acpi_resource.c acpi_tz.c acpireg.h aiboost.c
asus_acpi.c dalb_acpi.c fdc_acpi.c sony_acpi.c

Log Message:
Allow for 'options ACPI_DEBUG' by providing module declarations
and using memory allocation macros instead of calling AcpiOs* stubs
directly.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/i386/acpi/vald_acpi.c
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/x86/x86/mpacpi.c
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/acpi/acpi_bat.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/acpi/acpi_ec.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/acpi/acpi_pci_link.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/acpi_powerres.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/acpi/acpi_resource.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/acpi/acpi_tz.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpireg.h
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/acpi/aiboost.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/acpi/asus_acpi.c \
src/sys/dev/acpi/sony_acpi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/dalb_acpi.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/acpi/fdc_acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/acpi/vald_acpi.c
diff -u src/sys/arch/i386/acpi/vald_acpi.c:1.29 src/sys/arch/i386/acpi/vald_acpi.c:1.30
--- src/sys/arch/i386/acpi/vald_acpi.c:1.29	Sun May  4 16:16:56 2008
+++ src/sys/arch/i386/acpi/vald_acpi.c	Wed Sep 16 10:47:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vald_acpi.c,v 1.29 2008/05/04 16:16:56 xtraeme Exp $	*/
+/*	$NetBSD: vald_acpi.c,v 1.30 2009/09/16 10:47:54 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vald_acpi.c,v 1.29 2008/05/04 16:16:56 xtraeme Exp $);
+__KERNEL_RCSID(0, $NetBSD: vald_acpi.c,v 1.30 2009/09/16 10:47:54 mlelstv Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -86,6 +86,9 @@
 #include dev/acpi/acpireg.h
 #include dev/acpi/acpivar.h
 
+#define _COMPONENT  ACPI_RESOURCE_COMPONENT
+ACPI_MODULE_NAME(vald_acpi)
+
 #define GHCI_WORDS 6
 #define GHCI_FIFO_EMPTY  0x8c00
 #define GHCI_NOT_SUPPORT  0x8000
@@ -350,7 +353,7 @@
 	ArgList.Pointer = Arg;
 
 	buf.Pointer = NULL;
-	buf.Length = ACPI_ALLOCATE_BUFFER;
+	buf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
 
 	rv = AcpiEvaluateObject(sc-sc_node-ad_handle,
 	GHCI, ArgList, buf);
@@ -374,7 +377,7 @@
 	}
 
 	if (buf.Pointer)
-		AcpiOsFree(buf.Pointer);
+		ACPI_FREE(buf.Pointer);
 	return (rv);
 }
 
@@ -408,7 +411,7 @@
 	ArgList.Pointer = Arg;
 
 	buf.Pointer = NULL;
-	buf.Length = ACPI_ALLOCATE_BUFFER;
+	buf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
 
 	rv = AcpiEvaluateObject(sc-sc_node-ad_handle,
 	GHCI, ArgList, buf);
@@ -427,7 +430,7 @@
 	}
 
 	if (buf.Pointer)
-		AcpiOsFree(buf.Pointer);
+		ACPI_FREE(buf.Pointer);
 	return (rv);
 }
 
@@ -457,10 +460,10 @@
 		printf(_BCL retrun: %d packages\n, param-Package.Count);
 
 		sc-lcd_num = param-Package.Count;
-		sc-lcd_level = AcpiOsAllocate(sizeof(int) * sc-lcd_num);
+		sc-lcd_level = ACPI_ALLOCATE(sizeof(int) * sc-lcd_num);
 		if (sc-lcd_level == NULL) {
 			if (buf.Pointer)
-AcpiOsFree(buf.Pointer);
+ACPI_FREE(buf.Pointer);
 			return (AE_NO_MEMORY);
 		}
 
@@ -490,7 +493,7 @@
 	}
 
 	if (buf.Pointer)
-		AcpiOsFree(buf.Pointer);
+		ACPI_FREE(buf.Pointer);
 	return (AE_OK);
 }
 

Index: src/sys/arch/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.77 src/sys/arch/x86/x86/mpacpi.c:1.78
--- src/sys/arch/x86/x86/mpacpi.c:1.77	Tue Aug 18 16:41:03 2009
+++ src/sys/arch/x86/x86/mpacpi.c	Wed Sep 16 10:47:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpacpi.c,v 1.77 2009/08/18 16:41:03 jmcneill Exp $	*/
+/*	$NetBSD: mpacpi.c,v 1.78 2009/09/16 10:47:54 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.77 2009/08/18 16:41:03 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.78 2009/09/16 10:47:54 mlelstv Exp $);
 
 #include acpica.h
 #include opt_acpi.h
@@ -75,6 +75,9 @@
 
 #include dev/cons.h
 
+#define _COMPONENT ACPI_RESOURCE_COMPONENT
+ACPI_MODULE_NAME   (mpacpi)
+
 #include pci.h
 #include ioapic.h
 #include lapic.h
@@ -554,14 +557,14 @@
 		/* add this device to the list only if it's active */
 		if ((devinfo-Valid  ACPI_VALID_STA) == 0 ||
 		(devinfo-CurrentStatus  ACPI_STA_OK) == ACPI_STA_OK) {
-			AcpiOsFree(devinfo);
+			ACPI_FREE(devinfo);
 			dev = kmem_zalloc(sizeof(struct ac_dev), KM_SLEEP);
 			if (dev == NULL)
 return -1;
 			dev-handle = current;
 			TAILQ_INSERT_HEAD(dev_list, dev, list);
 

CVS commit: src/sys/dev/sbus

2009-09-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Sep 16 11:17:19 UTC 2009

Modified Files:
src/sys/dev/sbus: if_le.c

Log Message:
Rewrite code which looks for an unallocated lebuffer and pairs it
with possible orphaned this le at sbus one on old PROMs not using
homegrown struct sbusdev but common cfdriver_t and device_t structures.
Now nothing refers struct sbusdev registered by sbus_establish().

Tested an SBus le/esp combo card on SS1+.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/sbus/if_le.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sbus/if_le.c
diff -u src/sys/dev/sbus/if_le.c:1.37 src/sys/dev/sbus/if_le.c:1.38
--- src/sys/dev/sbus/if_le.c:1.37	Tue Sep  8 18:15:17 2009
+++ src/sys/dev/sbus/if_le.c	Wed Sep 16 11:17:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le.c,v 1.37 2009/09/08 18:15:17 tsutsui Exp $	*/
+/*	$NetBSD: if_le.c,v 1.38 2009/09/16 11:17:19 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_le.c,v 1.37 2009/09/08 18:15:17 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_le.c,v 1.38 2009/09/16 11:17:19 tsutsui Exp $);
 
 #include opt_inet.h
 #include bpfilter.h
@@ -147,10 +147,9 @@
 {
 	struct le_softc *lesc = device_private(self);
 	struct lance_softc *sc = lesc-sc_am7990.lsc;
-	struct sbus_softc *sbsc = device_private(parent);
 	struct sbus_attach_args *sa = aux;
 	bus_dma_tag_t dmatag;
-	struct sbusdev *sd;
+	cfdriver_t lebufcd;
 
 	sc-sc_dev = self;
 	lesc-sc_bustag = sa-sa_bustag;
@@ -171,26 +170,51 @@
 	 * a pre-historic ROM that doesn't establish le=lebuffer
 	 * parent-child relationships.
 	 */
-	for (sd = sbsc-sc_sbdev; sd != NULL; sd = sd-sd_bchain) {
-
-		struct lebuf_softc *lebuf = device_private(sd-sd_dev);
-
-		if (strncmp(lebuffer, device_xname(sd-sd_dev), 8) != 0)
-			continue;
-
-		if (lebuf-attached != 0)
-			continue;
-
-		sc-sc_mem = lebuf-sc_buffer;
-		sc-sc_memsize = lebuf-sc_bufsiz;
-		sc-sc_addr = 0; /* Lance view is offset by buffer location */
-		lebuf-attached = 1;
-
-		/* That old black magic... */
-		sc-sc_conf3 = prom_getpropint(sa-sa_node,
-	  busmaster-regval,
-	  LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON);
-		break;
+	lebufcd = config_cfdriver_lookup(lebuffer);
+	if (lebufcd != NULL) {
+		int unit;
+
+		/* Check all possible lebuffer units */
+		for (unit = 0; unit  lebufcd-cd_ndevs; unit++) {
+			device_t lebufdev;
+			struct lebuf_softc *lebufsc;
+
+			/* Check if unit is valid */
+			lebufdev = device_lookup(lebufcd, unit);
+			if (lebufdev == NULL)
+continue;
+
+			/* Check if we have a common sbus parent */
+			if (parent != device_parent(lebufdev))
+continue;
+			lebufsc = device_private(lebufdev);
+
+			/*
+			 * Check if this lebuffer unit is attached
+			 * but unused by its child, if_le_lebuffer.
+			 * XXX: this won't work if lebuffer is configured
+			 *  but not le at lebuffer?
+			 */
+			if (lebufsc-sc_buffer == 0 || lebufsc-attached != 0)
+continue;
+
+			/* Assume this lebuffer is my pair */
+			sc-sc_mem = lebufsc-sc_buffer;
+			sc-sc_memsize = lebufsc-sc_bufsiz;
+
+			/* Lance view is offset by buffer location */
+			sc-sc_addr = 0;
+
+			/* Denote it */
+			aprint_normal( (%s), device_xname(lebufdev));
+			lebufsc-attached = 1;
+
+			/* That old black magic... */
+			sc-sc_conf3 = prom_getpropint(sa-sa_node,
+			busmaster-regval,
+			LE_C3_BSWP | LE_C3_ACON | LE_C3_BCON);
+			break;
+		}
 	}
 
 	lesc-sc_sd.sd_reset = le_sbus_reset;



CVS commit: src/sys/dev/sbus

2009-09-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Sep 16 13:05:07 UTC 2009

Modified Files:
src/sys/dev/sbus: cgthree_sbus.c

Log Message:
Make cgthree(4) match prior to genfb(4). Required by cgthree(4) on SS1+.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sbus/cgthree_sbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sbus/cgthree_sbus.c
diff -u src/sys/dev/sbus/cgthree_sbus.c:1.25 src/sys/dev/sbus/cgthree_sbus.c:1.26
--- src/sys/dev/sbus/cgthree_sbus.c:1.25	Tue May 12 14:43:59 2009
+++ src/sys/dev/sbus/cgthree_sbus.c	Wed Sep 16 13:05:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgthree_sbus.c,v 1.25 2009/05/12 14:43:59 cegger Exp $ */
+/*	$NetBSD: cgthree_sbus.c,v 1.26 2009/09/16 13:05:07 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgthree_sbus.c,v 1.25 2009/05/12 14:43:59 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgthree_sbus.c,v 1.26 2009/09/16 13:05:07 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -125,7 +125,10 @@
 {
 	struct sbus_attach_args *sa = aux;
 
-	return (strcmp(cf-cf_name, sa-sa_name) == 0);
+	if (strcmp(cf-cf_name, sa-sa_name) == 0)
+		return 100;	/* beat genfb(4) */
+
+	return 0;
 }
 
 /*



CVS commit: src/sys/rump/net/lib/libvirtif

2009-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Sep 16 13:29:42 UTC 2009

Modified Files:
src/sys/rump/net/lib/libvirtif: if_virt.c

Log Message:
work around tap bug: if /dev/tapn was previously non-blocking, newly
opened fd's will also be non-blocking.
(yeayea, i'll fix the kernel some day, but I don't want to reboot
my host OS now)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/net/lib/libvirtif/if_virt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/net/lib/libvirtif/if_virt.c
diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.10 src/sys/rump/net/lib/libvirtif/if_virt.c:1.11
--- src/sys/rump/net/lib/libvirtif/if_virt.c:1.10	Wed May 27 23:41:20 2009
+++ src/sys/rump/net/lib/libvirtif/if_virt.c	Wed Sep 16 13:29:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_virt.c,v 1.10 2009/05/27 23:41:20 pooka Exp $	*/
+/*	$NetBSD: if_virt.c,v 1.11 2009/09/16 13:29:42 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_virt.c,v 1.10 2009/05/27 23:41:20 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_virt.c,v 1.11 2009/09/16 13:29:42 pooka Exp $);
 
 #include sys/param.h
 #include sys/condvar.h
@@ -34,6 +34,7 @@
 #include sys/kmem.h
 #include sys/kthread.h
 #include sys/mutex.h
+#include sys/poll.h
 #include sys/sockio.h
 #include sys/socketvar.h
 
@@ -207,9 +208,24 @@
 		m = m_gethdr(M_WAIT, MT_DATA);
 		MEXTMALLOC(m, plen, M_WAIT);
 
+ again:
 		n = rumpuser_read(sc-sc_tapfd, mtod(m, void *), plen, error);
 		KASSERT(n  ETHER_MAX_LEN_JUMBO);
 		if (n = 0) {
+			/*
+			 * work around tap bug: /dev/tap is opened in
+			 * non-blocking mode if it previously was
+			 * non-blocking.
+			 */
+			if (n == -1  error == EAGAIN) {
+struct pollfd pfd;
+
+pfd.fd = sc-sc_tapfd;
+pfd.events = POLLIN;
+
+rumpuser_poll(pfd, 1, INFTIM, error);
+goto again;
+			}
 			m_freem(m);
 			break;
 		}



CVS commit: src/sys/rump/librump/rumpnet

2009-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Sep 16 13:30:41 UTC 2009

Modified Files:
src/sys/rump/librump/rumpnet: rump_net.c

Log Message:
create interfaces only after ifnef is initialized


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpnet/rump_net.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpnet/rump_net.c
diff -u src/sys/rump/librump/rumpnet/rump_net.c:1.8 src/sys/rump/librump/rumpnet/rump_net.c:1.9
--- src/sys/rump/librump/rumpnet/rump_net.c:1.8	Thu May 28 00:02:16 2009
+++ src/sys/rump/librump/rumpnet/rump_net.c	Wed Sep 16 13:30:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_net.c,v 1.8 2009/05/28 00:02:16 pooka Exp $	*/
+/*	$NetBSD: rump_net.c,v 1.9 2009/09/16 13:30:41 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump_net.c,v 1.8 2009/05/28 00:02:16 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump_net.c,v 1.9 2009/09/16 13:30:41 pooka Exp $);
 
 #include sys/param.h
 
@@ -61,10 +61,11 @@
 	rump_net_inet_init();
 	rump_net_local_init();
 	rump_net_sockin_init();
-	rump_net_virtif_init();
-	/* Note: should be last due to calling of rn_init() */
+	/* Note: should be last _domain_ due to calling of rn_init() */
 	rump_net_net_init();
 
+	rump_net_virtif_init();
+
 	soinit();
 	soinit2();
 



CVS commit: [yamt-nfs-mp] src/sys

2009-09-16 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Sep 16 13:38:08 UTC 2009

Modified Files:
src/sys/arch/algor/algor [yamt-nfs-mp]: bus_dma.c
src/sys/arch/algor/conf [yamt-nfs-mp]: files.algor
src/sys/arch/alpha/alpha [yamt-nfs-mp]: cpu.c debug.s dec_1000a.c
dec_2100_a500.c dec_6600.c dec_kn300.c pmap.c
src/sys/arch/alpha/common [yamt-nfs-mp]: bus_dma.c
src/sys/arch/alpha/conf [yamt-nfs-mp]: GENERIC files.alpha
src/sys/arch/alpha/include [yamt-nfs-mp]: types.h
src/sys/arch/amd64/acpi [yamt-nfs-mp]: acpi_wakecode.S
src/sys/arch/amd64/conf [yamt-nfs-mp]: GENERIC XEN3_DOM0
src/sys/arch/amiga/amiga [yamt-nfs-mp]: disksubr.c pmap.c
src/sys/arch/amiga/conf [yamt-nfs-mp]: files.amiga
src/sys/arch/amiga/dev [yamt-nfs-mp]: clock.c
src/sys/arch/amiga/include [yamt-nfs-mp]: disklabel.h vmparam.h
src/sys/arch/amigappc/include [yamt-nfs-mp]: disklabel.h
src/sys/arch/arm/footbridge/isa [yamt-nfs-mp]: isa_machdep.c
src/sys/arch/arm/include/arm32 [yamt-nfs-mp]: pmap.h
src/sys/arch/arm/xscale [yamt-nfs-mp]: pxa2x0_intr.c
src/sys/arch/atari/atari [yamt-nfs-mp]: atari_init.c machdep.c pmap.c
src/sys/arch/atari/dev [yamt-nfs-mp]: clock.c
src/sys/arch/atari/include [yamt-nfs-mp]: iomap.h vmparam.h
src/sys/arch/atari/isa [yamt-nfs-mp]: isa_machdep.c
src/sys/arch/atari/stand/binpatch [yamt-nfs-mp]: Makefile binpatch.c
src/sys/arch/atari/stand/bootxx [yamt-nfs-mp]: bootxx.c filesystem.c
src/sys/arch/atari/stand/bootxxx [yamt-nfs-mp]: bootxxx.c filesystem.c
src/sys/arch/cats/conf [yamt-nfs-mp]: Makefile.cats.inc
src/sys/arch/cesfic/cesfic [yamt-nfs-mp]: machdep.c
src/sys/arch/cesfic/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/cobalt/cobalt [yamt-nfs-mp]: bus.c
src/sys/arch/cobalt/conf [yamt-nfs-mp]: files.cobalt
src/sys/arch/cobalt/dev [yamt-nfs-mp]: panel.c
src/sys/arch/cobalt/include [yamt-nfs-mp]: bus.h
src/sys/arch/dreamcast/conf [yamt-nfs-mp]: GENERIC
src/sys/arch/dreamcast/dev/g2 [yamt-nfs-mp]: g2bus_bus_mem.c
src/sys/arch/dreamcast/include [yamt-nfs-mp]: bus.h
src/sys/arch/evbmips/conf [yamt-nfs-mp]: MALTA
src/sys/arch/evbppc/conf [yamt-nfs-mp]: PMPPC
src/sys/arch/ews4800mips/conf [yamt-nfs-mp]: files.ews4800mips
src/sys/arch/ews4800mips/ews4800mips [yamt-nfs-mp]: bus_dma.c
src/sys/arch/hp300/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/hpcmips/conf [yamt-nfs-mp]: files.hpcmips
src/sys/arch/hpcmips/hpcmips [yamt-nfs-mp]: bus_dma.c
src/sys/arch/hpcmips/vr [yamt-nfs-mp]: vrecu.c
src/sys/arch/i386 [yamt-nfs-mp]: Makefile
src/sys/arch/i386/acpi [yamt-nfs-mp]: acpi_wakecode.S
src/sys/arch/i386/conf [yamt-nfs-mp]: ALL GENERIC XEN3_DOM0
src/sys/arch/i386/i386 [yamt-nfs-mp]: db_trace.c ipkdb_glue.c
powernow_k7.c
src/sys/arch/i386/stand/boot [yamt-nfs-mp]: boot2.c version
src/sys/arch/i386/stand/lib [yamt-nfs-mp]: biosdisk.c bootmenu.c exec.c
gatea20.c libi386.h pcio.c vbe.c vbe.h
src/sys/arch/i386/stand/pxeboot [yamt-nfs-mp]: main.c
src/sys/arch/ia64/ia64 [yamt-nfs-mp]: machdep.c
src/sys/arch/luna68k/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/m68k/include [yamt-nfs-mp]: pmap_motorola.h
src/sys/arch/m68k/m68k [yamt-nfs-mp]: pmap_motorola.c
src/sys/arch/mac68k/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/mips/include [yamt-nfs-mp]: proc.h
src/sys/arch/mips/mips [yamt-nfs-mp]: genassym.cf vm_machdep.c
src/sys/arch/mipsco/conf [yamt-nfs-mp]: files.mipsco
src/sys/arch/mipsco/mipsco [yamt-nfs-mp]: bus_dma.c
src/sys/arch/mvme68k/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/mvme68k/stand/bootxx [yamt-nfs-mp]: bootxx.c
src/sys/arch/news68k/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/newsmips/conf [yamt-nfs-mp]: files.newsmips
src/sys/arch/newsmips/newsmips [yamt-nfs-mp]: bus.c
src/sys/arch/next68k/dev [yamt-nfs-mp]: esp.c
src/sys/arch/next68k/include [yamt-nfs-mp]: vmparam.h
src/sys/arch/ofppc/stand/ofwboot [yamt-nfs-mp]: Makefile ofdev.c
ofdev.h version
src/sys/arch/playstation2/conf [yamt-nfs-mp]: files.playstation2
src/sys/arch/playstation2/playstation2 [yamt-nfs-mp]: bus_dma.c
src/sys/arch/pmax/conf [yamt-nfs-mp]: files.pmax
src/sys/arch/pmax/include [yamt-nfs-mp]: loadfile_machdep.h
src/sys/arch/pmax/pmax [yamt-nfs-mp]: bus_dma.c
src/sys/arch/powerpc/include [yamt-nfs-mp]: isa_machdep.h
src/sys/arch/sgimips/conf [yamt-nfs-mp]: files.sgimips
src/sys/arch/sgimips/include [yamt-nfs-mp]: loadfile_machdep.h
src/sys/arch/sgimips/mace [yamt-nfs-mp]: if_mec.c

CVS commit: src/sbin/ifconfig

2009-09-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Sep 16 14:59:45 UTC 2009

Modified Files:
src/sbin/ifconfig: Makefile Makefile.inc

Log Message:
Add comments that Makefile.inc should have shared stuff with
src/distrib/utils/x_ifconfig for install media.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sbin/ifconfig/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sbin/ifconfig/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/ifconfig/Makefile
diff -u src/sbin/ifconfig/Makefile:1.44 src/sbin/ifconfig/Makefile:1.45
--- src/sbin/ifconfig/Makefile:1.44	Tue Sep 15 09:22:07 2009
+++ src/sbin/ifconfig/Makefile	Wed Sep 16 14:59:45 2009
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.44 2009/09/15 09:22:07 he Exp $
+#	$NetBSD: Makefile,v 1.45 2009/09/16 14:59:45 tsutsui Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 # when making a change to this file, please check if the change is
-# also needed for src/distrib/utils/x_ifconfig/Makefile.
+# also needed for src/distrib/utils/x_ifconfig.
+# such stuff should be into Makefile.inc.
 
 .include bsd.own.mk
 

Index: src/sbin/ifconfig/Makefile.inc
diff -u src/sbin/ifconfig/Makefile.inc:1.6 src/sbin/ifconfig/Makefile.inc:1.7
--- src/sbin/ifconfig/Makefile.inc:1.6	Tue Sep 15 09:22:07 2009
+++ src/sbin/ifconfig/Makefile.inc	Wed Sep 16 14:59:45 2009
@@ -1,4 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.6 2009/09/15 09:22:07 he Exp $
+#	$NetBSD: Makefile.inc,v 1.7 2009/09/16 14:59:45 tsutsui Exp $
+
+# shared stuff with src/distrib/utils/x_ifconfig for install media.
+# stuff not required by install media should be into Makefile.
 
 PROG=	ifconfig
 



CVS commit: src/sys

2009-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Sep 16 15:03:56 UTC 2009

Modified Files:
src/sys/conf: files
src/sys/kern: init_sysctl.c
Added Files:
src/sys/kern: init_sysctl_base.c

Log Message:
Chop init_sysctl into base nodes (init_sysctl_base.c) and the
kitchen sink (init_sysctl.c).  Further surgery may be needed down
the line.


To generate a diff of this commit:
cvs rdiff -u -r1.954 -r1.955 src/sys/conf/files
cvs rdiff -u -r1.166 -r1.167 src/sys/kern/init_sysctl.c
cvs rdiff -u -r0 -r1.1 src/sys/kern/init_sysctl_base.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.954 src/sys/conf/files:1.955
--- src/sys/conf/files:1.954	Sun Sep  6 16:18:56 2009
+++ src/sys/conf/files	Wed Sep 16 15:03:56 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.954 2009/09/06 16:18:56 pooka Exp $
+#	$NetBSD: files,v 1.955 2009/09/16 15:03:56 pooka Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20090313
@@ -1405,6 +1405,7 @@
 file	kern/exec_subr.c
 file	kern/init_main.c
 file	kern/init_sysctl.c
+file	kern/init_sysctl_base.c
 file	kern/init_sysent.c
 file	kern/kern_acct.c
 file	kern/kern_auth.c

Index: src/sys/kern/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.166 src/sys/kern/init_sysctl.c:1.167
--- src/sys/kern/init_sysctl.c:1.166	Fri Sep 11 18:14:58 2009
+++ src/sys/kern/init_sysctl.c	Wed Sep 16 15:03:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $ */
+/*	$NetBSD: init_sysctl.c,v 1.167 2009/09/16 15:03:56 pooka Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysctl.c,v 1.167 2009/09/16 15:03:56 pooka Exp $);
 
 #include opt_sysv.h
 #include opt_compat_netbsd32.h
@@ -215,96 +215,6 @@
  */
 
 /*
- * sets up the base nodes...
- */
-SYSCTL_SETUP(sysctl_root_setup, sysctl base setup)
-{
-
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, kern,
-		   SYSCTL_DESCR(High kernel),
-		   NULL, 0, NULL, 0,
-		   CTL_KERN, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, vm,
-		   SYSCTL_DESCR(Virtual memory),
-		   NULL, 0, NULL, 0,
-		   CTL_VM, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, vfs,
-		   SYSCTL_DESCR(Filesystem),
-		   NULL, 0, NULL, 0,
-		   CTL_VFS, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, net,
-		   SYSCTL_DESCR(Networking),
-		   NULL, 0, NULL, 0,
-		   CTL_NET, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, debug,
-		   SYSCTL_DESCR(Debugging),
-		   NULL, 0, NULL, 0,
-		   CTL_DEBUG, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, hw,
-		   SYSCTL_DESCR(Generic CPU, I/O),
-		   NULL, 0, NULL, 0,
-		   CTL_HW, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, machdep,
-		   SYSCTL_DESCR(Machine dependent),
-		   NULL, 0, NULL, 0,
-		   CTL_MACHDEP, CTL_EOL);
-	/*
-	 * this node is inserted so that the sysctl nodes in libc can
-	 * operate.
-	 */
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, user,
-		   SYSCTL_DESCR(User-level),
-		   NULL, 0, NULL, 0,
-		   CTL_USER, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, ddb,
-		   SYSCTL_DESCR(In-kernel debugger),
-		   NULL, 0, NULL, 0,
-		   CTL_DDB, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, proc,
-		   SYSCTL_DESCR(Per-process),
-		   NULL, 0, NULL, 0,
-		   CTL_PROC, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-		   CTLTYPE_NODE, vendor,
-		   SYSCTL_DESCR(Vendor specific),
-		   NULL, 0, NULL, 0,
-		   CTL_VENDOR, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, emul,
-		   SYSCTL_DESCR(Emulation settings),
-		   NULL, 0, NULL, 0,
-		   CTL_EMUL, CTL_EOL);
-	sysctl_createv(clog, 0, NULL, NULL,
-		   CTLFLAG_PERMANENT,
-		   CTLTYPE_NODE, security,
-		   SYSCTL_DESCR(Security),
-		   NULL, 0, NULL, 0,
-		   CTL_SECURITY, CTL_EOL);
-}
-
-/*
  * this setup routine is a replacement for kern_sysctl()
  */
 SYSCTL_SETUP(sysctl_kern_setup, sysctl kern subtree setup)

Added files:

Index: src/sys/kern/init_sysctl_base.c
diff -u /dev/null src/sys/kern/init_sysctl_base.c:1.1

CVS commit: src/sbin/ifconfig

2009-09-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Sep 16 15:08:29 UTC 2009

Modified Files:
src/sbin/ifconfig: Makefile

Log Message:
- no space needed between -I and dir per gcc(1)
- it's still better to use ${NETBSDSRCDIR} per other existing Makefiles


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sbin/ifconfig/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/ifconfig/Makefile
diff -u src/sbin/ifconfig/Makefile:1.45 src/sbin/ifconfig/Makefile:1.46
--- src/sbin/ifconfig/Makefile:1.45	Wed Sep 16 14:59:45 2009
+++ src/sbin/ifconfig/Makefile	Wed Sep 16 15:08:29 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.45 2009/09/16 14:59:45 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.46 2009/09/16 15:08:29 tsutsui Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 # when making a change to this file, please check if the change is
@@ -18,7 +18,7 @@
 
 .include Makefile.inc
 
-CPPFLAGS+=-I ${.CURDIR}/../../sys/dist/pf/
+CPPFLAGS+=-I${NETBSDSRCDIR}/sys/dist/pf/
 SRCS+= pfsync.c
 
 .if ${MACHINE_ARCH} == m68000



CVS commit: src/sys/rump/net/lib/libnet

2009-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Sep 16 15:08:53 UTC 2009

Modified Files:
src/sys/rump/net/lib/libnet: component.c

Log Message:
call ifinit{,1}()


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/net/lib/libnet/component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/net/lib/libnet/component.c
diff -u src/sys/rump/net/lib/libnet/component.c:1.1 src/sys/rump/net/lib/libnet/component.c:1.2
--- src/sys/rump/net/lib/libnet/component.c:1.1	Thu May 28 00:02:16 2009
+++ src/sys/rump/net/lib/libnet/component.c	Wed Sep 16 15:08:53 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.1 2009/05/28 00:02:16 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.2 2009/09/16 15:08:53 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: component.c,v 1.1 2009/05/28 00:02:16 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: component.c,v 1.2 2009/09/16 15:08:53 pooka Exp $);
 
 #include sys/param.h
 #include sys/domain.h
@@ -44,6 +44,8 @@
 {
 	extern struct domain routedomain;
 
+	ifinit1();
+	ifinit();
 	loopattach(0);
 	DOMAINADD(routedomain);
 }



CVS commit: src/sys/rump/librump/rumpkern

2009-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Sep 16 15:10:23 UTC 2009

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
include init_sysctl_base.c


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/rump/librump/rumpkern/Makefile.rumpkern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.47 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.48
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.47	Sun Sep  6 20:54:19 2009
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Wed Sep 16 15:10:23 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.47 2009/09/06 20:54:19 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.48 2009/09/16 15:10:23 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -29,9 +29,9 @@
 # Rest are from the std kernel sources.
 #
 # sys/kern
-SRCS+=	kern_auth.c kern_descrip.c kern_event.c kern_ksyms.c		\
-	kern_malloc_stdtype.c kern_module.c kern_rate.c kern_stub.c	\
-	kern_sysctl.c kern_timeout.c kern_uidinfo.c param.c		\
+SRCS+=	init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c	\
+	kern_ksyms.c kern_malloc_stdtype.c kern_module.c kern_rate.c	\
+	kern_stub.c kern_sysctl.c kern_timeout.c kern_uidinfo.c param.c	\
 	sys_descrip.c sys_generic.c syscalls.c
 
 # sys/kern subr (misc)



CVS commit: src/sys

2009-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Sep 16 15:23:05 UTC 2009

Modified Files:
src/sys/kern: init_main.c kern_sysctl.c subr_autoconf.c subr_bufq.c
subr_iostat.c uipc_accf.c
src/sys/miscfs/syncfs: sync_subr.c
src/sys/net: if.c route.c rtsock.c
src/sys/netinet: if_arp.c igmp.c in_proto.c ip_carp.c ip_carp.h
ip_icmp.c ip_input.c raw_ip.c tcp_subr.c tcp_usrreq.c tcp_var.h
udp_usrreq.c
src/sys/netinet6: icmp6.c ip6_input.c ip6_mroute.c raw_ip6.c
udp6_usrreq.c
src/sys/rump/librump/rumpkern: rump.c
src/sys/sys: sysctl.h

Log Message:
Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC  build tested i386/ALL


To generate a diff of this commit:
cvs rdiff -u -r1.399 -r1.400 src/sys/kern/init_main.c
cvs rdiff -u -r1.225 -r1.226 src/sys/kern/kern_sysctl.c
cvs rdiff -u -r1.181 -r1.182 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/subr_bufq.c
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/subr_iostat.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/uipc_accf.c
cvs rdiff -u -r1.40 -r1.41 src/sys/miscfs/syncfs/sync_subr.c
cvs rdiff -u -r1.236 -r1.237 src/sys/net/if.c
cvs rdiff -u -r1.117 -r1.118 src/sys/net/route.c
cvs rdiff -u -r1.126 -r1.127 src/sys/net/rtsock.c
cvs rdiff -u -r1.146 -r1.147 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.50 -r1.51 src/sys/netinet/igmp.c
cvs rdiff -u -r1.98 -r1.99 src/sys/netinet/in_proto.c
cvs rdiff -u -r1.38 -r1.39 src/sys/netinet/ip_carp.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/ip_carp.h
cvs rdiff -u -r1.120 -r1.121 src/sys/netinet/ip_icmp.c
cvs rdiff -u -r1.283 -r1.284 src/sys/netinet/ip_input.c
cvs rdiff -u -r1.109 -r1.110 src/sys/netinet/raw_ip.c
cvs rdiff -u -r1.237 -r1.238 src/sys/netinet/tcp_subr.c
cvs rdiff -u -r1.156 -r1.157 src/sys/netinet/tcp_usrreq.c
cvs rdiff -u -r1.161 -r1.162 src/sys/netinet/tcp_var.h
cvs rdiff -u -r1.178 -r1.179 src/sys/netinet/udp_usrreq.c
cvs rdiff -u -r1.152 -r1.153 src/sys/netinet6/icmp6.c
cvs rdiff -u -r1.127 -r1.128 src/sys/netinet6/ip6_input.c
cvs rdiff -u -r1.97 -r1.98 src/sys/netinet6/ip6_mroute.c
cvs rdiff -u -r1.104 -r1.105 src/sys/netinet6/raw_ip6.c
cvs rdiff -u -r1.87 -r1.88 src/sys/netinet6/udp6_usrreq.c
cvs rdiff -u -r1.114 -r1.115 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.186 -r1.187 src/sys/sys/sysctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.399 src/sys/kern/init_main.c:1.400
--- src/sys/kern/init_main.c:1.399	Sun Sep 13 18:45:10 2009
+++ src/sys/kern/init_main.c	Wed Sep 16 15:23:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.399 2009/09/13 18:45:10 pooka Exp $	*/
+/*	$NetBSD: init_main.c,v 1.400 2009/09/16 15:23:04 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.399 2009/09/13 18:45:10 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.400 2009/09/16 15:23:04 pooka Exp $);
 
 #include opt_ddb.h
 #include opt_ipsec.h
@@ -589,6 +589,8 @@
 	 */
 	config_finalize();
 
+	sysctl_finalize();
+
 	/*
 	 * Now that autoconfiguration has completed, we can determine
 	 * the root and dump devices.

Index: src/sys/kern/kern_sysctl.c
diff -u src/sys/kern/kern_sysctl.c:1.225 src/sys/kern/kern_sysctl.c:1.226
--- src/sys/kern/kern_sysctl.c:1.225	Mon Aug 24 20:53:00 2009
+++ src/sys/kern/kern_sysctl.c	Wed Sep 16 15:23:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sysctl.c,v 1.225 2009/08/24 20:53:00 dyoung Exp $	*/
+/*	$NetBSD: kern_sysctl.c,v 1.226 2009/09/16 15:23:04 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.225 2009/08/24 20:53:00 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.226 2009/09/16 15:23:04 pooka Exp $);
 
 #include opt_defcorename.h
 #include ksyms.h
@@ -235,14 +235,20 @@
 		f = (void*)*sysctl_setup;
 		(*f)(NULL);
 	}
+}
 
-	/*
-	 * setting this means no more permanent nodes can be added,
-	 * trees that claim to be readonly at the root now are, and if
-	 * the main tree is readonly, *everything* is.
-	 */
-	sysctl_root.sysctl_flags |= CTLFLAG_PERMANENT;
+/*
+ * Setting this means no more permanent nodes can be added,
+ * trees that claim to be readonly at the root now are, and if
+ * the main tree is readonly, *everything* is.
+ *
+ * Call this at the end of kernel init.
+ */
+void
+sysctl_finalize(void)
+{
 
+	sysctl_root.sysctl_flags |= CTLFLAG_PERMANENT;
 }
 
 /*

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.181 src/sys/kern/subr_autoconf.c:1.182
--- src/sys/kern/subr_autoconf.c:1.181	Sun 

CVS commit: src/external/bsd/dhcpcd/dist

2009-09-16 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Sep 16 19:04:02 UTC 2009

Modified Files:
src/external/bsd/dhcpcd/dist: dhcpcd.8.in

Log Message:
Fix various typos and grammatical errors


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 src/external/bsd/dhcpcd/dist/dhcpcd.8.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcpcd/dist/dhcpcd.8.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.1.1.8 src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.2
--- src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.1.1.8	Tue Jul 28 20:53:18 2009
+++ src/external/bsd/dhcpcd/dist/dhcpcd.8.in	Wed Sep 16 19:04:01 2009
@@ -22,7 +22,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd July 26, 2009
+.Dd September 16, 2009
 .Dt DHCPCD 8 SMM
 .Os
 .Sh NAME
@@ -81,14 +81,15 @@
 .Xr resolvconf 8 ,
 if available, otherwise directly to
 .Pa /etc/resolv.conf .
-If the hostname is currenly blank, (null) or localhost, or
+If the hostname is currently blank, (null) or localhost, or
 .Va force_hostname
 is YES or TRUE or 1 then
 .Nm
 sets the hostname to the one supplied by the DHCP server.
 .Nm
 then daemonises and waits for the lease renewal time to lapse.
-Then it attempts to renew its lease and reconfigure if the new lease changes.
+It will then attempts to renew its lease and reconfigure if the new lease
+changes.
 .Pp
 .Nm
 is also an implementation of the BOOTP client specified in
@@ -156,7 +157,7 @@
 .Nm
 currently ignores the exit code of the script.
 .Ss Fine tuning
-You can fine tune the behaviour of
+You can fine-tune the behaviour of
 .Nm
 with the following options:
 .Bl -tag -width indent
@@ -220,7 +221,7 @@
 .Nm
 process running on the
 .Ar interface
-to release its lease, deconfigure the
+to release its lease, de-configure the
 .Ar interface
 and then exit.
 .Nm
@@ -230,7 +231,7 @@
 .Ar seconds .
 By default
 .Nm
-does not request any lease time and leaves the it in the hands of the
+does not request any lease time and leaves it in the hands of the
 DHCP server.
 .It Fl m , -metric Ar metric
 Metrics are used to prefer an interface over another one, lowest wins.
@@ -248,7 +249,7 @@
 .Nm
 process running on the
 .Ar interface
-to rebind it's lease.
+to rebind its lease.
 .Nm
 will not re-configure itself or use any other command line arguments.
 .Nm
@@ -266,10 +267,11 @@
 broadcast the request instead of unicasting.
 .It Fl p , -persistent
 .Nm
-normally deconfigures the
+normally de-configures the
 .Ar interface
 and configuration when it exits.
-Sometimes, this isn't desirable if for example you have root mounted over NFS.
+Sometimes, this isn't desirable if, for example, you have root mounted over
+NFS.
 You can use this option to stop this from happening.
 .It Fl r , -request Op Ar address
 .Nm
@@ -297,7 +299,7 @@
 in use.
 You should also include the optional
 .Ar cidr
-network number in-case the address is not already configured on the interface.
+network number in case the address is not already configured on the interface.
 .Nm
 remains running and pretends it has an infinite lease.
 .Nm
@@ -318,7 +320,7 @@
 .It Fl u , -userclass Ar class
 Tags the DHCP message with the userclass
 .Ar class .
-DHCP servers use this give members of the class DHCP options other than the
+DHCP servers use this to give members of the class DHCP options other than the
 default, without having to know things like hardware address or hostname.
 .It Fl v , -vendor Ar code , Ns Ar value
 Add an enscapulated vendor option.
@@ -337,7 +339,7 @@
 .Nm
 process running on the
 .Ar interface
-to deconfigure the
+to de-configure the
 .Ar interface
 and exit.
 .Nm
@@ -347,17 +349,17 @@
 .Ar reboot
 seconds before moving to the discover phase if we have an old lease to use.
 The default is 10 seconds.
-A setting if 0 seconds causes
+A setting of 0 seconds causes
 .Nm
 to skip the reboot phase and go straight into discover.
 .It Fl D , -duid 
 Generate an
 .Li RFC 4361
 compliant clientid.
-This requires persistent storage and not all DHCP servers work with it so it's
-not enabled by default.
+This requires persistent storage and not all DHCP servers work with it so it
+is not enabled by default.
 .Nm
-generates the DUID and stores in it
+generates the DUID and stores it in
 .Pa @SYSCONFDIR@/dhcpcd.duid .
 This file should not be copied to other hosts.
 .It Fl E , -lastlease
@@ -467,7 +469,7 @@
 .It Fl T, -test
 On receipt of DHCP messages just call
 .Pa @SCRIPT@
-with the reason of TEST which echo's the DHCP variables found in the message
+with the reason of TEST which echos the DHCP variables found in the message
 to the console.
 The interface configuration isn't touched and neither are any configuration
 files.
@@ -504,7 +506,7 @@
 .Nm
 will monitor the interface until an address is added or removed from it and
 act accordingly.
-For point to point 

CVS commit: [matt-nb5-mips64] src/sys/arch/pmax

2009-09-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Sep 16 19:23:18 UTC 2009

Modified Files:
src/sys/arch/pmax/include [matt-nb5-mips64]: dec_prom.h
src/sys/arch/pmax/pmax [matt-nb5-mips64]: machdep.c promcall.c
src/sys/arch/pmax/stand/common [matt-nb5-mips64]: callvec.c printf.S
startprog.S

Log Message:
Deal with some LP64 issues with only O32 console.
Make bootloader invoke kernel compatible with both O32 and N32


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.96.1 src/sys/arch/pmax/include/dec_prom.h
cvs rdiff -u -r1.223.8.1.2.2 -r1.223.8.1.2.3 src/sys/arch/pmax/pmax/machdep.c
cvs rdiff -u -r1.12 -r1.12.76.1 src/sys/arch/pmax/pmax/promcall.c
cvs rdiff -u -r1.16 -r1.16.96.1 src/sys/arch/pmax/stand/common/callvec.c
cvs rdiff -u -r1.5 -r1.5.18.1 src/sys/arch/pmax/stand/common/printf.S
cvs rdiff -u -r1.4 -r1.4.18.1 src/sys/arch/pmax/stand/common/startprog.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/pmax/include/dec_prom.h
diff -u src/sys/arch/pmax/include/dec_prom.h:1.20 src/sys/arch/pmax/include/dec_prom.h:1.20.96.1
--- src/sys/arch/pmax/include/dec_prom.h:1.20	Sun Dec 11 12:18:39 2005
+++ src/sys/arch/pmax/include/dec_prom.h	Wed Sep 16 19:23:18 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dec_prom.h,v 1.20 2005/12/11 12:18:39 christos Exp $	*/
+/*	$NetBSD: dec_prom.h,v 1.20.96.1 2009/09/16 19:23:18 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -92,55 +92,59 @@
 typedef void (*psig_t)(int);
 
 struct callback {
-	void	*(*_memcpy) __P((void *, void *, int));		/* 00 */
-	void	*(*_memset) __P((void *, int, int));		/* 04 */
-	char	*(*_strcat) __P((char *, char *));		/* 08 */
-	int	(*_strcmp) __P((char *, char *));		/* 0c */
-	char	*(*_strcpy) __P((char *, char *));		/* 10 */
-	int	(*_strlen) __P((char *));			/* 14 */
-	char	*(*_strncat) __P((char *, char *, int));	/* 18 */
-	char	*(*_strncpy) __P((char *, char *, int));	/* 1c */
-	int	(*_strncmp) __P((char *, char *, int));		/* 20 */
-	int	(*_getchar) __P((void));			/* 24 */
-	char	*(*_gets) __P((char *));			/* 28 */
-	int	(*_puts) __P((char *));/* 2c */
-	int	(*_printf) __P((const char *, ...));		/* 30 */
-	int	(*_sprintf) __P((char *, char *, ...));		/* 34 */
-	int	(*_io_poll) __P((void));			/* 38 */
-	long	(*_strtol) __P((char *, char **, int));		/* 3c */
-	psig_t	(*_signal) __P((int, psig_t));			/* 40 */
-	int	(*_raise) __P((int));/* 44 */
-	long	(*_time) __P((long *));/* 48 */
-	int	(*_setjmp) __P((jmp_buf));			/* 4c */
-	void	(*_longjmp) __P((jmp_buf, int));		/* 50 */
-	int	(*_bootinit) __P((char *));			/* 54 */
-	int	(*_bootread) __P((int, void *, int));		/* 58 */
-	int	(*_bootwrite) __P((int, void *, int));		/* 5c */
-	int	(*_setenv) __P((char *, char *));		/* 60 */
-	char	*(*_getenv) __P((const char *));		/* 64 */
-	int	(*_unsetenv) __P((char *));			/* 68 */
-	u_long	(*_slot_address) __P((int));			/* 6c */
-	void	(*_wbflush) __P((void));			/* 70 */
-	void	(*_msdelay) __P((int));/* 74 */
-	void	(*_leds) __P((int));/* 78 */
-	void	(*_clear_cache) __P((char *, int));		/* 7c */
-	int	(*_getsysid) __P((void));			/* 80 */
-	int	(*_getbitmap) __P((memmap *));			/* 84 */
-	int	(*_disableintr) __P((int));			/* 88 */
-	int	(*_enableintr) __P((int));			/* 8c */
-	int	(*_testintr) __P((int));			/* 90 */
+	void	*(*_memcpy)(void *, void *, int);		/* 00 */
+	void	*(*_memset)(void *, int, int);			/* 04 */
+	char	*(*_strcat)(char *, char *);			/* 08 */
+	int	(*_strcmp)(char *, char *);			/* 0c */
+	char	*(*_strcpy)(char *, char *);			/* 10 */
+	int	(*_strlen)(char *);/* 14 */
+	char	*(*_strncat)(char *, char *, int);		/* 18 */
+	char	*(*_strncpy)(char *, char *, int);		/* 1c */
+	int	(*_strncmp)(char *, char *, int);		/* 20 */
+	int	(*_getchar)(void);/* 24 */
+	char	*(*_gets)(char *);/* 28 */
+	int	(*_puts)(char *);/* 2c */
+	int	(*_printf)(const char *, ...);			/* 30 */
+	int	(*_sprintf)(char *, char *, ...);		/* 34 */
+	int	(*_io_poll)(void);/* 38 */
+	long	(*_strtol)(char *, char **, int);		/* 3c */
+	psig_t	(*_signal)(int, psig_t);			/* 40 */
+	int	(*_raise)(int);	/* 44 */
+	long	(*_time)(long *);/* 48 */
+	int	(*_setjmp)(jmp_buf);/* 4c */
+	void	(*_longjmp)(jmp_buf, int);			/* 50 */
+	int	(*_bootinit)(char *);/* 54 */
+	int	(*_bootread)(int, void *, int);			/* 58 */
+	int	(*_bootwrite)(int, void *, int);		/* 5c */
+	int	(*_setenv)(char *, char *);			/* 60 */
+	char	*(*_getenv)(const char *);			/* 64 */
+	int	(*_unsetenv)(char *);/* 68 */
+	u_long	(*_slot_address)(int);/* 6c */
+	void	(*_wbflush)(void);/* 70 */
+	void	(*_msdelay)(int);/* 74 */
+	void	(*_leds)(int);	/* 78 */
+	void	(*_clear_cache)(char *, int);			/* 7c */
+	int	(*_getsysid)(void);/* 80 */
+	int	(*_getbitmap)(memmap *);			/* 84 */
+	int	(*_disableintr)(int);/* 88 */
+	int	(*_enableintr)(int);/* 8c */
+	int	(*_testintr)(int);/* 90 */
 	void	

CVS commit: src/usr.bin/sort

2009-09-16 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Sep 16 20:56:39 UTC 2009

Modified Files:
src/usr.bin/sort: fields.c

Log Message:
Minor tweaks to the key generation for numeric fields.
Use 1's compliment for -ve numbers to avoid confitionals.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/sort/fields.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/sort/fields.c
diff -u src/usr.bin/sort/fields.c:1.28 src/usr.bin/sort/fields.c:1.29
--- src/usr.bin/sort/fields.c:1.28	Thu Sep 10 22:02:40 2009
+++ src/usr.bin/sort/fields.c	Wed Sep 16 20:56:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fields.c,v 1.28 2009/09/10 22:02:40 dsl Exp $	*/
+/*	$NetBSD: fields.c,v 1.29 2009/09/16 20:56:38 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
 #include sort.h
 
 #ifndef lint
-__RCSID($NetBSD: fields.c,v 1.28 2009/09/10 22:02:40 dsl Exp $);
+__RCSID($NetBSD: fields.c,v 1.29 2009/09/16 20:56:38 dsl Exp $);
 __SCCSID(@(#)fields.c	8.1 (Berkeley) 6/6/93);
 #endif /* not lint */
 
@@ -232,21 +232,22 @@
  * exponent. These have to be ordered (-ve value, decreasing exponent),
  * zero, (+ve value, increasing exponent).
  *
- * The first byte is 0x80 for zero, 0x40 for -ve with exponent 0 and
- * 0xc0 for +ve with exponent zero.
- * This only leaves 62 byte values for +ve exponents - which isn't enough.
+ * The first byte is 0x80 for zero, 0xc0 for +ve with exponent 0.
+ * -ve values are the 1's compliments (so 0x7f isn't used!).
+ *
+ * This only leaves 63 byte values for +ve exponents - which isn't enough.
  * The largest 5 exponent values are used to hold a byte count of the
  * number of following bytes that contain 7 exponent bits per byte,
+ * This lets us sort exponents from -2^31 to +2^31.
  *
  * The mantissa is stored 2 digits per byte offset by 0x40, for negative
- * numbers the order must be reversed (they are subtracted from 0x100).
+ * numbers the order must be reversed (they are bit inverted).
  *
  * Reverse sorts are done by inverting the sign of the number.
  */
 
-#define SIGNED(reverse, value) ((reverse) ? 0x100 - (value) : (value))
-
-/* Large exponents are encoded EXP_EXC_BITS per byte */
+/* Large exponents are encoded EXP_EXC_BITS per byte, MAX_EXP_ENC is the
+ * number of bytes required to contain an exponent. */
 #define EXP_ENC_BITS 7
 #define EXP_ENC_VAL  (1  EXP_ENC_BITS)
 #define EXP_ENC_MASK (EXP_ENC_VAL - 1)
@@ -262,8 +263,12 @@
 	char ch;
 	unsigned int val;
 	u_char *last_nz_pos;
+	u_char negate;
 
-	reverse = R;
+	if (reverse  R)
+		negate = 0xff;
+	else
+		negate = 0;
 
 	/* Give ourselves space for the key terminator */
 	bufend--;
@@ -274,7 +279,7 @@
 
 	SKIP_BLANKS(line);
 	if (*line == '-') {	/* set the sign */
-		reverse ^= R;
+		negate ^= 0xff;
 		line++;
 	}
 	/* eat initial zeroes */
@@ -304,11 +309,11 @@
 
 	/* Maybe here we should allow for e+12 (etc) */
 
-	if (exponent  0x3f - MAX_EXP_ENC  -exponent  0x3f - MAX_EXP_ENC) {
+	if (exponent  0x40 - MAX_EXP_ENC  -exponent  0x40 - MAX_EXP_ENC) {
 		/* Value ok for simple encoding */
 		/* exponent 0 is 0xc0 for +ve numbers and 0x40 for -ve ones */
 		exponent += 0xc0;
-		*pos++ = SIGNED(reverse, exponent);
+		*pos++ = negate ^ exponent;
 	} else {
 		/* Out or range for a single byte */
 		int c, t;
@@ -326,12 +331,12 @@
 		if (exponent  0)
 			t = -t;
 		t += 0xc0;
-		*pos++ = SIGNED(reverse, t);
+		*pos++ = negate ^ t;
 		/* now add each 7-bit block (offset 0x40..0xbf) */
 		for (; c = 0; c--) {
 			t = exponent  (c * EXP_ENC_BITS);
 			t = (t  EXP_ENC_MASK) + 0x40;
-			*pos++ = SIGNED(reverse, t);
+			*pos++ = negate ^ t;
 		}
 	}
 
@@ -360,13 +365,13 @@
 val += ch - '0';
 			break;
 		}
-		*pos++ = SIGNED(reverse, val + 0x40);
+		*pos++ = negate ^ (val + 0x40);
 		if (val != 0)
 			last_nz_pos = pos;
 	}
 
 	/* Add key terminator, deleting any trailing 00 */
-	*last_nz_pos++ = SIGNED(reverse, 1);
+	*last_nz_pos++ = negate;
 
 	return (last_nz_pos);
 }



CVS commit: src/sys/dev/pci

2009-09-16 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Wed Sep 16 20:58:07 UTC 2009

Modified Files:
src/sys/dev/pci: Makefile
Added Files:
src/sys/dev/pci/hdaudio: Makefile

Log Message:
Install hdaudio includes required by upcoming userland toolS


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/hdaudio/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/Makefile
diff -u src/sys/dev/pci/Makefile:1.12 src/sys/dev/pci/Makefile:1.13
--- src/sys/dev/pci/Makefile:1.12	Sun Jul 23 12:01:26 2006
+++ src/sys/dev/pci/Makefile	Wed Sep 16 20:58:07 2009
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.12 2006/07/23 12:01:26 bouyer Exp $
+#	$NetBSD: Makefile,v 1.13 2009/09/16 20:58:07 sborrill Exp $
 
 # use 'make -f Makefile.pcidevs' to make pcidevs.h and pcidevs_data.h
 
+SUBDIR=	hdaudio
+
 INCSDIR= /usr/include/dev/pci
 
 # Only install includes which are used by userland

Added files:

Index: src/sys/dev/pci/hdaudio/Makefile
diff -u /dev/null src/sys/dev/pci/hdaudio/Makefile:1.1
--- /dev/null	Wed Sep 16 20:58:07 2009
+++ src/sys/dev/pci/hdaudio/Makefile	Wed Sep 16 20:58:07 2009
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2009/09/16 20:58:07 sborrill Exp $
+
+INCSDIR= /usr/include/dev/pci/hdaudio
+
+# Only install includes which are used by userland
+INCS=	hdaudioio.h hdaudioreg.h
+
+.include bsd.kinc.mk



CVS commit: src/sys/dev/usb

2009-09-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Sep 16 22:44:19 UTC 2009

Modified Files:
src/sys/dev/usb: umass.c

Log Message:
Nothing else handles DVACT_ACTIVATE, so why should umass(4)? Get
rid of the DVACT_ACTIVATE case in umass_activate().  This eliminates
the only call to config_activate() in the entire tree.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/usb/umass.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.132 src/sys/dev/usb/umass.c:1.133
--- src/sys/dev/usb/umass.c:1.132	Sun Aug 23 19:03:18 2009
+++ src/sys/dev/usb/umass.c	Wed Sep 16 22:44:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.132 2009/08/23 19:03:18 jmcneill Exp $	*/
+/*	$NetBSD: umass.c,v 1.133 2009/09/16 22:44:19 dyoung Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.132 2009/08/23 19:03:18 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.133 2009/09/16 22:44:19 dyoung Exp $);
 
 #include atapibus.h
 #include scsibus.h
@@ -706,30 +706,23 @@
 {
 	struct umass_softc *sc = device_private(dev);
 	struct umassbus_softc *scbus = sc-bus;
-	int rv = 0;
+	int rv;
 
 	DPRINTF(UDMASS_USB, (%s: umass_activate: %d\n,
 	device_xname(sc-sc_dev), act));
 
 	switch (act) {
-	case DVACT_ACTIVATE:
-		if (scbus == NULL || scbus-sc_child == NULL)
-			break;
-		rv = config_activate(scbus-sc_child);
-		DPRINTF(UDMASS_USB, (%s: umass activate: child 
-		returned %d\n, device_xname(sc-sc_dev), rv));
-		break;
-
 	case DVACT_DEACTIVATE:
 		sc-sc_dying = 1;
 		if (scbus == NULL || scbus-sc_child == NULL)
-			break;
+			return 0;
 		rv = config_deactivate(scbus-sc_child);
 		DPRINTF(UDMASS_USB, (%s: umass_deactivate: child 
 		returned %d\n, device_xname(sc-sc_dev), rv));
-		break;
+		return rv;
+	default:
+		return EOPNOTSUPP;
 	}
-	return (rv);
 }
 
 Static void



CVS commit: src/sys

2009-09-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Sep 16 22:45:24 UTC 2009

Modified Files:
src/sys/kern: subr_autoconf.c
src/sys/sys: device.h

Log Message:
Nothing calls config_activate(9) any longer, so delete it.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.122 -r1.123 src/sys/sys/device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.183 src/sys/kern/subr_autoconf.c:1.184
--- src/sys/kern/subr_autoconf.c:1.183	Wed Sep 16 16:34:50 2009
+++ src/sys/kern/subr_autoconf.c	Wed Sep 16 22:45:24 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.183 2009/09/16 16:34:50 dyoung Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.184 2009/09/16 22:45:24 dyoung Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.183 2009/09/16 16:34:50 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.184 2009/09/16 22:45:24 dyoung Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ddb.h
@@ -1491,24 +1491,6 @@
 }
 
 int
-config_activate(device_t dev)
-{
-	const struct cfattach *ca = dev-dv_cfattach;
-	int rv = 0, oflags = dev-dv_flags;
-
-	if (ca-ca_activate == NULL)
-		return EOPNOTSUPP;
-
-	if ((dev-dv_flags  DVF_ACTIVE) == 0) {
-		dev-dv_flags |= DVF_ACTIVE;
-		rv = (*ca-ca_activate)(dev, DVACT_ACTIVATE);
-		if (rv)
-			dev-dv_flags = oflags;
-	}
-	return rv;
-}
-
-int
 config_deactivate(device_t dev)
 {
 	const struct cfattach *ca = dev-dv_cfattach;

Index: src/sys/sys/device.h
diff -u src/sys/sys/device.h:1.122 src/sys/sys/device.h:1.123
--- src/sys/sys/device.h:1.122	Wed Sep 16 16:34:56 2009
+++ src/sys/sys/device.h	Wed Sep 16 22:45:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.122 2009/09/16 16:34:56 dyoung Exp $ */
+/* $NetBSD: device.h,v 1.123 2009/09/16 22:45:23 dyoung Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -457,7 +457,6 @@
 int	config_detach(device_t, int);
 int	config_detach_children(device_t, int flags);
 bool	config_detach_all(int);
-int	config_activate(device_t);
 int	config_deactivate(device_t);
 void	config_defer(device_t, void (*)(device_t));
 void	config_deferred(device_t);



CVS commit: src/share/man/man9

2009-09-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Sep 16 22:47:29 UTC 2009

Modified Files:
src/share/man/man9: autoconf.9

Log Message:
Delete documentation for config_activate(9), it does not exist any
more.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/share/man/man9/autoconf.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/autoconf.9
diff -u src/share/man/man9/autoconf.9:1.24 src/share/man/man9/autoconf.9:1.25
--- src/share/man/man9/autoconf.9:1.24	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/autoconf.9	Wed Sep 16 22:47:29 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: autoconf.9,v 1.24 2008/04/30 13:10:58 martin Exp $
+.\ $NetBSD: autoconf.9,v 1.25 2009/09/16 22:47:29 dyoung Exp $
 .\
 .\ Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 7, 2006
+.Dd September 16, 2009
 .Dt AUTOCONF 9
 .Os
 .Sh NAME
@@ -42,7 +42,6 @@
 .Nm config_attach ,
 .Nm config_attach_pseudo ,
 .Nm config_detach ,
-.Nm config_activate ,
 .Nm config_deactivate ,
 .Nm config_defer ,
 .Nm config_interrupts ,
@@ -81,8 +80,6 @@
 .Ft int
 .Fn config_detach device_t dev int flags
 .Ft int
-.Fn config_activate device_t dev
-.Ft int
 .Fn config_deactivate device_t dev
 .Ft int
 .Fn config_defer device_t dev void (*func)(device_t)
@@ -348,13 +345,6 @@
 .Fn config_detach
 is always called from a thread context, allowing condition variables
 to be used while the device detaches itself.
-.It Fn config_activate dev
-Called by the parent to activate the child device
-.Fa dev .
-It is called to activate resources and initialise other kernel
-subsystems (such as the network subsystem).
-.Fn config_activate
-is called from interrupt context after the device has been attached.
 .It Fn config_deactivate dev
 Called by the parent to deactivate the child device
 .Fa dev .



CVS commit: src

2009-09-16 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Sep 16 22:52:41 UTC 2009

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Don't install config_activate links such as config_activate.9 -
autoconf.9.  In the set list, mark the config_activate links
obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.1309 -r1.1310 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.291 -r1.292 src/share/man/man9/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1309 src/distrib/sets/lists/comp/mi:1.1310
--- src/distrib/sets/lists/comp/mi:1.1309	Wed Sep 16 16:34:49 2009
+++ src/distrib/sets/lists/comp/mi	Wed Sep 16 22:52:40 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1309 2009/09/16 16:34:49 dyoung Exp $
+#	$NetBSD: mi,v 1.1310 2009/09/16 22:52:40 dyoung Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -8426,7 +8426,7 @@
 ./usr/share/man/cat9/cnputc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/condvar.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/config.0			comp-sys-catman		.cat
-./usr/share/man/cat9/config_activate.0		comp-sys-catman		.cat
+./usr/share/man/cat9/config_activate.0		comp-sys-catman		obsolete
 ./usr/share/man/cat9/config_attach.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/config_attach_loc.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/config_attach_pseudo.0	comp-sys-catman		.cat
@@ -13843,7 +13843,7 @@
 ./usr/share/man/html9/cnputc.html		comp-sys-htmlman	html
 ./usr/share/man/html9/condvar.html		comp-sys-htmlman	html
 ./usr/share/man/html9/config.html		comp-sys-htmlman	html
-./usr/share/man/html9/config_activate.html	comp-sys-htmlman	html
+./usr/share/man/html9/config_activate.html	comp-sys-htmlman	obsolete
 ./usr/share/man/html9/config_attach.html	comp-sys-htmlman	html
 ./usr/share/man/html9/config_attach_loc.html	comp-sys-htmlman	html
 ./usr/share/man/html9/config_attach_pseudo.html	comp-sys-htmlman	html
@@ -19379,7 +19379,7 @@
 ./usr/share/man/man9/cnputc.9			comp-sys-man		.man
 ./usr/share/man/man9/condvar.9			comp-sys-man		.man
 ./usr/share/man/man9/config.9			comp-sys-man		.man
-./usr/share/man/man9/config_activate.9		comp-sys-man		.man
+./usr/share/man/man9/config_activate.9		comp-sys-man		obsolete
 ./usr/share/man/man9/config_attach.9		comp-sys-man		.man
 ./usr/share/man/man9/config_attach_loc.9	comp-sys-man		.man
 ./usr/share/man/man9/config_attach_pseudo.9	comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.291 src/share/man/man9/Makefile:1.292
--- src/share/man/man9/Makefile:1.291	Sat Sep  5 16:13:21 2009
+++ src/share/man/man9/Makefile	Wed Sep 16 22:52:40 2009
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.291 2009/09/05 16:13:21 apb Exp $
+#   $NetBSD: Makefile,v 1.292 2009/09/16 22:52:40 dyoung Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -89,7 +89,6 @@
 	autoconf.9 config_attach.9 \
 	autoconf.9 config_attach_pseudo.9 \
 	autoconf.9 config_detach.9 \
-	autoconf.9 config_activate.9 \
 	autoconf.9 config_deactivate.9 \
 	autoconf.9 config_defer.9 \
 	autoconf.9 config_interrupts.9 \