CVS commit: src/distrib/sets/lists/tests

2012-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Mar 24 07:03:13 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Mark ipf entries with ipfilter so that MKIPFILTER=no works.


To generate a diff of this commit:
cvs rdiff -u -r1.454 -r1.455 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.454 src/distrib/sets/lists/tests/mi:1.455
--- src/distrib/sets/lists/tests/mi:1.454	Fri Mar 23 23:59:50 2012
+++ src/distrib/sets/lists/tests/mi	Sat Mar 24 07:03:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.454 2012/03/23 23:59:50 christos Exp $
+# $NetBSD: mi,v 1.455 2012/03/24 07:03:12 matt Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1624,467 +1624,467 @@
 ./usr/tests/include/t_stdint			tests-include-tests	atf
 ./usr/tests/include/t_types			tests-obsolete		obsolete
 ./usr/tests/ipf	tests-ipf-tests
-./usr/tests/ipf/Atffiletests-ipf-tests
+./usr/tests/ipf/Atffiletests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected			tests-ipf-tests
-./usr/tests/ipf/expected/bpf-f1			tests-ipf-tests
-./usr/tests/ipf/expected/bpf1			tests-ipf-tests
-./usr/tests/ipf/expected/f1			tests-ipf-tests
-./usr/tests/ipf/expected/f10			tests-ipf-tests
-./usr/tests/ipf/expected/f11			tests-ipf-tests
-./usr/tests/ipf/expected/f12			tests-ipf-tests
-./usr/tests/ipf/expected/f13			tests-ipf-tests
-./usr/tests/ipf/expected/f14			tests-ipf-tests
-./usr/tests/ipf/expected/f15			tests-ipf-tests
-./usr/tests/ipf/expected/f16			tests-ipf-tests
-./usr/tests/ipf/expected/f17			tests-ipf-tests
-./usr/tests/ipf/expected/f18			tests-ipf-tests
-./usr/tests/ipf/expected/f19			tests-ipf-tests
-./usr/tests/ipf/expected/f2			tests-ipf-tests
-./usr/tests/ipf/expected/f20			tests-ipf-tests
-./usr/tests/ipf/expected/f21			tests-ipf-tests
-./usr/tests/ipf/expected/f22			tests-ipf-tests
-./usr/tests/ipf/expected/f24			tests-ipf-tests
-./usr/tests/ipf/expected/f25			tests-ipf-tests
-./usr/tests/ipf/expected/f26			tests-ipf-tests
-./usr/tests/ipf/expected/f27			tests-ipf-tests
-./usr/tests/ipf/expected/f28			tests-ipf-tests
-./usr/tests/ipf/expected/f29			tests-ipf-tests
-./usr/tests/ipf/expected/f3			tests-ipf-tests
-./usr/tests/ipf/expected/f30			tests-ipf-tests
-./usr/tests/ipf/expected/f4			tests-ipf-tests
-./usr/tests/ipf/expected/f5			tests-ipf-tests
-./usr/tests/ipf/expected/f6			tests-ipf-tests
-./usr/tests/ipf/expected/f7			tests-ipf-tests
-./usr/tests/ipf/expected/f8			tests-ipf-tests
-./usr/tests/ipf/expected/f9			tests-ipf-tests
-./usr/tests/ipf/expected/i1			tests-ipf-tests
-./usr/tests/ipf/expected/i10			tests-ipf-tests
-./usr/tests/ipf/expected/i11			tests-ipf-tests
-./usr/tests/ipf/expected/i12			tests-ipf-tests
-./usr/tests/ipf/expected/i13			tests-ipf-tests
-./usr/tests/ipf/expected/i14			tests-ipf-tests
-./usr/tests/ipf/expected/i15			tests-ipf-tests
-./usr/tests/ipf/expected/i16			tests-ipf-tests
-./usr/tests/ipf/expected/i17			tests-ipf-tests
-./usr/tests/ipf/expected/i18			tests-ipf-tests
-./usr/tests/ipf/expected/i19.dist		tests-ipf-tests
-./usr/tests/ipf/expected/i2			tests-ipf-tests
-./usr/tests/ipf/expected/i20			tests-ipf-tests
-./usr/tests/ipf/expected/i21			tests-ipf-tests
-./usr/tests/ipf/expected/i22			tests-ipf-tests
-./usr/tests/ipf/expected/i3			tests-ipf-tests
-./usr/tests/ipf/expected/i4			tests-ipf-tests
-./usr/tests/ipf/expected/i5			tests-ipf-tests
-./usr/tests/ipf/expected/i6			tests-ipf-tests
-./usr/tests/ipf/expected/i7			tests-ipf-tests
-./usr/tests/ipf/expected/i8			tests-ipf-tests
-./usr/tests/ipf/expected/i9			tests-ipf-tests
-./usr/tests/ipf/expected/in1			tests-ipf-tests
-./usr/tests/ipf/expected/in100			tests-ipf-tests
-./usr/tests/ipf/expected/in101			tests-ipf-tests
-./usr/tests/ipf/expected/in102			tests-ipf-tests
-./usr/tests/ipf/expected/in2			tests-ipf-tests
-./usr/tests/ipf/expected/in3			tests-ipf-tests
-./usr/tests/ipf/expected/in4			tests-ipf-tests
-./usr/tests/ipf/expected/in5			tests-ipf-tests
-./usr/tests/ipf/expected/in6			tests-ipf-tests
-./usr/tests/ipf/expected/ip1			tests-ipf-tests
-./usr/tests/ipf/expected/ip2			tests-ipf-tests
-./usr/tests/ipf/expected/ip3			tests-ipf-tests
-./usr/tests/ipf/expected/ipv6.1			tests-ipf-tests
-./usr/tests/ipf/expected/ipv6.2			tests-ipf-tests
-./usr/tests/ipf/expected/ipv6.3			tests-ipf-tests
-./usr/tests/ipf/expected/ipv6.4			tests-ipf-tests
-./usr/tests/ipf/expected/ipv6.5			tests-ipf-tests
-./usr/tests/ipf/expected/ipv6.6			tests-ipf-tests
-./usr/tests/ipf/expected/l1			tests-ipf-tests
-./usr/tests/ipf/expected/l1.b			tests-ipf-tests
-./usr/tests/ipf/expected/n1			tests-ipf-tests
-./usr/tests/ipf/expected/n10			tests-ipf-tests
-./usr/tests/ipf/expected/n100			tests-ipf-tests
-./usr/tests/ipf/expected/n101			tests-ipf-tests
-./usr/tests/ipf/expected/n102			tests-ipf-tests

CVS commit: src/sbin/newfs_ext2fs

2012-03-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 24 08:22:24 UTC 2012

Modified Files:
src/sbin/newfs_ext2fs: Makefile mke2fs.c

Log Message:
Avoid non-literal format string. Raise WARNS to 4 and disable
sign warnings instead.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_ext2fs/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sbin/newfs_ext2fs/mke2fs.c

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

Modified files:

Index: src/sbin/newfs_ext2fs/Makefile
diff -u src/sbin/newfs_ext2fs/Makefile:1.3 src/sbin/newfs_ext2fs/Makefile:1.4
--- src/sbin/newfs_ext2fs/Makefile:1.3	Fri Jun  5 21:52:31 2009
+++ src/sbin/newfs_ext2fs/Makefile	Sat Mar 24 08:22:24 2012
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.3 2009/06/05 21:52:31 haad Exp $
+#	$NetBSD: Makefile,v 1.4 2012/03/24 08:22:24 joerg Exp $
 #	@(#)Makefile	8.2 (Berkeley) 3/27/94
 
-WARNS?=	3	# XXX: sign-compare issues
+WARNS?=	4
+
+CWARNFLAGS+=	-Wno-sign-compare
 
 .include bsd.own.mk
 

Index: src/sbin/newfs_ext2fs/mke2fs.c
diff -u src/sbin/newfs_ext2fs/mke2fs.c:1.15 src/sbin/newfs_ext2fs/mke2fs.c:1.16
--- src/sbin/newfs_ext2fs/mke2fs.c:1.15	Tue Mar  6 15:39:41 2012
+++ src/sbin/newfs_ext2fs/mke2fs.c	Sat Mar 24 08:22:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mke2fs.c,v 1.15 2012/03/06 15:39:41 tsutsui Exp $	*/
+/*	$NetBSD: mke2fs.c,v 1.16 2012/03/24 08:22:24 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2007 Izumi Tsutsui.  All rights reserved.
@@ -100,7 +100,7 @@
 #if 0
 static char sccsid[] = @(#)mkfs.c	8.11 (Berkeley) 5/3/95;
 #else
-__RCSID($NetBSD: mke2fs.c,v 1.15 2012/03/06 15:39:41 tsutsui Exp $);
+__RCSID($NetBSD: mke2fs.c,v 1.16 2012/03/24 08:22:24 joerg Exp $);
 #endif
 #endif /* not lint */
 
@@ -626,7 +626,7 @@ mke2fs(const char *fsys, int fi, int fo)
 			continue;
 		}
 		/* Print superblock numbers */
-		len = printf( %* PRIu64 , + !col, fld_width,
+		len = printf(%s%* PRIu64 ,, (col ?   : ), fld_width,
 		(uint64_t)cgbase(sblock, cylno));
 		col += len;
 		if (col + len  max_cols)



CVS commit: [netbsd-6] src

2012-03-24 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Mar 24 16:55:31 UTC 2012

Modified Files:
src/distrib/sparc/bootfs [netbsd-6]: Makefile
src/etc/etc.sparc [netbsd-6]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by martin in ticket #139):
distrib/sparc/bootfs/Makefile: revision 1.40
etc/etc.sparc/Makefile.inc: revision 1.43
Disable generation of boot floppy images for sparc, which do not fit on
floppy disks anymore, to unbreak the build (for now).
If someone feels like adding and testing ustarfs support in the floppy
/boot, please reenable again.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.58.1 src/distrib/sparc/bootfs/Makefile
cvs rdiff -u -r1.42 -r1.42.2.1 src/etc/etc.sparc/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/distrib/sparc/bootfs/Makefile
diff -u src/distrib/sparc/bootfs/Makefile:1.39 src/distrib/sparc/bootfs/Makefile:1.39.58.1
--- src/distrib/sparc/bootfs/Makefile:1.39	Thu Jul 10 10:34:14 2003
+++ src/distrib/sparc/bootfs/Makefile	Sat Mar 24 16:55:30 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.39 2003/07/10 10:34:14 lukem Exp $
+#	$NetBSD: Makefile,v 1.39.58.1 2012/03/24 16:55:30 bouyer Exp $
 #
 # boot.fs is the image for disk 1 of the two-set floppy based installation
 # method.
@@ -13,7 +13,7 @@
 .include bsd.kernobj.mk
 
 IMAGE=		boot.fs
-IMAGESIZE=	1440k
+IMAGESIZE=	2880k
 LISTS=		${.CURDIR}/list
 MTREECONF=	${DISTRIBDIR}/common/mtree.dot
 IMAGEENDIAN=	be
@@ -44,14 +44,6 @@ create-aout=\
 
 CLEANFILES+=	netbsd.ram.aout.raw
 
-
-FD?=		fd0
-FD_RDEV=	/dev/r${FD}a
-
-real-floppy:
-	dd if=${IMAGE} of=${FD_RDEV} bs=32k
-
-
 .include ${DISTRIBDIR}/common/Makefile.image
 .include ${DISTRIBDIR}/common/Makefile.mdset
 

Index: src/etc/etc.sparc/Makefile.inc
diff -u src/etc/etc.sparc/Makefile.inc:1.42 src/etc/etc.sparc/Makefile.inc:1.42.2.1
--- src/etc/etc.sparc/Makefile.inc:1.42	Sun Jan 15 17:36:55 2012
+++ src/etc/etc.sparc/Makefile.inc	Sat Mar 24 16:55:31 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.42 2012/01/15 17:36:55 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.42.2.1 2012/03/24 16:55:31 bouyer Exp $
 #
 #	etc.sparc/Makefile.inc -- sparc-specific etc Makefile targets
 #
@@ -14,18 +14,24 @@ BUILD_KERNELS=		INSTALL
 MD_INSTALLATION_DIRS=	installation/miniroot	\
 			installation/netboot	\
 			installation/bootfs	\
-			installation/tape	\
-			installation/floppy
+			installation/tape
+
+# XXX floppy overflows, see below (add to above list to re-enable)
+#			installation/floppy
+
 INSTALLATION_DIRS+=	${MD_INSTALLATION_DIRS}
 
 
 INSTALLATION_SYMLINKS=	\
 		tape/tapefile1.gz	../bootfs/netbsd.ram.aout.gz	\
 		tape/tapefile2		../bootfs/instfs.tgz		\
-		floppy/disk1.gz		../bootfs/boot.fs.gz		\
-		floppy/disk2		../bootfs/instfs.tgz		\
 		netboot/rootfs.tgz	../bootfs/instfs.tgz
 
+# XXX - floppy overflows on boot.fs.gz - so disabled for now,
+# add the following to above list to re-enable
+#		floppy/disk1.gz		../bootfs/boot.fs.gz
+#		floppy/disk2		../bootfs/instfs.tgz
+
 #
 # Install miniroot images and auxiliary scripts to the release tree
 #



CVS commit: src/sys/arch/powerpc/powerpc

2012-03-24 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Mar 24 17:52:35 UTC 2012

Modified Files:
src/sys/arch/powerpc/powerpc: vm_machdep.c

Log Message:
When a stack is specified, make sure the stack has enough for a previous
callframe in which the LR can be stored.  (atf test t_clone:clone_basic
now passes).


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/powerpc/powerpc/vm_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/powerpc/powerpc/vm_machdep.c
diff -u src/sys/arch/powerpc/powerpc/vm_machdep.c:1.95 src/sys/arch/powerpc/powerpc/vm_machdep.c:1.96
--- src/sys/arch/powerpc/powerpc/vm_machdep.c:1.95	Sun Feb 19 21:06:25 2012
+++ src/sys/arch/powerpc/powerpc/vm_machdep.c	Sat Mar 24 17:52:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.95 2012/02/19 21:06:25 rmind Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.96 2012/03/24 17:52:35 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.95 2012/02/19 21:06:25 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.96 2012/03/24 17:52:35 matt Exp $);
 
 #include opt_altivec.h
 #include opt_multiprocessor.h
@@ -108,10 +108,13 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 	*l2-l_md.md_utf = *l1-l_md.md_utf;
 
 	/*
-	 * If specified, give the child a different stack.
+	 * If specified, give the child a different stack.  Make sure to
+	 * reserve enough at the top to store the previous LR.
 	 */
 	if (stack != NULL) {
-		l2-l_md.md_utf-tf_fixreg[1] = (register_t)stack + stacksize;
+		l2-l_md.md_utf-tf_fixreg[1] =	
+		((register_t)stack + stacksize - STACK_ALIGNBYTES)
+			 ~STACK_ALIGNBYTES;
 	}
 
 	/*



CVS commit: src/external/bsd/ipf/bin

2012-03-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Mar 24 18:27:16 UTC 2012

Modified Files:
src/external/bsd/ipf/bin: Makefile.inc

Log Message:
Set BINDIR to get binaries installed in the correct directory.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/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/external/bsd/ipf/bin/Makefile.inc
diff -u src/external/bsd/ipf/bin/Makefile.inc:1.1 src/external/bsd/ipf/bin/Makefile.inc:1.2
--- src/external/bsd/ipf/bin/Makefile.inc:1.1	Fri Mar 23 21:29:44 2012
+++ src/external/bsd/ipf/bin/Makefile.inc	Sat Mar 24 18:27:16 2012
@@ -1,2 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2012/03/23 21:29:44 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2012/03/24 18:27:16 tron Exp $
 .include ../Makefile.inc
+
+BINDIR?=	/usr/sbin



CVS commit: src/distrib/sets/lists/tests

2012-03-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Mar 24 18:27:53 UTC 2012

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Update entries for IPFilter regression tests.


To generate a diff of this commit:
cvs rdiff -u -r1.455 -r1.456 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.455 src/distrib/sets/lists/tests/mi:1.456
--- src/distrib/sets/lists/tests/mi:1.455	Sat Mar 24 07:03:12 2012
+++ src/distrib/sets/lists/tests/mi	Sat Mar 24 18:27:53 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.455 2012/03/24 07:03:12 matt Exp $
+# $NetBSD: mi,v 1.456 2012/03/24 18:27:53 tron Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1672,6 +1672,7 @@
 ./usr/tests/ipf/expected/i20			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/i21			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/i22			tests-ipf-tests		ipfilter
+./usr/tests/ipf/expected/i23			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/i3			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/i4			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/i5			tests-ipf-tests		ipfilter
@@ -1688,6 +1689,7 @@
 ./usr/tests/ipf/expected/in4			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/in5			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/in6			tests-ipf-tests		ipfilter
+./usr/tests/ipf/expected/in7			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/ip1			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/ip2			tests-ipf-tests		ipfilter
 ./usr/tests/ipf/expected/ip3			tests-ipf-tests		ipfilter
@@ -2026,7 +2028,9 @@
 ./usr/tests/ipf/regress/ni15.nat		tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/ni16.ipf		tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/ni16.nat		tests-ipf-tests		ipfilter
+./usr/tests/ipf/regress/ni17.ipf		tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/ni17.nat		tests-ipf-tests		ipfilter
+./usr/tests/ipf/regress/ni18.ipf		tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/ni18.nat		tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/ni19.ipf		tests-ipf-tests		ipfilter
 ./usr/tests/ipf/regress/ni19.nat		tests-ipf-tests		ipfilter



CVS commit: src/doc

2012-03-24 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Mar 24 19:04:06 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
mdocml-1.12.1 out.


To generate a diff of this commit:
cvs rdiff -u -r1.923 -r1.924 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.923 src/doc/3RDPARTY:1.924
--- src/doc/3RDPARTY:1.923	Fri Mar 23 21:34:17 2012
+++ src/doc/3RDPARTY	Sat Mar 24 19:04:05 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.923 2012/03/23 21:34:17 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.924 2012/03/24 19:04:05 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -677,7 +677,7 @@ Notes:
 
 Package:	mdocml
 Version:	1.12.0
-Current Vers:	1.12.0
+Current Vers:	1.12.1
 Maintainer:	Kristaps Džonsons
 Archive Site:	http://mdocml.bsd.lv/snapshots/
 Home Page:	http://mdocml.bsd.lv/



CVS commit: src/lib/libedit

2012-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 24 20:08:44 UTC 2012

Modified Files:
src/lib/libedit: common.c

Log Message:
From Jilles Tjoelker:
Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the Delete key.
Behaviour in vi mode is unchanged (for 'x').


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libedit/common.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/libedit/common.c
diff -u src/lib/libedit/common.c:1.28 src/lib/libedit/common.c:1.29
--- src/lib/libedit/common.c:1.28	Fri Jul 29 16:58:07 2011
+++ src/lib/libedit/common.c	Sat Mar 24 16:08:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $	*/
+/*	$NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)common.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $);
+__RCSID($NetBSD: common.c,v 1.29 2012/03/24 20:08:43 christos Exp $);
 #endif
 #endif /* not lint  not SCCSID */
 
@@ -165,15 +165,12 @@ ed_delete_next_char(EditLine *el, Int c 
 return CC_ERROR;
 #endif
 			}
-		} else {
-			if (el-el_line.cursor != el-el_line.buffer)
-el-el_line.cursor--;
-			else
+		} else
 return CC_ERROR;
-		}
 	}
 	c_delafter(el, el-el_state.argument);	/* delete after dot */
-	if (el-el_line.cursor = el-el_line.lastchar 
+	if (el-el_map.type == MAP_VI 
+	el-el_line.cursor = el-el_line.lastchar 
 	el-el_line.cursor  el-el_line.buffer)
 			/* bounds check */
 		el-el_line.cursor = el-el_line.lastchar - 1;



CVS commit: src/usr.bin/make

2012-03-24 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sat Mar 24 20:28:42 UTC 2012

Modified Files:
src/usr.bin/make: parse.c

Log Message:
Avoid the need to escape the # in :[#] when parsing conditionals.


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/usr.bin/make/parse.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/make/parse.c
diff -u src/usr.bin/make/parse.c:1.180 src/usr.bin/make/parse.c:1.181
--- src/usr.bin/make/parse.c:1.180	Sun Nov  6 19:46:56 2011
+++ src/usr.bin/make/parse.c	Sat Mar 24 20:28:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.180 2011/11/06 19:46:56 christos Exp $	*/
+/*	$NetBSD: parse.c,v 1.181 2012/03/24 20:28:41 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: parse.c,v 1.180 2011/11/06 19:46:56 christos Exp $;
+static char rcsid[] = $NetBSD: parse.c,v 1.181 2012/03/24 20:28:41 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)parse.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: parse.c,v 1.180 2011/11/06 19:46:56 christos Exp $);
+__RCSID($NetBSD: parse.c,v 1.181 2012/03/24 20:28:41 sjg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -2524,7 +2524,9 @@ ParseGetLine(int flags, int *length)
 	}
 	if (ch == '#'  comment == NULL) {
 		/* Remember first '#' for comment stripping */
-		comment = line_end;
+		/* Unless previous char was '[', as in modifier :[#] */
+		if (!(ptr  line  ptr[-1] == '['))
+		comment = line_end;
 	}
 	ptr++;
 	if (ch == '\n')



CVS commit: src/usr.bin/fstat

2012-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 24 21:51:23 UTC 2012

Modified Files:
src/usr.bin/fstat: fstat.c

Log Message:
byte swap the inet6 ports.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/fstat/fstat.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/fstat/fstat.c
diff -u src/usr.bin/fstat/fstat.c:1.95 src/usr.bin/fstat/fstat.c:1.96
--- src/usr.bin/fstat/fstat.c:1.95	Sun Oct  9 17:16:00 2011
+++ src/usr.bin/fstat/fstat.c	Sat Mar 24 17:51:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstat.c,v 1.95 2011/10/09 21:16:00 chs Exp $	*/
+/*	$NetBSD: fstat.c,v 1.96 2012/03/24 21:51:23 christos Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)fstat.c	8.3 (Berkeley) 5/2/95;
 #else
-__RCSID($NetBSD: fstat.c,v 1.95 2011/10/09 21:16:00 chs Exp $);
+__RCSID($NetBSD: fstat.c,v 1.96 2012/03/24 21:51:23 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -974,9 +974,9 @@ socktrans(struct socket *sock, int i)
 goto bad;
 			}
 			inet6_addrstr(lbuf, sizeof(lbuf), in6pcb.in6p_laddr,
-			in6pcb.in6p_lport);
+			ntohs(in6pcb.in6p_lport));
 			inet6_addrstr(fbuf, sizeof(fbuf), in6pcb.in6p_faddr,
-			in6pcb.in6p_fport);
+			ntohs(in6pcb.in6p_fport));
 			break;
 		default:
 			break;



CVS commit: src/doc

2012-03-24 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Mar 25 00:16:30 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Mention about urtwn(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1687 -r1.1688 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1687 src/doc/CHANGES:1.1688
--- src/doc/CHANGES:1.1687	Fri Mar 23 21:34:17 2012
+++ src/doc/CHANGES	Sun Mar 25 00:16:30 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1687 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1688 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -34,3 +34,6 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	dhcpcd(8): Import dhcpcd-5.5.5 [roy 20120323]
 	ipf: upgrade to 5.1.1 with new build framework, no module and
 		test support yet [christos 20120323]
+	urtwn(4): Add a driver for Realtek RTL8188CU/RTL8192CU USB IEEE
+	  802.11b/g/n wireless network device, ported from OpenBSD.
+	  [nonaka 20120325]



CVS commit: src/sys/arch/sparc64/sparc64

2012-03-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar 25 01:41:04 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64: trap.c

Log Message:
print %i7 for data faults


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/sparc64/sparc64/trap.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/sparc64/sparc64/trap.c
diff -u src/sys/arch/sparc64/sparc64/trap.c:1.171 src/sys/arch/sparc64/sparc64/trap.c:1.172
--- src/sys/arch/sparc64/sparc64/trap.c:1.171	Sat Mar 17 23:47:13 2012
+++ src/sys/arch/sparc64/sparc64/trap.c	Sun Mar 25 01:41:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.171 2012/03/17 23:47:13 mrg Exp $ */
+/*	$NetBSD: trap.c,v 1.172 2012/03/25 01:41:03 mrg Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.171 2012/03/17 23:47:13 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.172 2012/03/25 01:41:03 mrg Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -1158,8 +1158,8 @@ kfault:
 /* Disable traptrace for printf */
 trap_trace_dis = 1;
 (void) splhigh();
-printf(cpu%d: data fault: pc=%lx addr=%lx\n,
-cpu_number(), pc, addr);
+printf(cpu%d: data fault: pc=%lx rpc=%lx addr=%lx\n,
+cpu_number(), pc, tf-tf_in[7], addr);
 DEBUGGER(type, tf);
 panic(kernel fault);
 /* NOTREACHED */



CVS commit: src/sys/conf

2012-03-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Mar 25 01:56:02 UTC 2012

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Don't print blank lines when !CTFCONVERT.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/conf/Makefile.kern.inc

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/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.153 src/sys/conf/Makefile.kern.inc:1.154
--- src/sys/conf/Makefile.kern.inc:1.153	Mon Mar 19 05:38:26 2012
+++ src/sys/conf/Makefile.kern.inc	Sun Mar 25 01:56:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.153 2012/03/19 05:38:26 bsh Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.154 2012/03/25 01:56:02 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -136,7 +136,7 @@ COMPILE_CTFCONVERT=	${_MKSHECHO}\
 			${CTFCONVERT} ${CTFFLAGS} ${.TARGET}  \
 			${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
 .else
-COMPILE_CTFCONVERT=	${_MKSHECHO}
+COMPILE_CTFCONVERT=
 .endif
 
 # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or



CVS commit: src/sys/arch/sparc64/sparc64

2012-03-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar 25 02:31:00 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64: pmap.c

Log Message:
reduce the #ifdef DEBUG usage by using the optimiser.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/sys/arch/sparc64/sparc64/pmap.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/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.277 src/sys/arch/sparc64/sparc64/pmap.c:1.278
--- src/sys/arch/sparc64/sparc64/pmap.c:1.277	Sun Mar 18 23:48:00 2012
+++ src/sys/arch/sparc64/sparc64/pmap.c	Sun Mar 25 02:31:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.277 2012/03/18 23:48:00 mrg Exp $	*/
+/*	$NetBSD: pmap.c,v 1.278 2012/03/25 02:31:00 mrg Exp $	*/
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.277 2012/03/18 23:48:00 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.278 2012/03/25 02:31:00 mrg Exp $);
 
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define	HWREF
@@ -260,7 +260,34 @@ tsb_invalidate(vaddr_t va, pmap_t pm)
 struct prom_map *prom_map;
 int prom_map_size;
 
-#ifdef DEBUG
+#define	PDB_CREATE		0x01
+#define	PDB_DESTROY		0x02
+#define	PDB_REMOVE		0x04
+#define	PDB_CHANGEPROT		0x08
+#define	PDB_ENTER		0x10
+#define	PDB_DEMAP		0x20	/* used in locore */
+#define	PDB_REF			0x40
+#define	PDB_COPY		0x80
+#define	PDB_MMU_ALLOC		0x000100
+#define	PDB_MMU_STEAL		0x000200
+#define	PDB_CTX_ALLOC		0x000400
+#define	PDB_CTX_STEAL		0x000800
+#define	PDB_MMUREG_ALLOC	0x001000
+#define	PDB_MMUREG_STEAL	0x002000
+#define	PDB_CACHESTUFF		0x004000
+#define	PDB_ALIAS		0x008000
+#define PDB_EXTRACT		0x01
+#define	PDB_BOOT		0x02
+#define	PDB_BOOT1		0x04
+#define	PDB_GROW		0x08
+#define	PDB_CTX_FLUSHALL	0x10
+#define	PDB_ACTIVATE		0x20
+
+#if defined(DEBUG)  !defined(PMAP_DEBUG)
+#define PMAP_DEBUG
+#endif
+
+#ifdef PMAP_DEBUG
 struct {
 	int kernel;	/* entering kernel mapping */
 	int user;	/* entering user mapping */
@@ -288,28 +315,8 @@ struct {
 #define	ENTER_STAT(x)	do { enter_stats.x ++; } while (0)
 #define	REMOVE_STAT(x)	do { remove_stats.x ++; } while (0)
 
-#define	PDB_CREATE		0x01
-#define	PDB_DESTROY		0x02
-#define	PDB_REMOVE		0x04
-#define	PDB_CHANGEPROT		0x08
-#define	PDB_ENTER		0x10
-#define	PDB_DEMAP		0x20	/* used in locore */
-#define	PDB_REF			0x40
-#define	PDB_COPY		0x80
-#define	PDB_MMU_ALLOC		0x000100
-#define	PDB_MMU_STEAL		0x000200
-#define	PDB_CTX_ALLOC		0x000400
-#define	PDB_CTX_STEAL		0x000800
-#define	PDB_MMUREG_ALLOC	0x001000
-#define	PDB_MMUREG_STEAL	0x002000
-#define	PDB_CACHESTUFF		0x004000
-#define	PDB_ALIAS		0x008000
-#define PDB_EXTRACT		0x01
-#define	PDB_BOOT		0x02
-#define	PDB_BOOT1		0x04
-#define	PDB_GROW		0x08
-#define	PDB_CTX_FLUSHALL	0x10
 int	pmapdebug = 0;
+//int	pmapdebug = 0 | PDB_CTX_ALLOC | PDB_ACTIVATE;
 /* Number of H/W pages stolen for page tables */
 int	pmap_pages_stolen = 0;
 
@@ -320,6 +327,7 @@ int	pmap_pages_stolen = 0;
 #define	REMOVE_STAT(x)	do { /* nothing */ } while (0)
 #define	BDPRINTF(n, f)
 #define	DPRINTF(n, f)
+#define pmapdebug 0
 #endif
 
 #define pv_check()
@@ -420,10 +428,8 @@ static void pmap_enter_kpage(vaddr_t va,
 		BDPRINTF(PDB_BOOT1,
 			 (pseg_set: pm=%p va=%p data=%lx newp %lx\n,
 			  pmap_kernel(), va, (long)data, (long)newp));
-#ifdef DEBUG
 		if (pmapdebug  PDB_BOOT1)
 		{int i; for (i=0; i14000; i++) ;}
-#endif
 	}
 }
 
@@ -447,6 +453,8 @@ static void pmap_bootdebug(void)
 			break;
 		}
 }
+#else
+#define pmap_bootdebug()	/* nothing */
 #endif
 
 
@@ -711,10 +719,7 @@ pmap_bootstrap(u_long kernelstart, u_lon
 	/* Initialize bootstrap allocator. */
 	kdata_alloc_init(kernelend + 1 * 1024 * 1024, ekdata);
 
-#ifdef DEBUG
 	pmap_bootdebug();
-#endif
-
 	pmap_alloc_bootargs();
 	pmap_mp_init();
 
@@ -761,7 +766,6 @@ pmap_bootstrap(u_long kernelstart, u_lon
 	phys_installed = prom_memlist;
 	phys_installed_size = prom_memlist_size / sizeof(*phys_installed);
 
-#ifdef DEBUG
 	if (pmapdebug  PDB_BOOT1) {
 		/* print out mem list */
 		prom_printf(Installed physical memory:\n);
@@ -771,7 +775,6 @@ pmap_bootstrap(u_long kernelstart, u_lon
 	(u_long)phys_installed[i].size);
 		}
 	}
-#endif
 
 	BDPRINTF(PDB_BOOT1, (Calculating physmem:));
 	for (i = 0; i  phys_installed_size; i++)
@@ -797,7 +800,6 @@ pmap_bootstrap(u_long kernelstart, u_lon
 	prom_map = prom_memlist;
 	prom_map_size = prom_memlist_size / sizeof(struct prom_map);
 
-#ifdef DEBUG
 	if (pmapdebug  PDB_BOOT) {
 		/* print out mem list */
 		prom_printf(Prom xlations:\n);
@@ -809,7 +811,6 @@ pmap_bootstrap(u_long kernelstart, u_lon
 		}
 		prom_printf(End of prom xlations\n);
 	}
-#endif
 
 	/*
 	 * Here's a quick in-lined reverse bubble sort.  It gets rid of
@@ 

CVS commit: src/sys/arch/sparc64/dev

2012-03-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar 25 03:13:08 UTC 2012

Modified Files:
src/sys/arch/sparc64/dev: schizo.c schizoreg.h schizovar.h

Log Message:
- save the version# in the softc, we will want it later
- enable some more things in the schizo CSR:
- tomatillo: DMA arbitration enable:
- tomatillo: prefetch read multiple / one / line
- schizo: enable parking unless no-bus-parking is set
- schizo: enable streaming buffer interrupts
- schizo: enable bus arbitration for schizo, not these reseved
  bits for tomatillo

partly from and entirely inspired by freebsd schizo_attach().


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc64/dev/schizo.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/schizoreg.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc64/dev/schizovar.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/sparc64/dev/schizo.c
diff -u src/sys/arch/sparc64/dev/schizo.c:1.28 src/sys/arch/sparc64/dev/schizo.c:1.29
--- src/sys/arch/sparc64/dev/schizo.c:1.28	Sun Mar 18 05:26:58 2012
+++ src/sys/arch/sparc64/dev/schizo.c	Sun Mar 25 03:13:08 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: schizo.c,v 1.28 2012/03/18 05:26:58 mrg Exp $	*/
+/*	$NetBSD: schizo.c,v 1.29 2012/03/25 03:13:08 mrg Exp $	*/
 /*	$OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $	*/
 
 /*
  * Copyright (c) 2002 Jason L. Wright (ja...@thought.net)
  * Copyright (c) 2003 Henric Jungheim
- * Copyright (c) 2008, 2009, 2010 Matthew R. Green
+ * Copyright (c) 2008, 2009, 2010, 2012 Matthew R. Green
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: schizo.c,v 1.28 2012/03/18 05:26:58 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: schizo.c,v 1.29 2012/03/25 03:13:08 mrg Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -152,6 +152,9 @@ schizo_attach(struct device *parent, str
 	str = prom_getpropstring(ma-ma_node, compatible);
 	if (strcmp(str, pci108e,a801) == 0)
 		sc-sc_tomatillo = 1;
+
+	sc-sc_ver = prom_getpropint(sc-sc_node, version#, 0);
+
 	sc-sc_dev = self;
 	sc-sc_node = ma-ma_node;
 	sc-sc_dmat = ma-ma_dmatag;
@@ -204,9 +207,8 @@ schizo_attach(struct device *parent, str
 		panic(schizo: can't get bus-range);
 
 	aprint_normal(: \%s\, version %d, ign %x, bus %c %d to %d\n,
-	sc-sc_tomatillo ? Tomatillo : Schizo,
-	prom_getpropint(sc-sc_node, version#, 0), sc-sc_ign,
-	pbm-sp_bus_a ? 'A' : 'B', busranges[0], busranges[1]);
+	sc-sc_tomatillo ? Tomatillo : Schizo, sc-sc_ver,
+	sc-sc_ign, pbm-sp_bus_a ? 'A' : 'B', busranges[0], busranges[1]);
 	aprint_naive(\n);
 
 	if (bus_space_subregion(pbm-sp_regt, sc-sc_ctrlh,
@@ -280,8 +282,20 @@ schizo_attach(struct device *parent, str
 
 	reg = schizo_pbm_read(pbm, SCZ_PCI_CTRL);
 	/* enable/disable error interrupts and arbiter */
-	reg |= SCZ_PCICTRL_EEN | SCZ_PCICTRL_MMU_INT | SCZ_PCICTRL_ARB;
-	reg = ~SCZ_PCICTRL_SBH_INT;
+	reg |= SCZ_PCICTRL_EEN | SCZ_PCICTRL_MMU_INT;
+	if (sc-sc_tomatillo) {
+		reg = ~SCZ_PCICTRL_SBH_INT;
+		reg |= TOM_PCICTRL_ARB;
+		reg |= TOM_PCICTRL_PRM | TOM_PCICTRL_PRO |
+		   TOM_PCICTRL_PRL;
+		if (sc-sc_ver = 1)	/* 2.0 */
+			reg |= TOM_PCICTRL_DTO_INT;
+		else
+			reg |= SCZ_PCICTRL_PTO;
+	} else
+		reg |= SCZ_PCICTRL_SBH_INT | SCZ_PCICTRL_ARB;
+	if (OF_getproplen(sc-sc_node, no-bus-parking)  0)
+		reg |= SCZ_PCICTRL_PARK;
 	schizo_pbm_write(pbm, SCZ_PCI_CTRL, reg);
 
 	reg = schizo_pbm_read(pbm, SCZ_PCI_DIAG);
@@ -315,7 +329,6 @@ schizo_attach(struct device *parent, str
 			  TOM_IOCACHE_CSR_PEN_RDM |
 			  TOM_IOCACHE_CSR_PEN_ONE |
 			  TOM_IOCACHE_CSR_PEN_LINE;
-
 		schizo_pbm_write(pbm, SCZ_PCI_IOCACHE_CSR, iocache_csr);
 	}
 
@@ -547,22 +560,19 @@ schizo_set_intr(struct schizo_softc *sc,
 bus_space_tag_t
 schizo_alloc_mem_tag(struct schizo_pbm *sp)
 {
-	return (schizo_alloc_bus_tag(sp, mem,
-	PCI_MEMORY_BUS_SPACE));
+	return (schizo_alloc_bus_tag(sp, mem, PCI_MEMORY_BUS_SPACE));
 }
 
 bus_space_tag_t
 schizo_alloc_io_tag(struct schizo_pbm *sp)
 {
-	return (schizo_alloc_bus_tag(sp, io,
-	PCI_IO_BUS_SPACE));
+	return (schizo_alloc_bus_tag(sp, io, PCI_IO_BUS_SPACE));
 }
 
 bus_space_tag_t
 schizo_alloc_config_tag(struct schizo_pbm *sp)
 {
-	return (schizo_alloc_bus_tag(sp, cfg,
-	PCI_CONFIG_BUS_SPACE));
+	return (schizo_alloc_bus_tag(sp, cfg, PCI_CONFIG_BUS_SPACE));
 }
 
 bus_space_tag_t

Index: src/sys/arch/sparc64/dev/schizoreg.h
diff -u src/sys/arch/sparc64/dev/schizoreg.h:1.8 src/sys/arch/sparc64/dev/schizoreg.h:1.9
--- src/sys/arch/sparc64/dev/schizoreg.h:1.8	Sun Mar 20 20:43:34 2011
+++ src/sys/arch/sparc64/dev/schizoreg.h	Sun Mar 25 03:13:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: schizoreg.h,v 1.8 2011/03/20 20:43:34 mrg Exp $	*/
+/*	$NetBSD: schizoreg.h,v 1.9 2012/03/25 03:13:08 mrg 

CVS commit: src/sys/arch/sparc64/dev

2012-03-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Mar 25 03:51:33 UTC 2012

Modified Files:
src/sys/arch/sparc64/dev: iommu.c iommuvar.h

Log Message:
replace splhigh() usage with an IPL_HIGH mutex.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/sparc64/dev/iommu.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sparc64/dev/iommuvar.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/sparc64/dev/iommu.c
diff -u src/sys/arch/sparc64/dev/iommu.c:1.106 src/sys/arch/sparc64/dev/iommu.c:1.107
--- src/sys/arch/sparc64/dev/iommu.c:1.106	Fri Jan 27 18:53:03 2012
+++ src/sys/arch/sparc64/dev/iommu.c	Sun Mar 25 03:51:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iommu.c,v 1.106 2012/01/27 18:53:03 para Exp $	*/
+/*	$NetBSD: iommu.c,v 1.107 2012/03/25 03:51:33 mrg Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.106 2012/01/27 18:53:03 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: iommu.c,v 1.107 2012/03/25 03:51:33 mrg Exp $);
 
 #include opt_ddb.h
 
@@ -203,6 +203,8 @@ iommu_init(char *name, struct iommu_stat
 	0, 0, EX_NOWAIT);
 	/* XXXMRG Check is_dvmamap is valid. */
 
+	mutex_init(is-is_lock, MUTEX_DEFAULT, IPL_HIGH);
+
 	/*
 	 * Set the TSB size.  The relevant bits were moved to the TSB
 	 * base register in the PCIe host bridges.
@@ -456,7 +458,6 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_
 {
 	struct strbuf_ctl *sb = (struct strbuf_ctl *)map-_dm_cookie;
 	struct iommu_state *is = sb-sb_is;
-	int s;
 	int err, needsflush;
 	bus_size_t sgsize;
 	paddr_t curaddr;
@@ -503,11 +504,11 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_
 	 * split the transfer up int little pieces ourselves.
 	 */
 	KASSERT(is-is_dvmamap);
-	s = splhigh();
+	mutex_enter(is-is_lock);
 	err = extent_alloc(is-is_dvmamap, sgsize, align,
 	(sgsize  boundary) ? 0 : boundary,
 	EX_NOWAIT|EX_BOUNDZERO, dvmaddr);
-	splx(s);
+	mutex_exit(is-is_lock);
 
 #ifdef DEBUG
 	if (err || (dvmaddr == (u_long)-1)) {
@@ -555,12 +556,12 @@ iommu_dvmamap_load(bus_dma_tag_t t, bus_
 			/* Too many segments.  Fail the operation. */
 			DPRINTF(IDB_INFO, (iommu_dvmamap_load: 
 			too many segments %d\n, seg));
-			s = splhigh();
+			mutex_enter(is-is_lock);
 			err = extent_free(is-is_dvmamap,
 			dvmaddr, sgsize, EX_NOWAIT);
 			map-_dm_dvmastart = 0;
 			map-_dm_dvmasize = 0;
-			splx(s);
+			mutex_exit(is-is_lock);
 			if (err != 0)
 printf(warning: %s: % PRId64
  of DVMA space lost\n, __func__, sgsize);
@@ -647,7 +648,7 @@ iommu_dvmamap_unload(bus_dma_tag_t t, bu
 {
 	struct strbuf_ctl *sb = (struct strbuf_ctl *)map-_dm_cookie;
 	struct iommu_state *is = sb-sb_is;
-	int error, s;
+	int error;
 	bus_size_t sgsize = map-_dm_dvmasize;
 
 	/* Flush the iommu */
@@ -664,12 +665,12 @@ iommu_dvmamap_unload(bus_dma_tag_t t, bu
 	/* Flush the caches */
 	bus_dmamap_unload(t-_parent, map);
 
-	s = splhigh();
+	mutex_enter(is-is_lock);
 	error = extent_free(is-is_dvmamap, map-_dm_dvmastart,
 		map-_dm_dvmasize, EX_NOWAIT);
 	map-_dm_dvmastart = 0;
 	map-_dm_dvmasize = 0;
-	splx(s);
+	mutex_exit(is-is_lock);
 	if (error != 0)
 		printf(warning: %s: % PRId64  of DVMA space lost\n,
 		__func__, sgsize);
@@ -685,7 +686,7 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, 
 	struct strbuf_ctl *sb = (struct strbuf_ctl *)map-_dm_cookie;
 	struct iommu_state *is = sb-sb_is;
 	struct vm_page *pg;
-	int i, j, s;
+	int i, j;
 	int left;
 	int err, needsflush;
 	bus_size_t sgsize;
@@ -734,7 +735,7 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, 
 	}
 	sgsize = round_page(sgsize);
 
-	s = splhigh();
+	mutex_enter(is-is_lock);
 	/*
 	 * If our segment size is larger than the boundary we need to
 	 * split the transfer up into little pieces ourselves.
@@ -743,7 +744,7 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, 
 		(sgsize  boundary) ? 0 : boundary,
 		((flags  BUS_DMA_NOWAIT) == 0 ? EX_WAITOK : EX_NOWAIT) |
 		EX_BOUNDZERO, dvmaddr);
-	splx(s);
+	mutex_exit(is-is_lock);
 
 	if (err != 0)
 		return (err);
@@ -976,12 +977,12 @@ iommu_dvmamap_load_raw(bus_dma_tag_t t, 
 	return (0);
 
 fail:
-	s = splhigh();
+	mutex_enter(is-is_lock);
 	err = extent_free(is-is_dvmamap, map-_dm_dvmastart, sgsize,
 	EX_NOWAIT);
 	map-_dm_dvmastart = 0;
 	map-_dm_dvmasize = 0;
-	splx(s);
+	mutex_exit(is-is_lock);
 	if (err != 0)
 		printf(warning: %s: % PRId64  of DVMA space lost\n,
 		__func__, sgsize);

Index: src/sys/arch/sparc64/dev/iommuvar.h
diff -u src/sys/arch/sparc64/dev/iommuvar.h:1.20 src/sys/arch/sparc64/dev/iommuvar.h:1.21
--- src/sys/arch/sparc64/dev/iommuvar.h:1.20	Sun Mar 20 20:47:10 2011
+++ src/sys/arch/sparc64/dev/iommuvar.h	Sun Mar 25 03:51:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iommuvar.h,v 1.20 2011/03/20 20:47:10 mrg Exp $	*/
+/*	$NetBSD: iommuvar.h,v 1.21 2012/03/25 03:51:33 mrg Exp $	*/
 
 /*
  * Copyright (c) 1999 Matthew R. Green

CVS commit: src/tests/lib/librt

2012-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 25 04:11:42 UTC 2012

Modified Files:
src/tests/lib/librt: t_sched.c

Log Message:
use check_eq instead of require.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/librt/t_sched.c

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

Modified files:

Index: src/tests/lib/librt/t_sched.c
diff -u src/tests/lib/librt/t_sched.c:1.4 src/tests/lib/librt/t_sched.c:1.5
--- src/tests/lib/librt/t_sched.c:1.4	Sun Mar 18 03:14:08 2012
+++ src/tests/lib/librt/t_sched.c	Sun Mar 25 00:11:42 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sched.c,v 1.4 2012/03/18 07:14:08 jruoho Exp $ */
+/* $NetBSD: t_sched.c,v 1.5 2012/03/25 04:11:42 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_sched.c,v 1.4 2012/03/18 07:14:08 jruoho Exp $);
+__RCSID($NetBSD: t_sched.c,v 1.5 2012/03/25 04:11:42 christos Exp $);
 
 #include sched.h
 #include limits.h
@@ -57,7 +57,7 @@ ATF_TC_BODY(sched_getparam, tc)
 	ATF_REQUIRE(sched_getparam(0, s1) == 0);
 	ATF_REQUIRE(sched_getparam(p, s2) == 0);
 
-	ATF_REQUIRE(s1.sched_priority == s2.sched_priority);
+	ATF_CHECK_EQ(s1.sched_priority, s2.sched_priority);
 
 	/*
 	 * The behavior is undefined but should error
@@ -114,7 +114,7 @@ sched_priority_set(int pri, int pol)
 	/*
 	 * Test that the policy was changed.
 	 */
-	ATF_REQUIRE(sched_getscheduler(0) == pol);
+	ATF_CHECK_EQ(sched_getscheduler(0), pol);
 
 	/*
 	 * And that sched_getparam(3) returns the new priority.
@@ -122,7 +122,7 @@ sched_priority_set(int pri, int pol)
 	sched.sched_priority = -1;
 
 	ATF_REQUIRE(sched_getparam(0, sched) == 0);
-	ATF_REQUIRE(sched.sched_priority == pri);
+	ATF_CHECK_EQ(sched.sched_priority, pri);
 }
 
 ATF_TC(sched_setscheduler_1);



CVS commit: src/usr.bin/passwd

2012-03-24 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Mar 25 05:55:07 UTC 2012

Modified Files:
src/usr.bin/passwd: local_passwd.c yp_passwd.c

Log Message:
fix non-PAM build


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/passwd/local_passwd.c
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/passwd/yp_passwd.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/passwd/local_passwd.c
diff -u src/usr.bin/passwd/local_passwd.c:1.35 src/usr.bin/passwd/local_passwd.c:1.36
--- src/usr.bin/passwd/local_passwd.c:1.35	Wed Aug 31 16:24:58 2011
+++ src/usr.bin/passwd/local_passwd.c	Sun Mar 25 05:55:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: local_passwd.c,v 1.35 2011/08/31 16:24:58 plunky Exp $	*/
+/*	$NetBSD: local_passwd.c,v 1.36 2012/03/25 05:55:07 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from: @(#)local_passwd.c8.3 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: local_passwd.c,v 1.35 2011/08/31 16:24:58 plunky Exp $);
+__RCSID($NetBSD: local_passwd.c,v 1.36 2012/03/25 05:55:07 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -230,8 +230,7 @@ pwlocal_process(const char *username, in
 static int force_local;
 
 int
-local_init(progname)
-	const char *progname;
+local_init(const char *progname)
 {
 	force_local = 0;
 	return (0);
@@ -251,7 +250,7 @@ local_arg(char ch, const char *arg)
 }
 
 int
-local_arg_end()
+local_arg_end(void)
 {
 	if (force_local)
 		return(PW_USE_FORCE);
@@ -259,14 +258,13 @@ local_arg_end()
 }
 
 void
-local_end()
+local_end(void)
 {
 	/* NOOP */
 }
 
 int
-local_chpw(uname)
-	const char *uname;
+local_chpw(const char *uname)
 {
 	struct passwd *pw;
 	struct passwd old_pw;

Index: src/usr.bin/passwd/yp_passwd.c
diff -u src/usr.bin/passwd/yp_passwd.c:1.36 src/usr.bin/passwd/yp_passwd.c:1.37
--- src/usr.bin/passwd/yp_passwd.c:1.36	Fri Sep 16 15:39:27 2011
+++ src/usr.bin/passwd/yp_passwd.c	Sun Mar 25 05:55:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: yp_passwd.c,v 1.36 2011/09/16 15:39:27 joerg Exp $	*/
+/*	$NetBSD: yp_passwd.c,v 1.37 2012/03/25 05:55:07 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from:  @(#)local_passwd.c8.3 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: yp_passwd.c,v 1.36 2011/09/16 15:39:27 joerg Exp $);
+__RCSID($NetBSD: yp_passwd.c,v 1.37 2012/03/25 05:55:07 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -329,8 +329,7 @@ pwyp_process(const char *username, int a
 static	int yflag;
 
 int
-yp_init(progname)
-	const char *progname;
+yp_init(const char *progname)
 {
 	int yppwd;