CVS commit: src/sys/dev/marvell

2010-06-02 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Jun  2 06:02:20 UTC 2010

Modified Files:
src/sys/dev/marvell: gtpcireg.h

Log Message:
Erase the old definition macro that forgot to be erased.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/marvell/gtpcireg.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/dev/marvell/gtpcireg.h
diff -u src/sys/dev/marvell/gtpcireg.h:1.5 src/sys/dev/marvell/gtpcireg.h:1.6
--- src/sys/dev/marvell/gtpcireg.h:1.5	Wed Apr 28 13:51:56 2010
+++ src/sys/dev/marvell/gtpcireg.h	Wed Jun  2 06:02:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtpcireg.h,v 1.5 2010/04/28 13:51:56 kiyohara Exp $	*/
+/*	$NetBSD: gtpcireg.h,v 1.6 2010/06/02 06:02:20 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -156,8 +156,6 @@
 #define GTPCI_GT64260_ACBL_WBURST_4_QW	(0  20)
 #define GTPCI_GT64260_ACBL_WBURST_8_QW	(1  20)
 #define GTPCI_GT64260_ACBL_WBURST_16_QW	(2  20)
-#define PCI_ACCCTLBASEL_PCISwap PCI__EXT(v, 24, 2)
-#define PCI_ACCCTLBASEL_PCISwap_NoSwap  PCI__INS(24, PCI_PCISWAP_NoSwap)
 #define GTPCI_GT64260_ACBL_PCISWAP_BYTESWAP (0  24)
 #define GTPCI_GT64260_ACBL_PCISWAP_NOSWAP   (1  24)
 #define GTPCI_GT64260_ACBL_PCISWAP_BYTEWORDSWAP (3  24)



CVS commit: src/sys/dev/marvell

2010-06-02 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Jun  2 06:05:32 UTC 2010

Modified Files:
src/sys/dev/marvell: gtidmac.c

Log Message:
Use kmem(9) instead of malloc(9) in gtidmac_attach().


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/marvell/gtidmac.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/marvell/gtidmac.c
diff -u src/sys/dev/marvell/gtidmac.c:1.1 src/sys/dev/marvell/gtidmac.c:1.2
--- src/sys/dev/marvell/gtidmac.c:1.1	Wed Apr 28 13:51:56 2010
+++ src/sys/dev/marvell/gtidmac.c	Wed Jun  2 06:05:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmac.c,v 1.1 2010/04/28 13:51:56 kiyohara Exp $	*/
+/*	$NetBSD: gtidmac.c,v 1.2 2010/06/02 06:05:32 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,14 +26,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gtidmac.c,v 1.1 2010/04/28 13:51:56 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: gtidmac.c,v 1.2 2010/06/02 06:05:32 kiyohara Exp $);
 
 #include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/errno.h
 #include sys/endian.h
-#include sys/malloc.h
+#include sys/kmem.h
 
 #include uvm/uvm_param.h	/* For PAGE_SIZE */
 
@@ -367,7 +367,7 @@
 	sc-sc_dmat = mva-mva_dmat;
 	n = idmac_nchan * GTIDMAC_NDESC + xore_nchan * MVXORE_NDESC;
 	sc-sc_dd_buffer =
-	malloc(sizeof(struct gtidmac_dma_desc) * n, M_DEVBUF, M_NOWAIT);
+	kmem_alloc(sizeof(struct gtidmac_dma_desc) * n, KM_SLEEP);
 	if (sc-sc_dd_buffer == NULL) {
 		aprint_error_dev(self, can't allocate memory\n);
 		goto fail1;
@@ -635,7 +635,7 @@
 fail3:
 	bus_dmamem_free(sc-sc_dmat, sc-sc_pattern_segment, 1);
 fail2:
-	free(sc-sc_dd_buffer, M_DEVBUF);
+	kmem_free(sc-sc_dd_buffer, sizeof(struct gtidmac_dma_desc) * n);
 fail1:
 	bus_space_unmap(sc-sc_iot, sc-sc_ioh, mva-mva_size);
 	return;



CVS commit: src/sys/dev/marvell

2010-06-02 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Jun  2 06:24:59 UTC 2010

Modified Files:
src/sys/dev/marvell: gtpci.c

Log Message:
Remove unused gpio.h.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/marvell/gtpci.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/marvell/gtpci.c
diff -u src/sys/dev/marvell/gtpci.c:1.22 src/sys/dev/marvell/gtpci.c:1.23
--- src/sys/dev/marvell/gtpci.c:1.22	Wed Apr 28 13:51:56 2010
+++ src/sys/dev/marvell/gtpci.c	Wed Jun  2 06:24:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtpci.c,v 1.22 2010/04/28 13:51:56 kiyohara Exp $	*/
+/*	$NetBSD: gtpci.c,v 1.23 2010/06/02 06:24:59 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gtpci.c,v 1.22 2010/04/28 13:51:56 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: gtpci.c,v 1.23 2010/06/02 06:24:59 kiyohara Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -36,7 +36,6 @@
 #include sys/device.h
 #include sys/errno.h
 #include sys/extent.h
-#include sys/gpio.h
 #include sys/malloc.h
 
 #include prop/proplib.h



CVS commit: src/sys/dev/marvell

2010-06-02 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Jun  2 06:33:40 UTC 2010

Modified Files:
src/sys/dev/marvell: gtpci.c

Log Message:
Set NULL to tag when the property doesn't get it.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/marvell/gtpci.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/marvell/gtpci.c
diff -u src/sys/dev/marvell/gtpci.c:1.23 src/sys/dev/marvell/gtpci.c:1.24
--- src/sys/dev/marvell/gtpci.c:1.23	Wed Jun  2 06:24:59 2010
+++ src/sys/dev/marvell/gtpci.c	Wed Jun  2 06:33:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtpci.c,v 1.23 2010/06/02 06:24:59 kiyohara Exp $	*/
+/*	$NetBSD: gtpci.c,v 1.24 2010/06/02 06:33:40 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gtpci.c,v 1.23 2010/06/02 06:24:59 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: gtpci.c,v 1.24 2010/06/02 06:33:40 kiyohara Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -144,15 +144,21 @@
 
 #if NPCI  0
 	iot = prop_dictionary_get(dict, io-bus-tag);
-	if (iot == NULL)
+	if (iot != NULL) {
+		KASSERT(prop_object_type(iot) == PROP_TYPE_DATA);
+		gtpci_io_bs_tag = __UNCONST(prop_data_data_nocopy(iot));
+	} else {
 		aprint_error_dev(self, no io-bus-tag property\n);
-	KASSERT(prop_object_type(iot) == PROP_TYPE_DATA);
-	gtpci_io_bs_tag = __UNCONST(prop_data_data_nocopy(iot));
+		gtpci_io_bs_tag = NULL;
+	}
 	memt = prop_dictionary_get(dict, mem-bus-tag);
-	if (memt == NULL)
+	if (memt != NULL) {
+		KASSERT(prop_object_type(memt) == PROP_TYPE_DATA);
+		gtpci_mem_bs_tag = __UNCONST(prop_data_data_nocopy(memt));
+	} else {
 		aprint_error_dev(self, no mem-bus-tag property\n);
-	KASSERT(prop_object_type(memt) == PROP_TYPE_DATA);
-	gtpci_mem_bs_tag = __UNCONST(prop_data_data_nocopy(memt));
+		gtpci_mem_bs_tag = NULL;
+	}
 	pc = prop_dictionary_get(dict, pci-chipset);
 	if (pc == NULL) {
 		aprint_error_dev(self, no pci-chipset property\n);



CVS commit: src/sys

2010-06-02 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Jun  2 06:44:33 UTC 2010

Modified Files:
src/sys/arch/evbppc/ev64260: autoconf.c gt_mainbus.c
src/sys/dev/marvell: gtpci.c gtpcivar.h

Log Message:
Move memory protection parameters to MI part.
Gtpci believes the initialization of the firmware(boot-loader) if protection
information is not obtained.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbppc/ev64260/autoconf.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbppc/ev64260/gt_mainbus.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/marvell/gtpci.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/marvell/gtpcivar.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/arch/evbppc/ev64260/autoconf.c
diff -u src/sys/arch/evbppc/ev64260/autoconf.c:1.13 src/sys/arch/evbppc/ev64260/autoconf.c:1.14
--- src/sys/arch/evbppc/ev64260/autoconf.c:1.13	Wed Apr 28 13:51:55 2010
+++ src/sys/arch/evbppc/ev64260/autoconf.c	Wed Jun  2 06:44:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.13 2010/04/28 13:51:55 kiyohara Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.14 2010/06/02 06:44:33 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.13 2010/04/28 13:51:55 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.14 2010/06/02 06:44:33 kiyohara Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -59,6 +59,7 @@
 
 #include machine/pci_machdep.h
 
+#include dev/marvell/gtpcivar.h
 #include dev/marvell/gtreg.h
 #include dev/marvell/marvellvar.h
 
@@ -156,6 +157,7 @@
 		prop_object_release(mac);
 	}
 	if (device_is_a(dev, gtpci)) {
+		extern struct gtpci_prot gtpci_prot;
 		extern struct powerpc_bus_space
 		ev64260_pci0_io_bs_tag, ev64260_pci0_mem_bs_tag,
 		ev64260_pci1_io_bs_tag, ev64260_pci1_mem_bs_tag;
@@ -165,7 +167,7 @@
 		struct marvell_attach_args *mva = aux;
 		struct powerpc_bus_space *pci_io_bs_tag, *pci_mem_bs_tag;
 		struct genppc_pci_chipset *genppc_gtpci_chipset;
-		prop_data_t io_bs_tag, mem_bs_tag, pc;
+		prop_data_t prot, io_bs_tag, mem_bs_tag, pc;
 
 		if (mva-mva_unit == 0) {
 			pci_io_bs_tag = ev64260_pci0_io_bs_tag;
@@ -177,6 +179,11 @@
 			genppc_gtpci_chipset = genppc_gtpci1_chipset;
 		}
 
+		prot = prop_data_create_data_nocopy(
+		gtpci_prot, sizeof(struct gtpci_prot));
+		KASSERT(prot != NULL);
+		prop_dictionary_set(dict, prot, prot);
+		prop_object_release(prot);
 		io_bs_tag = prop_data_create_data_nocopy(
 		pci_io_bs_tag, sizeof(struct powerpc_bus_space));
 		KASSERT(io_bs_tag != NULL);

Index: src/sys/arch/evbppc/ev64260/gt_mainbus.c
diff -u src/sys/arch/evbppc/ev64260/gt_mainbus.c:1.15 src/sys/arch/evbppc/ev64260/gt_mainbus.c:1.16
--- src/sys/arch/evbppc/ev64260/gt_mainbus.c:1.15	Wed Apr 28 13:51:55 2010
+++ src/sys/arch/evbppc/ev64260/gt_mainbus.c	Wed Jun  2 06:44:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gt_mainbus.c,v 1.15 2010/04/28 13:51:55 kiyohara Exp $	*/
+/*	$NetBSD: gt_mainbus.c,v 1.16 2010/06/02 06:44:33 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gt_mainbus.c,v 1.15 2010/04/28 13:51:55 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: gt_mainbus.c,v 1.16 2010/06/02 06:44:33 kiyohara Exp $);
 
 #include opt_ev64260.h
 #include opt_pci.h
@@ -47,7 +47,6 @@
 #include sys/device.h
 #include sys/errno.h
 #include sys/extent.h
-#include sys/malloc.h
 
 #define _POWERPC_BUS_DMA_PRIVATE
 #include machine/bus.h
@@ -82,6 +81,15 @@
 
 CFATTACH_DECL_NEW(gt, sizeof(struct gt_softc), gt_match, gt_attach, NULL, NULL);
 
+struct gtpci_prot gtpci_prot = {
+	GTPCI_GT64260_ACBL_PCISWAP_NOSWAP	|
+	GTPCI_GT64260_ACBL_WBURST_8_QW		|
+	GTPCI_GT64260_ACBL_RDMULPREFETCH	|
+	GTPCI_GT64260_ACBL_RDLINEPREFETCH	|
+	GTPCI_GT64260_ACBL_RDPREFETCH		|
+	GTPCI_GT64260_ACBL_PREFETCHEN,
+	0,
+};
 
 int
 gt_match(device_t parent, cfdata_t cf, void *aux)

Index: src/sys/dev/marvell/gtpci.c
diff -u src/sys/dev/marvell/gtpci.c:1.24 src/sys/dev/marvell/gtpci.c:1.25
--- src/sys/dev/marvell/gtpci.c:1.24	Wed Jun  2 06:33:40 2010
+++ src/sys/dev/marvell/gtpci.c	Wed Jun  2 06:44:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtpci.c,v 1.24 2010/06/02 06:33:40 kiyohara Exp $	*/
+/*	$NetBSD: gtpci.c,v 1.25 2010/06/02 06:44:32 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gtpci.c,v 1.24 2010/06/02 06:33:40 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: gtpci.c,v 1.25 2010/06/02 06:44:32 kiyohara Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -65,9 +65,9 @@
 static int gtpci_match(device_t, struct cfdata *, void *);
 static void gtpci_attach(device_t, device_t, void *);
 
-static void gtpci_init(struct gtpci_softc *);
+static void gtpci_init(struct 

CVS commit: src/sys/arch/x86/x86

2010-06-02 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jun  2 09:43:13 UTC 2010

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
Restore PHYSMEM_MAX* options (hi cegger!)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/x86/x86/x86_machdep.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/x86/x86/x86_machdep.c
diff -u src/sys/arch/x86/x86/x86_machdep.c:1.40 src/sys/arch/x86/x86/x86_machdep.c:1.41
--- src/sys/arch/x86/x86/x86_machdep.c:1.40	Sun Apr 18 23:47:51 2010
+++ src/sys/arch/x86/x86/x86_machdep.c	Wed Jun  2 09:43:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_machdep.c,v 1.40 2010/04/18 23:47:51 jym Exp $	*/
+/*	$NetBSD: x86_machdep.c,v 1.41 2010/06/02 09:43:12 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,9 +31,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: x86_machdep.c,v 1.40 2010/04/18 23:47:51 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: x86_machdep.c,v 1.41 2010/06/02 09:43:12 joerg Exp $);
 
 #include opt_modular.h
+#include opt_physmem.h
 
 #include sys/types.h
 #include sys/param.h



CVS commit: src/sys/ufs/ffs

2010-06-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Jun  2 09:56:59 UTC 2010

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
Initialize the initial snap block list's count.

From Antti Kantee po...@netbsd.org.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.97 src/sys/ufs/ffs/ffs_snapshot.c:1.98
--- src/sys/ufs/ffs/ffs_snapshot.c:1.97	Thu Oct 15 10:05:48 2009
+++ src/sys/ufs/ffs/ffs_snapshot.c	Wed Jun  2 09:56:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.97 2009/10/15 10:05:48 hannken Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.98 2010/06/02 09:56:59 hannken Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.97 2009/10/15 10:05:48 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.98 2010/06/02 09:56:59 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -684,6 +684,7 @@
 		*blkp++ = blkno + loc;
 	for (; cg  fs-fs_ncg; cg++)
 		*blkp++ = fragstoblks(fs, cgtod(fs, cg));
+	(*snaplist)[0] = blkp - (*snaplist)[0];
 
 out:
 	if (has_wapbl)



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

2010-06-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jun  2 10:55:19 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rump.c rump_private.h vm.c

Log Message:
rumpvm_init - uvm_init to get rid of local prototype.
no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.78 -r1.79 src/sys/rump/librump/rumpkern/vm.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/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.173 src/sys/rump/librump/rumpkern/rump.c:1.174
--- src/sys/rump/librump/rumpkern/rump.c:1.173	Mon May 31 23:18:33 2010
+++ src/sys/rump/librump/rumpkern/rump.c	Wed Jun  2 10:55:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.173 2010/05/31 23:18:33 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.174 2010/06/02 10:55:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.173 2010/05/31 23:18:33 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.174 2010/06/02 10:55:18 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -75,6 +75,7 @@
 
 #include prop/proplib.h
 
+#include uvm/uvm_extern.h
 #include uvm/uvm_readahead.h
 
 #include rump_private.h
@@ -276,7 +277,7 @@
 	mutex_init(tty_lock, MUTEX_DEFAULT, IPL_NONE);
 	rumpuser_mutex_recursive_init(rump_giantlock);
 	ksyms_init();
-	rumpvm_init();
+	uvm_init();
 	evcnt_init();
 
 	once_init();

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.48 src/sys/rump/librump/rumpkern/rump_private.h:1.49
--- src/sys/rump/librump/rumpkern/rump_private.h:1.48	Tue Jun  1 10:29:21 2010
+++ src/sys/rump/librump/rumpkern/rump_private.h	Wed Jun  2 10:55:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.48 2010/06/01 10:29:21 pooka Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.49 2010/06/02 10:55:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -81,8 +81,6 @@
 void		rump_component_init(enum rump_component_type);
 int		rump_component_count(enum rump_component_type);
 
-void		rumpvm_init(void);
-
 void		rump_gettime(struct timespec *);
 void		rump_getuptime(struct timespec *);
 

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.78 src/sys/rump/librump/rumpkern/vm.c:1.79
--- src/sys/rump/librump/rumpkern/vm.c:1.78	Tue Jun  1 20:11:33 2010
+++ src/sys/rump/librump/rumpkern/vm.c	Wed Jun  2 10:55:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.78 2010/06/01 20:11:33 pooka Exp $	*/
+/*	$NetBSD: vm.c,v 1.79 2010/06/02 10:55:18 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.78 2010/06/01 20:11:33 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm.c,v 1.79 2010/06/02 10:55:18 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -229,7 +229,7 @@
 static kmutex_t pagermtx;
 
 void
-rumpvm_init(void)
+uvm_init(void)
 {
 
 	uvmexp.free = 1024*1024; /* XXX */



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

2010-06-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jun  2 12:07:04 UTC 2010

Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c

Log Message:
In aiodone, call uvm_pageout_done() with number of PG_PAGEOUT pages
processed.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/rump/librump/rumpvfs/vm_vfs.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/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.15 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.16
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.15	Wed Dec 16 16:50:49 2009
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c	Wed Jun  2 12:07:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_vfs.c,v 1.15 2009/12/16 16:50:49 pooka Exp $	*/
+/*	$NetBSD: vm_vfs.c,v 1.16 2010/06/02 12:07:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.15 2009/12/16 16:50:49 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.16 2010/06/02 12:07:03 pooka Exp $);
 
 #include sys/param.h
 
@@ -50,15 +50,21 @@
 	int i, npages = bp-b_bufsize  PAGE_SHIFT;
 	struct vm_page **pgs;
 	vaddr_t va;
+	int pageout = 0;
 
 	pgs = kmem_alloc(npages * sizeof(*pgs), KM_SLEEP);
 	for (i = 0; i  npages; i++) {
 		va = (vaddr_t)bp-b_data + (i  PAGE_SHIFT);
 		pgs[i] = uvm_pageratop(va);
-		pgs[i]-flags = ~PG_PAGEOUT;
+		if (pgs[i]-flags  PG_PAGEOUT) {
+			KASSERT((pgs[i]-flags  PG_FAKE) == 0);
+			pageout++;
+			pgs[i]-flags = ~PG_PAGEOUT;
+		}
 	}
 
 	uvm_pagermapout((vaddr_t)bp-b_data, npages);
+	uvm_pageout_done(pageout);
 	uvm_page_unbusy(pgs, npages);
 
 	if (BUF_ISWRITE(bp)  (bp-b_cflags  BC_AGE) != 0) {



CVS commit: xsrc/external/mit/xf86-input-ws/dist/man

2010-06-02 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Wed Jun  2 12:56:24 UTC 2010

Modified Files:
xsrc/external/mit/xf86-input-ws/dist/man: ws.man

Log Message:
Drop empty .TP.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/xf86-input-ws/dist/man/ws.man

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

Modified files:

Index: xsrc/external/mit/xf86-input-ws/dist/man/ws.man
diff -u xsrc/external/mit/xf86-input-ws/dist/man/ws.man:1.1.1.1 xsrc/external/mit/xf86-input-ws/dist/man/ws.man:1.2
--- xsrc/external/mit/xf86-input-ws/dist/man/ws.man:1.1.1.1	Fri Nov 27 14:17:19 2009
+++ xsrc/external/mit/xf86-input-ws/dist/man/ws.man	Wed Jun  2 12:56:24 2010
@@ -70,7 +70,6 @@
 if two buttons where pressed simultaneously when 3 button emulation is
 enabled.  Default: 50.
 .TP 4
-.TP 4
 .BI Option \*qDebugLevel\*q \*q integer \*q
 This option sets the verbosity level of the driver.
 It defaults to 0, which means no extra debug output.



CVS commit: xsrc/external/mit/xf86-video-glint/dist/man

2010-06-02 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Wed Jun  2 13:17:26 UTC 2010

Modified Files:
xsrc/external/mit/xf86-video-glint/dist/man: glint.man

Log Message:
Drop empty .TP. Kill some useless quotes while here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xf86-video-glint/dist/man/glint.man

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

Modified files:

Index: xsrc/external/mit/xf86-video-glint/dist/man/glint.man
diff -u xsrc/external/mit/xf86-video-glint/dist/man/glint.man:1.1.1.2 xsrc/external/mit/xf86-video-glint/dist/man/glint.man:1.2
--- xsrc/external/mit/xf86-video-glint/dist/man/glint.man:1.1.1.2	Thu Jul  9 03:41:07 2009
+++ xsrc/external/mit/xf86-video-glint/dist/man/glint.man	Wed Jun  2 13:17:26 2010
@@ -102,8 +102,7 @@
 .TP
 .BI Option \*qFireGL3000\*q \*q boolean \*q
 If you have a card of the same name, turn this on.  Default: off.
-.TP
-.SH SEE ALSO
+.SH SEE ALSO
 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
 .SH AUTHORS
 Authors include: Alan Hourihane, Dirk Hohndel, Stefan Dirsch, Michel Dänzer,



CVS commit: src/lib/libc/locale

2010-06-02 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Jun  2 15:47:25 UTC 2010

Modified Files:
src/lib/libc/locale: _wctrans.c _wctrans_local.h _wctype.c
_wctype_local.h iswctype_mb.c

Log Message:
remove duplicated towctrans internal function.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/locale/_wctrans.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/locale/_wctrans_local.h \
src/lib/libc/locale/iswctype_mb.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/locale/_wctype.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/_wctype_local.h

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

Modified files:

Index: src/lib/libc/locale/_wctrans.c
diff -u src/lib/libc/locale/_wctrans.c:1.15 src/lib/libc/locale/_wctrans.c:1.16
--- src/lib/libc/locale/_wctrans.c:1.15	Tue Jun  1 13:52:08 2010
+++ src/lib/libc/locale/_wctrans.c	Wed Jun  2 15:47:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: _wctrans.c,v 1.15 2010/06/01 13:52:08 tnozaki Exp $	*/
+/*	$NetBSD: _wctrans.c,v 1.16 2010/06/02 15:47:25 tnozaki Exp $	*/
 
 /*-
  * Copyright (c)2003 Citrus Project,
@@ -60,7 +60,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _wctrans.c,v 1.15 2010/06/01 13:52:08 tnozaki Exp $);
+__RCSID($NetBSD: _wctrans.c,v 1.16 2010/06/02 15:47:25 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -77,7 +77,7 @@
  *	translate a character (extended part)
  */
 wint_t
-_towctrans_ext(wint_t c, struct _WCTransEntry *te)
+_towctrans_ext(wint_t c, struct _WCTransEntry const *te)
 {
 	__nbrune_t c0;
 	uint32_t x;

Index: src/lib/libc/locale/_wctrans_local.h
diff -u src/lib/libc/locale/_wctrans_local.h:1.8 src/lib/libc/locale/_wctrans_local.h:1.9
--- src/lib/libc/locale/_wctrans_local.h:1.8	Thu Feb 12 05:00:46 2009
+++ src/lib/libc/locale/_wctrans_local.h	Wed Jun  2 15:47:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: _wctrans_local.h,v 1.8 2009/02/12 05:00:46 lukem Exp $	*/
+/*	$NetBSD: _wctrans_local.h,v 1.9 2010/06/02 15:47:25 tnozaki Exp $	*/
 
 /*-
  * Copyright (c)2003 Citrus Project,
@@ -30,11 +30,11 @@
 #define _WCTRANS_LOCAL_H_
 
 __BEGIN_DECLS
-wint_t	_towctrans_ext(wint_t, _WCTransEntry *);
+wint_t	_towctrans_ext(wint_t, _WCTransEntry const *);
 __END_DECLS
 
 static __inline wint_t
-_towctrans(wint_t c, _WCTransEntry *te)
+_towctrans_priv(wint_t c, _WCTransEntry const *te)
 {
 	return (_RUNE_ISCACHED(c)
 		? (wint_t)te-te_cached[(size_t)c]
Index: src/lib/libc/locale/iswctype_mb.c
diff -u src/lib/libc/locale/iswctype_mb.c:1.8 src/lib/libc/locale/iswctype_mb.c:1.9
--- src/lib/libc/locale/iswctype_mb.c:1.8	Tue Jun  1 13:52:08 2010
+++ src/lib/libc/locale/iswctype_mb.c	Wed Jun  2 15:47:25 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: iswctype_mb.c,v 1.8 2010/06/01 13:52:08 tnozaki Exp $ */
+/* $NetBSD: iswctype_mb.c,v 1.9 2010/06/02 15:47:25 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: iswctype_mb.c,v 1.8 2010/06/01 13:52:08 tnozaki Exp $);
+__RCSID($NetBSD: iswctype_mb.c,v 1.9 2010/06/02 15:47:25 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -82,7 +82,7 @@
 			\
 	rl = _RUNE_LOCALE();\
 	te = rl-rl_wctrans[index];			\
-	return _towctrans_priv(rl, wc, te);		\
+	return _towctrans_priv(wc, te);			\
 }
 _TOWCTRANS_FUNC(upper, _WCTRANS_INDEX_UPPER)
 _TOWCTRANS_FUNC(lower, _WCTRANS_INDEX_LOWER)
@@ -134,16 +134,14 @@
 wint_t
 towctrans(wint_t wc, wctrans_t charmap)
 {
-	_RuneLocale const *rl;
 	_WCTransEntry const *te;
 
 	if (charmap == NULL) {
 		errno = EINVAL;
 		return wc;
 	}
-	rl = _RUNE_LOCALE();
 	te = (_WCTransEntry const *)(void *)charmap;
-	return _towctrans_priv(rl, wc, te);
+	return _towctrans_priv(wc, te);
 }
 
 __weak_alias(wcwidth,_wcwidth)

Index: src/lib/libc/locale/_wctype.c
diff -u src/lib/libc/locale/_wctype.c:1.7 src/lib/libc/locale/_wctype.c:1.8
--- src/lib/libc/locale/_wctype.c:1.7	Tue Jun  1 13:52:08 2010
+++ src/lib/libc/locale/_wctype.c	Wed Jun  2 15:47:25 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: _wctype.c,v 1.7 2010/06/01 13:52:08 tnozaki Exp $ */
+/* $NetBSD: _wctype.c,v 1.8 2010/06/02 15:47:25 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -60,7 +60,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: _wctype.c,v 1.7 2010/06/01 13:52:08 tnozaki Exp $);
+__RCSID($NetBSD: _wctype.c,v 1.8 2010/06/02 15:47:25 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -110,37 +110,3 @@
 {
 	return !!(_runetype_priv(rl, wc)  te-te_mask);
 }
-
-wint_t
-/*ARGSUSED*/
-_towctrans_priv(_RuneLocale const *rl,
-wint_t wc, _WCTransEntry const *te)
-{
-	__nbrune_t wc0;
-	_RuneRange *rr;
-	_RuneEntry *base, *re;
-	uint32_t x;
-
-	_DIAGASSERT(rl != NULL);
-	_DIAGASSERT(te != NULL);
-
-	if (wc == WEOF)
-		return wc;
-	_DIAGASSERT(te-te_name != NULL);
-	if 

CVS commit: src/sys/uvm

2010-06-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jun  2 15:48:49 UTC 2010

Modified Files:
src/sys/uvm: uvm_pdaemon.c

Log Message:
it's a wonderful static


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/uvm/uvm_pdaemon.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/uvm/uvm_pdaemon.c
diff -u src/sys/uvm/uvm_pdaemon.c:1.100 src/sys/uvm/uvm_pdaemon.c:1.101
--- src/sys/uvm/uvm_pdaemon.c:1.100	Wed Oct 21 21:12:07 2009
+++ src/sys/uvm/uvm_pdaemon.c	Wed Jun  2 15:48:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pdaemon.c,v 1.100 2009/10/21 21:12:07 rmind Exp $	*/
+/*	$NetBSD: uvm_pdaemon.c,v 1.101 2010/06/02 15:48:49 pooka Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.100 2009/10/21 21:12:07 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.101 2010/06/02 15:48:49 pooka Exp $);
 
 #include opt_uvmhist.h
 #include opt_readahead.h
@@ -107,7 +107,7 @@
 static void	uvmpd_scan_queue(void);
 static void	uvmpd_tune(void);
 
-unsigned int uvm_pagedaemon_waiters;
+static unsigned int uvm_pagedaemon_waiters;
 
 /*
  * XXX hack to avoid hangs when large processes fork.



CVS commit: src/lib/libc/locale

2010-06-02 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Wed Jun  2 16:04:52 UTC 2010

Modified Files:
src/lib/libc/locale: bsdctype.c

Log Message:
uint8_t - unsigned char, int16_t - short.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/locale/bsdctype.c

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

Modified files:

Index: src/lib/libc/locale/bsdctype.c
diff -u src/lib/libc/locale/bsdctype.c:1.5 src/lib/libc/locale/bsdctype.c:1.6
--- src/lib/libc/locale/bsdctype.c:1.5	Tue Jun  1 18:00:28 2010
+++ src/lib/libc/locale/bsdctype.c	Wed Jun  2 16:04:52 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bsdctype.c,v 1.5 2010/06/01 18:00:28 tnozaki Exp $ */
+/* $NetBSD: bsdctype.c,v 1.6 2010/06/02 16:04:52 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: bsdctype.c,v 1.5 2010/06/01 18:00:28 tnozaki Exp $);
+__RCSID($NetBSD: bsdctype.c,v 1.6 2010/06/02 16:04:52 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/stat.h
@@ -52,18 +52,18 @@
 const _BSDCTypeLocale *_CurrentBSDCTypeLocale = _DefaultBSDCTypeLocale;
 
 typedef struct {
-	_BSDCTypeLocale bl;
-	uint8_t blp_ctype_tab  [_CTYPE_NUM_CHARS + 1];
-	int16_t blp_tolower_tab[_CTYPE_NUM_CHARS + 1];
-	int16_t blp_toupper_tab[_CTYPE_NUM_CHARS + 1];
+	_BSDCTypeLocale	bl;
+	unsigned char	blp_ctype_tab  [_CTYPE_NUM_CHARS + 1];
+	short		blp_tolower_tab[_CTYPE_NUM_CHARS + 1];
+	short		blp_toupper_tab[_CTYPE_NUM_CHARS + 1];
 } _BSDCTypeLocalePriv;
 
 static __inline void
 _bsdctype_init_priv(_BSDCTypeLocalePriv *blp)
 {
-	blp-blp_ctype_tab  [0] = (uint8_t)0;
-	blp-blp_tolower_tab[0] = (int16_t)EOF;
-	blp-blp_toupper_tab[0] = (int16_t)EOF;
+	blp-blp_ctype_tab  [0] = 0;
+	blp-blp_tolower_tab[0] = EOF;
+	blp-blp_toupper_tab[0] = EOF;
 	blp-bl.bl_ctype_tab   = blp-blp_ctype_tab  [0];
 	blp-bl.bl_tolower_tab = blp-blp_tolower_tab[0];
 	blp-bl.bl_toupper_tab = blp-blp_toupper_tab[0];



CVS commit: src/sys/dev/usb

2010-06-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jun  2 17:27:57 UTC 2010

Modified Files:
src/sys/dev/usb: usb.h

Log Message:
Add symbolic constant for number of USB 2.0 microframes per frame.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/usb/usb.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/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.85 src/sys/dev/usb/usb.h:1.86
--- src/sys/dev/usb/usb.h:1.85	Sat May 15 20:45:43 2010
+++ src/sys/dev/usb/usb.h	Wed Jun  2 17:27:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.85 2010/05/15 20:45:43 jakllsch Exp $	*/
+/*	$NetBSD: usb.h,v 1.86 2010/06/02 17:27:57 jakllsch Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -107,6 +107,7 @@
 #define USB_MAX_ENDPOINTS 16
 
 #define USB_FRAMES_PER_SECOND 1000
+#define USB_UFRAMES_PER_FRAME 8
 
 /*
  * The USB records contain some unaligned little-endian word



CVS commit: src/sys/arch/amd64/conf

2010-06-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jun  2 18:02:58 UTC 2010

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
COMPAT_43 should not be sorted between COMPAT_40 and COMPAT_50.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/arch/amd64/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.279 src/sys/arch/amd64/conf/GENERIC:1.280
--- src/sys/arch/amd64/conf/GENERIC:1.279	Sat May 22 19:02:07 2010
+++ src/sys/arch/amd64/conf/GENERIC	Wed Jun  2 18:02:57 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.279 2010/05/22 19:02:07 plunky Exp $
+# $NetBSD: GENERIC,v 1.280 2010/06/02 18:02:57 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.279 $
+#ident 		GENERIC-$Revision: 1.280 $
 
 maxusers	64		# estimated number of users
 
@@ -112,9 +112,9 @@
 options 	COMPAT_16	# NetBSD 1.6,
 options 	COMPAT_20	# NetBSD 2.0,
 options 	COMPAT_30	# NetBSD 3.0,
-options 	COMPAT_40	# NetBSD 4.0 compatibility.
+options 	COMPAT_40	# NetBSD 4.0,
+options 	COMPAT_50	# NetBSD 5.0 compatibility,
 options 	COMPAT_43	# and 4.3BSD
-options 	COMPAT_50	# NetBSD 5.0
 #options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 options 	COMPAT_OSSAUDIO



CVS commit: src/sys/arch/shark/conf

2010-06-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jun  2 18:03:52 UTC 2010

Modified Files:
src/sys/arch/shark/conf: GENERIC

Log Message:
COMPAT_43 should not be sorted between COMPAT_40 and COMPAT_50.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/shark/conf/GENERIC

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/shark/conf/GENERIC
diff -u src/sys/arch/shark/conf/GENERIC:1.89 src/sys/arch/shark/conf/GENERIC:1.90
--- src/sys/arch/shark/conf/GENERIC:1.89	Fri Apr 16 13:48:35 2010
+++ src/sys/arch/shark/conf/GENERIC	Wed Jun  2 18:03:52 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.89 2010/04/16 13:48:35 pooka Exp $
+#	$NetBSD: GENERIC,v 1.90 2010/06/02 18:03:52 dholland Exp $
 #
 # Generic Shark configuration.
 #
@@ -7,7 +7,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		GENERIC-$Revision: 1.89 $
+#ident		GENERIC-$Revision: 1.90 $
 
 # estimated number of users
 maxusers	32
@@ -117,8 +117,8 @@
 options 	COMPAT_20	# NetBSD 2.0 compatibility.
 options 	COMPAT_30	# NetBSD 3.0 compatibility.
 options 	COMPAT_40	# NetBSD 4.0 compatibility.
-options 	COMPAT_43	# 4.3BSD compatibility.
 options 	COMPAT_50	# NetBSD 5.0 compatibility.
+options 	COMPAT_43	# 4.3BSD compatibility.
 options 	COMPAT_LINUX	# Linux compatibility.
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.



CVS commit: src/sys/arch/amd64/conf

2010-06-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Jun  2 18:05:28 UTC 2010

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Remove orphaned heading Mice


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/sys/arch/amd64/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.280 src/sys/arch/amd64/conf/GENERIC:1.281
--- src/sys/arch/amd64/conf/GENERIC:1.280	Wed Jun  2 18:02:57 2010
+++ src/sys/arch/amd64/conf/GENERIC	Wed Jun  2 18:05:28 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.280 2010/06/02 18:02:57 dholland Exp $
+# $NetBSD: GENERIC,v 1.281 2010/06/02 18:05:28 dholland Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.280 $
+#ident 		GENERIC-$Revision: 1.281 $
 
 maxusers	64		# estimated number of users
 
@@ -1066,8 +1066,6 @@
 ld*at sdmmc?
 
 
-# Mice
-
 # Middle Digital, Inc. PCI-Weasel serial console board control
 # devices (watchdog timer, etc.)
 weasel* at pci?



CVS commit: src/lib/librumpuser

2010-06-02 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jun  2 18:15:35 UTC 2010

Modified Files:
src/lib/librumpuser: rumpuser.c

Log Message:
Check return value of posix_memalign ... always helpful to not return
garbage memory in case of failure.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/librumpuser/rumpuser.c

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

Modified files:

Index: src/lib/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.5 src/lib/librumpuser/rumpuser.c:1.6
--- src/lib/librumpuser/rumpuser.c:1.5	Tue Jun  1 20:11:33 2010
+++ src/lib/librumpuser/rumpuser.c	Wed Jun  2 18:15:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.c,v 1.5 2010/06/01 20:11:33 pooka Exp $	*/
+/*	$NetBSD: rumpuser.c,v 1.6 2010/06/02 18:15:35 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser.c,v 1.5 2010/06/01 20:11:33 pooka Exp $);
+__RCSID($NetBSD: rumpuser.c,v 1.6 2010/06/02 18:15:35 pooka Exp $);
 #endif /* !lint */
 
 /* thank the maker for this */
@@ -196,11 +196,20 @@
 rumpuser_malloc(size_t howmuch, int alignment)
 {
 	void *mem;
+	int rv;
 
 	if (alignment == 0)
 		alignment = sizeof(void *);
 
-	posix_memalign(mem, alignment, howmuch);
+	rv = posix_memalign(mem, alignment, howmuch);
+	if (__predict_false(rv != 0)) {
+		if (rv == EINVAL) {
+			printf(rumpuser_malloc: invalid alignment %d\n,
+			alignment);
+			abort();
+		}
+		mem = NULL;
+	}
 
 	return mem;
 }



CVS commit: src/sys/dev/usb

2010-06-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Jun  2 18:53:40 UTC 2010

Modified Files:
src/sys/dev/usb: ehci.c ehcireg.h

Log Message:
Improve EHCI isochronous code, fix scheduling.

 - Create and use symbolic constants.

 - Convert some switch statements to functionally-similar caculations.

 - Correct scheduling interval of high-speed isochronous transactions.
   Previous calculation produced half the intended rate.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/ehcireg.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/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.167 src/sys/dev/usb/ehci.c:1.168
--- src/sys/dev/usb/ehci.c:1.167	Sat May 29 16:52:33 2010
+++ src/sys/dev/usb/ehci.c	Wed Jun  2 18:53:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.167 2010/05/29 16:52:33 jakllsch Exp $ */
+/*	$NetBSD: ehci.c,v 1.168 2010/06/02 18:53:39 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.167 2010/05/29 16:52:33 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.168 2010/06/02 18:53:39 jakllsch Exp $);
 
 #include ohci.h
 #include uhci.h
@@ -811,12 +811,12 @@
 		sizeof(itd-itd.itd_ctl), BUS_DMASYNC_POSTWRITE |
 		BUS_DMASYNC_POSTREAD);
 
-	for (i = 0; i  8; i++) {
+	for (i = 0; i  EHCI_ITD_NUFRAMES; i++) {
 		if (le32toh(itd-itd.itd_ctl[i])  EHCI_ITD_ACTIVE)
 			break;
 	}
 
-	if (i == 8) {
+	if (i == EHCI_ITD_NUFRAMES) {
 		goto done; /* All 8 descriptors inactive, it's done */
 	}
 
@@ -879,21 +879,15 @@
 		nframes = 0;
 		actlen = 0;
 
-		switch (xfer-pipe-endpoint-edesc-bInterval) {
-		case 0:
-			panic(ehci: isoc xfer suddenly has 0 bInterval, invalid\n);
-		case 1: uframes = 1; break;
-		case 2: uframes = 2; break;
-		case 3: uframes = 4; break;
-		default: uframes = 8; break;
-		}
+		i = xfer-pipe-endpoint-edesc-bInterval;
+		uframes = min(1  (i - 1), USB_UFRAMES_PER_FRAME);
 
 		for (itd = ex-itdstart; itd != NULL; itd = itd-xfer_next) {
 			usb_syncmem(itd-dma,itd-offs + offsetof(ehci_itd_t,itd_ctl),
 			sizeof(itd-itd.itd_ctl), BUS_DMASYNC_POSTWRITE |
 			BUS_DMASYNC_POSTREAD);
 
-			for (i = 0; i  8; i += uframes) {
+			for (i = 0; i  EHCI_ITD_NUFRAMES; i += uframes) {
 /* XXX - driver didn't fill in the frame full
  *   of uframes. This leads to scheduling
  *   inefficiencies, but working around
@@ -1483,7 +1477,7 @@
 
 	printf(ITD: next phys=%X\n, itd-itd.itd_next);
 
-	for (i = 0; i  8;i++) {
+	for (i = 0; i  EHCI_ITD_NUFRAMES; i++) {
 		t = le32toh(itd-itd.itd_ctl[i]);
 		printf(ITDctl %d: stat=%X len=%X ioc=%X pg=%X offs=%X\n, i,
 		EHCI_ITD_GET_STATUS(t), EHCI_ITD_GET_LEN(t),
@@ -1491,7 +1485,7 @@
 		EHCI_ITD_GET_OFFS(t));
 	}
 	printf(ITDbufr: );
-	for (i = 0; i  7; i++)
+	for (i = 0; i  EHCI_ITD_NBUFFERS; i++)
 		printf(%X,, EHCI_ITD_GET_BPTR(le32toh(itd-itd.itd_bufr[i])));
 
 	b = le32toh(itd-itd.itd_bufr[0]);
@@ -3857,22 +3851,9 @@
 		return USBD_INVAL;
 	}
 
-	switch (i) {
-	case 1:
-		ufrperframe = 8;
-		break;
-	case 2:
-		ufrperframe = 4;
-		break;
-	case 3:
-		ufrperframe = 2;
-		break;
-	default:
-		ufrperframe = 1;
-		break;
-	}
+	ufrperframe = max(1, USB_UFRAMES_PER_FRAME / (1  (i - 1)));
 	frames = (xfer-nframes + (ufrperframe - 1)) / ufrperframe;
-	uframes = 8 / ufrperframe;
+	uframes = USB_UFRAMES_PER_FRAME / ufrperframe;
 
 	if (frames == 0) {
 		DPRINTF((ehci_device_isoc_start: frames == 0\n));
@@ -3901,7 +3882,7 @@
 		/*
 		 * Step 1.5, initialize uframes
 		 */
-		for (j = 0; j  8; j += uframes) {
+		for (j = 0; j  EHCI_ITD_NUFRAMES; j += uframes) {
 			/* Calculate which page in the list this starts in */
 			int addr = DMAADDR(dma_buf, froffs);
 			addr = EHCI_PAGE_OFFSET(addr);
@@ -3935,7 +3916,7 @@
 		 * and what to not.
 		 */
 
-		for (j=0; j  7; j++) {
+		for (j = 0; j  EHCI_ITD_NBUFFERS; j++) {
 			/*
 			 * Don't try to lookup a page that's past the end
 			 * of buffer
@@ -4006,12 +3987,12 @@
 	if (frindex = sc-sc_flsize)
 		frindex = (sc-sc_flsize - 1);
 
-	/* Whats the frame interval? */
-	i = (1  epipe-pipe.endpoint-edesc-bInterval);
-	if (i / 8 == 0)
+	/* What's the frame interval? */
+	i = (1  (epipe-pipe.endpoint-edesc-bInterval - 1));
+	if (i / USB_UFRAMES_PER_FRAME == 0)
 		i = 1;
 	else
-		i /= 8;
+		i /= USB_UFRAMES_PER_FRAME;
 
 	itd = start;
 	for (j = 0; j  frames; j++) {

Index: src/sys/dev/usb/ehcireg.h
diff -u src/sys/dev/usb/ehcireg.h:1.30 src/sys/dev/usb/ehcireg.h:1.31
--- src/sys/dev/usb/ehcireg.h:1.30	Sat May 15 20:47:23 2010
+++ src/sys/dev/usb/ehcireg.h	Wed Jun  2 18:53:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehcireg.h,v 1.30 2010/05/15 20:47:23 jakllsch Exp $	*/
+/*	$NetBSD: ehcireg.h,v 1.31 2010/06/02 18:53:39 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD 

CVS commit: src/share/mk

2010-06-02 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Jun  2 19:40:12 UTC 2010

Modified Files:
src/share/mk: bsd.x11.mk

Log Message:
XORGVERSION should be a single quoted expression as it represents a
single argument for .TH


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/share/mk/bsd.x11.mk

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

Modified files:

Index: src/share/mk/bsd.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.82 src/share/mk/bsd.x11.mk:1.83
--- src/share/mk/bsd.x11.mk:1.82	Sun May 23 21:23:59 2010
+++ src/share/mk/bsd.x11.mk	Wed Jun  2 19:40:12 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.82 2010/05/23 21:23:59 veego Exp $
+#	$NetBSD: bsd.x11.mk,v 1.83 2010/06/02 19:40:12 joerg Exp $
 
 .include bsd.init.mk
 
@@ -370,7 +370,7 @@
 _X11MANTRANSFORM+= \
 	__vendorversion__	${X11VERSION:C/ /%/gW}
 .else
-XORGVERSION=	'X.Org 7.3nb20081014 X Version 11'
+XORGVERSION=	X Version 11
 X11MANCPP?=	no
 _X11MANTRANSFORM+= \
 	__vendorversion__	${XORGVERSION:C/ /%/gW} \



CVS commit: src/sys/net

2010-06-02 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Jun  2 23:41:14 UTC 2010

Modified Files:
src/sys/net: if.c

Log Message:
Prevent if_detach() from crashing while it walks the routing table
to find and unlink routes that reference the detached ifnet: make
if_rt_walktree() return ERESTART whenever it has deleted a route.
Whenever rt_walktree() returns ERESTART, if_detach() restarts it.

I believe that this fix resembles one by Jonathan Kollasch or by someone
else, which has languished in a PR for too long.  Sorry!

Tested by me and by Jeff Rizzo.

XXX It's supposed to be safe for rn_walktree() to apply to the routing
XXX table a routine that may delete routes.  Why isn't it safe in
XXX practice?


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.242 src/sys/net/if.c:1.243
--- src/sys/net/if.c:1.242	Thu Jan 28 14:12:11 2010
+++ src/sys/net/if.c	Wed Jun  2 23:41:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.242 2010/01/28 14:12:11 mbalmer Exp $	*/
+/*	$NetBSD: if.c,v 1.243 2010/06/02 23:41:14 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.242 2010/01/28 14:12:11 mbalmer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.243 2010/06/02 23:41:14 dyoung Exp $);
 
 #include opt_inet.h
 
@@ -792,8 +792,10 @@
 	if_free_sadl(ifp);
 
 	/* Walk the routing table looking for stragglers. */
-	for (i = 0; i = AF_MAX; i++)
-		(void)rt_walktree(i, if_rt_walktree, ifp);
+	for (i = 0; i = AF_MAX; i++) {
+		while (rt_walktree(i, if_rt_walktree, ifp) == ERESTART)
+			;
+	}
 
 	DOMAIN_FOREACH(dp) {
 		if (dp-dom_ifdetach != NULL  ifp-if_afdata[dp-dom_family])
@@ -904,7 +906,7 @@
 	if (error != 0)
 		printf(%s: warning: unable to delete rtentry @ %p, 
 		error = %d\n, ifp-if_xname, rt, error);
-	return 0;
+	return ERESTART;
 }
 
 /*



CVS commit: src/sys/dev/pci

2010-06-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun  3 00:05:36 UTC 2010

Modified Files:
src/sys/dev/pci: if_bge.c

Log Message:
Fix DMA setting for read/write on conventional PCI bus devices.
This bug was added in rev. 1.166. Sorry...


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/dev/pci/if_bge.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/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.184 src/sys/dev/pci/if_bge.c:1.185
--- src/sys/dev/pci/if_bge.c:1.184	Tue May 11 09:08:12 2010
+++ src/sys/dev/pci/if_bge.c	Thu Jun  3 00:05:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.184 2010/05/11 09:08:12 njoly Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.185 2010/06/03 00:05:36 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.184 2010/05/11 09:08:12 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.185 2010/06/03 00:05:36 msaitoh Exp $);
 
 #include vlan.h
 #include rnd.h
@@ -1842,7 +1842,7 @@
 		/* Conventional PCI bus: 256 bytes for read and write. */
 	  	DPRINTFN(4, ((%s: PCI 2.2 DMA setting)\n,
 		device_xname(sc-bge_dev)));
-		dma_rw_ctl = (0x7  BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
+		dma_rw_ctl |= (0x7  BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
 		   (0x7  BGE_PCIDMARWCTL_WR_WAT_SHIFT);
 		if (BGE_ASICREV(sc-bge_chipid) != BGE_ASICREV_BCM5705 
 		BGE_ASICREV(sc-bge_chipid) != BGE_ASICREV_BCM5750)



CVS commit: src/bin/sh

2010-06-02 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Jun  3 02:05:02 UTC 2010

Modified Files:
src/bin/sh: sh.1

Log Message:
Note that set -o tabcomplete requires either set -o emacs or set -o vi
to work.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/bin/sh/sh.1

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

Modified files:

Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.98 src/bin/sh/sh.1:1.99
--- src/bin/sh/sh.1:1.98	Mon Mar  1 21:53:58 2010
+++ src/bin/sh/sh.1	Thu Jun  3 02:05:02 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: sh.1,v 1.98 2010/03/01 21:53:58 joerg Exp $
+.\	$NetBSD: sh.1,v 1.99 2010/06/03 02:05:02 dholland Exp $
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
 .\
@@ -31,7 +31,7 @@
 .\
 .\	@(#)sh.1	8.6 (Berkeley) 5/4/95
 .\
-.Dd January 1, 2010
+.Dd June 2, 2010
 .Dt SH 1
 .Os
 .Sh NAME
@@ -310,6 +310,11 @@
 filename.
 If more than one filename matches it is only extended to be the common prefix.
 Typing a second tab character will list all the matching names.
+One of the editing modes, either
+.Fl E
+or
+.Fl V ,
+must be enabled for this to work.
 .El
 .Ss Lexical Structure
 The shell reads input in terms of lines from a file and breaks it up into