CVS commit: src/tests/lib/libc/ieeefp

2011-01-03 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan  3 09:14:21 UTC 2011

Modified Files:
src/tests/lib/libc/ieeefp: t_except.c

Log Message:
remove another extraneous static


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/ieeefp/t_except.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/libc/ieeefp/t_except.c
diff -u src/tests/lib/libc/ieeefp/t_except.c:1.3 src/tests/lib/libc/ieeefp/t_except.c:1.4
--- src/tests/lib/libc/ieeefp/t_except.c:1.3	Mon Jan  3 09:10:54 2011
+++ src/tests/lib/libc/ieeefp/t_except.c	Mon Jan  3 09:14:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_except.c,v 1.3 2011/01/03 09:10:54 dholland Exp $	*/
+/*	$NetBSD: t_except.c,v 1.4 2011/01/03 09:14:21 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -194,7 +194,7 @@
 {
 	struct sigaction sa;
 	fp_except ex1, ex2;
-	static const struct ops *t;
+	const struct ops *t;
 
 	/* mask all exceptions, clear history */
 	fpsetmask(0);



CVS commit: src/tests/fs/vfs

2011-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan  3 09:35:33 UTC 2011

Modified Files:
src/tests/fs/vfs: t_io.c

Log Message:
Give this a chance of working on non-4kB pagesize.
from martin's sparc64 test run


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/vfs/t_io.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/fs/vfs/t_io.c
diff -u src/tests/fs/vfs/t_io.c:1.5 src/tests/fs/vfs/t_io.c:1.6
--- src/tests/fs/vfs/t_io.c:1.5	Sat Jan  1 20:43:01 2011
+++ src/tests/fs/vfs/t_io.c	Mon Jan  3 09:35:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_io.c,v 1.5 2011/01/01 20:43:01 pooka Exp $	*/
+/*	$NetBSD: t_io.c,v 1.6 2011/01/03 09:35:33 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 	RL(rump_sys_pwrite(fd, buf, 1, getpagesize()));
 
 	memset(buf, 'B', sizeof(buf));
-	RL(rump_sys_pwrite(fd, buf, 2, 0xfff));
+	RL(rump_sys_pwrite(fd, buf, 2, getpagesize()-1));
 
 	REQUIRE_LIBC(b2 = malloc(2 * getpagesize()), NULL);
 	REQUIRE_LIBC(b3 = malloc(2 * getpagesize()), NULL);



CVS commit: src/tests/dev/cgd

2011-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan  3 09:37:43 UTC 2011

Modified Files:
src/tests/dev/cgd: t_cgd.sh

Log Message:
make this work when rawpart != d


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/dev/cgd/t_cgd.sh

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

Modified files:

Index: src/tests/dev/cgd/t_cgd.sh
diff -u src/tests/dev/cgd/t_cgd.sh:1.4 src/tests/dev/cgd/t_cgd.sh:1.5
--- src/tests/dev/cgd/t_cgd.sh:1.4	Thu Dec 30 16:58:07 2010
+++ src/tests/dev/cgd/t_cgd.sh	Mon Jan  3 09:37:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_cgd.sh,v 1.4 2010/12/30 16:58:07 pooka Exp $
+#	$NetBSD: t_cgd.sh,v 1.5 2011/01/03 09:37:42 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -25,6 +25,8 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+rawpart=`sysctl -n kern.rawpartition | tr '01234' 'abcde'`
+rawcgd=/dev/rcgd0${rawpart}
 cgdserver=\
 rump_server -lrumpvfs -lrumpkern_crypto -lrumpdev -lrumpdev_disk -lrumpdev_cgd
 
@@ -45,10 +47,9 @@
 	export RUMP_SERVER=unix://csock
 	atf_check -s exit:0 sh -c echo 12345 | \
 	rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile
-	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=/dev/rcgd0d count=2
+	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=${rawcgd} count=2
 	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd of=testfile count=2
-	atf_check -s exit:0 -e ignore -o file:testfile \
-	dd rif=/dev/rcgd0d count=2
+	atf_check -s exit:0 -e ignore -o file:testfile dd rif=${rawcgd} count=2
 }
 
 basic_cleanup()
@@ -75,7 +76,7 @@
 	export RUMP_SERVER=unix://csock
 	atf_check -s exit:0 sh -c echo 12345 | \
 	rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile
-	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=/dev/rcgd0d count=2
+	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd rof=${rawcgd} count=2
 
 	# unconfig and reconfig cgd
 	atf_check -s exit:0 rump.cgdconfig -u cgd0
@@ -84,7 +85,7 @@
 
 	atf_check -s exit:0 -e ignore dd if=${d}/t_cgd of=testfile count=2
 	atf_check -s exit:0 -e ignore -o not-file:testfile \
-	dd rif=/dev/rcgd0d count=2
+	dd rif=${rawcgd} count=2
 }
 
 wrongpass_cleanup()



CVS commit: src/tests/dev/md

2011-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan  3 09:39:46 UTC 2011

Modified Files:
src/tests/dev/md: t_md.sh

Log Message:
use rawpart


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/dev/md/t_md.sh

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

Modified files:

Index: src/tests/dev/md/t_md.sh
diff -u src/tests/dev/md/t_md.sh:1.4 src/tests/dev/md/t_md.sh:1.5
--- src/tests/dev/md/t_md.sh:1.4	Sun Dec 12 12:49:59 2010
+++ src/tests/dev/md/t_md.sh	Mon Jan  3 09:39:46 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_md.sh,v 1.4 2010/12/12 12:49:59 pooka Exp $
+#	$NetBSD: t_md.sh,v 1.5 2011/01/03 09:39:46 pooka Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -25,6 +25,9 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+rawpart=`sysctl -n kern.rawpartition | tr '01234' 'abcde'`
+rawmd=/dev/rmd0${rawpart}
+
 atf_test_case basic cleanup
 basic_head()
 {
@@ -39,11 +42,11 @@
 	# but just let it slide for now, since they *should* be the same.
 	rawpart=`sysctl -n kern.rawpartition | tr '01234' 'abcde'`
 
-	atf_check -s exit:0 $(atf_get_srcdir)/h_mdserv /dev/rmd0${rawpart}
+	atf_check -s exit:0 $(atf_get_srcdir)/h_mdserv ${rawmd}
 
 	export RUMP_SERVER=unix://commsock
-	atf_check -s exit:0 -e ignore dd if=/bin/ls rof=/dev/rmd0d seek=100 count=10
-	atf_check -s exit:0 -e ignore dd of=testfile rif=/dev/rmd0d skip=100 count=10
+	atf_check -s exit:0 -e ignore dd if=/bin/ls rof=${rawmd} seek=100 count=10
+	atf_check -s exit:0 -e ignore dd of=testfile rif=${rawmd} skip=100 count=10
 	atf_check -s exit:0 -e ignore -o file:testfile dd if=/bin/ls count=10
 }
 



CVS commit: src/doc

2011-01-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Jan  3 11:35:04 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Document import of dhcpcd-5.2.10


To generate a diff of this commit:
cvs rdiff -u -r1.801 -r1.802 src/doc/3RDPARTY
cvs rdiff -u -r1.1482 -r1.1483 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/3RDPARTY
diff -u src/doc/3RDPARTY:1.801 src/doc/3RDPARTY:1.802
--- src/doc/3RDPARTY:1.801	Sat Jan  1 14:25:47 2011
+++ src/doc/3RDPARTY	Mon Jan  3 11:35:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.801 2011/01/01 14:25:47 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.802 2011/01/03 11:35:04 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -268,8 +268,8 @@
 top of the current tree.
 
 Package:	dhcpcd
-Version:	5.2.9
-Current Vers:	5.2.9
+Version:	5.2.10
+Current Vers:	5.2.10
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1482 src/doc/CHANGES:1.1483
--- src/doc/CHANGES:1.1482	Mon Dec 27 21:26:44 2010
+++ src/doc/CHANGES	Mon Jan  3 11:35:04 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1482 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1483 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -815,3 +815,4 @@
 	dm(4): Make LVM use non 512-byte sector devices. [mlelstv 20101223]
 	auvitek(4): Add a driver for Auvitek AU0828 family USB video
 		capture controllers. [jmcneill 20101227]
+	dhcpcd(8): Import dhcpcd-5.2.10. [roy 20110103]



CVS commit: src/usr.bin/rump_allserver

2011-01-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan  3 12:18:25 UTC 2011

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

Log Message:
Fix usage (8th bit begone!)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/rump_allserver/rump_allserver.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/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.12 src/usr.bin/rump_allserver/rump_allserver.c:1.13
--- src/usr.bin/rump_allserver/rump_allserver.c:1.12	Mon Jan  3 10:44:40 2011
+++ src/usr.bin/rump_allserver/rump_allserver.c	Mon Jan  3 12:18:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.12 2011/01/03 10:44:40 pooka Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.13 2011/01/03 12:18:25 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: rump_allserver.c,v 1.12 2011/01/03 10:44:40 pooka Exp $);
+__RCSID($NetBSD: rump_allserver.c,v 1.13 2011/01/03 12:18:25 wiz Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -51,7 +51,7 @@
 usage(void)
 {
 
-	fprintf(stderr, usage: %s [-s] [-c ncpu] [-d drivespec] [-l libs] 
+	fprintf(stderr, usage: %s [-s] [-c ncpu] [-d drivespec] [-l libs] 
 	[-m modules] bindurl\n, getprogname());
 	exit(1);
 }



CVS commit: src/sys/fs/udf

2011-01-03 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Jan  3 13:12:40 UTC 2011

Modified Files:
src/sys/fs/udf: udf_strat_sequential.c

Log Message:
destroy mutex/cv before freeing the struct holding them, fixes
LOCKDEBUG panic


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/fs/udf/udf_strat_sequential.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/fs/udf/udf_strat_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.10 src/sys/fs/udf/udf_strat_sequential.c:1.11
--- src/sys/fs/udf/udf_strat_sequential.c:1.10	Wed May 20 15:30:26 2009
+++ src/sys/fs/udf/udf_strat_sequential.c	Mon Jan  3 13:12:40 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.10 2009/05/20 15:30:26 reinoud Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.11 2011/01/03 13:12:40 drochner Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_strat_sequential.c,v 1.10 2009/05/20 15:30:26 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_strat_sequential.c,v 1.11 2011/01/03 13:12:40 drochner Exp $);
 #endif /* not lint */
 
 
@@ -671,6 +671,9 @@
 	/* destroy our pool */
 	pool_destroy(priv-desc_pool);
 
+	mutex_destroy(priv-discstrat_mutex);
+	cv_destroy(priv-discstrat_cv);
+
 	/* free our private space */
 	free(ump-strategy_private, M_UDFTEMP);
 	ump-strategy_private = NULL;



CVS commit: src/sys/kern

2011-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan  3 13:22:32 UTC 2011

Modified Files:
src/sys/kern: kern_synch.c

Log Message:
update comment


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/sys/kern/kern_synch.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/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.285 src/sys/kern/kern_synch.c:1.286
--- src/sys/kern/kern_synch.c:1.285	Sat Dec 18 01:13:36 2010
+++ src/sys/kern/kern_synch.c	Mon Jan  3 13:22:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.285 2010/12/18 01:13:36 rmind Exp $	*/
+/*	$NetBSD: kern_synch.c,v 1.286 2011/01/03 13:22:32 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_synch.c,v 1.285 2010/12/18 01:13:36 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_synch.c,v 1.286 2011/01/03 13:22:32 pooka Exp $);
 
 #include opt_kstack.h
 #include opt_perfctrs.h
@@ -978,8 +978,7 @@
 #endif /* KERN_SA */
 
 	/*
-	 * If the LWP was sleeping interruptably, then it's OK to start it
-	 * again.  If not, mark it as still sleeping.
+	 * If the LWP was sleeping, start it again.
 	 */
 	if (l-l_wchan != NULL) {
 		l-l_stat = LSSLEEP;



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

2011-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan  3 14:07:10 UTC 2011

Added Files:
src/distrib/sets/lists/tests: md.alpha md.i386 md.ia64 md.sparc
md.sparc64
Removed Files:
src/distrib/sets/lists/tests: ad.alpha ad.i386 ad.sparc ad.sparc64

Log Message:
Apparently, the ad.{MACHINE_ARCH} files are not processed when

${MACHINE} == ${MACHINE_ARCH}

So rename the files for affected ports accordingly.

This is confirmed to fix build breakage on port-i386 reported by
gson@ gson.org in private Email thread.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/distrib/sets/lists/tests/ad.alpha \
src/distrib/sets/lists/tests/ad.i386 \
src/distrib/sets/lists/tests/ad.sparc \
src/distrib/sets/lists/tests/ad.sparc64
cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/tests/md.alpha \
src/distrib/sets/lists/tests/md.i386 src/distrib/sets/lists/tests/md.ia64 \
src/distrib/sets/lists/tests/md.sparc \
src/distrib/sets/lists/tests/md.sparc64

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

Added files:

Index: src/distrib/sets/lists/tests/md.alpha
diff -u /dev/null src/distrib/sets/lists/tests/md.alpha:1.1
--- /dev/null	Mon Jan  3 14:07:10 2011
+++ src/distrib/sets/lists/tests/md.alpha	Mon Jan  3 14:07:10 2011
@@ -0,0 +1,11 @@
+# $NetBSD: md.alpha,v 1.1 2011/01/03 14:07:10 pgoyette Exp $
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_except.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_nan_inf.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_round.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_subnormal.debug		tests-lib-debug		debug,atf
+#
+./usr/tests/lib/libc/ieeefp/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_except		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_nan_inf		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_round		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_subnormal		tests-lib-tests		atf
Index: src/distrib/sets/lists/tests/md.i386
diff -u /dev/null src/distrib/sets/lists/tests/md.i386:1.1
--- /dev/null	Mon Jan  3 14:07:10 2011
+++ src/distrib/sets/lists/tests/md.i386	Mon Jan  3 14:07:10 2011
@@ -0,0 +1,11 @@
+# $NetBSD: md.i386,v 1.1 2011/01/03 14:07:10 pgoyette Exp $
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_except.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_nan_inf.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_round.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_subnormal.debug		tests-lib-debug		debug,atf
+#
+./usr/tests/lib/libc/ieeefp/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_except		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_nan_inf		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_round		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_subnormal		tests-lib-tests		atf
Index: src/distrib/sets/lists/tests/md.ia64
diff -u /dev/null src/distrib/sets/lists/tests/md.ia64:1.1
--- /dev/null	Mon Jan  3 14:07:10 2011
+++ src/distrib/sets/lists/tests/md.ia64	Mon Jan  3 14:07:10 2011
@@ -0,0 +1,11 @@
+# $NetBSD: md.ia64,v 1.1 2011/01/03 14:07:10 pgoyette Exp $
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_except.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_nan_inf.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_round.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_subnormal.debug		tests-lib-debug		debug,atf
+#
+./usr/tests/lib/libc/ieeefp/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_except		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_nan_inf		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_round		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_subnormal		tests-lib-tests		atf
Index: src/distrib/sets/lists/tests/md.sparc
diff -u /dev/null src/distrib/sets/lists/tests/md.sparc:1.1
--- /dev/null	Mon Jan  3 14:07:10 2011
+++ src/distrib/sets/lists/tests/md.sparc	Mon Jan  3 14:07:10 2011
@@ -0,0 +1,11 @@
+# $NetBSD: md.sparc,v 1.1 2011/01/03 14:07:10 pgoyette Exp $
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_except.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_nan_inf.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_round.debug		tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_subnormal.debug		tests-lib-debug		debug,atf
+#
+./usr/tests/lib/libc/ieeefp/Atffile		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_except		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_nan_inf		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_round		tests-lib-tests		atf
+./usr/tests/lib/libc/ieeefp/t_subnormal		tests-lib-tests		atf
Index: 

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

2011-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan  3 14:57:06 UTC 2011

Modified Files:
src/sys/rump/librump/rumpkern: signals.c

Log Message:
kqueue signal filters are not supported, so be explicit about it.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/signals.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/signals.c
diff -u src/sys/rump/librump/rumpkern/signals.c:1.4 src/sys/rump/librump/rumpkern/signals.c:1.5
--- src/sys/rump/librump/rumpkern/signals.c:1.4	Mon Nov 15 20:37:22 2010
+++ src/sys/rump/librump/rumpkern/signals.c	Mon Jan  3 14:57:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: signals.c,v 1.4 2010/11/15 20:37:22 pooka Exp $	*/
+/*	$NetBSD: signals.c,v 1.5 2011/01/03 14:57:06 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: signals.c,v 1.4 2010/11/15 20:37:22 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: signals.c,v 1.5 2011/01/03 14:57:06 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -39,7 +39,10 @@
 
 #include rumpkern_if_priv.h
 
-const struct filterops sig_filtops;
+const struct filterops sig_filtops = {
+	.f_attach = (void *)eopnotsupp,
+};
+
 sigset_t sigcantmask;
 
 /* RUMP_SIGMODEL_PANIC */



CVS commit: src/crypto/external/bsd/openssh/dist

2011-01-03 Thread Arnaud Ysmal
Module Name:src
Committed By:   stacktic
Date:   Mon Jan  3 18:55:42 UTC 2011

Modified Files:
src/crypto/external/bsd/openssh/dist: sshconnect2.c

Log Message:
Fixed strvisx usage


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssh/dist/sshconnect2.c

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

Modified files:

Index: src/crypto/external/bsd/openssh/dist/sshconnect2.c
diff -u src/crypto/external/bsd/openssh/dist/sshconnect2.c:1.5 src/crypto/external/bsd/openssh/dist/sshconnect2.c:1.6
--- src/crypto/external/bsd/openssh/dist/sshconnect2.c:1.5	Sun Nov 21 18:29:49 2010
+++ src/crypto/external/bsd/openssh/dist/sshconnect2.c	Mon Jan  3 18:55:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sshconnect2.c,v 1.5 2010/11/21 18:29:49 adam Exp $	*/
+/*	$NetBSD: sshconnect2.c,v 1.6 2011/01/03 18:55:41 stacktic Exp $	*/
 /* $OpenBSD: sshconnect2.c,v 1.183 2010/04/26 22:28:24 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include includes.h
-__RCSID($NetBSD: sshconnect2.c,v 1.5 2010/11/21 18:29:49 adam Exp $);
+__RCSID($NetBSD: sshconnect2.c,v 1.6 2011/01/03 18:55:41 stacktic Exp $);
 #include sys/types.h
 #include sys/socket.h
 #include sys/wait.h
@@ -458,7 +458,7 @@
 		if (len  65536)
 			len = 65536;
 		msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
-		strvisx(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
+		strvisx(msg, raw, len, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
 		fprintf(stderr, %s, msg);
 		xfree(msg);
 	}



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

2011-01-03 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan  4 00:09:43 UTC 2011

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

Log Message:
Don't try to change the size of non-reg nodes or when vattr doesn't
contain a new size.

from njoly


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/rump/librump/rumpvfs/rumpfs.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/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.79 src/sys/rump/librump/rumpvfs/rumpfs.c:1.80
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.79	Sat Jan  1 19:47:22 2011
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Tue Jan  4 00:09:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.79 2011/01/01 19:47:22 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.80 2011/01/04 00:09:43 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.79 2011/01/01 19:47:22 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.80 2011/01/04 00:09:43 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -776,10 +776,13 @@
 		struct vattr *a_vap;
 		kauth_cred_t a_cred;
 	} */ *ap = v;
-	struct rumpfs_node *rn = ap-a_vp-v_data;
+	struct vnode *vp = ap-a_vp;
+	struct vattr *vap = ap-a_vap;
+	struct rumpfs_node *rn = vp-v_data;
 
-	memcpy(rn-rn_va, ap-a_vap, sizeof(struct vattr));
-	uvm_vnp_setsize(ap-a_vp, ap-a_vap-va_size);
+	memcpy(rn-rn_va, vap, sizeof(rn-rn_va));
+	if (vp-v_type == VREG  vap-va_size != VSIZENOTSET)
+		uvm_vnp_setsize(vp, vap-va_size);
 	return 0;
 }
 



CVS commit: src/sys/dev/i2c

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:24:56 UTC 2011

Modified Files:
src/sys/dev/i2c: files.i2c

Log Message:
Add a generic Motorola/Freescale i2c driver.  This was taken from sandpoint
and heavily modified.  It works on most Freescale PowerPC and ARM SoCs.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/i2c/files.i2c

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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.30 src/sys/dev/i2c/files.i2c:1.31
--- src/sys/dev/i2c/files.i2c:1.30	Mon Dec 27 20:42:51 2010
+++ src/sys/dev/i2c/files.i2c	Tue Jan  4 01:24:56 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.30 2010/12/27 20:42:51 jmcneill Exp $
+#	$NetBSD: files.i2c,v 1.31 2011/01/04 01:24:56 matt Exp $
 
 defflag	opt_i2cbus.hI2C_SCAN
 define	i2cbus { }
@@ -22,6 +22,12 @@
 file	dev/i2c/xc5k.cxc5k
 
 #
+# I2C master devices
+#
+define	motoi2c
+file	dev/i2c/motoi2c.c			motoi2c
+
+#
 # I2C client devices
 #
 



CVS commit: src/sys/dev/i2c

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:25:17 UTC 2011

Added Files:
src/sys/dev/i2c: motoi2c.c motoi2creg.h motoi2cvar.h

Log Message:
Add a generic Motorola/Freescale i2c driver.  This was taken from sandpoint
and heavily modified.  It works on most Freescale PowerPC and ARM SoCs.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/motoi2c.c src/sys/dev/i2c/motoi2creg.h \
src/sys/dev/i2c/motoi2cvar.h

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

Added files:

Index: src/sys/dev/i2c/motoi2c.c
diff -u /dev/null src/sys/dev/i2c/motoi2c.c:1.1
--- /dev/null	Tue Jan  4 01:25:17 2011
+++ src/sys/dev/i2c/motoi2c.c	Tue Jan  4 01:25:17 2011
@@ -0,0 +1,366 @@
+/* $NetBSD: motoi2c.c,v 1.1 2011/01/04 01:25:17 matt Exp $ */
+
+/*-
+ * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Tohru Nishimura and Matt Thomas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: motoi2c.c,v 1.1 2011/01/04 01:25:17 matt Exp $);
+
+#include sys/param.h
+#include sys/device.h
+#include sys/systm.h
+#include sys/mutex.h
+#include sys/bus.h
+#include sys/intr.h
+
+#include dev/i2c/i2cvar.h
+#include dev/i2c/motoi2creg.h
+#include dev/i2c/motoi2cvar.h
+
+#ifdef DEBUG
+static int motoi2c_debug = 0;
+#define	DPRINTF		if (motoi2c_debug) printf
+#else
+#define	DPRINTF		(void)
+#endif
+
+static int  motoi2c_acquire_bus(void *, int);
+static void motoi2c_release_bus(void *, int);
+static int  motoi2c_exec(void *, i2c_op_t, i2c_addr_t, const void *, size_t,
+		void *, size_t, int);
+static int  motoi2c_busy_wait(struct motoi2c_softc *, uint8_t);
+
+static const struct i2c_controller motoi2c = {
+	.ic_acquire_bus = motoi2c_acquire_bus,
+	.ic_release_bus = motoi2c_release_bus,
+	.ic_exec	= motoi2c_exec,
+};
+
+static const struct motoi2c_settings motoi2c_default_settings = {
+	.i2c_adr	= MOTOI2C_ADR_DEFAULT,
+	.i2c_fdr	= MOTOI2C_FDR_DEFAULT,
+	.i2c_dfsrr	= MOTOI2C_DFSRR_DEFAULT,
+};
+
+#define	I2C_READ(r)	((*sc-sc_iord)(sc, (r)))
+#define	I2C_WRITE(r,v)	((*sc-sc_iowr)(sc, (r), (v)))
+#define I2C_SETCLR(r, s, c) \
+	((*sc-sc_iowr)(sc, (r), ((*sc-sc_iord)(sc, (r)) | (s))  ~(c)))
+
+static uint8_t
+motoi2c_iord1(struct motoi2c_softc *sc, bus_size_t off)
+{
+	return bus_space_read_1(sc-sc_iot, sc-sc_ioh, off);
+}
+
+static void
+motoi2c_iowr1(struct motoi2c_softc *sc, bus_size_t off, uint8_t data)
+{
+	bus_space_write_1(sc-sc_iot, sc-sc_ioh, off, data);
+}
+
+void
+motoi2c_attach_common(device_t self, struct motoi2c_softc *sc,
+	const struct motoi2c_settings *i2c)
+{
+	struct i2cbus_attach_args iba;
+
+	mutex_init(sc-sc_buslock, MUTEX_DEFAULT, IPL_NONE);
+
+	if (i2c == NULL)
+		i2c = motoi2c_default_settings;
+
+	sc-sc_i2c = motoi2c;
+	sc-sc_i2c.ic_cookie = sc;
+	sc-sc_start = false;
+	if (sc-sc_iord == NULL)
+		sc-sc_iord = motoi2c_iord1;
+	if (sc-sc_iowr == NULL)
+		sc-sc_iowr = motoi2c_iowr1;
+	memset(iba, 0, sizeof(iba));
+	iba.iba_tag = sc-sc_i2c;
+
+	I2C_WRITE(I2CCR, 0);		/* reset before changing anything */
+	I2C_WRITE(I2CDFSRR, i2c-i2c_dfsrr);	/* sampling units */
+	I2C_WRITE(I2CFDR, i2c-i2c_fdr);	/* divider 3072 (0x31) */
+	I2C_WRITE(I2CADR, i2c-i2c_adr);	/* our slave address is 0x7f */
+	I2C_WRITE(I2CSR, 0);		/* clear status flags */
+
+	config_found_ia(self, i2cbus, iba, iicbus_print);
+}
+
+static int
+motoi2c_acquire_bus(void *v, int flags)
+{
+	struct motoi2c_softc * const sc = v;
+
+	mutex_enter(sc-sc_buslock);
+	I2C_WRITE(I2CCR, CR_MEN);	/* enable the I2C module */
+
+	return 0;

CVS commit: src/sys/dev

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:26:22 UTC 2011

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add the new mpc85xx/booke device names.


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.261 src/sys/dev/DEVNAMES:1.262
--- src/sys/dev/DEVNAMES:1.261	Sat Oct  2 06:09:45 2010
+++ src/sys/dev/DEVNAMES	Tue Jan  4 01:26:22 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.261 2010/10/02 06:09:45 kiyohara Exp $
+#	$NetBSD: DEVNAMES,v 1.262 2011/01/04 01:26:22 matt Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -299,6 +299,7 @@
 cpu			sparc64
 cpu			vax
 cpu			x68k
+cpunode			evbppc
 crime			sgimips
 crypto			MI		Attribute
 cs			MI
@@ -323,6 +324,7 @@
 dge			MI
 dh			vax
 dhu			MI
+diic			powerpc
 dio			hp300
 dl			MI
 dm			MI
@@ -347,9 +349,11 @@
 dsrtc			cats
 dsrtc			evbppc
 dtide			MI
+duart			powerpc
 dvbox			hp300
 dwlpx			alpha
 dz			MI
+e500wdog		powerpc
 ea			MI
 eap			MI
 eb			MI
@@ -865,6 +869,7 @@
 mms			bebox
 mms			dreamcast
 mms			i386
+motoi2c			MI		Attribute
 moxa			MI
 mpt			MI
 mpu			MI
@@ -1019,8 +1024,10 @@
 pcic			alpha
 pcic			hpcmips
 pcic			i386
+pcie			evbppc
 pciide			MI
 pcivga			arc
+pcix			evbppc
 pckbc			MI
 pckbcport		bebox		Attribute
 pckbcport		i386		Attribute
@@ -1288,6 +1295,7 @@
 ts			MI
 tsc			alpha
 tscs			MI
+tsec			powerpc
 tslcd			evbarm
 tslot			sparc
 tsp			alpha



CVS commit: src/sys/dev/ic

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:28:15 UTC 2011

Modified Files:
src/sys/dev/ic: mk48txx.c mk48txxreg.h mk48txxvar.h

Log Message:
Make this support the DS1553 as well.  Add support for the centry reg which
newer RTCs seem to have.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/mk48txx.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/mk48txxreg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/mk48txxvar.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/ic/mk48txx.c
diff -u src/sys/dev/ic/mk48txx.c:1.25 src/sys/dev/ic/mk48txx.c:1.26
--- src/sys/dev/ic/mk48txx.c:1.25	Mon Apr 28 20:23:50 2008
+++ src/sys/dev/ic/mk48txx.c	Tue Jan  4 01:28:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mk48txx.c,v 1.25 2008/04/28 20:23:50 martin Exp $ */
+/*	$NetBSD: mk48txx.c,v 1.26 2011/01/04 01:28:15 matt Exp $ */
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mk48txx.c,v 1.25 2008/04/28 20:23:50 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: mk48txx.c,v 1.26 2011/01/04 01:28:15 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -50,7 +50,7 @@
 uint8_t mk48txx_def_nvrd(struct mk48txx_softc *, int);
 void mk48txx_def_nvwr(struct mk48txx_softc *, int, uint8_t);
 
-struct {
+const struct {
 	const char *name;
 	bus_size_t nvramsz;
 	bus_size_t clkoff;
@@ -61,6 +61,7 @@
 	{ mk48t08, MK48T08_CLKSZ, MK48T08_CLKOFF, 0 },
 	{ mk48t18, MK48T18_CLKSZ, MK48T18_CLKOFF, 0 },
 	{ mk48t59, MK48T59_CLKSZ, MK48T59_CLKOFF, MK48TXX_EXT_REGISTERS },
+	{ ds1553, DS1553_CLKSZ, DS1553_CLKOFF, MK48TXX_EXT_REGISTERS },
 };
 
 void
@@ -127,10 +128,14 @@
 	dt-dt_mon = FROMBCD((*sc-sc_nvrd)(sc, clkoff + MK48TXX_IMON));
 	year = FROMBCD((*sc-sc_nvrd)(sc, clkoff + MK48TXX_IYEAR));
 
-	year += sc-sc_year0;
-	if (year  POSIX_BASE_YEAR 
-	(sc-sc_flag  MK48TXX_NO_CENT_ADJUST) == 0)
-		year += 100;
+	if (sc-sc_flag  MK48TXX_HAVE_CENT_REG) {
+		year += 100*FROMBCD(csr  MK48TXX_CSR_CENT_MASK);
+	} else {
+		year += sc-sc_year0;
+		if (year  POSIX_BASE_YEAR 
+		(sc-sc_flag  MK48TXX_NO_CENT_ADJUST) == 0)
+			year += 100;
+	}
 
 	dt-dt_year = year;
 
@@ -154,14 +159,21 @@
 	bus_size_t clkoff;
 	uint8_t csr;
 	int year;
+	int cent;
 
 	sc = handle-cookie;
 	clkoff = sc-sc_clkoffset;
 
-	year = dt-dt_year - sc-sc_year0;
-	if (year  99 
-	(sc-sc_flag  MK48TXX_NO_CENT_ADJUST) == 0)
-		year -= 100;
+	if ((sc-sc_flag  MK48TXX_HAVE_CENT_REG) == 0) {
+		cent = 0;
+		year = dt-dt_year - sc-sc_year0;
+		if (year  99 
+		(sc-sc_flag  MK48TXX_NO_CENT_ADJUST) == 0)
+			year -= 100;
+	} else {
+		cent = dt-dt_year / 100;
+		year = dt-dt_year % 100;
+	}
 
 	todr_wenable(handle, 1);
 	/* enable write */
@@ -177,6 +189,17 @@
 	(*sc-sc_nvwr)(sc, clkoff + MK48TXX_IMON, TOBCD(dt-dt_mon));
 	(*sc-sc_nvwr)(sc, clkoff + MK48TXX_IYEAR, TOBCD(year));
 
+	/*
+	 * If we have a century register and the century has changed
+	 * update it.
+	 */
+	if ((sc-sc_flag  MK48TXX_HAVE_CENT_REG)
+	 (csr  MK48TXX_CSR_CENT_MASK) != TOBCD(cent)) {
+		csr = ~MK48TXX_CSR_CENT_MASK;
+		csr |= MK48TXX_CSR_CENT_MASK  TOBCD(cent);
+		(*sc-sc_nvwr)(sc, clkoff + MK48TXX_ICSR, csr);
+	}
+
 	/* load them up */
 	csr = (*sc-sc_nvrd)(sc, clkoff + MK48TXX_ICSR);
 	csr = ~MK48TXX_CSR_WRITE;

Index: src/sys/dev/ic/mk48txxreg.h
diff -u src/sys/dev/ic/mk48txxreg.h:1.10 src/sys/dev/ic/mk48txxreg.h:1.11
--- src/sys/dev/ic/mk48txxreg.h:1.10	Mon Apr 28 20:23:50 2008
+++ src/sys/dev/ic/mk48txxreg.h	Tue Jan  4 01:28:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mk48txxreg.h,v 1.10 2008/04/28 20:23:50 martin Exp $ */
+/*	$NetBSD: mk48txxreg.h,v 1.11 2011/01/04 01:28:15 matt Exp $ */
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -57,7 +57,7 @@
 #define MK48TXX_IADAY	5	/* alarm day (1..31; BCD) */
 #define MK48TXX_IINTR	6	/* interrupts */
 #define MK48TXX_IWDOG	7	/* watchdog */
-#define MK48TXX_ICSR	8	/* control register */
+#define MK48TXX_ICSR	8	/* control register / century (DS1553) */
 #define MK48TXX_ISEC	9	/* seconds (0..59; BCD) */
 #define MK48TXX_IMIN	10	/* minutes (0..59; BCD) */
 #define MK48TXX_IHOUR	11	/* hour (0..23; BCD) */
@@ -88,6 +88,7 @@
 /* Bits in the control register */
 #define MK48TXX_CSR_WRITE	0x80	/* want to write */
 #define MK48TXX_CSR_READ	0x40	/* want to read (freeze clock) */
+#define MK48TXX_CSR_CENT_MASK	0x3f	/* century mask */
 
 /* Bit in the weekday register */
 #define MK48TXX_WDAY_FT		0x40	/* freq test: toggle sec[0] at 512Hz */
@@ -109,3 +110,6 @@
 
 #define MK48T59_CLKSZ		8192
 #define MK48T59_CLKOFF		0x1ff0
+
+#define	DS1553_CLKSZ		8192
+#define	DS1553_CLKOFF		0x1ff0

Index: src/sys/dev/ic/mk48txxvar.h
diff -u src/sys/dev/ic/mk48txxvar.h:1.6 src/sys/dev/ic/mk48txxvar.h:1.7
--- src/sys/dev/ic/mk48txxvar.h:1.6	Mon Apr 28 20:23:50 2008
+++ src/sys/dev/ic/mk48txxvar.h	Tue Jan  

CVS commit: src/sys/dev/usb

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:29:01 UTC 2011

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

Log Message:
Use LIST_FOREACH when possible.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/usb/usb_mem.c

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

Modified files:

Index: src/sys/dev/usb/usb_mem.c
diff -u src/sys/dev/usb/usb_mem.c:1.43 src/sys/dev/usb/usb_mem.c:1.44
--- src/sys/dev/usb/usb_mem.c:1.43	Thu Dec 16 10:08:43 2010
+++ src/sys/dev/usb/usb_mem.c	Tue Jan  4 01:29:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_mem.c,v 1.43 2010/12/16 10:08:43 pooka Exp $	*/
+/*	$NetBSD: usb_mem.c,v 1.44 2011/01/04 01:29:01 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: usb_mem.c,v 1.43 2010/12/16 10:08:43 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: usb_mem.c,v 1.44 2011/01/04 01:29:01 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_usb.h
@@ -121,7 +121,7 @@
 
 	s = splusb();
 	/* First check the free list. */
-	for (p = LIST_FIRST(usb_blk_freelist); p; p = LIST_NEXT(p, next)) {
+	LIST_FOREACH(p, usb_blk_freelist, next) {
 		if (p-tag == tag  p-size = size  p-align = align) {
 			LIST_REMOVE(p, next);
 			usb_blk_nfree--;
@@ -246,7 +246,7 @@
 
 	s = splusb();
 	/* Check for free fragments. */
-	for (f = LIST_FIRST(usb_frag_freelist); f; f = LIST_NEXT(f, next)) {
+	LIST_FOREACH(f, usb_frag_freelist, next) {
 		if (f-block-tag == tag)
 			break;
 	}



CVS commit: src/sys/dev/usb

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:37:55 UTC 2011

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

Log Message:
Switch back to malloc since kmem isn't softintr safe.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/usb/usb_mem.c

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

Modified files:

Index: src/sys/dev/usb/usb_mem.c
diff -u src/sys/dev/usb/usb_mem.c:1.44 src/sys/dev/usb/usb_mem.c:1.45
--- src/sys/dev/usb/usb_mem.c:1.44	Tue Jan  4 01:29:01 2011
+++ src/sys/dev/usb/usb_mem.c	Tue Jan  4 01:37:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_mem.c,v 1.44 2011/01/04 01:29:01 matt Exp $	*/
+/*	$NetBSD: usb_mem.c,v 1.45 2011/01/04 01:37:55 matt Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: usb_mem.c,v 1.44 2011/01/04 01:29:01 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: usb_mem.c,v 1.45 2011/01/04 01:37:55 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_usb.h
@@ -47,7 +47,7 @@
 #include sys/param.h
 #include sys/systm.h
 #include sys/kernel.h
-#include sys/kmem.h
+#include sys/malloc.h
 #include sys/queue.h
 #include sys/device.h		/* for usbdivar.h */
 #include sys/bus.h
@@ -142,7 +142,7 @@
 #endif
 
 	DPRINTFN(6, (usb_block_allocmem: no free\n));
-	p = kmem_zalloc(sizeof *p, KM_NOSLEEP);
+	p = malloc(sizeof *p, M_USB, M_NOWAIT);
 	if (p == NULL)
 		return (USBD_NOMEM);
 
@@ -183,7 +183,7 @@
  free1:
 	bus_dmamem_free(tag, p-segs, p-nsegs);
  free0:
-	kmem_free(p, sizeof(*p));
+	free(p, M_USB);
 	return (USBD_NOMEM);
 }
 
@@ -201,7 +201,7 @@
 	bus_dmamap_destroy(p-tag, p-map);
 	bus_dmamem_unmap(p-tag, p-kaddr, p-size);
 	bus_dmamem_free(p-tag, p-segs, p-nsegs);
-	kmem_free(p, sizeof(*p));
+	free(p, M_USB);
 }
 #endif
 
@@ -327,7 +327,7 @@
 	if (rs-vaddr == 0 || size  USB_MEM_RESERVE)
 		return USBD_NOMEM;
 
-	dma-block = kmem_zalloc(sizeof *dma-block, KM_NOSLEEP);
+	dma-block = malloc(sizeof *dma-block, M_USB, M_ZERO | M_NOWAIT);
 	if (dma-block == NULL)
 		return USBD_NOMEM;
 
@@ -363,7 +363,7 @@
 
 	error = extent_free(rs-extent,
 	(u_long)(rs-paddr + dma-offs), dma-block-size, 0);
-	kmem_free(dma-block, sizeof(*dma-block));
+	free(dma-block, M_USB);
 }
 
 int



CVS commit: src/sys/kern

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:40:19 UTC 2011

Modified Files:
src/sys/kern: kern_ksyms.c

Log Message:
When determining max/min sym value, ignore ABS symbols which don't
have a type.  This stops ksym thinking that the _KERNEL_OPT symbols
could actually be useful.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/kern/kern_ksyms.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/kern/kern_ksyms.c
diff -u src/sys/kern/kern_ksyms.c:1.61 src/sys/kern/kern_ksyms.c:1.62
--- src/sys/kern/kern_ksyms.c:1.61	Tue Jul 27 14:25:23 2010
+++ src/sys/kern/kern_ksyms.c	Tue Jan  4 01:40:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ksyms.c,v 1.61 2010/07/27 14:25:23 jakllsch Exp $	*/
+/*	$NetBSD: kern_ksyms.c,v 1.62 2011/01/04 01:40:19 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_ksyms.c,v 1.61 2010/07/27 14:25:23 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ksyms.c,v 1.62 2011/01/04 01:40:19 matt Exp $);
 
 #if defined(_KERNEL)  defined(_KERNEL_OPT)
 #include opt_ddb.h
@@ -365,11 +365,14 @@
 		nglob += (ELF_ST_BIND(nsym[n].st_info) == STB_GLOBAL);
 
 		/* Compute min and max symbols. */
-		if (nsym[n].st_value  tab-sd_minsym) {
-			tab-sd_minsym = nsym[n].st_value;
-		}
-		if (nsym[n].st_value  tab-sd_maxsym) {
-			tab-sd_maxsym = nsym[n].st_value;
+		if (strcmp(str + sym[i].st_name, *ABS*) != 0
+		 ELF_ST_TYPE(nsym[n].st_info) != STT_NOTYPE) {
+			if (nsym[n].st_value  tab-sd_minsym) {
+tab-sd_minsym = nsym[n].st_value;
+			}
+			if (nsym[n].st_value  tab-sd_maxsym) {
+tab-sd_maxsym = nsym[n].st_value;
+			}
 		}
 		n++;
 	}



CVS commit: src/sys/conf

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:52:31 UTC 2011

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

Log Message:
If using a kernel ldscript, make sure it's added to the list of kernel
dependencies.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 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.128 src/sys/conf/Makefile.kern.inc:1.129
--- src/sys/conf/Makefile.kern.inc:1.128	Sun Jan  2 19:24:48 2011
+++ src/sys/conf/Makefile.kern.inc	Tue Jan  4 01:52:30 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.128 2011/01/02 19:24:48 matt Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.129 2011/01/04 01:52:30 matt Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -210,6 +210,9 @@
 #	${SYSTEM_LD_TAIL}
 SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN}
 SYSTEM_DEP?=	Makefile ${SYSTEM_OBJ:O} .gdbinit
+.if defined(KERNLDSCRIPT)
+SYSTEM_DEP+=	${KERNLDSCRIPT}
+.endif
 .if defined(CTFMERGE)
 SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
 .else



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

2011-01-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jan  4 02:19:32 UTC 2011

Modified Files:
src/sys/arch/hpcarm/conf: IPAQ JORNADA720 JORNADA820 WZERO3

Log Message:
Add options P1003_1B_SEMAPHORE.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/hpcarm/conf/IPAQ
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/hpcarm/conf/JORNADA720
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hpcarm/conf/JORNADA820
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hpcarm/conf/WZERO3

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/hpcarm/conf/IPAQ
diff -u src/sys/arch/hpcarm/conf/IPAQ:1.62 src/sys/arch/hpcarm/conf/IPAQ:1.63
--- src/sys/arch/hpcarm/conf/IPAQ:1.62	Tue Nov 23 11:13:59 2010
+++ src/sys/arch/hpcarm/conf/IPAQ	Tue Jan  4 02:19:32 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: IPAQ,v 1.62 2010/11/23 11:13:59 hannken Exp $
+#	$NetBSD: IPAQ,v 1.63 2011/01/04 02:19:32 tsutsui Exp $
 #
 #	iPAQ H3600 -- Windows-CE based PDA
 #
@@ -95,6 +95,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 # Device options
 

Index: src/sys/arch/hpcarm/conf/JORNADA720
diff -u src/sys/arch/hpcarm/conf/JORNADA720:1.80 src/sys/arch/hpcarm/conf/JORNADA720:1.81
--- src/sys/arch/hpcarm/conf/JORNADA720:1.80	Tue Nov 23 11:13:59 2010
+++ src/sys/arch/hpcarm/conf/JORNADA720	Tue Jan  4 02:19:32 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: JORNADA720,v 1.80 2010/11/23 11:13:59 hannken Exp $
+#	$NetBSD: JORNADA720,v 1.81 2011/01/04 02:19:32 tsutsui Exp $
 #
 #	JORNADA -- Windows-CE based jornada 720
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.80 $
+#ident 		GENERIC-$Revision: 1.81 $
 
 # estimated number of users
 maxusers	32
@@ -99,6 +99,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 # Device options
 

Index: src/sys/arch/hpcarm/conf/JORNADA820
diff -u src/sys/arch/hpcarm/conf/JORNADA820:1.20 src/sys/arch/hpcarm/conf/JORNADA820:1.21
--- src/sys/arch/hpcarm/conf/JORNADA820:1.20	Tue Nov 23 11:13:59 2010
+++ src/sys/arch/hpcarm/conf/JORNADA820	Tue Jan  4 02:19:32 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: JORNADA820,v 1.20 2010/11/23 11:13:59 hannken Exp $
+#	$NetBSD: JORNADA820,v 1.21 2011/01/04 02:19:32 tsutsui Exp $
 #
 #	JORNADA -- Windows-CE based jornada 820
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.20 $
+#ident 		GENERIC-$Revision: 1.21 $
 
 # estimated number of users
 maxusers	32
@@ -97,6 +97,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 # Device options
 

Index: src/sys/arch/hpcarm/conf/WZERO3
diff -u src/sys/arch/hpcarm/conf/WZERO3:1.17 src/sys/arch/hpcarm/conf/WZERO3:1.18
--- src/sys/arch/hpcarm/conf/WZERO3:1.17	Tue Nov 23 11:13:59 2010
+++ src/sys/arch/hpcarm/conf/WZERO3	Tue Jan  4 02:19:32 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: WZERO3,v 1.17 2010/11/23 11:13:59 hannken Exp $
+#	$NetBSD: WZERO3,v 1.18 2011/01/04 02:19:32 tsutsui Exp $
 #
 #	WZERO3 -- Sharp Windows Mobile 5 based PDA
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.17 $
+#ident 		GENERIC-$Revision: 1.18 $
 
 # estimated number of users
 maxusers	32
@@ -99,7 +99,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
-
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 # Miscellaneous kernel options
 options 	KTRACE		# system call tracing, a la ktrace(1)



CVS commit: src/sys/dev/i2c

2011-01-03 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Jan  4 02:50:08 UTC 2011

Modified Files:
src/sys/dev/i2c: motoi2c.c motoi2creg.h motoi2cvar.h

Log Message:
withdraw my name from the copyright notice as there is little code
substance made by me.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/motoi2c.c \
src/sys/dev/i2c/motoi2creg.h src/sys/dev/i2c/motoi2cvar.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/i2c/motoi2c.c
diff -u src/sys/dev/i2c/motoi2c.c:1.1 src/sys/dev/i2c/motoi2c.c:1.2
--- src/sys/dev/i2c/motoi2c.c:1.1	Tue Jan  4 01:25:17 2011
+++ src/sys/dev/i2c/motoi2c.c	Tue Jan  4 02:50:08 2011
@@ -1,11 +1,11 @@
-/* $NetBSD: motoi2c.c,v 1.1 2011/01/04 01:25:17 matt Exp $ */
+/* $NetBSD: motoi2c.c,v 1.2 2011/01/04 02:50:08 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by Tohru Nishimura and Matt Thomas.
+ * by Matt Thomas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: motoi2c.c,v 1.1 2011/01/04 01:25:17 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: motoi2c.c,v 1.2 2011/01/04 02:50:08 nisimura Exp $);
 
 #include sys/param.h
 #include sys/device.h
Index: src/sys/dev/i2c/motoi2creg.h
diff -u src/sys/dev/i2c/motoi2creg.h:1.1 src/sys/dev/i2c/motoi2creg.h:1.2
--- src/sys/dev/i2c/motoi2creg.h:1.1	Tue Jan  4 01:25:17 2011
+++ src/sys/dev/i2c/motoi2creg.h	Tue Jan  4 02:50:08 2011
@@ -1,11 +1,11 @@
-/* $NetBSD: motoi2creg.h,v 1.1 2011/01/04 01:25:17 matt Exp $ */
+/* $NetBSD: motoi2creg.h,v 1.2 2011/01/04 02:50:08 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by Tohru Nishimura and Matt Thomas.
+ * by Matt Thomas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
Index: src/sys/dev/i2c/motoi2cvar.h
diff -u src/sys/dev/i2c/motoi2cvar.h:1.1 src/sys/dev/i2c/motoi2cvar.h:1.2
--- src/sys/dev/i2c/motoi2cvar.h:1.1	Tue Jan  4 01:25:17 2011
+++ src/sys/dev/i2c/motoi2cvar.h	Tue Jan  4 02:50:08 2011
@@ -1,11 +1,11 @@
-/* $NetBSD: motoi2cvar.h,v 1.1 2011/01/04 01:25:17 matt Exp $ */
+/* $NetBSD: motoi2cvar.h,v 1.2 2011/01/04 02:50:08 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by Tohru Nishimura and Matt Thomas.
+ * by Matt Thomas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions



CVS commit: src/sys/dev/acpi

2011-01-03 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jan  4 04:28:49 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_timer.c

Log Message:
Fix previous.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/acpi/acpi_timer.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/acpi/acpi_timer.c
diff -u src/sys/dev/acpi/acpi_timer.c:1.19 src/sys/dev/acpi/acpi_timer.c:1.20
--- src/sys/dev/acpi/acpi_timer.c:1.19	Sun Jan  2 05:48:55 2011
+++ src/sys/dev/acpi/acpi_timer.c	Tue Jan  4 04:28:48 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_timer.c,v 1.19 2011/01/02 05:48:55 jruoho Exp $ */
+/* $NetBSD: acpi_timer.c,v 1.20 2011/01/04 04:28:48 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2006 Matthias Drochner droch...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_timer.c,v 1.19 2011/01/02 05:48:55 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_timer.c,v 1.20 2011/01/04 04:28:48 jruoho Exp $);
 
 #include sys/types.h
 #include sys/systm.h
@@ -82,7 +82,7 @@
 	aprint_debug_dev(sc-sc_dev, %s %d-bit timer\n,
 	acpi_timecounter.tc_name, bits);
 
-	if ((flags  ACPI_FADT_PLATFORM_CLOCK) != 0)
+	if ((flags  ACPI_FADT_PLATFORM_CLOCK) == 0)
 		aprint_debug_dev(sc-sc_dev,
 		warning: timer may be unreliable\n);
 



CVS commit: src/sys/kern

2011-01-03 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Jan  4 07:43:42 UTC 2011

Modified Files:
src/sys/kern: vfs_lookup.c

Log Message:
Tsort functions and remove a small #if 0 block leftover from earlier cleanup.
No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/kern/vfs_lookup.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/kern/vfs_lookup.c
diff -u src/sys/kern/vfs_lookup.c:1.130 src/sys/kern/vfs_lookup.c:1.131
--- src/sys/kern/vfs_lookup.c:1.130	Sun Jan  2 05:09:31 2011
+++ src/sys/kern/vfs_lookup.c	Tue Jan  4 07:43:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_lookup.c,v 1.130 2011/01/02 05:09:31 dholland Exp $	*/
+/*	$NetBSD: vfs_lookup.c,v 1.131 2011/01/04 07:43:42 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_lookup.c,v 1.130 2011/01/02 05:09:31 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_lookup.c,v 1.131 2011/01/04 07:43:42 dholland Exp $);
 
 #include opt_magiclinks.h
 
@@ -194,6 +194,36 @@
 
 
 /*
+ * Determine the namei hash (for cn_hash) for name.
+ * If *ep != NULL, hash from name to ep-1.
+ * If *ep == NULL, hash from name until the first NUL or '/', and
+ * return the location of this termination character in *ep.
+ *
+ * This function returns an equivalent hash to the MI hash32_strn().
+ * The latter isn't used because in the *ep == NULL case, determining
+ * the length of the string to the first NUL or `/' and then calling
+ * hash32_strn() involves unnecessary double-handling of the data.
+ */
+uint32_t
+namei_hash(const char *name, const char **ep)
+{
+	uint32_t	hash;
+
+	hash = HASH32_STR_INIT;
+	if (*ep != NULL) {
+		for (; name  *ep; name++)
+			hash = hash * 33 + *(const uint8_t *)name;
+	} else {
+		for (; *name != '\0'  *name != '/'; name++)
+			hash = hash * 33 + *(const uint8_t *)name;
+		*ep = name;
+	}
+	return (hash + (hash  5));
+}
+
+
+
+/*
  * Sealed abstraction for pathnames.
  *
  * System-call-layer level code that is going to call namei should
@@ -466,11 +496,6 @@
 	struct cwdinfo *cwdi;		/* pointer to cwd state */
 	struct lwp *self = curlwp;	/* thread doing namei() */
 
-#if 0 /* not any more */
-	/* as both buffers are size PATH_MAX this cannot overflow */
-	strcpy(cnp-cn_pnbuf, ndp-ni_pathbuf-pb_path);
-#endif
-
 	/* length includes null terminator (was originally from copyinstr) */
 	ndp-ni_pathlen = strlen(ndp-ni_pnbuf) + 1;
 
@@ -664,147 +689,6 @@
 
 //
 
-static int
-do_namei(struct namei_state *state)
-{
-	int error;
-
-	struct nameidata *ndp = state-ndp;
-	struct componentname *cnp = state-cnp;
-	const char *savepath = NULL;
-
-	KASSERT(cnp == ndp-ni_cnd);
-
-	namei_start1(state);
-
-	if (cnp-cn_flags  TRYEMULROOT) {
-		savepath = pathbuf_stringcopy_get(ndp-ni_pathbuf);
-	}
-
-emul_retry:
-
-	if (savepath != NULL) {
-		/* kinda gross */
-		strcpy(ndp-ni_pathbuf-pb_path, savepath);
-		pathbuf_stringcopy_put(ndp-ni_pathbuf, savepath);
-		savepath = NULL;
-	}
-
-	error = namei_start2(state);
-	if (error) {
-		if (savepath != NULL) {
-			pathbuf_stringcopy_put(ndp-ni_pathbuf, savepath);
-		}
-		return error;
-	}
-
-	/* Loop through symbolic links */
-	for (;;) {
-		if (state-namei_startdir-v_mount == NULL) {
-			/* Give up if the directory is no longer mounted */
-			if (savepath != NULL) {
-pathbuf_stringcopy_put(ndp-ni_pathbuf, savepath);
-			}
-			namei_end(state);
-			return (ENOENT);
-		}
-		cnp-cn_nameptr = ndp-ni_pnbuf;
-		error = do_lookup(state, state-namei_startdir);
-		if (error != 0) {
-			/* XXX this should use namei_end() */
-			if (ndp-ni_dvp) {
-vput(ndp-ni_dvp);
-			}
-			if (ndp-ni_erootdir != NULL) {
-/* Retry the whole thing from the normal root */
-cnp-cn_flags = ~TRYEMULROOT;
-goto emul_retry;
-			}
-			KASSERT(savepath == NULL);
-			return (error);
-		}
-
-		/*
-		 * Check for symbolic link
-		 */
-		if (namei_atsymlink(state)) {
-			error = namei_follow(state);
-			if (error) {
-KASSERT(ndp-ni_dvp != ndp-ni_vp);
-vput(ndp-ni_dvp);
-vput(ndp-ni_vp);
-ndp-ni_vp = NULL;
-if (savepath != NULL) {
-	pathbuf_stringcopy_put(ndp-ni_pathbuf, savepath);
-}
-return error;
-			}
-		}
-		else {
-			break;
-		}
-	}
-
-	/*
-	 * Done
-	 */
-
-	if ((cnp-cn_flags  LOCKPARENT) == 0  ndp-ni_dvp) {
-		if (ndp-ni_dvp == ndp-ni_vp) {
-			vrele(ndp-ni_dvp);
-		} else {
-			vput(ndp-ni_dvp);
-		}
-	}
-
-	if (savepath != NULL) {
-		pathbuf_stringcopy_put(ndp-ni_pathbuf, savepath);
-	}
-
-	return 0;
-}
-
-int
-namei(struct nameidata *ndp)
-{
-	struct namei_state state;
-	int error;
-
-	namei_init(state, ndp);
-	error = do_namei(state);
-	namei_cleanup(state);
-
-	return error;
-}
-
-/*
- * Determine the