CVS commit: src
Module Name:src Committed By: jruoho Date: Fri Dec 17 08:13:10 UTC 2010 Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man3: Makefile attribute.3 Log Message: Briefly describe __read_mostly and __cachline_aligned. To generate a diff of this commit: cvs rdiff -u -r1.1552 -r1.1553 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.62 -r1.63 src/share/man/man3/Makefile cvs rdiff -u -r1.6 -r1.7 src/share/man/man3/attribute.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1552 src/distrib/sets/lists/comp/mi:1.1553 --- src/distrib/sets/lists/comp/mi:1.1552 Fri Dec 17 07:10:37 2010 +++ src/distrib/sets/lists/comp/mi Fri Dec 17 08:13:09 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1552 2010/12/17 07:10:37 jruoho Exp $ +# $NetBSD: mi,v 1.1553 2010/12/17 08:13:09 jruoho Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -4908,12 +4908,14 @@ ./usr/share/man/cat3/__aligned.0 comp-c-catman .cat ./usr/share/man/cat3/__arraycount.0 comp-c-catman .cat ./usr/share/man/cat3/__builtin_object_size.0 comp-c-catman .cat +./usr/share/man/cat3/__cacheline_aligned.0 comp-c-catman .cat ./usr/share/man/cat3/__constfunc.0 comp-c-catman .cat ./usr/share/man/cat3/__dead.0 comp-c-catman .cat ./usr/share/man/cat3/__insn_barrier.0 comp-c-catman .cat ./usr/share/man/cat3/__noinline.0 comp-c-catman .cat ./usr/share/man/cat3/__packed.0 comp-c-catman .cat ./usr/share/man/cat3/__pure.0 comp-c-catman .cat +./usr/share/man/cat3/__read_mostly.0 comp-c-catman .cat ./usr/share/man/cat3/__section.0 comp-c-catman .cat ./usr/share/man/cat3/__svc_getcallercreds.0 comp-c-catman .cat ./usr/share/man/cat3/__unused.0 comp-c-catman .cat @@ -10993,12 +10995,14 @@ ./usr/share/man/html3/__aligned.html comp-c-htmlman html ./usr/share/man/html3/__arraycount.html comp-c-htmlman html ./usr/share/man/html3/__builtin_object_size.html comp-c-htmlman html +./usr/share/man/html3/__cacheline_aligned.html comp-c-htmlman html ./usr/share/man/html3/__constfunc.html comp-c-htmlman html ./usr/share/man/html3/__dead.html comp-c-htmlman html ./usr/share/man/html3/__insn_barrier.html comp-c-htmlman html ./usr/share/man/html3/__noinline.html comp-c-htmlman html ./usr/share/man/html3/__packed.html comp-c-htmlman html ./usr/share/man/html3/__pure.html comp-c-htmlman html +./usr/share/man/html3/__read_mostly.html comp-c-htmlman html ./usr/share/man/html3/__section.html comp-c-htmlman html ./usr/share/man/html3/__svc_getcallercreds.html comp-c-htmlman html ./usr/share/man/html3/__unused.html comp-c-htmlman html @@ -16878,12 +16882,14 @@ ./usr/share/man/man3/__aligned.3 comp-c-man .man ./usr/share/man/man3/__arraycount.3 comp-c-man .man ./usr/share/man/man3/__builtin_object_size.3 comp-c-man .man +./usr/share/man/man3/__cacheline_aligned.3 comp-c-man .man ./usr/share/man/man3/__constfunc.3 comp-c-man .man ./usr/share/man/man3/__dead.3 comp-c-man .man ./usr/share/man/man3/__insn_barrier.3 comp-c-man .man ./usr/share/man/man3/__noinline.3 comp-c-man .man ./usr/share/man/man3/__packed.3 comp-c-man .man ./usr/share/man/man3/__pure.3 comp-c-man .man +./usr/share/man/man3/__read_mostly.3 comp-c-man .man ./usr/share/man/man3/__section.3 comp-c-man .man ./usr/share/man/man3/__svc_getcallercreds.3 comp-c-man .man ./usr/share/man/man3/__unused.3 comp-c-man .man Index: src/share/man/man3/Makefile diff -u src/share/man/man3/Makefile:1.62 src/share/man/man3/Makefile:1.63 --- src/share/man/man3/Makefile:1.62 Fri Dec 17 07:10:38 2010 +++ src/share/man/man3/Makefile Fri Dec 17 08:13:09 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.62 2010/12/17 07:10:38 jruoho Exp $ +# $NetBSD: Makefile,v 1.63 2010/12/17 08:13:09 jruoho Exp $ # @(#)Makefile 8.2 (Berkeley) 12/13/93 MAN= _DIAGASSERT.3 __CONCAT.3 __UNCONST.3 CMSG_DATA.3 \ @@ -23,7 +23,9 @@ attribute.3 __used.3 \ attribute.3 __packed.3 \ attribute.3 __aligned.3 \ - attribute.3 __section.3 + attribute.3 __section.3 \ + attribute.3 __read_mostly.3 \ + attribute.3 __cacheline_aligned.3 MLINKS+=bitstring.3 bit_alloc.3 \ bitstring.3 bit_clear.3 \ bitstring.3 bit_decl.3 \ Index: src/share/man/man3/attribute.3 diff -u src/share/man/man3/attribute.3:1.6 src/share/man/man3/attribute.3:1.7 --- src/share/man/man3/attribute.3:1.6 Thu Dec 16 17:50:39 2010 +++ src/share/man/man3/attribute.3 Fri Dec 17 08:13:09 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: attribute.3,v 1.6 2010/12/16 17:50:39 jruoho Exp $ +.\ $NetBSD: attribute.3,v 1.7 2010/12/17 08:13:09 jruoho Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -52,6 +52,10 @@ .Pp .Fn __aligned x .Fn __section section +.Pp +.Ic __read_mostly +.Pp +.Ic __cacheline_aligned .Sh DESCRIPTION The .Tn GNU @@ -218,9
CVS commit: src/share/man/man3
Module Name:src Committed By: jruoho Date: Fri Dec 17 08:23:04 UTC 2010 Modified Files: src/share/man/man3: attribute.3 Log Message: Note that the previous are available only for the kernel. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man3/attribute.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/attribute.3 diff -u src/share/man/man3/attribute.3:1.7 src/share/man/man3/attribute.3:1.8 --- src/share/man/man3/attribute.3:1.7 Fri Dec 17 08:13:09 2010 +++ src/share/man/man3/attribute.3 Fri Dec 17 08:23:04 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: attribute.3,v 1.7 2010/12/17 08:13:09 jruoho Exp $ +.\ $NetBSD: attribute.3,v 1.8 2010/12/17 08:23:04 jruoho Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -253,6 +253,11 @@ to set the minimum alignment into a predefined coherency unit. This should ensure that frequently used data structures are aligned on cacheline boundaries. +Both +.Ic __cacheline_aligned +and +.Ic __read_mostly +are only available for the kernel. .El .Sh SEE ALSO .Xr gcc 1 ,
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: wiz Date: Fri Dec 17 08:50:26 UTC 2010 Modified Files: src/libexec/ld.elf_so: ld.elf_so.1 Log Message: Remove superfluous Pp. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/libexec/ld.elf_so/ld.elf_so.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/ld.elf_so.1 diff -u src/libexec/ld.elf_so/ld.elf_so.1:1.14 src/libexec/ld.elf_so/ld.elf_so.1:1.15 --- src/libexec/ld.elf_so/ld.elf_so.1:1.14 Fri Dec 17 07:04:52 2010 +++ src/libexec/ld.elf_so/ld.elf_so.1 Fri Dec 17 08:50:26 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: ld.elf_so.1,v 1.14 2010/12/17 07:04:52 skrll Exp $ +.\ $NetBSD: ld.elf_so.1,v 1.15 2010/12/17 08:50:26 wiz Exp $ .\ .\ Copyright (c) 2001 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -62,7 +62,6 @@ The entry point of the program and the base address of where .Nm is loaded is also supplied. -.Pp .Ss Finding objects Each .Xr elf 5
CVS commit: src
Module Name:src Committed By: jruoho Date: Fri Dec 17 09:54:28 UTC 2010 Modified Files: src: UPDATING src/distrib/sets/lists/base: mi src/etc: group master.passwd src/etc/mtree: NetBSD.dist.base special src/external/bsd/tcpdump/bin: Makefile src/external/bsd/tcpdump/dist: tcpdump.1.in src/usr.sbin/tcpdump: Makefile Log Message: Make tcpdump(8) to drop root privileges and chroot(2) by default. To generate a diff of this commit: cvs rdiff -u -r1.216 -r1.217 src/UPDATING cvs rdiff -u -r1.907 -r1.908 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.25 -r1.26 src/etc/group cvs rdiff -u -r1.42 -r1.43 src/etc/master.passwd cvs rdiff -u -r1.67 -r1.68 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.133 -r1.134 src/etc/mtree/special cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/bin/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/tcpdump.1.in cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/tcpdump/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.216 src/UPDATING:1.217 --- src/UPDATING:1.216 Thu Nov 25 22:08:49 2010 +++ src/UPDATING Fri Dec 17 09:54:27 2010 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.216 2010/11/25 22:08:49 christos Exp $ +$NetBSD: UPDATING,v 1.217 2010/12/17 09:54:27 jruoho Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -15,6 +15,11 @@ Recent changes: ^^^ +20101217: + The tcpdump(8) program was changed to drop privileges and chroot(2) + by default. It may be necessary to manually update passwd(5) and + group(5) in order to make the program work with existing setups. + 20101125: The latest changes to setenv(3) dissallow setting environment variables with names that contain '='. Revision 1.18 of env.c Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.907 src/distrib/sets/lists/base/mi:1.908 --- src/distrib/sets/lists/base/mi:1.907 Wed Dec 15 18:39:27 2010 +++ src/distrib/sets/lists/base/mi Fri Dec 17 09:54:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.907 2010/12/15 18:39:27 pooka Exp $ +# $NetBSD: mi,v 1.908 2010/12/17 09:54:27 jruoho Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -4806,6 +4806,7 @@ ./var/chroot/pfspamdbase-obsolete obsolete ./var/chroot/spamdbase-obsolete obsolete ./var/chroot/sshdbase-sys-root +./var/chroot/tcpdumpbase-sys-root ./var/chroot/tftp-proxybase-sys-root ./var/crash base-sys-root ./var/cron base-cron-root Index: src/etc/group diff -u src/etc/group:1.25 src/etc/group:1.26 --- src/etc/group:1.25 Sun Nov 7 17:47:47 2010 +++ src/etc/group Fri Dec 17 09:54:27 2010 @@ -22,6 +22,7 @@ _httpd:*:24: _mdnsd:*:25: _atf:*:26: +_tcpdump:*:27: guest:*:31:root nobody:*:39: utmp:*:45: Index: src/etc/master.passwd diff -u src/etc/master.passwd:1.42 src/etc/master.passwd:1.43 --- src/etc/master.passwd:1.42 Sun Nov 7 17:47:47 2010 +++ src/etc/master.passwd Fri Dec 17 09:54:27 2010 @@ -16,5 +16,6 @@ _httpd:*:24:24::0:0: pseudo-user:/var/www:/sbin/nologin _mdnsd:*:25:25::0:0: pseudo-user:/nonexistent:/sbin/nologin _atf:*:26:26::0:0: pseudo-user:/nonexistent:/sbin/nologin +_tcpdump:*:27:27::0:0: pseudo-user:/var/chroot/tcpdump:/sbin/nologin uucp:*:66:1::0:0:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin nobody:*:32767:39::0:0:Unprivileged user:/nonexistent:/sbin/nologin Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.67 src/etc/mtree/NetBSD.dist.base:1.68 --- src/etc/mtree/NetBSD.dist.base:1.67 Wed Dec 8 23:56:02 2010 +++ src/etc/mtree/NetBSD.dist.base Fri Dec 17 09:54:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.67 2010/12/08 23:56:02 njoly Exp $ +# $NetBSD: NetBSD.dist.base,v 1.68 2010/12/17 09:54:28 jruoho Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -1080,6 +1080,7 @@ ./var/chroot/ntpd/var/run mode=0775 gname=ntpd ./var/chroot/pflogd mode=0755 ./var/chroot/sshd mode=0755 +./var/chroot/tcpdump mode=0755 ./var/chroot/tftp-proxy mode=0755 ./var/crash mode=0770 ./var/cron Index: src/etc/mtree/special diff -u src/etc/mtree/special:1.133 src/etc/mtree/special:1.134 --- src/etc/mtree/special:1.133 Tue Aug 24 13:18:04 2010 +++ src/etc/mtree/special Fri Dec 17 09:54:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.133 2010/08/24 13:18:04 christos Exp $ +# $NetBSD: special,v 1.134 2010/12/17 09:54:28 jruoho Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -393,6 +393,7 @@ ./var/chroot/ntpd/var/run type=dir mode=0775 gname=ntpd ./var/chroot/pflogd type=dir mode=0755 ./var/chroot/sshd type=dir mode=0755 +./var/chroot/tcpdump type=dir
CVS commit: src/external/bsd/tcpdump/dist
Module Name:src Committed By: wiz Date: Fri Dec 17 10:35:10 UTC 2010 Modified Files: src/external/bsd/tcpdump/dist: tcpdump.1.in Log Message: Bump date for chroot default. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tcpdump/dist/tcpdump.1.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tcpdump/dist/tcpdump.1.in diff -u src/external/bsd/tcpdump/dist/tcpdump.1.in:1.3 src/external/bsd/tcpdump/dist/tcpdump.1.in:1.4 --- src/external/bsd/tcpdump/dist/tcpdump.1.in:1.3 Fri Dec 17 09:54:28 2010 +++ src/external/bsd/tcpdump/dist/tcpdump.1.in Fri Dec 17 10:35:10 2010 @@ -1,6 +1,6 @@ .\ @(#) Header: /tcpdump/master/tcpdump/tcpdump.1.in,v 1.2 2008-11-09 23:35:03 mcr Exp (LBL) .\ -.\ $NetBSD: tcpdump.1.in,v 1.3 2010/12/17 09:54:28 jruoho Exp $ +.\ $NetBSD: tcpdump.1.in,v 1.4 2010/12/17 10:35:10 wiz Exp $ .\ .\ Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997 .\ The Regents of the University of California. All rights reserved. @@ -22,7 +22,7 @@ .\ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\ -.TH TCPDUMP 8 5 December 2010 +.TH TCPDUMP 8 17 December 2010 .SH NAME tcpdump \- dump traffic on a network .SH SYNOPSIS
CVS commit: src/usr.bin/xargs
Module Name:src Committed By: plunky Date: Fri Dec 17 11:32:57 UTC 2010 Modified Files: src/usr.bin/xargs: xargs.c Log Message: correct the error message (wait3-waitpid) To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/xargs/xargs.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/xargs/xargs.c diff -u src/usr.bin/xargs/xargs.c:1.19 src/usr.bin/xargs/xargs.c:1.20 --- src/usr.bin/xargs/xargs.c:1.19 Mon Jul 21 14:19:28 2008 +++ src/usr.bin/xargs/xargs.c Fri Dec 17 11:32:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xargs.c,v 1.19 2008/07/21 14:19:28 lukem Exp $ */ +/* $NetBSD: xargs.c,v 1.20 2010/12/17 11:32:57 plunky Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -42,7 +42,7 @@ static char sccsid[] = @(#)xargs.c 8.1 (Berkeley) 6/6/93; __FBSDID($FreeBSD: src/usr.bin/xargs/xargs.c,v 1.62 2006/01/01 22:59:54 jmallett Exp $); #endif -__RCSID($NetBSD: xargs.c,v 1.19 2008/07/21 14:19:28 lukem Exp $); +__RCSID($NetBSD: xargs.c,v 1.20 2010/12/17 11:32:57 plunky Exp $); #endif /* not lint */ #include sys/param.h @@ -610,7 +610,7 @@ } } if (pid == -1 errno != ECHILD) - err(1, wait3); + err(1, waitpid); } /*
CVS commit: src
Module Name:src Committed By: jruoho Date: Fri Dec 17 12:14:05 UTC 2010 Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man3: Makefile src/share/man/man7: c.7 Added Files: src/share/man/man3: typeof.3 Log Message: There is no harm to add a manual page for the GNU typeof()-construct, given that it has already crawled into the source tree. To generate a diff of this commit: cvs rdiff -u -r1.1553 -r1.1554 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.63 -r1.64 src/share/man/man3/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man3/typeof.3 cvs rdiff -u -r1.9 -r1.10 src/share/man/man7/c.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1553 src/distrib/sets/lists/comp/mi:1.1554 --- src/distrib/sets/lists/comp/mi:1.1553 Fri Dec 17 08:13:09 2010 +++ src/distrib/sets/lists/comp/mi Fri Dec 17 12:14:03 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1553 2010/12/17 08:13:09 jruoho Exp $ +# $NetBSD: mi,v 1.1554 2010/12/17 12:14:03 jruoho Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -8518,6 +8518,7 @@ ./usr/share/man/cat3/ttyslot.0 comp-c-catman .cat ./usr/share/man/cat3/ttyunlock.0 comp-c-catman .cat ./usr/share/man/cat3/twalk.0 comp-c-catman .cat +./usr/share/man/cat3/typeof.0 comp-c-catman .cat ./usr/share/man/cat3/types.0 comp-c-catman .cat ./usr/share/man/cat3/tzalloc.0 comp-c-catman .cat ./usr/share/man/cat3/tzfree.0 comp-c-catman .cat @@ -14468,6 +14469,7 @@ ./usr/share/man/html3/ttyslot.html comp-c-htmlman html ./usr/share/man/html3/ttyunlock.html comp-c-htmlman html ./usr/share/man/html3/twalk.html comp-c-htmlman html +./usr/share/man/html3/typeof.html comp-c-htmlman html ./usr/share/man/html3/types.html comp-c-htmlman html ./usr/share/man/html3/tzalloc.html comp-c-htmlman html ./usr/share/man/html3/tzfree.html comp-c-htmlman html @@ -20488,6 +20490,7 @@ ./usr/share/man/man3/ttyslot.3 comp-c-man .man ./usr/share/man/man3/ttyunlock.3 comp-c-man .man ./usr/share/man/man3/twalk.3 comp-c-man .man +./usr/share/man/man3/typeof.3 comp-c-man .man ./usr/share/man/man3/types.3 comp-c-man .man ./usr/share/man/man3/tzalloc.3 comp-c-man .man ./usr/share/man/man3/tzfree.3 comp-c-man .man Index: src/share/man/man3/Makefile diff -u src/share/man/man3/Makefile:1.63 src/share/man/man3/Makefile:1.64 --- src/share/man/man3/Makefile:1.63 Fri Dec 17 08:13:09 2010 +++ src/share/man/man3/Makefile Fri Dec 17 12:14:04 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.63 2010/12/17 08:13:09 jruoho Exp $ +# $NetBSD: Makefile,v 1.64 2010/12/17 12:14:04 jruoho Exp $ # @(#)Makefile 8.2 (Berkeley) 12/13/93 MAN= _DIAGASSERT.3 __CONCAT.3 __UNCONST.3 CMSG_DATA.3 \ @@ -9,7 +9,7 @@ ilog2.3 intro.3 inttypes.3 iso646.3 \ makedev.3 offsetof.3 queue.3 rbtree.3 sigevent.3 \ stdarg.3 stdbool.3 stddef.3 stdint.3 stdlib.3 sysexits.3 \ - tgmath.3 timeradd.3 timeval.3 tree.3 types.3 varargs.3 + tgmath.3 timeradd.3 timeval.3 tree.3 typeof.3 types.3 varargs.3 USETBL= # used by queue.3 @@ -176,7 +176,7 @@ queue.3 SIMPLEQ_FOREACH.3 \ queue.3 SIMPLEQ_EMPTY.3 \ queue.3 SIMPLEQ_FIRST.3 \ - queue.3 SIMPLEQ_NEXT.3 + queue.3 SIMPLEQ_NEXT.3 MLINKS+=queue.3 TAILQ_HEAD.3 \ queue.3 TAILQ_HEAD_INITIALIZER.3 \ queue.3 TAILQ_ENTRY.3 \ Index: src/share/man/man7/c.7 diff -u src/share/man/man7/c.7:1.9 src/share/man/man7/c.7:1.10 --- src/share/man/man7/c.7:1.9 Fri Dec 17 07:25:33 2010 +++ src/share/man/man7/c.7 Fri Dec 17 12:14:04 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: c.7,v 1.9 2010/12/17 07:25:33 jruoho Exp $ +.\ $NetBSD: c.7,v 1.10 2010/12/17 12:14:04 jruoho Exp $ .\ .\ Copyright (C) 2007, 2010 Gabor Kovesdan. All rights reserved. .\ @@ -158,7 +158,9 @@ .Pq Xr gcc 1 . Most of the UNIX-like operating systems use GNU C as a system compiler, but the various extensions of GNU C, such as -.Xr attribute 3 , +.Xr attribute 3 +or +.Xr typeof 3 , should not be considered standard features. .Sh SEE ALSO .Xr c89 1 , Added files: Index: src/share/man/man3/typeof.3 diff -u /dev/null src/share/man/man3/typeof.3:1.1 --- /dev/null Fri Dec 17 12:14:05 2010 +++ src/share/man/man3/typeof.3 Fri Dec 17 12:14:04 2010 @@ -0,0 +1,62 @@ +.\ $NetBSD: typeof.3,v 1.1 2010/12/17 12:14:04 jruoho Exp $ +.\ +.\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi +.\ All rights reserved. +.\ +.\ 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
CVS commit: src/sys/netsmb
Module Name:src Committed By: pooka Date: Fri Dec 17 13:05:31 UTC 2010 Modified Files: src/sys/netsmb: iconv.h smb_conn.c smb_conn.h smb_dev.c smb_iod.c smb_rq.c smb_subr.h subr_mchain.c Log Message: unifdef -D__NetBSD__ To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/netsmb/iconv.h cvs rdiff -u -r1.26 -r1.27 src/sys/netsmb/smb_conn.c cvs rdiff -u -r1.19 -r1.20 src/sys/netsmb/smb_conn.h \ src/sys/netsmb/smb_subr.h src/sys/netsmb/subr_mchain.c cvs rdiff -u -r1.36 -r1.37 src/sys/netsmb/smb_dev.c cvs rdiff -u -r1.38 -r1.39 src/sys/netsmb/smb_iod.c cvs rdiff -u -r1.33 -r1.34 src/sys/netsmb/smb_rq.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/netsmb/iconv.h diff -u src/sys/netsmb/iconv.h:1.9 src/sys/netsmb/iconv.h:1.10 --- src/sys/netsmb/iconv.h:1.9 Tue Jun 24 10:37:19 2008 +++ src/sys/netsmb/iconv.h Fri Dec 17 13:05:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: iconv.h,v 1.9 2008/06/24 10:37:19 gmcgarry Exp $ */ +/* $NetBSD: iconv.h,v 1.10 2010/12/17 13:05:29 pooka Exp $ */ /* * Copyright (c) 2000-2001, Boris Popov @@ -82,49 +82,6 @@ #else /* !_KERNEL */ -#ifndef __NetBSD__ -#include sys/kobj.h -#include sys/queue.h /* can't avoid that */ -#include sys/sysctl.h /* can't avoid that */ - -struct iconv_cspair; -struct iconv_cspairdata; - -/* - * iconv converter class definition - */ -struct iconv_converter_class { - KOBJ_CLASS_FIELDS; - TAILQ_ENTRY(iconv_converter_class) cc_link; -}; - -struct iconv_cspair { - int cp_id; /* unique id of charset pair */ - int cp_refcount; /* number of references from other pairs */ - const char * cp_from; - const char * cp_to; - void * cp_data; - struct iconv_converter_class * cp_dcp; - struct iconv_cspair *cp_base; - TAILQ_ENTRY(iconv_cspair) cp_link; -}; - -#define KICONV_CONVERTER(name,size) \ -static DEFINE_CLASS(iconv_ ## name, iconv_ ## name ## _methods, (size)); \ -static moduledata_t iconv_ ## name ## _mod = { \ - iconv_#name, iconv_converter_handler, \ - (void*)iconv_ ## name ## _class \ -}; \ -DECLARE_MODULE(iconv_ ## name, iconv_ ## name ## _mod, SI_SUB_DRIVERS, SI_ORDER_ANY); - -#define KICONV_CES(name,size) \ -static DEFINE_CLASS(iconv_ces_ ## name, iconv_ces_ ## name ## _methods, (size)); \ -static moduledata_t iconv_ces_ ## name ## _mod = { \ - iconv_ces_#name, iconv_cesmod_handler, \ - (void*)iconv_ces_ ## name ## _class \ -}; \ -DECLARE_MODULE(iconv_ces_ ## name, iconv_ces_ ## name ## _mod, SI_SUB_DRIVERS, SI_ORDER_ANY); -#endif /* !NetBSD */ #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_ICONV); @@ -144,11 +101,6 @@ */ int iconv_lookupcp(const char **, const char *); -#ifndef __NetBSD__ -int iconv_converter_initstub(struct iconv_converter_class *); -int iconv_converter_donestub(struct iconv_converter_class *); -int iconv_converter_handler(module_t, int, void *); -#endif /* !NetBSD */ #ifdef ICONV_DEBUG #define ICDEBUG(x) aprint_debug x Index: src/sys/netsmb/smb_conn.c diff -u src/sys/netsmb/smb_conn.c:1.26 src/sys/netsmb/smb_conn.c:1.27 --- src/sys/netsmb/smb_conn.c:1.26 Thu Jul 1 13:00:56 2010 +++ src/sys/netsmb/smb_conn.c Fri Dec 17 13:05:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_conn.c,v 1.26 2010/07/01 13:00:56 hannken Exp $ */ +/* $NetBSD: smb_conn.c,v 1.27 2010/12/17 13:05:29 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: smb_conn.c,v 1.26 2010/07/01 13:00:56 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: smb_conn.c,v 1.27 2010/12/17 13:05:29 pooka Exp $); /* * Connection engine. @@ -88,9 +88,6 @@ static struct smb_connobj smb_vclist; static int smb_vcnext = 1; /* next unique id for VC */ -#ifndef __NetBSD__ -SYSCTL_NODE(_net, OID_AUTO, smb, CTLFLAG_RW, NULL, SMB protocol); -#endif MALLOC_DEFINE(M_SMBCONN, SMB conn, SMB connection); @@ -103,12 +100,6 @@ static smb_co_free_t smb_share_free; static smb_co_gone_t smb_share_gone; -#ifndef __NetBSD__ -static int smb_sysctl_treedump(SYSCTL_HANDLER_ARGS); - -SYSCTL_PROC(_net_smb, OID_AUTO, treedump, CTLFLAG_RD | CTLTYPE_OPAQUE, - NULL, 0, smb_sysctl_treedump, S,treedump, Requester tree); -#endif int smb_sm_init(void) @@ -708,25 +699,6 @@ return smb_emptypass; } -#ifndef __NetBSD__ -static int -smb_vc_getinfo(struct smb_vc *vcp, struct smb_vc_info *vip) -{ - memset(vip, 0, sizeof(struct smb_vc_info)); - vip-itype = SMB_INFO_VC; - vip-usecount = vcp-obj.co_usecount; - vip-uid = vcp-vc_uid; - vip-gid = vcp-vc_grp; - vip-mode = vcp-vc_mode; - vip-flags = vcp-obj.co_flags; - vip-sopt = vcp-vc_sopt; - vip-iodstate = vcp-vc_iod-iod_state; - memset(vip-sopt.sv_skey, 0, sizeof(vip-sopt.sv_skey)); - snprintf(vip-srvname, sizeof(vip-srvname), %s, vcp-vc_srvname); - snprintf(vip-vcname, sizeof(vip-vcname), %s, vcp-vc_username); - return 0; -} -#endif u_short
CVS commit: src/sys/netsmb
Module Name:src Committed By: pooka Date: Fri Dec 17 13:24:45 UTC 2010 Modified Files: src/sys/netsmb: smb_dev.c Log Message: Try to unbreak module a little. It would be really nice to not utterly break things in the name of modularization, especially if avoiding breakage takes 2min. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/netsmb/smb_dev.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/netsmb/smb_dev.c diff -u src/sys/netsmb/smb_dev.c:1.37 src/sys/netsmb/smb_dev.c:1.38 --- src/sys/netsmb/smb_dev.c:1.37 Fri Dec 17 13:05:29 2010 +++ src/sys/netsmb/smb_dev.c Fri Dec 17 13:24:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_dev.c,v 1.37 2010/12/17 13:05:29 pooka Exp $ */ +/* $NetBSD: smb_dev.c,v 1.38 2010/12/17 13:24:45 pooka Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: smb_dev.c,v 1.37 2010/12/17 13:05:29 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: smb_dev.c,v 1.38 2010/12/17 13:24:45 pooka Exp $); #include sys/param.h #include sys/kernel.h @@ -90,11 +90,16 @@ void nsmbattach(int); +static bool nsmb_inited = false; void nsmbattach(int num) { + if (nsmb_inited) + return; + nsmb_inited = true; + if (num = 0) { #ifdef DIAGNOSTIC panic(nsmbattach: count = 0); @@ -124,6 +129,17 @@ smb_rqpool_init(); } +static void +nsmbdetach(void) +{ + + smb_iod_done(); + smb_sm_done(); + smb_rqpool_fini(); + free(smb_devtbl, M_NSMBDEV); + nsmb_inited = false; +} + int nsmb_dev_open(dev_t dev, int oflags, int devtype, struct lwp *l) @@ -358,24 +374,25 @@ nsmbattach(1); error = devsw_attach(nsmb, NULL, bmajor, nsmb_cdevsw, cmajor); - if (error) - return error; + if (error == EEXIST) /* builtin */ + error = 0; + if (error) { + nsmbdetach(); + } break; case MODULE_CMD_FINI: - smb_iod_done(); - smb_sm_done(); - smb_rqpool_fini(); error = devsw_detach(NULL, nsmb_cdevsw); - free(smb_devtbl, M_NSMBDEV); + if (error) + break; + nsmbdetach(); break; default: error = ENOTTY; break; } - return error; - return 0; + return error; } #endif /* _MODULE */
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pooka Date: Fri Dec 17 13:37:38 UTC 2010 Modified Files: src/sys/dev/sysmon: swsensor.c Log Message: use aprint To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sysmon/swsensor.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/sysmon/swsensor.c diff -u src/sys/dev/sysmon/swsensor.c:1.6 src/sys/dev/sysmon/swsensor.c:1.7 --- src/sys/dev/sysmon/swsensor.c:1.6 Thu Dec 16 14:33:30 2010 +++ src/sys/dev/sysmon/swsensor.c Fri Dec 17 13:37:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: swsensor.c,v 1.6 2010/12/16 14:33:30 pgoyette Exp $ */ +/* $NetBSD: swsensor.c,v 1.7 2010/12/17 13:37:37 pooka Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.6 2010/12/16 14:33:30 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: swsensor.c,v 1.7 2010/12/17 13:37:37 pooka Exp $); #include sys/param.h #include sys/kernel.h @@ -243,17 +243,17 @@ if (error == 0) error = sysmon_envsys_register(swsensor_sme); else { - printf(sysmon_envsys_sensor_attach failed: %d\n, error); + aprint_error(sysmon_envsys_sensor_attach failed: %d\n, error); return error; } if (error == 0) sysctl_swsensor_setup(); else - printf(sysmon_envsys_register failed: %d\n, error); + aprint_error(sysmon_envsys_register failed: %d\n, error); if (error == 0) - printf(swsensor: initialized\n); + aprint_normal(swsensor: initialized\n); return error; }
CVS commit: src/sys/netsmb
Module Name:src Committed By: pooka Date: Fri Dec 17 14:27:34 UTC 2010 Modified Files: src/sys/netsmb: smb_dev.c Log Message: * remove #ifdef nonsense (which caused the lossage in the first place) * make it a DRIVER so that it autoloads when /dev/nsmb is opened To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/netsmb/smb_dev.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/netsmb/smb_dev.c diff -u src/sys/netsmb/smb_dev.c:1.38 src/sys/netsmb/smb_dev.c:1.39 --- src/sys/netsmb/smb_dev.c:1.38 Fri Dec 17 13:24:45 2010 +++ src/sys/netsmb/smb_dev.c Fri Dec 17 14:27:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_dev.c,v 1.38 2010/12/17 13:24:45 pooka Exp $ */ +/* $NetBSD: smb_dev.c,v 1.39 2010/12/17 14:27:34 pooka Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: smb_dev.c,v 1.38 2010/12/17 13:24:45 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: smb_dev.c,v 1.39 2010/12/17 14:27:34 pooka Exp $); #include sys/param.h #include sys/kernel.h @@ -47,6 +47,7 @@ #include sys/lock.h #include sys/malloc.h #include sys/file.h /* Must come after sys/malloc.h */ +#include sys/module.h #include sys/mbuf.h #include sys/poll.h #include sys/proc.h @@ -356,13 +357,7 @@ return error; } - -#ifdef _MODULE - -#include sys/module.h - -MODULE(MODULE_CLASS_MISC, nsmb, NULL); - +MODULE(MODULE_CLASS_DRIVER, nsmb, NULL); static int nsmb_modcmd(modcmd_t cmd, void *arg) { @@ -394,8 +389,6 @@ return error; } -#endif /* _MODULE */ - /* * Convert a file descriptor to appropriate smb_share pointer @@ -441,4 +434,3 @@ *sspp = ssp; return 0; } -
CVS commit: src/tests/dev/raidframe
Module Name:src Committed By: pooka Date: Fri Dec 17 14:51:27 UTC 2010 Modified Files: src/tests/dev/raidframe: t_raid.sh Log Message: fix editing artifact To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/dev/raidframe/t_raid.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/raidframe/t_raid.sh diff -u src/tests/dev/raidframe/t_raid.sh:1.1 src/tests/dev/raidframe/t_raid.sh:1.2 --- src/tests/dev/raidframe/t_raid.sh:1.1 Wed Dec 15 20:40:18 2010 +++ src/tests/dev/raidframe/t_raid.sh Fri Dec 17 14:51:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_raid.sh,v 1.1 2010/12/15 20:40:18 pooka Exp $ +# $NetBSD: t_raid.sh,v 1.2 2010/12/17 14:51:27 pooka Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,7 @@ } atf_test_case smalldisk cleanup -raid1fail_head() +smalldisk_head() { atf_set descr Checks the raidframe works on small disks
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: pooka Date: Fri Dec 17 19:12:30 UTC 2010 Modified Files: src/tests/lib/libc/gen: Makefile Added Files: src/tests/lib/libc/gen: t_syslog_pthread.c Log Message: Add an isolated test case for PR lib/44248. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/t_syslog_pthread.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/gen/Makefile diff -u src/tests/lib/libc/gen/Makefile:1.1 src/tests/lib/libc/gen/Makefile:1.2 --- src/tests/lib/libc/gen/Makefile:1.1 Mon Sep 6 14:41:21 2010 +++ src/tests/lib/libc/gen/Makefile Fri Dec 17 19:12:30 2010 @@ -1,9 +1,12 @@ -# $NetBSD: Makefile,v 1.1 2010/09/06 14:41:21 christos Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/17 19:12:30 pooka Exp $ .include bsd.own.mk TESTSDIR= ${TESTSBASE}/lib/libc/gen TESTS_C+= t_glob_star +TESTS_C+= t_syslog_pthread + +LDADD.t_syslog_pthread+=-lpthread .include bsd.test.mk Added files: Index: src/tests/lib/libc/gen/t_syslog_pthread.c diff -u /dev/null src/tests/lib/libc/gen/t_syslog_pthread.c:1.1 --- /dev/null Fri Dec 17 19:12:30 2010 +++ src/tests/lib/libc/gen/t_syslog_pthread.c Fri Dec 17 19:12:30 2010 @@ -0,0 +1,56 @@ +/* $NetBSD: t_syslog_pthread.c,v 1.1 2010/12/17 19:12:30 pooka Exp $ */ + +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * 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 COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDERS 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/types.h + +#include atf-c.h +#include syslog.h + +ATF_TC(basic); +ATF_TC_HEAD(basic, tc) +{ + + atf_tc_set_md_var(tc, descr, Test that syslog works at all); + atf_tc_set_md_var(tc, timeout, 2); +} + +ATF_TC_BODY(basic, tc) +{ + + atf_tc_expect_timeout(PR lib/44248); + syslog(LOG_DEBUG, from tests/lib/libc/gen/t_syslog_pthread); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, basic); + + return atf_no_error(); +}
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: pooka Date: Fri Dec 17 19:13:48 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Log Message: the setlist joy for a new tp To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 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.179 src/distrib/sets/lists/tests/mi:1.180 --- src/distrib/sets/lists/tests/mi:1.179 Wed Dec 15 20:42:24 2010 +++ src/distrib/sets/lists/tests/mi Fri Dec 17 19:13:48 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.179 2010/12/15 20:42:24 pooka Exp $ +# $NetBSD: mi,v 1.180 2010/12/17 19:13:48 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -319,6 +319,7 @@ ./usr/libdata/debug/usr/tests/lib/libc tests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/gen/t_glob_star.debug tests-lib-debug debug,atf +./usr/libdata/debug/usr/tests/lib/libc/gen/t_syslog_pthread.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/hashtests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/hash/t_sha2.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/stdiotests-lib-debug @@ -1529,6 +1530,7 @@ ./usr/tests/lib/libc/gen tests-lib-tests ./usr/tests/lib/libc/gen/Atffile tests-lib-tests atf ./usr/tests/lib/libc/gen/t_glob_star tests-lib-tests atf +./usr/tests/lib/libc/gen/t_syslog_pthread tests-lib-tests atf ./usr/tests/lib/libc/hash tests-lib-tests ./usr/tests/lib/libc/hash/Atffile tests-lib-tests atf ./usr/tests/lib/libc/hash/t_sha2 tests-lib-tests atf
CVS commit: src/sys/arch/ofppc
Module Name:src Committed By: phx Date: Fri Dec 17 19:18:49 UTC 2010 Modified Files: src/sys/arch/ofppc/include: pegasosreg.h src/sys/arch/ofppc/pci: gt_mainbus.c Log Message: Set the GPIO to enable AGP configuration space access when attaching gtpci0 and do not reset it again. This keeps AGP devices visible after configure(). Improved the match-function to look for a Discovery controller on the PCI bus. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ofppc/include/pegasosreg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ofppc/pci/gt_mainbus.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/ofppc/include/pegasosreg.h diff -u src/sys/arch/ofppc/include/pegasosreg.h:1.2 src/sys/arch/ofppc/include/pegasosreg.h:1.3 --- src/sys/arch/ofppc/include/pegasosreg.h:1.2 Wed Jun 9 04:41:42 2010 +++ src/sys/arch/ofppc/include/pegasosreg.h Fri Dec 17 19:18:49 2010 @@ -1,9 +1,14 @@ -/* $NetBSD: pegasosreg.h,v 1.2 2010/06/09 04:41:42 kiyohara Exp $ */ +/* $NetBSD: pegasosreg.h,v 1.3 2010/12/17 19:18:49 phx Exp $ */ #ifndef _MACHINE_PEGASOSREG_H_ #define _MACHINE_PEGASOSREG_H_ +/* Marvell Discovery System Controller */ #define PEGASOS2_GT_REGBASE 0xf100 + +/* GPIO to control AGP configuration space access */ +#define PEGASOS2_AGP_CONF_ENABLE (1 23) + #define PEGASOS2_SRAM_BASE 0xf200 #define PEGASOS2_SRAM_SIZE 0x4 Index: src/sys/arch/ofppc/pci/gt_mainbus.c diff -u src/sys/arch/ofppc/pci/gt_mainbus.c:1.2 src/sys/arch/ofppc/pci/gt_mainbus.c:1.3 --- src/sys/arch/ofppc/pci/gt_mainbus.c:1.2 Sun Jun 20 00:25:41 2010 +++ src/sys/arch/ofppc/pci/gt_mainbus.c Fri Dec 17 19:18:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gt_mainbus.c,v 1.2 2010/06/20 00:25:41 matt Exp $ */ +/* $NetBSD: gt_mainbus.c,v 1.3 2010/12/17 19:18:49 phx Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gt_mainbus.c,v 1.2 2010/06/20 00:25:41 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: gt_mainbus.c,v 1.3 2010/12/17 19:18:49 phx Exp $); #include opt_pci.h #include opt_marvell.h @@ -49,6 +49,7 @@ #include dev/pci/pcivar.h #include dev/pci/pciconf.h +#include dev/pci/pcidevs.h #include dev/marvell/gtreg.h #include dev/marvell/gtvar.h @@ -122,7 +123,8 @@ gt_match(device_t parent, cfdata_t cf, void *aux) { struct confargs *ca = aux; - int node, pci, ethernet; + uint32_t device_id, vendor_id; + int node; char name[32]; if (strcmp(ca-ca_name, gt) != 0 || @@ -130,20 +132,27 @@ return 0; /* Paranoid check... */ - - pci = ethernet = 0; for (node = OF_child(OF_finddevice(/)); node; node = OF_peer(node)) { memset(name, 0, sizeof(name)); if (OF_getprop(node, name, name, sizeof(name)) == -1) continue; - if (strcmp(name, pci) == 0) - pci++; - else if (strcmp(name, ethernet) == 0) - ethernet++; - + if (strcmp(name, pci) == 0) { + for (node = OF_child(node); node; + node = OF_peer(node)) { +if (OF_getprop(node, vendor-id, +vendor_id, sizeof(vendor_id)) == -1) + continue; +if (OF_getprop(node, device-id, +device_id, sizeof(device_id)) == -1) + continue; +/* Find a Marvell system controller */ +if (vendor_id == PCI_VENDOR_MARVELL +device_id == PCI_PRODUCT_MARVELL_MV64360) + return 1; + } + return 0; + } } - if (pci == 2 (ethernet == 1 || ethernet == 0)) - return 1; return 0; } @@ -244,19 +253,13 @@ genppc_gtpci0_chipset.pc_iot = gtpci0_io_bs_tag; genppc_gtpci0_chipset.pc_memt = gtpci0_mem_bs_tag; - /* Enable access to space of configuration for AGP. */ - bus_space_write_4(sc-sc_iot, sc-sc_ioh, GT_GPP_Value_Set, - (1 23)); + /* Enable AGP configuration space access. */ + bus_space_write_4(sc-sc_iot, sc-sc_ioh, + GT_GPP_Value_Set, PEGASOS2_AGP_CONF_ENABLE); } #endif gt_attach_common(sc); - -#if NGTPCI 0 - /* Disable access to space of configuration for AGP. */ - bus_space_write_4(sc-sc_iot, sc-sc_ioh, GT_GPP_Value_Clear, - (1 23)); -#endif }
CVS commit: src
Module Name:src Committed By: njoly Date: Fri Dec 17 19:20:42 UTC 2010 Modified Files: src/bin/ls: ls.1 src/lib/libc/gen: directory.3 scandir.3 Log Message: Fix cross-reference, dir(5) - dirent(3). To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/bin/ls/ls.1 cvs rdiff -u -r1.35 -r1.36 src/lib/libc/gen/directory.3 cvs rdiff -u -r1.13 -r1.14 src/lib/libc/gen/scandir.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ls/ls.1 diff -u src/bin/ls/ls.1:1.65 src/bin/ls/ls.1:1.66 --- src/bin/ls/ls.1:1.65 Fri May 14 17:11:52 2010 +++ src/bin/ls/ls.1 Fri Dec 17 19:20:42 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: ls.1,v 1.65 2010/05/14 17:11:52 joerg Exp $ +.\ $NetBSD: ls.1,v 1.66 2010/12/17 19:20:42 njoly Exp $ .\ .\ Copyright (c) 1980, 1990, 1991, 1993, 1994 .\ The Regents of the University of California. All rights reserved. @@ -430,7 +430,7 @@ .Pp The number of bytes displayed for a directory is a function of the number of -.Xr dirent 5 +.Xr dirent 3 structures in the directory, not all of which may be allocated to any existing file. .Sh ENVIRONMENT @@ -477,8 +477,8 @@ .Xr chflags 1 , .Xr chmod 1 , .Xr stat 2 , +.Xr dirent 3 , .Xr getbsize 3 , -.Xr dir 5 , .Xr sticky 7 , .Xr symlink 7 .Sh STANDARDS Index: src/lib/libc/gen/directory.3 diff -u src/lib/libc/gen/directory.3:1.35 src/lib/libc/gen/directory.3:1.36 --- src/lib/libc/gen/directory.3:1.35 Fri Jun 4 05:42:24 2010 +++ src/lib/libc/gen/directory.3 Fri Dec 17 19:20:42 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: directory.3,v 1.35 2010/06/04 05:42:24 jruoho Exp $ +.\ $NetBSD: directory.3,v 1.36 2010/12/17 19:20:42 njoly Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -369,7 +369,7 @@ .Xr lseek 2 , .Xr open 2 , .Xr read 2 , -.Xr dir 5 +.Xr dirent 3 .Sh STANDARDS The .Fn opendir , Index: src/lib/libc/gen/scandir.3 diff -u src/lib/libc/gen/scandir.3:1.13 src/lib/libc/gen/scandir.3:1.14 --- src/lib/libc/gen/scandir.3:1.13 Thu Apr 29 08:06:21 2010 +++ src/lib/libc/gen/scandir.3 Fri Dec 17 19:20:42 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: scandir.3,v 1.13 2010/04/29 08:06:21 jruoho Exp $ +.\ $NetBSD: scandir.3,v 1.14 2010/12/17 19:20:42 njoly Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -94,9 +94,9 @@ cannot allocate enough memory to hold all the data structures. .Sh SEE ALSO .Xr directory 3 , +.Xr dirent 3 , .Xr malloc 3 , -.Xr qsort 3 , -.Xr dir 5 +.Xr qsort 3 .Sh STANDARDS The .Fn scandir
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Fri Dec 17 22:00:44 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: cosmetics. no functional changes. - constify - wrap long lines - assertions - comments To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/sys/uvm/uvm_fault.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.176 src/sys/uvm/uvm_fault.c:1.177 --- src/sys/uvm/uvm_fault.c:1.176 Wed Dec 15 13:44:17 2010 +++ src/sys/uvm/uvm_fault.c Fri Dec 17 22:00:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.176 2010/12/15 13:44:17 pooka Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.177 2010/12/17 22:00:43 yamt Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.176 2010/12/15 13:44:17 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.177 2010/12/17 22:00:43 yamt Exp $); #include opt_uvmhist.h @@ -98,7 +98,7 @@ * the code is structured as follows: * * - init the IN params in the ufi structure - * ReFault: + * ReFault: (ERESTART returned to the loop in uvm_fault_internal) * - do lookups [locks maps], check protection, handle needs_copy * - check for case 0 fault (error) * - establish range of fault @@ -702,23 +702,22 @@ bool wire_mapping; bool narrow; bool wire_paging; - bool maxprot; bool cow_now; bool promote; }; static inline int uvm_fault_check( struct uvm_faultinfo *, struct uvm_faultctx *, - struct vm_anon ***, struct vm_page ***); + struct vm_anon ***, bool); static int uvm_fault_upper( struct uvm_faultinfo *, struct uvm_faultctx *, struct vm_anon **); static inline int uvm_fault_upper_lookup( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, struct vm_anon **, struct vm_page **); static inline void uvm_fault_upper_neighbor( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, vaddr_t, struct vm_page *, bool); static inline int uvm_fault_upper_loan( struct uvm_faultinfo *, struct uvm_faultctx *, @@ -730,25 +729,24 @@ struct uvm_faultinfo *, struct uvm_faultctx *, struct uvm_object *, struct vm_anon *); static int uvm_fault_upper_enter( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, struct uvm_object *, struct vm_anon *, struct vm_page *, struct vm_anon *); static inline void uvm_fault_upper_done( - struct uvm_faultinfo *, struct uvm_faultctx *, - struct uvm_object *, struct vm_anon *, - struct vm_page *); + struct uvm_faultinfo *, const struct uvm_faultctx *, + struct vm_anon *, struct vm_page *); static int uvm_fault_lower( struct uvm_faultinfo *, struct uvm_faultctx *, struct vm_page **); static inline void uvm_fault_lower_lookup( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, struct vm_page **); static inline void uvm_fault_lower_neighbor( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, vaddr_t, struct vm_page *, bool); static inline int uvm_fault_lower_io( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, struct uvm_object **, struct vm_page **); static inline int uvm_fault_lower_direct( struct uvm_faultinfo *, struct uvm_faultctx *, @@ -761,14 +759,13 @@ struct uvm_faultinfo *, struct uvm_faultctx *, struct uvm_object *, struct vm_page *); static int uvm_fault_lower_enter( - struct uvm_faultinfo *, struct uvm_faultctx *, + struct uvm_faultinfo *, const struct uvm_faultctx *, struct uvm_object *, struct vm_anon *, struct vm_page *, struct vm_page *); static inline void uvm_fault_lower_done( - struct uvm_faultinfo *, struct uvm_faultctx *, - struct uvm_object *, struct vm_anon *, - struct vm_page *); + struct uvm_faultinfo *, const struct uvm_faultctx *, + struct uvm_object *, struct vm_page *); int uvm_fault_internal(struct vm_map *orig_map, vaddr_t vaddr, @@ -784,9 +781,8 @@ /* wire fault causes wiring of both mapping and paging */ .wire_mapping = (fault_flag UVM_FAULT_WIRE) != 0, .wire_paging = (fault_flag UVM_FAULT_WIRE) != 0, - - .maxprot = (fault_flag UVM_FAULT_MAXPROT) != 0, }; + const bool maxprot = (fault_flag UVM_FAULT_MAXPROT) != 0; struct vm_anon *anons_store[UVM_MAXRANGE], **anons; struct vm_page *pages_store[UVM_MAXRANGE], **pages; int error; @@ -810,7 +806,7 @@ anons = anons_store;
CVS commit: src/sys/miscfs/deadfs
Module Name:src Committed By: yamt Date: Fri Dec 17 22:03:00 UTC 2010 Modified Files: src/sys/miscfs/deadfs: dead_vnops.c Log Message: do minimal locking to make assertions like KASSERT(VOP_ISLOCKED(vp)) happy. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/miscfs/deadfs/dead_vnops.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/miscfs/deadfs/dead_vnops.c diff -u src/sys/miscfs/deadfs/dead_vnops.c:1.49 src/sys/miscfs/deadfs/dead_vnops.c:1.50 --- src/sys/miscfs/deadfs/dead_vnops.c:1.49 Fri Jul 2 07:58:09 2010 +++ src/sys/miscfs/deadfs/dead_vnops.c Fri Dec 17 22:03:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dead_vnops.c,v 1.49 2010/07/02 07:58:09 hannken Exp $ */ +/* $NetBSD: dead_vnops.c,v 1.50 2010/12/17 22:03:00 yamt Exp $ */ /* * Copyright (c) 1989, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dead_vnops.c,v 1.49 2010/07/02 07:58:09 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: dead_vnops.c,v 1.50 2010/12/17 22:03:00 yamt Exp $); #include sys/param.h #include sys/systm.h @@ -60,11 +60,11 @@ #define dead_inactive genfs_nullop #define dead_reclaim genfs_nullop int dead_lock(void *); -#define dead_unlock genfs_nullop +#define dead_unlock genfs_unlock int dead_bmap(void *); int dead_strategy(void *); int dead_print(void *); -#define dead_islocked genfs_nullop +#define dead_islocked genfs_islocked #define dead_bwrite genfs_nullop #define dead_revoke genfs_nullop int dead_getpages(void *); @@ -235,8 +235,9 @@ struct proc *a_p; } */ *ap = v; - if (!chkvnlock(ap-a_vp)) - return (0); + if (!chkvnlock(ap-a_vp)) { + return genfs_lock(v); + } return (VCALL(ap-a_vp, VOFFSET(vop_lock), ap)); }
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:04:42 UTC 2010 Modified Files: src/sys/kern: vfs_subr.c Log Message: 0 - NULL for a pointer To generate a diff of this commit: cvs rdiff -u -r1.416 -r1.417 src/sys/kern/vfs_subr.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_subr.c diff -u src/sys/kern/vfs_subr.c:1.416 src/sys/kern/vfs_subr.c:1.417 --- src/sys/kern/vfs_subr.c:1.416 Thu Nov 11 13:58:58 2010 +++ src/sys/kern/vfs_subr.c Fri Dec 17 22:04:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.416 2010/11/11 13:58:58 yamt Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.417 2010/12/17 22:04:42 yamt Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.416 2010/11/11 13:58:58 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.417 2010/12/17 22:04:42 yamt Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -637,7 +637,7 @@ vp-v_op = vops; insmntque(vp, mp); *vpp = vp; - vp-v_data = 0; + vp-v_data = NULL; /* * initialize uvm_object within vnode.
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:05:36 UTC 2010 Modified Files: src/sys/kern: sys_aio.c Log Message: aio_worker: add an assertion To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/kern/sys_aio.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/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.35 src/sys/kern/sys_aio.c:1.36 --- src/sys/kern/sys_aio.c:1.35 Fri Aug 6 18:36:09 2010 +++ src/sys/kern/sys_aio.c Fri Dec 17 22:05:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.35 2010/08/06 18:36:09 jruoho Exp $ */ +/* $NetBSD: sys_aio.c,v 1.36 2010/12/17 22:05:36 yamt Exp $ */ /* * Copyright (c) 2007 Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.35 2010/08/06 18:36:09 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.36 2010/12/17 22:05:36 yamt Exp $); #ifdef _KERNEL_OPT #include opt_ddb.h @@ -327,6 +327,7 @@ sizeof(struct aiocb)); mutex_enter(aio-aio_mtx); + KASSERT(aio-curjob == a_job); aio-curjob = NULL; /* Decrease a reference counter, if there is a LIO structure */
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:06:31 UTC 2010 Modified Files: src/sys/kern: kern_descrip.c Log Message: update some comments To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/kern/kern_descrip.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_descrip.c diff -u src/sys/kern/kern_descrip.c:1.207 src/sys/kern/kern_descrip.c:1.208 --- src/sys/kern/kern_descrip.c:1.207 Fri Oct 29 15:32:23 2010 +++ src/sys/kern/kern_descrip.c Fri Dec 17 22:06:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.207 2010/10/29 15:32:23 pooka Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.208 2010/12/17 22:06:31 yamt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.207 2010/10/29 15:32:23 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.208 2010/12/17 22:06:31 yamt Exp $); #include sys/param.h #include sys/systm.h @@ -1598,7 +1598,7 @@ * the file descriptor being sought for duplication. The error * return ensures that the vnode for this device will be released * by vn_open. Open will detect this special error and take the - * actions in dupfdopen below. Other callers of vn_open or VOP_OPEN + * actions in fd_dupopen below. Other callers of vn_open or VOP_OPEN * will simply report the error. */ l-l_dupfd = minor(dev); /* XXX */ @@ -1626,11 +1626,11 @@ /* * There are two cases of interest here. * - * For EDUPFD simply dup (dfd) to file descriptor - * (indx) and return. + * For EDUPFD simply dup (old) to file descriptor + * (new) and return. * - * For EMOVEFD steal away the file structure from (dfd) and - * store it in (indx). (dfd) is effectively closed by + * For EMOVEFD steal away the file structure from (old) and + * store it in (new). (old) is effectively closed by * this operation. * * Any other error code is just returned.
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:08:19 UTC 2010 Modified Files: src/sys/kern: kern_time.c Log Message: realtimerexpire: rename a confusing variable. no functional change. (now_ms - now_ns as it hold a nano second value) To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/kern/kern_time.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_time.c diff -u src/sys/kern/kern_time.c:1.165 src/sys/kern/kern_time.c:1.166 --- src/sys/kern/kern_time.c:1.165 Thu Apr 8 11:51:13 2010 +++ src/sys/kern/kern_time.c Fri Dec 17 22:08:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.165 2010/04/08 11:51:13 njoly Exp $ */ +/* $NetBSD: kern_time.c,v 1.166 2010/12/17 22:08:18 yamt Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_time.c,v 1.165 2010/04/08 11:51:13 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_time.c,v 1.166 2010/12/17 22:08:18 yamt Exp $); #include sys/param.h #include sys/resourcevar.h @@ -974,7 +974,7 @@ void realtimerexpire(void *arg) { - uint64_t last_val, next_val, interval, now_ms; + uint64_t last_val, next_val, interval, now_ns; struct timespec now, next; struct ptimer *pt; int backwards; @@ -997,17 +997,17 @@ if (!backwards timespeccmp(next, now, )) { pt-pt_time.it_value = next; } else { - now_ms = timespec2ns(now); + now_ns = timespec2ns(now); last_val = timespec2ns(pt-pt_time.it_value); interval = timespec2ns(pt-pt_time.it_interval); - next_val = now_ms + - (now_ms - last_val + interval - 1) % interval; + next_val = now_ns + + (now_ns - last_val + interval - 1) % interval; if (backwards) next_val += interval; else - pt-pt_overruns += (now_ms - last_val) / interval; + pt-pt_overruns += (now_ns - last_val) / interval; pt-pt_time.it_value.tv_sec = next_val / 10; pt-pt_time.it_value.tv_nsec = next_val % 10;
CVS commit: src/sys/nfs
Module Name:src Committed By: yamt Date: Fri Dec 17 22:22:00 UTC 2010 Modified Files: src/sys/nfs: nfs_socket.c Log Message: nfs_rcvunlock: don't wake up all waiters. To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/nfs/nfs_socket.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/nfs/nfs_socket.c diff -u src/sys/nfs/nfs_socket.c:1.187 src/sys/nfs/nfs_socket.c:1.188 --- src/sys/nfs/nfs_socket.c:1.187 Tue Mar 2 23:19:09 2010 +++ src/sys/nfs/nfs_socket.c Fri Dec 17 22:22:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.187 2010/03/02 23:19:09 pooka Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.188 2010/12/17 22:22:00 yamt Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nfs_socket.c,v 1.187 2010/03/02 23:19:09 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: nfs_socket.c,v 1.188 2010/12/17 22:22:00 yamt Exp $); #ifdef _KERNEL_OPT #include opt_nfs.h @@ -906,10 +906,12 @@ * receive lock. */ if (rep-r_mrep != NULL) { + cv_signal(nmp-nm_rcvcv); error = EALREADY; break; } if (nfs_sigintr(rep-r_nmp, rep, rep-r_lwp)) { + cv_signal(nmp-nm_rcvcv); error = EINTR; break; } @@ -944,7 +946,7 @@ if ((nmp-nm_iflag NFSMNT_RCVLOCK) == 0) panic(nfs rcvunlock); nmp-nm_iflag = ~NFSMNT_RCVLOCK; - cv_broadcast(nmp-nm_rcvcv); + cv_signal(nmp-nm_rcvcv); mutex_exit(nmp-nm_lock); }
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:24:11 UTC 2010 Modified Files: src/sys/kern: subr_vmem.c Log Message: wrap a long line. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/kern/subr_vmem.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/subr_vmem.c diff -u src/sys/kern/subr_vmem.c:1.57 src/sys/kern/subr_vmem.c:1.58 --- src/sys/kern/subr_vmem.c:1.57 Wed Mar 18 10:22:42 2009 +++ src/sys/kern/subr_vmem.c Fri Dec 17 22:24:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_vmem.c,v 1.57 2009/03/18 10:22:42 cegger Exp $ */ +/* $NetBSD: subr_vmem.c,v 1.58 2010/12/17 22:24:11 yamt Exp $ */ /*- * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.57 2009/03/18 10:22:42 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.58 2010/12/17 22:24:11 yamt Exp $); #if defined(_KERNEL) #include opt_ddb.h @@ -579,7 +579,8 @@ KASSERT((flags (VM_SLEEP|VM_NOSLEEP)) != 0); KASSERT((~flags (VM_SLEEP|VM_NOSLEEP)) != 0); - KASSERT(spanbttype == BT_TYPE_SPAN || spanbttype == BT_TYPE_SPAN_STATIC); + KASSERT(spanbttype == BT_TYPE_SPAN || + spanbttype == BT_TYPE_SPAN_STATIC); btspan = bt_alloc(vm, flags); if (btspan == NULL) {
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:34:04 UTC 2010 Modified Files: src/sys/kern: vfs_lookup.c Log Message: - lookup_once: when crossing a mount point, don't keep the parent vnode locked. ie. don't lock a vnode while holding another vnode which belongs to a different filesystem. otherwise we propagate slowness (or deadness) of a filesystem to another via vnode lock chain. - lookup_parsepath: don't alter vnode states. let the caller do it instead. - add comments and assertions. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 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.125 src/sys/kern/vfs_lookup.c:1.126 --- src/sys/kern/vfs_lookup.c:1.125 Tue Nov 30 10:43:05 2010 +++ src/sys/kern/vfs_lookup.c Fri Dec 17 22:34:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.125 2010/11/30 10:43:05 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.126 2010/12/17 22:34:04 yamt Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_lookup.c,v 1.125 2010/11/30 10:43:05 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_lookup.c,v 1.126 2010/12/17 22:34:04 yamt Exp $); #include opt_magiclinks.h @@ -696,6 +696,7 @@ } return error; } + KASSERT(VOP_ISLOCKED(state-namei_startdir) == LK_EXCLUSIVE); /* Loop through symbolic links */ for (;;) { @@ -904,6 +905,11 @@ return 0; } +/* + * lookup_parsepath: consume a component name from state-ndp and prepare + * state-cnp for it. + */ + static int lookup_parsepath(struct namei_state *state) { @@ -922,16 +928,12 @@ * cnp-cn_nameptr for callers that need the name. Callers needing * the name set the SAVENAME flag. When done, they assume * responsibility for freeing the pathname buffer. - * - * At this point, our only vnode state is that dp is held and locked. */ cnp-cn_consume = 0; cp = NULL; cnp-cn_hash = namei_hash(cnp-cn_nameptr, cp); cnp-cn_namelen = cp - cnp-cn_nameptr; if (cnp-cn_namelen NAME_MAX) { - vput(state-dp); - ndp-ni_dvp = NULL; return ENAMETOOLONG; } #ifdef NAMEI_DIAGNOSTIC @@ -982,6 +984,21 @@ return 0; } +/* + * lookup_once: look up the vnode for the next component name (state-cnp). + * + * takes care of dot-dot, cross-mount, and MNT_UNION. + * + * inputs: + * state-dp the parent vnode + * state-cnp the componentname to lookup + * + * outputs: + * state-dp the result vnode + * ndp-ni_vp updated to state-dp + * ndp-ni_dvp updated to the parent directory vnode + */ + static int lookup_once(struct namei_state *state) { @@ -1136,6 +1153,8 @@ * state-dp and ndp-ni_dvp are both locked and held, * and may be the same vnode. */ + KASSERT(VOP_ISLOCKED(state-dp) == LK_EXCLUSIVE); + KASSERT(VOP_ISLOCKED(ndp-ni_dvp) == LK_EXCLUSIVE); /* * Check to see if the vnode has been mounted on; @@ -1157,10 +1176,9 @@ vn_lock(ndp-ni_dvp, LK_EXCLUSIVE | LK_RETRY); return error; } - VOP_UNLOCK(tdp); - ndp-ni_vp = state-dp = tdp; - vn_lock(ndp-ni_dvp, LK_EXCLUSIVE | LK_RETRY); - vn_lock(ndp-ni_vp, LK_EXCLUSIVE | LK_RETRY); + vrele(ndp-ni_dvp); + vref(tdp); + ndp-ni_dvp = ndp-ni_vp = state-dp = tdp; } return 0; @@ -1187,8 +1205,14 @@ } dirloop: + /* + * At this point, our only vnode state is that dp is held and locked. + */ + KASSERT(VOP_ISLOCKED(state-dp) == LK_EXCLUSIVE); + KASSERT(ndp-ni_dvp == NULL); error = lookup_parsepath(state); if (error) { + vput(state-dp); goto bad; } @@ -1235,6 +1259,7 @@ } else { vput(ndp-ni_dvp); } + ndp-ni_dvp = NULL; goto dirloop; }
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 17 22:35:08 UTC 2010 Modified Files: src/sys/kern: exec_subr.c Log Message: new_vmcmd: assertions To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/kern/exec_subr.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/exec_subr.c diff -u src/sys/kern/exec_subr.c:1.65 src/sys/kern/exec_subr.c:1.66 --- src/sys/kern/exec_subr.c:1.65 Mon Aug 23 20:53:08 2010 +++ src/sys/kern/exec_subr.c Fri Dec 17 22:35:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_subr.c,v 1.65 2010/08/23 20:53:08 christos Exp $ */ +/* $NetBSD: exec_subr.c,v 1.66 2010/12/17 22:35:07 yamt Exp $ */ /* * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: exec_subr.c,v 1.65 2010/08/23 20:53:08 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: exec_subr.c,v 1.66 2010/12/17 22:35:07 yamt Exp $); #include opt_pax.h @@ -80,6 +80,8 @@ struct exec_vmcmd*vcp; VMCMD_EVCNT_INCR(calls); + KASSERT(proc != vmcmd_map_pagedvn || (vp-v_iflag VI_TEXT)); + KASSERT(vp == NULL || vp-v_usecount 0); if (evsp-evs_used = evsp-evs_cnt) vmcmdset_extend(evsp);
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: njoly Date: Fri Dec 17 22:56:22 UTC 2010 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Add _tcpdump uid/gid checks. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.111 src/usr.sbin/postinstall/postinstall:1.112 --- src/usr.sbin/postinstall/postinstall:1.111 Tue Nov 30 14:35:38 2010 +++ src/usr.sbin/postinstall/postinstall Fri Dec 17 22:56:22 2010 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.111 2010/11/30 14:35:38 njoly Exp $ +# $NetBSD: postinstall,v 1.112 2010/12/17 22:56:22 njoly Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -815,7 +815,7 @@ check_ids $1 groups ${DEST_DIR}/etc/group \ named ntpd sshd authpf _pflogd _rwhod _proxy _timedc \ - _sdpd _httpd _mdnsd _atf + _sdpd _httpd _mdnsd _atf _tcpdump } # @@ -1430,7 +1430,7 @@ check_ids $1 users ${DEST_DIR}/etc/master.passwd \ named ntpd postfix sshd _pflogd _rwhod _proxy _timedc \ - _sdpd _httpd _mdnsd _atf + _sdpd _httpd _mdnsd _atf _tcpdump }
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Fri Dec 17 23:11:57 UTC 2010 Modified Files: src/lib/libc/time: localtime.c Log Message: PR/44248: Antti Kantee: Fix multi-threaded localtime hang. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/lib/libc/time/localtime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.49 src/lib/libc/time/localtime.c:1.50 --- src/lib/libc/time/localtime.c:1.49 Thu Dec 16 13:38:07 2010 +++ src/lib/libc/time/localtime.c Fri Dec 17 18:11:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.49 2010/12/16 18:38:07 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.50 2010/12/17 23:11:57 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = @(#)localtime.c 8.9; #else -__RCSID($NetBSD: localtime.c,v 1.49 2010/12/16 18:38:07 christos Exp $); +__RCSID($NetBSD: localtime.c,v 1.50 2010/12/17 23:11:57 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -1412,7 +1412,6 @@ localtime_r(const time_t * __restrict timep, struct tm *tmp) { rwlock_rdlock(lcl_lock); - rwlock_rdlock(lcl_lock); tzset_unlocked(); tmp = localtime_rz(lclptr, timep, tmp); rwlock_unlock(lcl_lock);
CVS commit: src/lib/libm/gen
Module Name:src Committed By: njoly Date: Fri Dec 17 23:57:07 UTC 2010 Modified Files: src/lib/libm/gen: nan.3 Log Message: Fix typo in cross-refernce. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libm/gen/nan.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/gen/nan.3 diff -u src/lib/libm/gen/nan.3:1.2 src/lib/libm/gen/nan.3:1.3 --- src/lib/libm/gen/nan.3:1.2 Wed Apr 30 13:10:51 2008 +++ src/lib/libm/gen/nan.3 Fri Dec 17 23:57:07 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: nan.3,v 1.2 2008/04/30 13:10:51 martin Exp $ +.\ $NetBSD: nan.3,v 1.3 2010/12/17 23:57:07 njoly Exp $ .\ .\ Copyright (c) 2006 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -84,7 +84,7 @@ functions return zero. .Sh SEE ALSO .Xr math 3 , -.Xr strod 3 +.Xr strtod 3 .Sh STANDARDS The .Fn nan ,
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: eeh Date: Sat Dec 18 00:01:46 UTC 2010 Modified Files: src/sys/ufs/lfs: lfs_vnops.c Log Message: Byebye deadlock. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/sys/ufs/lfs/lfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/lfs/lfs_vnops.c diff -u src/sys/ufs/lfs/lfs_vnops.c:1.231 src/sys/ufs/lfs/lfs_vnops.c:1.232 --- src/sys/ufs/lfs/lfs_vnops.c:1.231 Wed Aug 4 10:43:53 2010 +++ src/sys/ufs/lfs/lfs_vnops.c Sat Dec 18 00:01:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vnops.c,v 1.231 2010/08/04 10:43:53 hannken Exp $ */ +/* $NetBSD: lfs_vnops.c,v 1.232 2010/12/18 00:01:46 eeh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lfs_vnops.c,v 1.231 2010/08/04 10:43:53 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: lfs_vnops.c,v 1.232 2010/12/18 00:01:46 eeh Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -2205,16 +2205,19 @@ * Pagedaemon can't actually write LFS pages; wake up * the writer to take care of that. The writer will * notice the pager inode queue and act on that. + * + * XXX We must drop the vp-interlock before taking the lfs_lock or we + * get a nasty deadlock with lfs_flush_pchain(). */ if (pagedaemon) { + mutex_exit(vp-v_interlock); mutex_enter(lfs_lock); if (!(ip-i_flags IN_PAGING)) { ip-i_flags |= IN_PAGING; TAILQ_INSERT_TAIL(fs-lfs_pchainhd, ip, i_lfs_pchain); - } + } wakeup(lfs_writer_daemon); mutex_exit(lfs_lock); - mutex_exit(vp-v_interlock); preempt(); return EWOULDBLOCK; }
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Sat Dec 18 01:13:37 UTC 2010 Modified Files: src/sys/kern: kern_synch.c Log Message: mi_switch: remove invalid assert and add a note that preemption/interrupt may happen while migrating LWP is set. Reported by Manuel Bouyer. To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 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.284 src/sys/kern/kern_synch.c:1.285 --- src/sys/kern/kern_synch.c:1.284 Tue Nov 2 15:17:37 2010 +++ src/sys/kern/kern_synch.c Sat Dec 18 01:13:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.284 2010/11/02 15:17:37 pooka Exp $ */ +/* $NetBSD: kern_synch.c,v 1.285 2010/12/18 01:13:36 rmind 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.284 2010/11/02 15:17:37 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_synch.c,v 1.285 2010/12/18 01:13:36 rmind Exp $); #include opt_kstack.h #include opt_perfctrs.h @@ -654,9 +654,13 @@ l-l_stat = LSRUN; lwp_setlock(l, spc-spc_mutex); sched_enqueue(l, true); - /* Handle migration case */ - KASSERT(spc-spc_migrating == NULL); - if (l-l_target_cpu != NULL) { + /* + * Handle migration. Note that migrating LWP may + * be reset here, if interrupt/preemption happens + * early in idle LWP. + */ + if (l-l_target_cpu != NULL) { +KASSERT((l-l_pflag LP_INTR) == 0); spc-spc_migrating = l; } } else
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Sat Dec 18 01:18:48 UTC 2010 Modified Files: src/sys/kern: sys_descrip.c Log Message: do_posix_fadvise: fix and improve previous change - add a comment with some rationale and handle few range overflows. Per report/discussion with y...@. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/kern/sys_descrip.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/sys_descrip.c diff -u src/sys/kern/sys_descrip.c:1.18 src/sys/kern/sys_descrip.c:1.19 --- src/sys/kern/sys_descrip.c:1.18 Wed Oct 27 02:58:04 2010 +++ src/sys/kern/sys_descrip.c Sat Dec 18 01:18:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_descrip.c,v 1.18 2010/10/27 02:58:04 rmind Exp $ */ +/* $NetBSD: sys_descrip.c,v 1.19 2010/12/18 01:18:48 rmind Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_descrip.c,v 1.18 2010/10/27 02:58:04 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_descrip.c,v 1.19 2010/12/18 01:18:48 rmind Exp $); #include sys/param.h #include sys/systm.h @@ -662,9 +662,8 @@ case POSIX_FADV_NORMAL: case POSIX_FADV_RANDOM: case POSIX_FADV_SEQUENTIAL: - /* - * We ignore offset and size. must lock the file to + * We ignore offset and size. Must lock the file to * do this, as f_advice is sub-word sized. */ mutex_enter(fp-f_lock); @@ -680,9 +679,22 @@ case POSIX_FADV_DONTNEED: vp = fp-f_data; - mutex_enter(vp-v_interlock); - error = VOP_PUTPAGES(vp, trunc_page(offset), - round_page(endoffset), PGO_DEACTIVATE | PGO_CLEANIT); + /* + * Align the region to page boundaries as VOP_PUTPAGES expects + * by shrinking it. We shrink instead of expand because we + * do not want to deactivate cache outside of the requested + * region. It means that if the specified region is smaller + * than PAGE_SIZE, we do nothing. + */ + if (round_page(offset) trunc_page(endoffset) + offset = round_page(offset)) { + mutex_enter(vp-v_interlock); + error = VOP_PUTPAGES(vp, + round_page(offset), trunc_page(endoffset), + PGO_DEACTIVATE | PGO_CLEANIT); + } else { + error = 0; + } break; case POSIX_FADV_NOREUSE:
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sat Dec 18 01:36:20 UTC 2010 Modified Files: src/sys/kern: kern_exec.c kern_exit.c kern_lwp.c kern_timeout.c sys_select.c src/sys/rump/librump/rumpkern: sleepq.c src/sys/sys: lwp.h sleepq.h Log Message: - Fix a few possible locking issues in execve1() and exit1(). Add a note that scheduler locks are special in this regard - adaptive locks cannot be in the path due to turnstiles. Randomly spotted/reported by uebay...@. - Remove unused lwp_relock() and replace lwp_lock_retry() by simplifying lwp_lock() and sleepq_enter() a little. - Give alllwp its own cache-line and mark lwp_cache pointer as read-mostly. OK ad@ To generate a diff of this commit: cvs rdiff -u -r1.303 -r1.304 src/sys/kern/kern_exec.c cvs rdiff -u -r1.230 -r1.231 src/sys/kern/kern_exit.c cvs rdiff -u -r1.151 -r1.152 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.44 -r1.45 src/sys/kern/kern_timeout.c cvs rdiff -u -r1.28 -r1.29 src/sys/kern/sys_select.c cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/sleepq.c cvs rdiff -u -r1.138 -r1.139 src/sys/sys/lwp.h cvs rdiff -u -r1.18 -r1.19 src/sys/sys/sleepq.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_exec.c diff -u src/sys/kern/kern_exec.c:1.303 src/sys/kern/kern_exec.c:1.304 --- src/sys/kern/kern_exec.c:1.303 Tue Nov 30 10:43:05 2010 +++ src/sys/kern/kern_exec.c Sat Dec 18 01:36:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.303 2010/11/30 10:43:05 dholland Exp $ */ +/* $NetBSD: kern_exec.c,v 1.304 2010/12/18 01:36:19 rmind Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.303 2010/11/30 10:43:05 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.304 2010/12/18 01:36:19 rmind Exp $); #include opt_ktrace.h #include opt_modular.h @@ -1165,8 +1165,10 @@ l-l_stat = LSSTOP; p-p_stat = SSTOP; p-p_nrlwps--; + lwp_unlock(l); mutex_exit(p-p_lock); mutex_exit(proc_lock); + lwp_lock(l); mi_switch(l); ksiginfo_queue_drain(kq); KERNEL_LOCK(l-l_biglocks, l); Index: src/sys/kern/kern_exit.c diff -u src/sys/kern/kern_exit.c:1.230 src/sys/kern/kern_exit.c:1.231 --- src/sys/kern/kern_exit.c:1.230 Wed Jul 7 01:30:37 2010 +++ src/sys/kern/kern_exit.c Sat Dec 18 01:36:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.230 2010/07/07 01:30:37 chs Exp $ */ +/* $NetBSD: kern_exit.c,v 1.231 2010/12/18 01:36:19 rmind Exp $ */ /*- * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_exit.c,v 1.230 2010/07/07 01:30:37 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_exit.c,v 1.231 2010/12/18 01:36:19 rmind Exp $); #include opt_ktrace.h #include opt_perfctrs.h @@ -244,7 +244,9 @@ lwp_lock(l); p-p_nrlwps--; l-l_stat = LSSTOP; + lwp_unlock(l); mutex_exit(p-p_lock); + lwp_lock(l); mi_switch(l); KERNEL_LOCK(l-l_biglocks, l); mutex_enter(p-p_lock); Index: src/sys/kern/kern_lwp.c diff -u src/sys/kern/kern_lwp.c:1.151 src/sys/kern/kern_lwp.c:1.152 --- src/sys/kern/kern_lwp.c:1.151 Wed Jul 7 01:30:37 2010 +++ src/sys/kern/kern_lwp.c Sat Dec 18 01:36:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.151 2010/07/07 01:30:37 chs Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.152 2010/12/18 01:36:19 rmind Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -153,9 +153,11 @@ * each field are documented in sys/lwp.h. * * State transitions must be made with the LWP's general lock held, - * and may cause the LWP's lock pointer to change. Manipulation of + * and may cause the LWP's lock pointer to change. Manipulation of * the general lock is not performed directly, but through calls to - * lwp_lock(), lwp_relock() and similar. + * lwp_lock(), lwp_unlock() and others. It should be noted that the + * adaptive locks are not allowed to be released while the LWP's lock + * is being held (unlike for other spin-locks). * * States and their associated locks: * @@ -209,7 +211,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.151 2010/07/07 01:30:37 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.152 2010/12/18 01:36:19 rmind Exp $); #include opt_ddb.h #include opt_lockdebug.h @@ -242,8 +244,8 @@ #include uvm/uvm_extern.h #include uvm/uvm_object.h -struct lwplist alllwp = LIST_HEAD_INITIALIZER(alllwp); -static pool_cache_t lwp_cache; +static pool_cache_t lwp_cache __read_mostly; +struct lwplist alllwp __cacheline_aligned; /* DTrace proc provider probes */ SDT_PROBE_DEFINE(proc,,,lwp_create, @@ -284,6 +286,7 @@ lwpinit(void) { + LIST_INIT(alllwp); lwpinit_specificdata(); lwp_sys_init(); lwp_cache = pool_cache_init(sizeof(lwp_t), MIN_LWP_ALIGNMENT,
CVS commit: src/external/gpl2/xcvs/bin/xcvs
Module Name:src Committed By: joerg Date: Sat Dec 18 04:23:27 UTC 2010 Modified Files: src/external/gpl2/xcvs/bin/xcvs: Makefile Log Message: Build xcvs without -g. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl2/xcvs/bin/xcvs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/bin/xcvs/Makefile diff -u src/external/gpl2/xcvs/bin/xcvs/Makefile:1.1 src/external/gpl2/xcvs/bin/xcvs/Makefile:1.2 --- src/external/gpl2/xcvs/bin/xcvs/Makefile:1.1 Wed Apr 8 16:27:51 2009 +++ src/external/gpl2/xcvs/bin/xcvs/Makefile Sat Dec 18 04:23:26 2010 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2009/04/08 16:27:51 christos Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/18 04:23:26 joerg Exp $ .include ${.CURDIR}/../../Makefile.inc -CFLAGS+=-g + PROG= xcvs # So that cleandir works on case-insensitive file systems.
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: joerg Date: Sat Dec 18 04:25:37 UTC 2010 Modified Files: src/usr.sbin/ldpd: Makefile Log Message: Don't assign CFLAGS. Use default WARNS from usr.sbin/Makefile.inc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/ldpd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ldpd/Makefile diff -u src/usr.sbin/ldpd/Makefile:1.1 src/usr.sbin/ldpd/Makefile:1.2 --- src/usr.sbin/ldpd/Makefile:1.1 Wed Dec 8 07:20:14 2010 +++ src/usr.sbin/ldpd/Makefile Sat Dec 18 04:25:37 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/12/08 07:20:14 kefren Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/18 04:25:37 joerg Exp $ .include bsd.own.mk @@ -19,8 +19,6 @@ tlv.c \ tlv_stack.c -CFLAGS= -Wall -g - LDADD+= -lcrypt .include bsd.prog.mk
CVS commit: src/tests/crypto/libcrypto/bn/div
Module Name:src Committed By: joerg Date: Sat Dec 18 04:27:17 UTC 2010 Modified Files: src/tests/crypto/libcrypto/bn/div: Makefile Log Message: Don't force debug build. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/crypto/libcrypto/bn/div/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/crypto/libcrypto/bn/div/Makefile diff -u src/tests/crypto/libcrypto/bn/div/Makefile:1.1 src/tests/crypto/libcrypto/bn/div/Makefile:1.2 --- src/tests/crypto/libcrypto/bn/div/Makefile:1.1 Fri Feb 13 20:58:14 2009 +++ src/tests/crypto/libcrypto/bn/div/Makefile Sat Dec 18 04:27:17 2010 @@ -1,8 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:14 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/18 04:27:17 joerg Exp $ HELPER_NAME= divtest HELPER_DIR= bn -CFLAGS+= -g # XXX - .include bsd.init.mk
CVS commit: src/tests/fs/ptyfs
Module Name:src Committed By: joerg Date: Sat Dec 18 04:31:22 UTC 2010 Modified Files: src/tests/fs/ptyfs: Makefile Log Message: Don't force debug build. XXX Why does this have NOGCCERROR=1 set? To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/ptyfs/Makefile 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/ptyfs/Makefile diff -u src/tests/fs/ptyfs/Makefile:1.1 src/tests/fs/ptyfs/Makefile:1.2 --- src/tests/fs/ptyfs/Makefile:1.1 Fri Jun 11 23:52:38 2010 +++ src/tests/fs/ptyfs/Makefile Sat Dec 18 04:31:22 2010 @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2010/06/11 23:52:38 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2010/12/18 04:31:22 joerg Exp $ # TESTSDIR= ${TESTSBASE}/fs/ptyfs WARNS= 4 -DBG=-g NOGCCERROR=1 TESTS_C= t_ptyfs
CVS commit: src/tests/fs/nfs/nfsservice
Module Name:src Committed By: joerg Date: Sat Dec 18 04:31:41 UTC 2010 Modified Files: src/tests/fs/nfs/nfsservice: Makefile Log Message: Don't force debug build. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/nfs/nfsservice/Makefile 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/nfs/nfsservice/Makefile diff -u src/tests/fs/nfs/nfsservice/Makefile:1.4 src/tests/fs/nfs/nfsservice/Makefile:1.5 --- src/tests/fs/nfs/nfsservice/Makefile:1.4 Tue Aug 3 17:24:45 2010 +++ src/tests/fs/nfs/nfsservice/Makefile Sat Dec 18 04:31:41 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2010/08/03 17:24:45 drochner Exp $ +# $NetBSD: Makefile,v 1.5 2010/12/18 04:31:41 joerg Exp $ # NOMAN= 1 @@ -30,7 +30,6 @@ CPPFLAGS+= -DRUMP_SYS_NETWORKING #CPPFLAGS+= -DSVC_RUN_DEBUG CPPFLAGS+= -I${.CURDIR}/../../common/nfsrpc -DBG=-g .PATH: ${.CURDIR}/rpcbind .include rpcbind/Makefile.inc
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: mrg Date: Sat Dec 18 05:14:13 UTC 2010 Modified Files: src/sys/arch/sparc64/dev: pci_machdep.c Log Message: allow sparc64 spc_find_ino() to be NULL; schizo doesn't need it. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sparc64/dev/pci_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/sparc64/dev/pci_machdep.c diff -u src/sys/arch/sparc64/dev/pci_machdep.c:1.67 src/sys/arch/sparc64/dev/pci_machdep.c:1.68 --- src/sys/arch/sparc64/dev/pci_machdep.c:1.67 Thu Jan 7 09:33:44 2010 +++ src/sys/arch/sparc64/dev/pci_machdep.c Sat Dec 18 05:14:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.67 2010/01/07 09:33:44 jdc Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.68 2010/12/18 05:14:13 mrg Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.67 2010/01/07 09:33:44 jdc Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.68 2010/12/18 05:14:13 mrg Exp $); #include sys/types.h #include sys/param.h @@ -438,8 +438,8 @@ if (OF_mapintr(node, int_used, sizeof(int_used), sizeof(int_used)) 0) { printf(OF_mapintr failed\n); - KASSERT(pa-pa_pc-spc_find_ino); - pa-pa_pc-spc_find_ino(pa, int_used); + if (pa-pa_pc-spc_find_ino) + pa-pa_pc-spc_find_ino(pa, int_used); } DPRINTF(SPDB_INTMAP, (OF_mapintr() gave %x\n, int_used));
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: mrg Date: Sat Dec 18 05:45:44 UTC 2010 Modified Files: src/sys/arch/sparc64/include: ctlreg.h Log Message: add a bit for MCCR_RAW_EN -- enable read-after-write. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/sparc64/include/ctlreg.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/include/ctlreg.h diff -u src/sys/arch/sparc64/include/ctlreg.h:1.53 src/sys/arch/sparc64/include/ctlreg.h:1.54 --- src/sys/arch/sparc64/include/ctlreg.h:1.53 Sat Jul 10 10:10:36 2010 +++ src/sys/arch/sparc64/include/ctlreg.h Sat Dec 18 05:45:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ctlreg.h,v 1.53 2010/07/10 10:10:36 nakayama Exp $ */ +/* $NetBSD: ctlreg.h,v 1.54 2010/12/18 05:45:43 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -223,6 +223,7 @@ #define MCCR_IMMU_EN 0x04 #define MCCR_DCACHE_EN 0x02 #define MCCR_ICACHE_EN 0x01 +#define MCCR_RAW_EN 0x4000 /*