CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Mon Feb 13 08:13:42 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h locore.h src/sys/arch/mips/mips [matt-nb5-mips64]: mips_emul.c mips_machdep.c trap.c Log Message: Fix emulation to not panic when it encounters something it doesn't like. (so running crashme won't crash the system). Centralize the trapsignal processing so we can print out the trap info if so desired. Add a machdep.printfataltraps sysctl knob. To generate a diff of this commit: cvs rdiff -u -r1.90.16.41 -r1.90.16.42 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.78.36.1.2.32 -r1.78.36.1.2.33 \ src/sys/arch/mips/include/locore.h cvs rdiff -u -r1.14.78.13 -r1.14.78.14 src/sys/arch/mips/mips/mips_emul.c cvs rdiff -u -r1.205.4.1.2.1.2.63 -r1.205.4.1.2.1.2.64 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.217.12.41 -r1.217.12.42 src/sys/arch/mips/mips/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.90.16.41 src/sys/arch/mips/include/cpu.h:1.90.16.42 --- src/sys/arch/mips/include/cpu.h:1.90.16.41 Sat Jan 28 00:56:34 2012 +++ src/sys/arch/mips/include/cpu.h Mon Feb 13 08:13:41 2012 @@ -163,6 +163,7 @@ struct cpu_info { #define CPU_BOOTED_KERNEL 2 /* string: booted kernel name */ #define CPU_ROOT_DEVICE 3 /* string: root device name */ #define CPU_LLSC 4 /* OS/CPU supports LL/SC instruction */ +#define CPU_PRINTFATALTRAPS 5 /* bool: print fatal traps */ /* * Platform can override, but note this breaks userland compatibility Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.32 src/sys/arch/mips/include/locore.h:1.78.36.1.2.33 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.32 Thu Feb 9 20:01:21 2012 +++ src/sys/arch/mips/include/locore.h Mon Feb 13 08:13:41 2012 @@ -42,6 +42,13 @@ struct trapframe; void trap(uint32_t, uint32_t, vaddr_t, vaddr_t, struct trapframe *); void ast(void); +/* + * Perform a trapsignal, and if cpu_printfataltraps is true, print the trap info + * to the console. + */ +extern bool cpu_printfataltraps; +void cpu_trapsignal(struct lwp *, ksiginfo_t *, struct trapframe *); + void mips_fpu_trap(vaddr_t, struct trapframe *); void mips_fpu_intr(vaddr_t, struct trapframe *); Index: src/sys/arch/mips/mips/mips_emul.c diff -u src/sys/arch/mips/mips/mips_emul.c:1.14.78.13 src/sys/arch/mips/mips/mips_emul.c:1.14.78.14 --- src/sys/arch/mips/mips/mips_emul.c:1.14.78.13 Fri Apr 29 08:26:28 2011 +++ src/sys/arch/mips/mips/mips_emul.c Mon Feb 13 08:13:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_emul.c,v 1.14.78.13 2011/04/29 08:26:28 matt Exp $ */ +/* $NetBSD: mips_emul.c,v 1.14.78.14 2012/02/13 08:13:42 matt Exp $ */ /* * Copyright (c) 1999 Shuichiro URATA. All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mips_emul.c,v 1.14.78.13 2011/04/29 08:26:28 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mips_emul.c,v 1.14.78.14 2012/02/13 08:13:42 matt Exp $); #include sys/param.h #include sys/systm.h @@ -43,9 +43,10 @@ __KERNEL_RCSID(0, $NetBSD: mips_emul.c, #include mips/vmparam.h /* for VM_MAX_ADDRESS */ #include mips/trap.h -static inline void send_sigsegv(intptr_t, uint32_t, struct trapframe *, - uint32_t); -static inline void update_pc(struct trapframe *, uint32_t); +static void send_sigsegv(intptr_t, uint32_t, struct trapframe *, uint32_t); +static void send_sigill(intptr_t, uint32_t, struct trapframe *, uint32_t, + uint32_t); +static void update_pc(struct trapframe *, uint32_t); /* * MIPS2 LL instruction emulation state @@ -78,9 +79,11 @@ mips_emul_branch(struct trapframe *tf, v nextpc = tf-tf_regs[inst.RType.rs]; else if (allowNonBranch) nextpc = instpc + 4; - else - panic(%s: %s instruction %08x at pc 0x%PRIxVADDR, - __func__, non-branch, inst.word, instpc); + else { + send_sigill(instpc, T_RES_INST, tf, + tf-tf_regs[_R_CAUSE], inst.word); + nextpc = instpc; + } break; case OP_BCOND: @@ -106,8 +109,10 @@ mips_emul_branch(struct trapframe *tf, v break; default: - panic(%s: %s instruction 0x%08x at pc 0x%PRIxVADDR, - __func__, bad branch, inst.word, instpc); + send_sigill(instpc, T_RES_INST, tf, + tf-tf_regs[_R_CAUSE], inst.word); + nextpc = instpc; + break; } break; @@ -161,16 +166,22 @@ mips_emul_branch(struct trapframe *tf, v } else if (allowNonBranch) nextpc = instpc + 4; - else - panic(%s: %s instruction 0x%08x at pc 0x%PRIxVADDR, - __func__, bad COP1 branch, inst.word, instpc); + else { + send_sigill(instpc, T_RES_INST, tf, + tf-tf_regs[_R_CAUSE], inst.word); + nextpc = instpc; + } break; default: - if (!allowNonBranch) - panic(%s: %s instruction 0x%08x at pc 0x%PRIxVADDR, -
CVS commit: src/tests
Module Name:src Committed By: wiz Date: Mon Feb 13 08:55:20 UTC 2012 Modified Files: src/tests: README Log Message: Add RCS Id. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/README diff -u src/tests/README:1.2 src/tests/README:1.3 --- src/tests/README:1.2 Mon Feb 13 04:48:21 2012 +++ src/tests/README Mon Feb 13 08:55:20 2012 @@ -1,3 +1,4 @@ +$NetBSD: README,v 1.3 2012/02/13 08:55:20 wiz Exp $ When adding new tests, please try to follow the directory structure of the real source tree. For instance, interfaces available via the C library
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: njoly Date: Mon Feb 13 12:49:27 UTC 2012 Modified Files: src/distrib/sets/lists/comp: mi Log Message: No need for quotadump.debug. quotadump is a link to repquota, and will use its debug file. To generate a diff of this commit: cvs rdiff -u -r1.1736 -r1.1737 src/distrib/sets/lists/comp/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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1736 src/distrib/sets/lists/comp/mi:1.1737 --- src/distrib/sets/lists/comp/mi:1.1736 Mon Feb 13 01:43:23 2012 +++ src/distrib/sets/lists/comp/mi Mon Feb 13 12:49:25 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1736 2012/02/13 01:43:23 dholland Exp $ +# $NetBSD: mi,v 1.1737 2012/02/13 12:49:25 njoly Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -4230,7 +4230,6 @@ ./usr/libdata/debug/usr/sbin/quot.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/quotacheck.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/quotactl.debug comp-obsolete obsolete -./usr/libdata/debug/usr/sbin/quotadump.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/quotaon.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/quotarestore.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/racoon.debug comp-netutil-debug crypto,debug
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Feb 13 12:49:35 UTC 2012 Modified Files: src/share/man/man9: vnodeops.9 Log Message: Add locking description to some functions. Add FILES section referencing source code. From Julian Fagir in PR 45988. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/share/man/man9/vnodeops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/vnodeops.9 diff -u src/share/man/man9/vnodeops.9:1.83 src/share/man/man9/vnodeops.9:1.84 --- src/share/man/man9/vnodeops.9:1.83 Mon Jul 18 04:39:28 2011 +++ src/share/man/man9/vnodeops.9 Mon Feb 13 12:49:35 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: vnodeops.9,v 1.83 2011/07/18 04:39:28 dholland Exp $ +.\ $NetBSD: vnodeops.9,v 1.84 2012/02/13 12:49:35 wiz Exp $ .\ .\ Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd July 11, 2011 +.Dd February 13, 2012 .Dt VNODEOPS 9 .Os .Sh NAME @@ -567,6 +567,10 @@ Attributes which are not available are s .Pp For more information on vnode attributes see .Xr vattr 9 . +.Pp +The vnode +.Fa vp +will be locked on entry and should remain locked on return. .It Fn VOP_SETATTR vp vap cred Set specific vnode attributes on a file. The argument @@ -711,6 +715,10 @@ The argument .Fa events is a set of flags as specified by .Xr poll 2 . +.Pp +The vnode +.Fa vp +remains unlocked throughout the whole operation. .It Fn VOP_KQFILTER vp kn Register a knote .Fa kn @@ -718,6 +726,10 @@ with the vnode .Fa vn . If the operation is successful zero is returned, otherwise an appropriate error code is returned. +.Pp +The vnode +.Fa vp +remains unlocked throughout the whole operation. .It Fn VOP_REVOKE vp flags Eliminate all activity associated with the vnode .Fa vp . @@ -731,6 +743,10 @@ all vnodes aliased to the vnode are also eliminated. If the operation is successful zero is returned, otherwise an appropriate error is returned. +.Pp +The vnode +.Fa vp +remains unlocked throughout the whole operation. .It Fn VOP_MMAP vp prot cred Inform file system that .Fa vp @@ -1232,6 +1248,10 @@ Whiteout pathname component in directory The argument .Fa cnp specifies the pathname component to whiteout. +.Pp +The vnode +.Fa dvp +should be locked on entry and will remain locked on return. .It Fn VOP_GETPAGES vp offset m count centeridx access_type advice flags Read VM pages from file. The argument @@ -1407,7 +1427,15 @@ If full removal is not supported, the fi .Er EOPNOTSUPP to allow the caller to zero out the value with .Fn VOP_SETEXTATTR . +.Pp +The vnode +.Fa vp +should be locked on entry and will remain locked on return. .El +.Sh FILES +.Pa src/sys/kern/vnode_if.src +contains the list of vnode functions, their definitions and an exact locking +protocol. .Sh ERRORS .Bl -tag -width Er .It Bq Er EACCES
CVS commit: src/external/cddl/osnet/lib/libdtrace
Module Name:src Committed By: wiz Date: Mon Feb 13 12:52:54 UTC 2012 Modified Files: src/external/cddl/osnet/lib/libdtrace: Makefile Log Message: Use the correct MACHINE_ARCH for amd64. Remove temporary hack while here. From Henning Petersen in PR 46001. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/libdtrace/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/cddl/osnet/lib/libdtrace/Makefile diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.5 src/external/cddl/osnet/lib/libdtrace/Makefile:1.6 --- src/external/cddl/osnet/lib/libdtrace/Makefile:1.5 Sat Apr 3 18:34:19 2010 +++ src/external/cddl/osnet/lib/libdtrace/Makefile Mon Feb 13 12:52:54 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2010/04/03 18:34:19 christos Exp $ +# $NetBSD: Makefile,v 1.6 2012/02/13 12:52:54 wiz Exp $ # $FreeBSD: src/cddl/lib/libdtrace/Makefile,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $ @@ -82,13 +82,10 @@ COPTS.dt_program.c += -Wno-stack-protect COPTS.dt_provider.c += -Wno-stack-protector COPTS.dt_subr.c += -Wno-stack-protector -.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == amd64 +.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64 CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel .elif ${MACHINE_ARCH} == sparc64 CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc -.else -# temporary hack -CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel .endif LFLAGS+=-l
CVS commit: src/bin/ps
Module Name:src Committed By: wiz Date: Mon Feb 13 12:55:28 UTC 2012 Modified Files: src/bin/ps: print.c Log Message: Remove unused variable. From cppcheck via Henning Petersen in PR 46002. To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/bin/ps/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/print.c diff -u src/bin/ps/print.c:1.118 src/bin/ps/print.c:1.119 --- src/bin/ps/print.c:1.118 Mon Jun 13 03:42:15 2011 +++ src/bin/ps/print.c Mon Feb 13 12:55:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.118 2011/06/13 03:42:15 dholland Exp $ */ +/* $NetBSD: print.c,v 1.119 2012/02/13 12:55:28 wiz Exp $ */ /* * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = @(#)print.c 8.6 (Berkeley) 4/16/94; #else -__RCSID($NetBSD: print.c,v 1.118 2011/06/13 03:42:15 dholland Exp $); +__RCSID($NetBSD: print.c,v 1.119 2012/02/13 12:55:28 wiz Exp $); #endif #endif /* not lint */ @@ -554,13 +554,12 @@ void lstate(void *arg, VARENT *ve, int mode) { struct kinfo_lwp *k; - int flag, is_zombie; + int flag; char *cp; VAR *v; char buf[16]; k = arg; - is_zombie = 0; v = ve-var; flag = k-l_flag; cp = buf; @@ -590,7 +589,6 @@ lstate(void *arg, VARENT *ve, int mode) case LSZOMB: case LSDEAD: *cp = 'Z'; - is_zombie = 1; break; case LSSUSPENDED:
CVS commit: src/sbin/newfs
Module Name:src Committed By: wiz Date: Mon Feb 13 12:59:56 UTC 2012 Modified Files: src/sbin/newfs: mkfs.c newfs.c Log Message: Remove unused variables. From cppcheck via Henning Petersen in PR 46004. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sbin/newfs/mkfs.c cvs rdiff -u -r1.109 -r1.110 src/sbin/newfs/newfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/newfs/mkfs.c diff -u src/sbin/newfs/mkfs.c:1.111 src/sbin/newfs/mkfs.c:1.112 --- src/sbin/newfs/mkfs.c:1.111 Tue Feb 7 14:14:45 2012 +++ src/sbin/newfs/mkfs.c Mon Feb 13 12:59:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs.c,v 1.111 2012/02/07 14:14:45 tsutsui Exp $ */ +/* $NetBSD: mkfs.c,v 1.112 2012/02/13 12:59:56 wiz Exp $ */ /* * Copyright (c) 1980, 1989, 1993 @@ -73,7 +73,7 @@ #if 0 static char sccsid[] = @(#)mkfs.c 8.11 (Berkeley) 5/3/95; #else -__RCSID($NetBSD: mkfs.c,v 1.111 2012/02/07 14:14:45 tsutsui Exp $); +__RCSID($NetBSD: mkfs.c,v 1.112 2012/02/13 12:59:56 wiz Exp $); #endif #endif /* not lint */ @@ -1343,11 +1343,10 @@ static void iput(union dinode *ip, ino_t ino) { daddr_t d; - int c, i; + int i; struct ufs1_dinode *dp1; struct ufs2_dinode *dp2; - c = ino_to_cg(sblock, ino); rdfs(fsbtodb(sblock, cgtod(sblock, 0)), sblock.fs_cgsize, acg); /* fs - host byte order */ if (needswap) Index: src/sbin/newfs/newfs.c diff -u src/sbin/newfs/newfs.c:1.109 src/sbin/newfs/newfs.c:1.110 --- src/sbin/newfs/newfs.c:1.109 Sun Mar 6 17:08:17 2011 +++ src/sbin/newfs/newfs.c Mon Feb 13 12:59:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: newfs.c,v 1.109 2011/03/06 17:08:17 bouyer Exp $ */ +/* $NetBSD: newfs.c,v 1.110 2012/02/13 12:59:56 wiz Exp $ */ /* * Copyright (c) 1983, 1989, 1993, 1994 @@ -78,7 +78,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = @(#)newfs.c 8.13 (Berkeley) 5/1/95; #else -__RCSID($NetBSD: newfs.c,v 1.109 2011/03/06 17:08:17 bouyer Exp $); +__RCSID($NetBSD: newfs.c,v 1.110 2012/02/13 12:59:56 wiz Exp $); #endif #endif /* not lint */ @@ -239,7 +239,7 @@ main(int argc, char *argv[]) struct statvfs *mp; struct stat sb; int ch, fsi, fso, len, n, Fflag, Iflag, Zflag; - char *cp, *s1, *s2, *special; + char *s1, *s2, *special; const char *opstring; int byte_sized = 0; #ifdef MFS @@ -255,7 +255,6 @@ main(int argc, char *argv[]) gid_t mfsgid = 0; /* group wheel */ mntoptparse_t mo; - cp = NULL; fsi = fso = -1; Fflag = Iflag = Zflag = 0; verbosity = -1;
CVS commit: src/share/man/man9
Module Name:src Committed By: njoly Date: Mon Feb 13 13:01:39 UTC 2012 Modified Files: src/share/man/man9: vfsops.9 Log Message: Fix copyin/copyout sections in xrefs. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/share/man/man9/vfsops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/vfsops.9 diff -u src/share/man/man9/vfsops.9:1.44 src/share/man/man9/vfsops.9:1.45 --- src/share/man/man9/vfsops.9:1.44 Mon Feb 13 01:24:00 2012 +++ src/share/man/man9/vfsops.9 Mon Feb 13 13:01:39 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: vfsops.9,v 1.44 2012/02/13 01:24:00 dholland Exp $ +.\ $NetBSD: vfsops.9,v 1.45 2012/02/13 13:01:39 njoly Exp $ .\ .\ Copyright (c) 2001 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -290,9 +290,9 @@ This is the same interface as documented .Xr __quotactl 2 except that the file system argument has been resolved. All -.Xr copyin 2 +.Xr copyin 9 and -.Xr copyout 2 +.Xr copyout 9 processing is handled by code above the file system. .It Fn VFS_STATVFS mp sbp Get file system statistics for the file system specified by the mount
CVS commit: src/crypto/dist/ipsec-tools/src/libipsec
Module Name:src Committed By: wiz Date: Mon Feb 13 13:03:06 UTC 2012 Modified Files: src/crypto/dist/ipsec-tools/src/libipsec: pfkey.c Log Message: Use the correct constant. From FreeBSD via Henning Petersen in PR 46005. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/crypto/dist/ipsec-tools/src/libipsec/pfkey.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/dist/ipsec-tools/src/libipsec/pfkey.c diff -u src/crypto/dist/ipsec-tools/src/libipsec/pfkey.c:1.23 src/crypto/dist/ipsec-tools/src/libipsec/pfkey.c:1.24 --- src/crypto/dist/ipsec-tools/src/libipsec/pfkey.c:1.23 Mon Jan 9 15:25:13 2012 +++ src/crypto/dist/ipsec-tools/src/libipsec/pfkey.c Mon Feb 13 13:03:06 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pfkey.c,v 1.23 2012/01/09 15:25:13 drochner Exp $ */ +/* $NetBSD: pfkey.c,v 1.24 2012/02/13 13:03:06 wiz Exp $ */ /* $KAME: pfkey.c,v 1.47 2003/10/02 19:52:12 itojun Exp $ */ @@ -710,7 +710,7 @@ pfkey_send_register(int so, u_int satype { int len, algno; - if (satype == PF_UNSPEC) { + if (satype == SADB_SATYPE_UNSPEC) { for (algno = 0; algno sizeof(supported_map)/sizeof(supported_map[0]); algno++) {
CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common
Module Name:src Committed By: wiz Date: Mon Feb 13 13:05:36 UTC 2012 Modified Files: src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c Log Message: Use the correct path in dt_module.c. From clang via Henning Petersen in PR 46009. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.6 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.7 --- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.6 Tue Jul 26 12:28:01 2011 +++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Mon Feb 13 13:05:36 2012 @@ -880,7 +880,7 @@ dt_module_update(dtrace_hdl_t *dtp, cons } (void) snprintf(fname, sizeof (fname), - /stand/%s/%s/%s.kmod, machine, osrel, name, name); + /stand/%s/%s/modules/%s/%s.kmod, machine, osrel, name, name); } #endif
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Mon Feb 13 13:22:09 UTC 2012 Modified Files: src/lib/libc/sys: __quotactl.2 Log Message: Merge descriptions for same error code. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/__quotactl.2 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/sys/__quotactl.2 diff -u src/lib/libc/sys/__quotactl.2:1.1 src/lib/libc/sys/__quotactl.2:1.2 --- src/lib/libc/sys/__quotactl.2:1.1 Mon Feb 13 01:24:03 2012 +++ src/lib/libc/sys/__quotactl.2 Mon Feb 13 13:22:09 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: __quotactl.2,v 1.1 2012/02/13 01:24:03 dholland Exp $ +.\ $NetBSD: __quotactl.2,v 1.2 2012/02/13 13:22:09 wiz Exp $ .\ .\ Copyright (c) 1983, 1990, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -309,11 +309,9 @@ failures include: .It Bq Er EFAULT A pointer points outside the process's allocated address space. .It Bq Er EINVAL -The operation code was out of range. -.It Bq Er EINVAL -A requested ID or object type was out of range. -.It Bq Er EINVAL -A corrupted or invalid cursor was passed in. +The operation code was out of range; or +a requested ID or object type was out of range; or +a corrupted or invalid cursor was passed in. .It Bq Er ENODEV The requested action was inappropriate for .Pq or not supported by
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Feb 13 13:24:18 UTC 2012 Modified Files: src/share/man/man9: vfsops.9 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/share/man/man9/vfsops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/vfsops.9 diff -u src/share/man/man9/vfsops.9:1.45 src/share/man/man9/vfsops.9:1.46 --- src/share/man/man9/vfsops.9:1.45 Mon Feb 13 13:01:39 2012 +++ src/share/man/man9/vfsops.9 Mon Feb 13 13:24:18 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: vfsops.9,v 1.45 2012/02/13 13:01:39 njoly Exp $ +.\ $NetBSD: vfsops.9,v 1.46 2012/02/13 13:24:18 wiz Exp $ .\ .\ Copyright (c) 2001 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd April 22, 2009 +.Dd February 13, 2012 .Dt VFSOPS 9 .Os .Sh NAME
CVS commit: src/usr.sbin/repquota
Module Name:src Committed By: wiz Date: Mon Feb 13 13:37:45 UTC 2012 Modified Files: src/usr.sbin/repquota: repquota.8 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/repquota/repquota.8 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/repquota/repquota.8 diff -u src/usr.sbin/repquota/repquota.8:1.14 src/usr.sbin/repquota/repquota.8:1.15 --- src/usr.sbin/repquota/repquota.8:1.14 Mon Feb 13 01:35:09 2012 +++ src/usr.sbin/repquota/repquota.8 Mon Feb 13 13:37:45 2012 @@ -29,9 +29,9 @@ .\ SUCH DAMAGE. .\ .\ from: @(#)repquota.8 8.1 (Berkeley) 6/6/93 -.\ $NetBSD: repquota.8,v 1.14 2012/02/13 01:35:09 dholland Exp $ +.\ $NetBSD: repquota.8,v 1.15 2012/02/13 13:37:45 wiz Exp $ .\ -.Dd February 2, 2012 +.Dd February 13, 2012 .Dt REPQUOTA 8 .Os .Sh NAME
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: phx Date: Mon Feb 13 13:44:14 UTC 2012 Modified Files: src/sys/arch/powerpc/powerpc: vm_machdep.c Log Message: Allow all physical addresses from 0 to 0x in cpu_uarea_alloc(). This fixes a panic with amigappc, which has RAM starting at 0x0800. Ok by releng@. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/powerpc/powerpc/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/powerpc/vm_machdep.c diff -u src/sys/arch/powerpc/powerpc/vm_machdep.c:1.93 src/sys/arch/powerpc/powerpc/vm_machdep.c:1.94 --- src/sys/arch/powerpc/powerpc/vm_machdep.c:1.93 Sat Jan 28 16:30:23 2012 +++ src/sys/arch/powerpc/powerpc/vm_machdep.c Mon Feb 13 13:44:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.93 2012/01/28 16:30:23 skrll Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.94 2012/02/13 13:44:14 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.93 2012/01/28 16:30:23 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.94 2012/02/13 13:44:14 phx Exp $); #include opt_altivec.h #include opt_multiprocessor.h @@ -295,7 +295,7 @@ cpu_uarea_alloc(bool system) * Allocate a new physically contiguous uarea which can be * direct-mapped. */ - error = uvm_pglistalloc(USPACE, 0, ptoa(physmem), 0, 0, pglist, 1, 1); + error = uvm_pglistalloc(USPACE, 0, ~0UL, 0, 0, pglist, 1, 1); if (error) { if (!system) return NULL;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: wiz Date: Mon Feb 13 14:36:39 UTC 2012 Modified Files: src/sys/dev/usb: files.usb Log Message: Add missing dependency for uts. From Pierre Pronchery khor...@defora.org in PR 45872. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/dev/usb/files.usb 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/files.usb diff -u src/sys/dev/usb/files.usb:1.119 src/sys/dev/usb/files.usb:1.120 --- src/sys/dev/usb/files.usb:1.119 Tue Jan 17 03:49:20 2012 +++ src/sys/dev/usb/files.usb Mon Feb 13 14:36:39 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.119 2012/01/17 03:49:20 christos Exp $ +# $NetBSD: files.usb,v 1.120 2012/02/13 14:36:39 wiz Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -92,7 +92,7 @@ attach ums at uhidbus file dev/usb/ums.c ums # Touchscreens -device uts: hid, wsmousedev +device uts: hid, wsmousedev, tpcalib attach uts at uhidbus file dev/usb/uts.c uts
CVS commit: othersrc/usr.bin/protoz
Module Name:othersrc Committed By: apb Date: Mon Feb 13 15:04:49 UTC 2012 Modified Files: othersrc/usr.bin/protoz: protoz Log Message: Move the sed script into a shell function, and add command line argument processing code to filter stdin to stdout when invoked without arguments, to edit all files specified on the command line, and to recursively look for *.c files to process when a directory is specified on the command line. Previously, only one command line argument was accepted, and it was expected to be a directory. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 othersrc/usr.bin/protoz/protoz Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/protoz/protoz diff -u othersrc/usr.bin/protoz/protoz:1.1 othersrc/usr.bin/protoz/protoz:1.2 --- othersrc/usr.bin/protoz/protoz:1.1 Mon Oct 3 13:41:41 2011 +++ othersrc/usr.bin/protoz/protoz Mon Feb 13 15:04:49 2012 @@ -1,7 +1,7 @@ #! /bin/sh -# $NetBSD: protoz,v 1.1 2011/10/03 13:41:41 wiz Exp $ +# $NetBSD: protoz,v 1.2 2012/02/13 15:04:49 apb Exp $ # -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009,2012 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation @@ -31,19 +31,27 @@ # Script to convert KR functions to ANSI # +# When run without args, it filters stdin to stdout. +# +# When run with args, it expects them to be file or directory names. +# Each file is edited regardless of its name. Each directory +# is searched for *.c files that could benefit from edited. +# # BUGS: # Dpesn't handle functions with no arguments # Doesn't handle va_list args # Doesn't like blank lines or extra line breaks # Generated ANSI definitions are often longer than 80 cols. -dir=${1:-.} - a='a-zA-Z0-9_' as='['a-zA-Z_']['$a']*' as_v='['a-uw-zA-Z_']['$a']*' -grep -rl --include '*.c' ^$as *($as\( *, *$as\)*)$ $dir | while read f; do -sed -e '/^'$as' *(['$a' ,]*)$/{ + +# process_stream -- copy stdin to stdout while editing it as appropriate +# +process_stream() +{ +sed -e '/^'$as' *(['$a' ,]*)$/{ h : a # Remove an argument @@ -133,10 +141,32 @@ sed -e '/^'$as' *(['$a' ,]*)$/{ H # get prototype g -}' $f $f.new -res=$? -[ $res -ne 0 ] { echo sed failed $res; rm $f.new; continue; } -cmp -s $f $f.new { rm $f.new; continue; } -echo updated $f -mv $f.new $f -done +}' +} + +if [ $# = 0 ]; then +# filter stdin to stdout +process_stream +else +# args may be file or directory names. +# For plain files, just process them. +# For directories, recursively look for *.c files that +# may benefit from editing. +for arg in $@ ; do + if [ -f $arg ]; then + echo $arg + elif [ -d $arg ]; then + grep -rl --include '*.c' ^$as *($as\( *, *$as\)*)$ $arg + else + echo 2 $0: $arg is not a file or directory + fi +done \ +| while read f; do + process_stream $f $f.new + res=$? + [ $res -ne 0 ] { echo sed failed $res; rm $f.new; continue; } + cmp -s $f $f.new { rm $f.new; continue; } + echo 2 updated $f + mv $f.new $f +done +fi
CVS commit: src/lib/libc/gen
Module Name:src Committed By: njoly Date: Mon Feb 13 16:35:59 UTC 2012 Modified Files: src/lib/libc/gen: posix_spawn.3 Log Message: Fix sched_set{param,scheduler} sections. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/posix_spawn.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/libc/gen/posix_spawn.3 diff -u src/lib/libc/gen/posix_spawn.3:1.1 src/lib/libc/gen/posix_spawn.3:1.2 --- src/lib/libc/gen/posix_spawn.3:1.1 Sat Feb 11 23:31:24 2012 +++ src/lib/libc/gen/posix_spawn.3 Mon Feb 13 16:35:59 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: posix_spawn.3,v 1.1 2012/02/11 23:31:24 martin Exp $ +.\ $NetBSD: posix_spawn.3,v 1.2 2012/02/13 16:35:59 njoly Exp $ .\ .\ Copyright (c) 2008 Ed Schouten e...@freebsd.org .\ All rights reserved. @@ -427,8 +427,6 @@ in addition to those described by .Xr execve 2 , .Xr fcntl 2 , .Xr open 2 , -.Xr sched_setparam 2 , -.Xr sched_setscheduler 2 , .Xr setpgid 2 , .Xr vfork 2 , .Xr posix_spawn_file_actions_addclose 3 , @@ -449,7 +447,9 @@ in addition to those described by .Xr posix_spawnattr_setschedparam 3 , .Xr posix_spawnattr_setschedpolicy 3 , .Xr posix_spawnattr_setsigdefault 3 , -.Xr posix_spawnattr_setsigmask 3 +.Xr posix_spawnattr_setsigmask 3 , +.Xr sched_setparam 3 , +.Xr sched_setscheduler 3 .Sh STANDARDS The .Fn posix_spawn
CVS commit: xsrc/external/mit
Module Name:xsrc Committed By: matt Date: Mon Feb 13 16:59:52 UTC 2012 Modified Files: xsrc/external/mit/MesaLib/dist/include/GL: glu.h xsrc/external/mit/MesaLib/dist/src/mesa/math: m_norm_tmp.h xsrc/external/mit/fontconfig/dist/src: fcmatch.c xsrc/external/mit/libX11/dist/src/xcms: cmsTrig.c Log Message: Deal with the limited range of VAX floating point numbers when compiling for VAX. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/MesaLib/dist/include/GL/glu.h cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/mesa/math/m_norm_tmp.h cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/fontconfig/dist/src/fcmatch.c cvs rdiff -u -r1.1.1.3 -r1.2 xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/include/GL/glu.h diff -u xsrc/external/mit/MesaLib/dist/include/GL/glu.h:1.1.1.2 xsrc/external/mit/MesaLib/dist/include/GL/glu.h:1.2 --- xsrc/external/mit/MesaLib/dist/include/GL/glu.h:1.1.1.2 Thu Jun 11 00:50:15 2009 +++ xsrc/external/mit/MesaLib/dist/include/GL/glu.h Mon Feb 13 16:59:51 2012 @@ -281,7 +281,11 @@ typedef GLUquadric GLUquadricObj; typedef GLUtesselator GLUtesselatorObj; typedef GLUtesselator GLUtriangulatorObj; +#ifdef __vax__ +#define GLU_TESS_MAX_COORD 1.0e19 +#else #define GLU_TESS_MAX_COORD 1.0e150 +#endif /* Internal convenience typedefs */ typedef void (GLAPIENTRYP _GLUfuncptr)(); Index: xsrc/external/mit/MesaLib/dist/src/mesa/math/m_norm_tmp.h diff -u xsrc/external/mit/MesaLib/dist/src/mesa/math/m_norm_tmp.h:1.1.1.1 xsrc/external/mit/MesaLib/dist/src/mesa/math/m_norm_tmp.h:1.2 --- xsrc/external/mit/MesaLib/dist/src/mesa/math/m_norm_tmp.h:1.1.1.1 Tue Jul 29 05:08:51 2008 +++ xsrc/external/mit/MesaLib/dist/src/mesa/math/m_norm_tmp.h Mon Feb 13 16:59:51 2012 @@ -321,7 +321,7 @@ TAG(normalize_normals)( const GLmatrix * STRIDE_LOOP { const GLfloat x = from[0], y = from[1], z = from[2]; GLdouble len = x * x + y * y + z * z; - if (len 1e-50) { + if (len 1e-20) { len = INV_SQRTF(len); out[i][0] = (GLfloat)(x * len); out[i][1] = (GLfloat)(y * len); Index: xsrc/external/mit/fontconfig/dist/src/fcmatch.c diff -u xsrc/external/mit/fontconfig/dist/src/fcmatch.c:1.1.1.2 xsrc/external/mit/fontconfig/dist/src/fcmatch.c:1.2 --- xsrc/external/mit/fontconfig/dist/src/fcmatch.c:1.1.1.2 Sun Nov 21 06:35:32 2010 +++ xsrc/external/mit/fontconfig/dist/src/fcmatch.c Mon Feb 13 16:59:51 2012 @@ -26,6 +26,7 @@ #include string.h #include ctype.h #include stdio.h +#include float.h static double FcCompareNumber (FcValue *value1, FcValue *value2) @@ -285,9 +286,9 @@ FcCompareValueList (FcObject object, return FcTrue; } -best = 1e99; -bestStrong = 1e99; -bestWeak = 1e99; +best = DBL_MAX; +bestStrong = DBL_MAX; +bestWeak = DBL_MAX; j = 1; for (v1 = v1orig; v1; v1 = FcValueListNext(v1)) { Index: xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c diff -u xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c:1.1.1.3 xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c:1.2 --- xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c:1.1.1.3 Sat May 22 01:22:13 2010 +++ xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c Mon Feb 13 16:59:51 2012 @@ -71,7 +71,11 @@ _XcmsModuloF( #define XCMS_SIXTHPI 0.523598775598298820 #define XCMS_RADIANS(d) ((d) * XCMS_PI / 180.0) #define XCMS_DEGREES(r) ((r) * 180.0 / XCMS_PI) +#ifdef __vax__ +#define XCMS_X6_UNDERFLOWS (3.784659e-07) /* X**6 almost underflows*/ +#else #define XCMS_X6_UNDERFLOWS (4.209340e-52) /* X**6 almost underflows */ +#endif #define XCMS_X16_UNDERFLOWS (5.421010e-20) /* X**16 almost underflows*/ #define XCMS_CHAR_BIT 8 #define XCMS_LONG_MAX 0x7FFF
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Mon Feb 13 17:07:45 UTC 2012 Modified Files: src/sys/arch/arm/include: mcontext.h Log Message: Modify __lwp_getprivate_fast to call _lwp_getprivate if the mrc instruction returns 0 (some ARM cores are broken and don't raise an undefined exception when encountering an unknown or privileged mrc instruction in user mode). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/include/mcontext.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/arm/include/mcontext.h diff -u src/sys/arch/arm/include/mcontext.h:1.9 src/sys/arch/arm/include/mcontext.h:1.10 --- src/sys/arch/arm/include/mcontext.h:1.9 Thu Apr 7 10:20:29 2011 +++ src/sys/arch/arm/include/mcontext.h Mon Feb 13 17:07:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.9 2011/04/07 10:20:29 matt Exp $ */ +/* $NetBSD: mcontext.h,v 1.10 2012/02/13 17:07:45 matt Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -112,9 +112,18 @@ typedef struct { static __inline void * __lwp_getprivate_fast(void) { + extern void *_lwp_getprivate(void); void *rv; __asm(mrc p15, 0, %0, c13, c0, 3 : =r(rv)); - return rv; + if (__predict_true(rv)) + return rv; + /* + * Some ARM cores are broken and don't raise an undefined fault when an + * unrecogized mrc instruction is encountered, but just return zero. + * To do deal with that, if we get a zero we (re-)fetch the value using + * syscall. + */ + return _lwp_getprivate(); } #endif /* !_ARM_MCONTEXT_H_ */
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: matt Date: Mon Feb 13 17:34:21 UTC 2012 Modified Files: src/sys/arch/arm/omap: obio_ohci.c Log Message: Make this compilable again. Use the new defines and switcht to CFATTACH_DECL_NEW. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/obio_ohci.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/arm/omap/obio_ohci.c diff -u src/sys/arch/arm/omap/obio_ohci.c:1.5 src/sys/arch/arm/omap/obio_ohci.c:1.6 --- src/sys/arch/arm/omap/obio_ohci.c:1.5 Fri Jul 1 20:30:21 2011 +++ src/sys/arch/arm/omap/obio_ohci.c Mon Feb 13 17:34:21 2012 @@ -1,7 +1,7 @@ -/* $Id: obio_ohci.c,v 1.5 2011/07/01 20:30:21 dyoung Exp $ */ +/* $Id: obio_ohci.c,v 1.6 2012/02/13 17:34:21 matt Exp $ */ /* adapted from: */ -/* $NetBSD: obio_ohci.c,v 1.5 2011/07/01 20:30:21 dyoung Exp $ */ +/* $NetBSD: obio_ohci.c,v 1.6 2012/02/13 17:34:21 matt Exp $ */ /* $OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */ /* @@ -23,15 +23,15 @@ #include opt_omap.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: obio_ohci.c,v 1.5 2011/07/01 20:30:21 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: obio_ohci.c,v 1.6 2012/02/13 17:34:21 matt Exp $); #include sys/param.h #include sys/systm.h -#include sys/device.h #include sys/kernel.h - -#include machine/intr.h +#include sys/intr.h #include sys/bus.h +#include sys/device.h +#include sys/kernel.h #include dev/usb/usb.h #include dev/usb/usbdi.h @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, $NetBSD: obio_ohci.c, #include dev/usb/ohcireg.h #include dev/usb/ohcivar.h +#include arm/omap/omap2_reg.h #include arm/omap/omap2_obiovar.h #include arm/omap/omap2_obioreg.h @@ -51,6 +52,7 @@ struct obioohci_softc { void *sc_ih; bus_addr_t sc_addr; bus_addr_t sc_size; + void *sc_powerhook; }; static int obioohci_match(struct device *, struct cfdata *, void *); @@ -71,7 +73,7 @@ static void obioohci_disable(struct obio #define HWRITE4(sc,r,v) bus_space_write_4((sc)-sc.iot, (sc)-sc.ioh, (r), (v)) static int -obioohci_match(struct device *parent, struct cfdata *cf, void *aux) +obioohci_match(device_t parent, cfdata_t cf, void *aux) { struct obio_attach_args *obio = aux; @@ -88,9 +90,9 @@ obioohci_match(struct device *parent, st } static void -obioohci_attach(struct device *parent, struct device *self, void *aux) +obioohci_attach(device_t parent, device_t self, void *aux) { - struct obioohci_softc *sc = (struct obioohci_softc *)self; + struct obioohci_softc *sc = device_private(self); struct obio_attach_args *obio = aux; usbd_status r; @@ -107,7 +109,7 @@ obioohci_attach(struct device *parent, s sc-sc.iot = obio-obio_iot; sc-sc_addr = obio-obio_addr; sc-sc.sc_size = obio-obio_size; - sc-sc.sc_bus.dmatag = obio-obio_dmac; + sc-sc.sc_bus.dmatag = obio-obio_dmat; /* XXX copied from ohci_pci.c. needed? */ bus_space_barrier(sc-sc.iot, sc-sc.ioh, 0, sc-sc.sc_size, @@ -123,9 +125,9 @@ obioohci_attach(struct device *parent, s bus_space_write_4(sc-sc.iot, sc-sc.ioh, OHCI_INTERRUPT_DISABLE, OHCI_MIE); -#ifdef NOTYET - sc-sc_ih = obio_intr_establish(obio-obio_intr, IPL_USB, - sc-sc.sc_bus.bdev.dv_xname, ohci_intr, sc-sc); +#if 1 + sc-sc_ih = intr_establish(obio-obio_intr, IPL_USB, IST_LEVEL, + ohci_intr, sc-sc); if (sc-sc_ih == NULL) { aprint_error(: unable to establish interrupt\n); goto free_map; @@ -137,16 +139,14 @@ obioohci_attach(struct device *parent, s strlcpy(sc-sc.sc_vendor, OMAP2, sizeof(sc-sc.sc_vendor)); r = ohci_init(sc-sc); if (r != USBD_NORMAL_COMPLETION) { - aprint_error(%s: init failed, error=%d\n, - sc-sc.sc_bus.bdev.dv_xname, r); + aprint_error_dev(self, init failed, error=%d\n, r); goto free_intr; } - sc-sc.sc_powerhook = powerhook_establish(sc-sc.sc_bus.bdev.dv_xname, + sc-sc_powerhook = powerhook_establish(device_xname(self), obioohci_power, sc); - if (sc-sc.sc_powerhook == NULL) { - aprint_error(%s: cannot establish powerhook\n, - sc-sc.sc_bus.bdev.dv_xname); + if (sc-sc_powerhook == NULL) { + aprint_error_dev(self, cannot establish powerhook\n); } sc-sc.sc_child = config_found((void *)sc, sc-sc.sc_bus, usbctlprint); @@ -158,9 +158,7 @@ free_intr: obio_gpio_intr_disestablish(sc-sc_ih); #endif sc-sc_ih = NULL; -#ifdef NOTYET free_map: -#endif obioohci_disable(sc); #ifdef NOTYET pxa2x0_clkman_config(CKEN_USBHC, 0); @@ -170,18 +168,18 @@ free_map: } static int -obioohci_detach(struct device *self, int flags) +obioohci_detach(device_t self, int flags) { - struct obioohci_softc *sc = (struct obioohci_softc *)self; + struct obioohci_softc *sc = device_private(self); int error; error = ohci_detach(sc-sc, flags); if (error) return error; - if (sc-sc.sc_powerhook) { - powerhook_disestablish(sc-sc.sc_powerhook); - sc-sc.sc_powerhook = NULL; + if (sc-sc_powerhook) { +
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Mon Feb 13 17:36:18 UTC 2012 Modified Files: src/sys/dev/usb: umidi.c Log Message: revert prior change to unbind_jacks_from_mididev(), it's wrong. slightly clean up free_all_jacks(). To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/umidi.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/umidi.c diff -u src/sys/dev/usb/umidi.c:1.57 src/sys/dev/usb/umidi.c:1.58 --- src/sys/dev/usb/umidi.c:1.57 Mon Feb 13 01:51:02 2012 +++ src/sys/dev/usb/umidi.c Mon Feb 13 17:36:18 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: umidi.c,v 1.57 2012/02/13 01:51:02 mrg Exp $ */ +/* $NetBSD: umidi.c,v 1.58 2012/02/13 17:36:18 mrg Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.57 2012/02/13 01:51:02 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.58 2012/02/13 17:36:18 mrg Exp $); #include sys/types.h #include sys/param.h @@ -974,17 +974,16 @@ static void free_all_jacks(struct umidi_softc *sc) { struct umidi_jack *jacks; + size_t len; mutex_enter(sc-sc_lock); - if (sc-sc_out_jacks) - jacks = sc-sc_out_jacks; - else - jacks = sc-sc_in_jacks; + jacks = sc-sc_jacks; + len = sizeof(*sc-sc_out_jacks)*(sc-sc_in_num_jacks+sc-sc_out_num_jacks); sc-sc_jacks = sc-sc_in_jacks = sc-sc_out_jacks = NULL; mutex_exit(sc-sc_lock); if (jacks) - kmem_free(jacks, sizeof(*sc-sc_out_jacks)*(sc-sc_in_num_jacks+sc-sc_out_num_jacks)); + kmem_free(jacks, len); } static usbd_status @@ -1012,10 +1011,6 @@ static void unbind_jacks_from_mididev(struct umidi_mididev *mididev) { - /* XXX SMP */ - KERNEL_LOCK(1, curlwp); - mutex_spin_exit(mididev-sc-sc_lock); - if ((mididev-flags FWRITE) mididev-out_jack) close_out_jack(mididev-out_jack); if ((mididev-flags FREAD) mididev-in_jack) @@ -1026,10 +1021,6 @@ unbind_jacks_from_mididev(struct umidi_m if (mididev-in_jack) mididev-in_jack-binded = 0; mididev-out_jack = mididev-in_jack = NULL; - - /* XXX SMP */ - mutex_spin_enter(mididev-sc-sc_lock); - KERNEL_UNLOCK_ONE(curlwp); } static void
CVS commit: src/tests/fs/ffs
Module Name:src Committed By: dholland Date: Mon Feb 13 17:55:12 UTC 2012 Modified Files: src/tests/fs/ffs: t_miscquota.sh Log Message: Update reference output to match yesterday's fix. ok martin@ for releng To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/fs/ffs/t_miscquota.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/fs/ffs/t_miscquota.sh diff -u src/tests/fs/ffs/t_miscquota.sh:1.5 src/tests/fs/ffs/t_miscquota.sh:1.6 --- src/tests/fs/ffs/t_miscquota.sh:1.5 Wed Feb 1 05:12:45 2012 +++ src/tests/fs/ffs/t_miscquota.sh Mon Feb 13 17:55:12 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_miscquota.sh,v 1.5 2012/02/01 05:12:45 dholland Exp $ +# $NetBSD: t_miscquota.sh,v 1.6 2012/02/13 17:55:12 dholland Exp $ # # Copyright (c) 2011 Manuel Bouyer # All rights reserved. @@ -82,7 +82,7 @@ quota_walk_list() i=$((i + 1)) done # do a repquota - atf_check -s exit:0 -o 'match:user 409600 blocks *81920 20 0' \ + atf_check -s exit:0 -o 'match:user 409600 block *81920 20 0' \ env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -x -${expect} /mnt rump_quota_shutdown }
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Mon Feb 13 18:20:26 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h locore.h src/sys/arch/mips/mips [matt-nb5-mips64]: bus_dma.c mem.c mips_machdep.c pmap.c pmap_segtab.c vm_machdep.c Log Message: Add mm_md_direct_mapped_virt (inverse of mm_md_direct_mapped_phys). Add a third argument, vsize_t *, which, if not NULL, returns the amount of virtual space left in that direct mapped segment. Get rid most of the individual direct_mapped assert and use the above routines instead. Improve kernel core dump code. To generate a diff of this commit: cvs rdiff -u -r1.90.16.42 -r1.90.16.43 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.78.36.1.2.33 -r1.78.36.1.2.34 \ src/sys/arch/mips/include/locore.h cvs rdiff -u -r1.22.16.21 -r1.22.16.22 src/sys/arch/mips/mips/bus_dma.c cvs rdiff -u -r1.35.38.10 -r1.35.38.11 src/sys/arch/mips/mips/mem.c cvs rdiff -u -r1.205.4.1.2.1.2.64 -r1.205.4.1.2.1.2.65 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.179.16.40 -r1.179.16.41 src/sys/arch/mips/mips/pmap.c cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/arch/mips/mips/pmap_segtab.c cvs rdiff -u -r1.121.6.1.2.26 -r1.121.6.1.2.27 \ src/sys/arch/mips/mips/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.90.16.42 src/sys/arch/mips/include/cpu.h:1.90.16.43 --- src/sys/arch/mips/include/cpu.h:1.90.16.42 Mon Feb 13 08:13:41 2012 +++ src/sys/arch/mips/include/cpu.h Mon Feb 13 18:20:25 2012 @@ -637,7 +637,8 @@ void fpusave_cpu(struct cpu_info *); void dumpsys(void); int savectx(struct pcb *); void cpu_identify(device_t, const char *); -bool mm_md_direct_mapped_phys(paddr_t, vaddr_t *); +bool mm_md_direct_mapped_phys(paddr_t, vaddr_t *, vsize_t *); +bool mm_md_direct_mapped_virt(vaddr_t, paddr_t *, vsize_t *); /* locore*.S */ int badaddr(void *, size_t); Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.33 src/sys/arch/mips/include/locore.h:1.78.36.1.2.34 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.33 Mon Feb 13 08:13:41 2012 +++ src/sys/arch/mips/include/locore.h Mon Feb 13 18:20:25 2012 @@ -32,6 +32,8 @@ #include opt_cputype.h #endif +#include sys/kcore.h + #include mips/mutex.h #include mips/cpuregs.h #include mips/reg.h @@ -417,6 +419,19 @@ void mips_page_physload(vaddr_t, vaddr_t const struct phys_ram_seg *, size_t, const struct mips_vmfreelist *, size_t); +paddr_t kvtophys(vaddr_t); + +extern struct phys_ram_seg mem_clusters[]; +extern u_int mem_cluster_cnt; + +#ifndef _LP64 +/* + * Helper routines for kernel coredumps. + */ +bool mips_kcore_window_vtophys(vaddr_t, paddr_t *); +vaddr_t mips_kcore_window_map(paddr_t, vsize_t *); +#endif + /* * CPU identification, from PRID register. Index: src/sys/arch/mips/mips/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.22.16.21 src/sys/arch/mips/mips/bus_dma.c:1.22.16.22 --- src/sys/arch/mips/mips/bus_dma.c:1.22.16.21 Tue Dec 6 17:37:55 2011 +++ src/sys/arch/mips/mips/bus_dma.c Mon Feb 13 18:20:25 2012 @@ -1009,18 +1009,22 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma return 0; } #else - if ((nsegs == 1) (segs[0].ds_addr MIPS_PHYS_MASK)) { - if (((mips_options.mips_cpu_flags CPU_MIPS_D_CACHE_COHERENT) == 0) - (flags BUS_DMA_COHERENT)) + if (nsegs == 1) { + vsize_t vs; + if (!(mips_options.mips_cpu_flags CPU_MIPS_D_CACHE_COHERENT) + segs[0].ds_addr MIPS_PHYS_MASK + segs[0].ds_addr + segs[0].ds_len = MIPS_PHYS_MASK + 1 + (flags BUS_DMA_COHERENT)) { *kvap = (void *)MIPS_PHYS_TO_KSEG1(segs[0].ds_addr); -#ifdef ENABLE_MIPS_KSEGX - else if (mips_ksegx_start segs[0].ds_addr - segs[0].ds_addr mips_ksegx_start + VM_KSEGX_SIZE) - *kvap = (void *)(vaddr_t)(VM_KSEGX_ADDRESS + segs[0].ds_addr); -#endif - else - *kvap = (void *)MIPS_PHYS_TO_KSEG0(segs[0].ds_addr); - return (0); + return (0); + } + if (((mips_options.mips_cpu_flags CPU_MIPS_D_CACHE_COHERENT) + || (flags BUS_DMA_COHERENT) == 0) + mm_md_direct_mapped_phys(segs[0].ds_addr, va, vs) + segs[0].ds_len = vs) { + *kvap = (void *)va; + return (0); + } } #endif /* _LP64 */ @@ -1068,17 +1072,9 @@ _bus_dmamem_unmap(bus_dma_tag_t t, void * Nothing to do if we mapped it with KSEG0 or KSEG1 (i.e. * not in KSEG2 or XKSEG). */ - if (MIPS_KSEG0_P(kva) || MIPS_KSEG1_P(kva)) - return; -#ifdef ENABLE_MIPS_KSEGX - if (VM_KSEGX_ADDRESS = (vaddr_t)kva - (vaddr_t)kva VM_KSEGX_ADDRESS + VM_KSEGX_SIZE) + if (mm_md_direct_mapped_virt((vaddr_t)kva, NULL, NULL) + || MIPS_KSEG1_P(kva)) return; -#endif -#ifdef _LP64 - if (MIPS_XKPHYS_P((vaddr_t)kva)) - return; -#endif size = round_page(size); pmap_remove(pmap_kernel(), (vaddr_t)kva, (vaddr_t)kva + size); Index:
CVS commit: src/share/man/man8/man8.evbarm
Module Name:src Committed By: njoly Date: Mon Feb 13 18:30:44 UTC 2012 Modified Files: src/share/man/man8/man8.evbarm: bootmini2440.8 Log Message: Small typo in macro (.xr - .Xr). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man8/man8.evbarm/bootmini2440.8 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/man8/man8.evbarm/bootmini2440.8 diff -u src/share/man/man8/man8.evbarm/bootmini2440.8:1.2 src/share/man/man8/man8.evbarm/bootmini2440.8:1.3 --- src/share/man/man8/man8.evbarm/bootmini2440.8:1.2 Tue Jan 31 13:25:05 2012 +++ src/share/man/man8/man8.evbarm/bootmini2440.8 Mon Feb 13 18:30:44 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: bootmini2440.8,v 1.2 2012/01/31 13:25:05 wiz Exp $ +.\ $NetBSD: bootmini2440.8,v 1.3 2012/02/13 18:30:44 njoly Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -158,7 +158,7 @@ MAC-address, and booting into single use .Xr dhcpd 8 , .Xr diskless 8 , .Xr nfsd 8 , -.xr tftpd 8 , +.Xr tftpd 8 , .Xr boothowto 9 .Sh HISTORY The
CVS commit: src/doc
Module Name:src Committed By: dholland Date: Mon Feb 13 19:15:31 UTC 2012 Modified Files: src/doc: CHANGES Log Message: Note removal of quotactl(8) and addition of quotadump(8)/quotarestore(8) for backup purposes. While here, also improve the earlier quota-related entries. At quota2 merge time [20110306]: - main entry is for ffs, not kernel - add entry to note addition of repquota -x - add entry to note addition of quotactl(8) - add entry to note changes to quotactl(2) - avoid explicitly saying to use repquota -x and quotactl(8) to migrate as it's no longer quite accurate At libquota addition time [20120201]: - main entry is for libquota, not kernel - add entry to note that quotactl(2) is gone and __quotactl(2) is now a private interface - add entry to note that the repquota -x dump format changed (from xml to tabular) - continue to make no reference to the vfs-level changes as they aren't user-facing Prompted/suggested by apb@; ok by martin for releng. To generate a diff of this commit: cvs rdiff -u -r1.1669 -r1.1670 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1669 src/doc/CHANGES:1.1670 --- src/doc/CHANGES:1.1669 Sat Feb 11 23:36:18 2012 +++ src/doc/CHANGES Mon Feb 13 19:15:30 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1669 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1670 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -959,15 +959,21 @@ Changes from NetBSD 5.0 to NetBSD 6.0: atf-run(1): In case a test program dumps core, dump the stack trace from the core file as part of test output. [pooka 20110302] - kernel: merge the bouyer-quota2 branch. This adds a new on-disk format + ffs: merge the bouyer-quota2 branch. This adds a new on-disk format to store disk quota usage and limits, integrated with ffs metadata. Usage is checked by fsck_ffs (no more quotacheck) and is covered by the WAPBL journal. Enabled with kernel option QUOTA2, turned on with tunefs(8) on a per-filesystem basis. mount_mfs(8) can also turn quotas on. - See repquota(8) and quotactl(8) for a way to migrate - limits from QUOTA to QUOTA2. [bouyer 20110306] + quotactl(2): quotactl system call interface changed to support the + bouyer-quota2 branch. Quotas are no longer limited to + 32-bit values. [bouyer 20110306] + repquota(8): added -x option to dump quotas for backup or + transfer purposes. [bouyer 20110306] + quotactl(8): Added tool to manipulate quotas via proplib XML bundles. + This can be used (among other things) to restore backups + created with repquota -x. [bouyer 20110306] tmux(1): First import of tmux (version 1.4). [jmmv 20110310] powerpc: add TLS (thread local storage) support. [matt 20110311] sh3: add TLS (thread local storage) support. [joerg 20110312] @@ -1228,9 +1234,14 @@ Changes from NetBSD 5.0 to NetBSD 6.0: ported by TOYOKURA Atsushi. [tsutsui 20120129] evbarm: Add FriendlyARM Mini2440 support. Code was written by Paul Fleischer. [nisimura 20120130] - kernel: Add a new library, libquota, for control of and access to + libquota(3): Add a new library, libquota, for control of and access to disk quotas, extending the file-system-independent interface added with the bouyer-quota2 branch. [dholland 20120201] + quotactl(2): Removed quotactl(2) interface, replaced with new + private __quotactl(2) interface. All user code should use + the libquota(3) API. [dholland 20120201] + repquota(8): The repquota -x dump format is now tabular, not XML. + [dholland 20120201] mac68k: Add timecounter support to the CSI Hurdler Centronics Parallel Interface cpi(4) driver. [hauke 20120201] ntp: import ntp 4.2.6p5. @@ -1243,3 +1254,10 @@ Changes from NetBSD 5.0 to NetBSD 6.0: [joerg 20120207] posix_spawn: Import Charles Zhang's summer of code project. [martin 20120212] + quotactl(8): quotactl(8) was removed in favor of quotadump and + quotarestore. [dholland 20120212] + quotadump(8): Added quotadump, which is the same as repquota -x, + for creating backups of quota information. + [dholland 20120212] + quotarestore(8): New quota tool quotarestore for loading backups + created with quotadump. [dholland 20120212]
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Mon Feb 13 19:15:59 UTC 2012 Modified Files: src/sys/arch/usermode/usermode: syscall.c Log Message: Add cpu_spawn_return() as per other archs to make it compile. No tests done yet. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/usermode/usermode/syscall.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/usermode/usermode/syscall.c diff -u src/sys/arch/usermode/usermode/syscall.c:1.22 src/sys/arch/usermode/usermode/syscall.c:1.23 --- src/sys/arch/usermode/usermode/syscall.c:1.22 Sat Jan 14 21:45:28 2012 +++ src/sys/arch/usermode/usermode/syscall.c Mon Feb 13 19:15:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.22 2012/01/14 21:45:28 reinoud Exp $ */ +/* $NetBSD: syscall.c,v 1.23 2012/02/13 19:15:59 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.22 2012/01/14 21:45:28 reinoud Exp $); +__KERNEL_RCSID(0, $NetBSD: syscall.c,v 1.23 2012/02/13 19:15:59 reinoud Exp $); #include sys/types.h #include sys/param.h @@ -63,6 +63,16 @@ child_return(void *arg) ktrsysret(SYS_fork, 0, 0); } +/* + * Process the tail end of a posix_spawn() for the child. + */ +void +cpu_spawn_return(struct lwp *l) +{ + + userret(l); +} + extern const char *const syscallnames[]; static void syscall_args_print(lwp_t *l, int code, int nargs, int argsize,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: dholland Date: Mon Feb 13 19:50:15 UTC 2012 Modified Files: src/lib/libc/sys: __quotactl.2 Log Message: Fix wrong xref; wrote quotactl(8), meant quotacheck(8). ok riz@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/sys/__quotactl.2 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/sys/__quotactl.2 diff -u src/lib/libc/sys/__quotactl.2:1.2 src/lib/libc/sys/__quotactl.2:1.3 --- src/lib/libc/sys/__quotactl.2:1.2 Mon Feb 13 13:22:09 2012 +++ src/lib/libc/sys/__quotactl.2 Mon Feb 13 19:50:15 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: __quotactl.2,v 1.2 2012/02/13 13:22:09 wiz Exp $ +.\ $NetBSD: __quotactl.2,v 1.3 2012/02/13 19:50:15 dholland Exp $ .\ .\ Copyright (c) 1983, 1990, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -169,7 +169,7 @@ meta-data, cannot be updated via this in If the usage information is incorrect a tool such as .Xr fsck 8 or -.Xr quotactl 8 +.Xr quotacheck 8 with file-system-specific knowledge must be used to repair the on-disk information. See
CVS commit: src
Module Name:src Committed By: dholland Date: Mon Feb 13 19:53:26 UTC 2012 Modified Files: src/lib/libc/sys: getrlimit.2 src/share/man/man5: fstab.5 src/usr.bin/quota: quota.1 src/usr.sbin/edquota: edquota.8 src/usr.sbin/quotacheck: quotacheck.8 src/usr.sbin/quotaon: quotaon.8 Log Message: Update dangling references to quotactl(2), mostly now libquota(3), and to quotactl(8), mostly now quotarestore(8). ok riz@ To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/lib/libc/sys/getrlimit.2 cvs rdiff -u -r1.38 -r1.39 src/share/man/man5/fstab.5 cvs rdiff -u -r1.16 -r1.17 src/usr.bin/quota/quota.1 cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/edquota/edquota.8 cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/quotacheck/quotacheck.8 cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/quotaon/quotaon.8 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/sys/getrlimit.2 diff -u src/lib/libc/sys/getrlimit.2:1.34 src/lib/libc/sys/getrlimit.2:1.35 --- src/lib/libc/sys/getrlimit.2:1.34 Wed Nov 16 22:43:27 2011 +++ src/lib/libc/sys/getrlimit.2 Mon Feb 13 19:53:24 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: getrlimit.2,v 1.34 2011/11/16 22:43:27 wiz Exp $ +.\ $NetBSD: getrlimit.2,v 1.35 2012/02/13 19:53:24 dholland Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -209,10 +209,10 @@ cannot be lowered, because current usage .Xr csh 1 , .Xr sh 1 , .Xr mlock 2 , -.Xr quotactl 2 , .Xr setsockopt 2 , .Xr sigaction 2 , .Xr sigaltstack 2 , +.Xr libquota 3 , .Xr sysctl 3 .\ Sh STANDARDS .\ With exception of Index: src/share/man/man5/fstab.5 diff -u src/share/man/man5/fstab.5:1.38 src/share/man/man5/fstab.5:1.39 --- src/share/man/man5/fstab.5:1.38 Sun Mar 6 17:22:50 2011 +++ src/share/man/man5/fstab.5 Mon Feb 13 19:53:25 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: fstab.5,v 1.38 2011/03/06 17:22:50 wiz Exp $ +.\ $NetBSD: fstab.5,v 1.39 2012/02/13 19:53:25 dholland Exp $ .\ .\ Copyright (c) 1980, 1989, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -212,12 +212,10 @@ or .Dq groupquota options. Migration of limits to the new in-file system quota can be handled -by -.Xr repquota 8 -with option -.Fl x +via +.Xr quotadump 8 and -.Xr quotactl 8 . +.Xr quotarestore 8 . .Pp The option .Dq rump Index: src/usr.bin/quota/quota.1 diff -u src/usr.bin/quota/quota.1:1.16 src/usr.bin/quota/quota.1:1.17 --- src/usr.bin/quota/quota.1:1.16 Sun Mar 6 17:25:32 2011 +++ src/usr.bin/quota/quota.1 Mon Feb 13 19:53:25 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: quota.1,v 1.16 2011/03/06 17:25:32 wiz Exp $ +.\ $NetBSD: quota.1,v 1.17 2012/02/13 19:53:25 dholland Exp $ .\ .\ Copyright (c) 1983, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -124,7 +124,7 @@ If exits with a non-zero status, one or more file systems are over quota. .Sh SEE ALSO -.Xr quotactl 2 , +.Xr libquota 3 , .Xr fstab 5 , .Xr edquota 8 , .Xr quotacheck 8 , Index: src/usr.sbin/edquota/edquota.8 diff -u src/usr.sbin/edquota/edquota.8:1.15 src/usr.sbin/edquota/edquota.8:1.16 --- src/usr.sbin/edquota/edquota.8:1.15 Mon Jan 30 19:17:29 2012 +++ src/usr.sbin/edquota/edquota.8 Mon Feb 13 19:53:25 2012 @@ -29,7 +29,7 @@ .\ SUCH DAMAGE. .\ .\ from: @(#)edquota.8 8.2 (Berkeley) 4/27/95 -.\ $NetBSD: edquota.8,v 1.15 2012/01/30 19:17:29 dholland Exp $ +.\ $NetBSD: edquota.8,v 1.16 2012/02/13 19:53:25 dholland Exp $ .\ .Dd January 29, 2012 .Dt EDQUOTA 8 @@ -191,10 +191,10 @@ time for the default quotas on file syst .Dl edquota -h 4M/2k -s 2M/1k -t 2W3D/2W3D -f /home -u -d .Sh SEE ALSO .Xr quota 1 , -.Xr quotactl 2 , .Xr humanize_number 3 , +.Xr libquota 3 , .Xr fstab 5 , .Xr quotacheck 8 , -.Xr quotactl 8 , .Xr quotaon 8 , +.Xr quotarestore 8 , .Xr repquota 8 Index: src/usr.sbin/quotacheck/quotacheck.8 diff -u src/usr.sbin/quotacheck/quotacheck.8:1.17 src/usr.sbin/quotacheck/quotacheck.8:1.18 --- src/usr.sbin/quotacheck/quotacheck.8:1.17 Mon Jan 5 18:46:44 2004 +++ src/usr.sbin/quotacheck/quotacheck.8 Mon Feb 13 19:53:25 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: quotacheck.8,v 1.17 2004/01/05 18:46:44 wiz Exp $ +.\ $NetBSD: quotacheck.8,v 1.18 2012/02/13 19:53:25 dholland Exp $ .\ .\ Copyright (c) 1983, 1990, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -175,7 +175,7 @@ default filesystems .El .Sh SEE ALSO .Xr quota 1 , -.Xr quotactl 2 , +.Xr libquota 3 , .Xr fstab 5 , .Xr edquota 8 , .Xr fsck 8 , Index: src/usr.sbin/quotaon/quotaon.8 diff -u src/usr.sbin/quotaon/quotaon.8:1.9 src/usr.sbin/quotaon/quotaon.8:1.10 --- src/usr.sbin/quotaon/quotaon.8:1.9 Fri Nov 19 21:19:24 2004 +++ src/usr.sbin/quotaon/quotaon.8 Mon Feb 13 19:53:26 2012 @@ -28,7 +28,7 @@ .\ SUCH DAMAGE. .\ .\ from: @(#)quotaon.8 8.2 (Berkeley) 12/11/93 -.\ $NetBSD: quotaon.8,v 1.9
CVS commit: src/sys/arch/atari
Module Name:src Committed By: jdc Date: Mon Feb 13 20:00:00 UTC 2012 Modified Files: src/sys/arch/atari/isa: isa_dma.c src/sys/arch/atari/pci: pci_hades.c Log Message: Build fix - convert to new-style definitions. OK by releng. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/isa/isa_dma.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/atari/pci/pci_hades.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/atari/isa/isa_dma.c diff -u src/sys/arch/atari/isa/isa_dma.c:1.10 src/sys/arch/atari/isa/isa_dma.c:1.11 --- src/sys/arch/atari/isa/isa_dma.c:1.10 Fri Jul 1 20:34:06 2011 +++ src/sys/arch/atari/isa/isa_dma.c Mon Feb 13 19:59:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_dma.c,v 1.10 2011/07/01 20:34:06 dyoung Exp $ */ +/* $NetBSD: isa_dma.c,v 1.11 2012/02/13 19:59:59 jdc Exp $ */ #define ISA_DMA_STATS @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: isa_dma.c,v 1.10 2011/07/01 20:34:06 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: isa_dma.c,v 1.11 2012/02/13 19:59:59 jdc Exp $); #include sys/param.h #include sys/systm.h @@ -262,13 +262,8 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t, * Load an ISA DMA map with a linear buffer. */ int -_isa_bus_dmamap_load(t, map, buf, buflen, p, flags) - bus_dma_tag_t t; - bus_dmamap_t map; - void *buf; - bus_size_t buflen; - struct proc *p; - int flags; +_isa_bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, void *buf, +bus_size_t buflen, struct proc *p, int flags) { struct atari_isa_dma_cookie *cookie = map-_dm_cookie; int error; @@ -333,11 +328,8 @@ _isa_bus_dmamap_load(t, map, buf, buflen * Like _isa_bus_dmamap_load(), but for mbufs. */ int -_isa_bus_dmamap_load_mbuf(t, map, m0, flags) - bus_dma_tag_t t; - bus_dmamap_t map; - struct mbuf *m0; - int flags; +_isa_bus_dmamap_load_mbuf(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0, +int flags) { struct atari_isa_dma_cookie *cookie = map-_dm_cookie; int error; Index: src/sys/arch/atari/pci/pci_hades.c diff -u src/sys/arch/atari/pci/pci_hades.c:1.12 src/sys/arch/atari/pci/pci_hades.c:1.13 --- src/sys/arch/atari/pci/pci_hades.c:1.12 Fri Jul 1 20:34:06 2011 +++ src/sys/arch/atari/pci/pci_hades.c Mon Feb 13 20:00:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_hades.c,v 1.12 2011/07/01 20:34:06 dyoung Exp $ */ +/* $NetBSD: pci_hades.c,v 1.13 2012/02/13 20:00:00 jdc Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_hades.c,v 1.12 2011/07/01 20:34:06 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_hades.c,v 1.13 2012/02/13 20:00:00 jdc Exp $); #include sys/types.h #include sys/param.h @@ -66,8 +66,7 @@ static int pci_config_offset(pcitag_t); /* * Atari_init.c maps the config areas PAGE_SIZE bytes apart */ -static int pci_config_offset(tag) -pcitag_t tag; +static int pci_config_offset(pcitag_t tag) { int device;
CVS commit: src
Module Name:src Committed By: martin Date: Mon Feb 13 21:03:08 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/kernel: Makefile src/tests/lib/libc/gen: Makefile Added Files: src/tests/lib/libc/gen/posix_spawn: Makefile Makefile.inc h_fileactions.c h_nonexec.sh h_spawn.c h_spawnattr.c t_fileactions.c t_spawn.c t_spawnattr.c Removed Files: src/tests/kernel/posix_spawn: Makefile Makefile.inc h_fileactions.c h_nonexec.sh h_spawn.c h_spawnattr.c t_fileactions.c t_spawn.c t_spawnattr.c Log Message: Move posix_spawn tests to lib/libc/gen/posix_spawn - they test both libc and kernel, but that is an implementation detail unrelated to the tests themselfs. Ok: releng To generate a diff of this commit: cvs rdiff -u -r1.435 -r1.436 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.59 -r1.60 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.23 -r1.24 src/tests/kernel/Makefile cvs rdiff -u -r1.1 -r0 src/tests/kernel/posix_spawn/Makefile \ src/tests/kernel/posix_spawn/Makefile.inc \ src/tests/kernel/posix_spawn/h_fileactions.c \ src/tests/kernel/posix_spawn/h_nonexec.sh \ src/tests/kernel/posix_spawn/h_spawn.c \ src/tests/kernel/posix_spawn/h_spawnattr.c \ src/tests/kernel/posix_spawn/t_fileactions.c \ src/tests/kernel/posix_spawn/t_spawn.c \ src/tests/kernel/posix_spawn/t_spawnattr.c cvs rdiff -u -r1.33 -r1.34 src/tests/lib/libc/gen/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/posix_spawn/Makefile \ src/tests/lib/libc/gen/posix_spawn/Makefile.inc \ src/tests/lib/libc/gen/posix_spawn/h_fileactions.c \ src/tests/lib/libc/gen/posix_spawn/h_nonexec.sh \ src/tests/lib/libc/gen/posix_spawn/h_spawn.c \ src/tests/lib/libc/gen/posix_spawn/h_spawnattr.c \ src/tests/lib/libc/gen/posix_spawn/t_fileactions.c \ src/tests/lib/libc/gen/posix_spawn/t_spawn.c \ src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c 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.435 src/distrib/sets/lists/tests/mi:1.436 --- src/distrib/sets/lists/tests/mi:1.435 Sat Feb 11 23:31:23 2012 +++ src/distrib/sets/lists/tests/mi Mon Feb 13 21:03:06 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.435 2012/02/11 23:31:23 martin Exp $ +# $NetBSD: mi,v 1.436 2012/02/13 21:03:06 martin Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -322,13 +322,13 @@ ./usr/libdata/debug/usr/tests/kernel/kqueue/write/t_fifo.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/write/t_pipe.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/write/t_ttypty.debug tests-kernel-tests debug,atf -./usr/libdata/debug/usr/tests/kernel/posix_spawn tests-kernel-tests -./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_spawn.debug tests-kernel-tests debug,atf -./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_spawnattr.debug tests-kernel-tests debug,atf -./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_fileactions.debug tests-kernel-tests debug,atf -./usr/libdata/debug/usr/tests/kernel/posix_spawn/h_spawn.debug tests-kernel-tests debug,atf -./usr/libdata/debug/usr/tests/kernel/posix_spawn/h_fileactions.debug tests-kernel-tests debug,atf -./usr/libdata/debug/usr/tests/kernel/posix_spawn/h_spawnattr.debug tests-kernel-tests debug,atf +./usr/libdata/debug/usr/tests/kernel/posix_spawn tests-kernel-tests obsolete +./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_spawn.debug tests-kernel-tests obsolete +./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_spawnattr.debug tests-kernel-tests obsolete +./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_fileactions.debug tests-kernel-tests obsolete +./usr/libdata/debug/usr/tests/kernel/posix_spawn/h_spawn.debug tests-kernel-tests obsolete +./usr/libdata/debug/usr/tests/kernel/posix_spawn/h_fileactions.debug tests-kernel-tests obsolete +./usr/libdata/debug/usr/tests/kernel/posix_spawn/h_spawnattr.debug tests-kernel-tests obsolete ./usr/libdata/debug/usr/tests/kernel/t_extattrctl.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/t_extent.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/t_filedesc.debug tests-kernel-tests debug,atf @@ -365,6 +365,13 @@ ./usr/libdata/debug/usr/tests/lib/libc/dbtests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/db/h_db.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug +./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn tests-kernel-tests +./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/t_spawn.debug tests-kernel-tests debug,atf +./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/t_spawnattr.debug
CVS commit: src/tests/fs/nfs
Module Name:src Committed By: bouyer Date: Mon Feb 13 22:40:43 UTC 2012 Modified Files: src/tests/fs/nfs: Makefile t_rquotad.sh Log Message: When I split non-quota-specific functions out from ../ffs/quotas_common.sh I forgot to ajust this test. Fix PR bin/46015 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/fs/nfs/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/t_rquotad.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/fs/nfs/Makefile diff -u src/tests/fs/nfs/Makefile:1.6 src/tests/fs/nfs/Makefile:1.7 --- src/tests/fs/nfs/Makefile:1.6 Mon May 30 14:41:26 2011 +++ src/tests/fs/nfs/Makefile Mon Feb 13 22:40:43 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/05/30 14:41:26 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2012/02/13 22:40:43 bouyer Exp $ # .include bsd.own.mk @@ -11,7 +11,7 @@ TESTS_C= t_mountd .for name in t_rquotad TESTS_SH+= ${name} -TESTS_SH_SRC_${name}= ../ffs/quotas_common.sh ${name}.sh +TESTS_SH_SRC_${name}= ../ffs/ffs_common.sh ../ffs/quotas_common.sh ${name}.sh .endfor VFSTESTDIR != cd ${.CURDIR}/../common ${PRINTOBJDIR} Index: src/tests/fs/nfs/t_rquotad.sh diff -u src/tests/fs/nfs/t_rquotad.sh:1.1 src/tests/fs/nfs/t_rquotad.sh:1.2 --- src/tests/fs/nfs/t_rquotad.sh:1.1 Sat Mar 12 14:03:38 2011 +++ src/tests/fs/nfs/t_rquotad.sh Mon Feb 13 22:40:43 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_rquotad.sh,v 1.1 2011/03/12 14:03:38 bouyer Exp $ +# $NetBSD: t_rquotad.sh,v 1.2 2012/02/13 22:40:43 bouyer Exp $ # # Copyright (c) 2011 Manuel Bouyer # All rights reserved. @@ -35,7 +35,7 @@ done get_nfs_quota() { - create_with_quotas $* + create_ffs $* local q=$3 local expect @@ -138,5 +138,5 @@ get_nfs_quota() done unset LD_PRELOAD - rump_shutdown + rump_quota_shutdown }
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Mon Feb 13 23:07:31 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_page.h uvm_pdaemon.c Log Message: Use separate pending and paging tailq entries. Add a queue check routine to validate the queues aren't corrupt. To generate a diff of this commit: cvs rdiff -u -r1.55.14.6 -r1.55.14.7 src/sys/uvm/uvm_page.h cvs rdiff -u -r1.93.4.2.4.3 -r1.93.4.2.4.4 src/sys/uvm/uvm_pdaemon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_page.h diff -u src/sys/uvm/uvm_page.h:1.55.14.6 src/sys/uvm/uvm_page.h:1.55.14.7 --- src/sys/uvm/uvm_page.h:1.55.14.6 Thu Feb 9 03:05:00 2012 +++ src/sys/uvm/uvm_page.h Mon Feb 13 23:07:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.h,v 1.55.14.6 2012/02/09 03:05:00 matt Exp $ */ +/* $NetBSD: uvm_page.h,v 1.55.14.7 2012/02/13 23:07:31 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -248,7 +248,8 @@ struct vm_physseg { * Fields from uvmexp which need to be kept on a per-group basis. */ struct uvm_pggroup { - TAILQ_ENTRY(uvm_pggroup) pgrp_pd_link; + TAILQ_ENTRY(uvm_pggroup) pgrp_pending_link; + TAILQ_ENTRY(uvm_pggroup) pgrp_paging_link; STAILQ_ENTRY(uvm_pggroup) pgrp_uvm_link; struct uvmpdpol_groupstate *pgrp_gs; /* for pdpolicy */ Index: src/sys/uvm/uvm_pdaemon.c diff -u src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.3 src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.4 --- src/sys/uvm/uvm_pdaemon.c:1.93.4.2.4.3 Thu Feb 9 03:05:01 2012 +++ src/sys/uvm/uvm_pdaemon.c Mon Feb 13 23:07:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.3 2012/02/09 03:05:01 matt Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.4 2012/02/13 23:07:31 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.3 2012/02/09 03:05:01 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_pdaemon.c,v 1.93.4.2.4.4 2012/02/13 23:07:31 matt Exp $); #include opt_uvmhist.h #include opt_readahead.h @@ -106,6 +106,8 @@ static void uvmpd_scan(struct uvm_pggrou static void uvmpd_scan_queue(struct uvm_pggroup *); static void uvmpd_tune(void); +static void uvmpd_checkgroup(const struct uvm_pggroup *); + static struct uvm_pdinfo { unsigned int pd_waiters; unsigned int pd_scans_neededs; @@ -170,6 +172,40 @@ uvm_wait(const char *wmsg) UVM_UNLOCK_AND_WAIT(uvmexp.free, uvm_fpageqlock, false, wmsg, timo); } + +static void +uvmpd_checkgroup(const struct uvm_pggroup *grp) +{ +#ifdef DEBUG + struct uvm_pdinfo * const pdinfo = uvm_pdinfo; + bool in_pendingq = false; + bool in_pagingq = false; + const struct uvm_pggroup *tstgrp; + + TAILQ_FOREACH(tstgrp, pdinfo-pd_pendingq, pgrp_pending_link) { + if (tstgrp == grp) { + in_pendingq = true; + break; + } + } + + TAILQ_FOREACH(tstgrp, pdinfo-pd_pagingq, pgrp_paging_link) { + if (tstgrp == grp) { + in_pagingq = true; + break; + } + } + + if (grp-pgrp_paging 0) { + KASSERT(in_pagingq); + KASSERT(!in_pendingq); + } else { + KASSERT(!in_pagingq); + KASSERT(in_pendingq == grp-pgrp_scan_needed); + } +#endif +} + /* * uvm_kick_pdaemon: perform checks to determine if we need to * give the pagedaemon a nudge, and do so if necessary. @@ -191,6 +227,7 @@ uvm_kick_pdaemon(void) const bool prev_scan_needed = grp-pgrp_scan_needed; KASSERT(grp-pgrp_npages 0); + uvmpd_checkgroup(grp); grp-pgrp_scan_needed = grp-pgrp_free + grp-pgrp_paging grp-pgrp_freemin @@ -207,16 +244,16 @@ uvm_kick_pdaemon(void) grp-pgrp_freemin, grp-pgrp_freetarg); } - if (grp-pgrp_paging == 0 - prev_scan_needed != grp-pgrp_scan_needed) { + if (prev_scan_needed != grp-pgrp_scan_needed) { if (grp-pgrp_scan_needed) { TAILQ_INSERT_TAIL(pdinfo-pd_pendingq, -grp, pgrp_pd_link); +grp, pgrp_pending_link); need_wakeup = true; } else { TAILQ_REMOVE(pdinfo-pd_pendingq, -grp, pgrp_pd_link); +grp, pgrp_pending_link); } + uvmpd_checkgroup(grp); } } @@ -224,7 +261,7 @@ uvm_kick_pdaemon(void) wakeup(uvm.pagedaemon); UVMHIST_LOG(pdhist, - done: wakeup=%d!, - grp - uvm.pggroups, need_wakeup, 0, 0); + need_wakeup, 0, 0, 0); } /* @@ -371,6 +408,16 @@ uvm_pageout(void *arg) uvmpdpol_tune(grp); + /* + * While we are locked, remove this from the pendingq. + */ + uvmpd_checkgroup(grp); + KASSERT(grp-pgrp_scan_needed); + TAILQ_REMOVE(pdinfo-pd_pendingq, grp, + pgrp_pending_link); + grp-pgrp_scan_needed = false; + uvmpd_checkgroup(grp); + int diff = grp-pgrp_freetarg - grp-pgrp_free; if (diff 0) diff = 0; @@ -411,11 +458,6 @@ uvm_pageout(void *arg) need_wakeup = true; } - /* - * We are done, remove it from the queue. - */ - TAILQ_REMOVE(pdinfo-pd_pendingq, grp, pgrp_pd_link); -
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: jym Date: Mon Feb 13 23:54:58 UTC 2012 Modified Files: src/sys/arch/xen/x86: cpu.c Log Message: PAT flags are not under control of Xen domains currently, so there is no point in enabling them. Avoids: - a warning logged by hypervisor when a domain attempts to modify the PAT MSR. - an error during domain resuming, where a PAT flag has been set on a page while the hypervisor does not allow it. ok releng@. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/xen/x86/cpu.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/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.79 src/sys/arch/xen/x86/cpu.c:1.80 --- src/sys/arch/xen/x86/cpu.c:1.79 Sat Jan 28 12:15:19 2012 +++ src/sys/arch/xen/x86/cpu.c Mon Feb 13 23:54:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.79 2012/01/28 12:15:19 cherry Exp $ */ +/* $NetBSD: cpu.c,v 1.80 2012/02/13 23:54:58 jym Exp $ */ /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */ /*- @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.79 2012/01/28 12:15:19 cherry Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.80 2012/02/13 23:54:58 jym Exp $); #include opt_ddb.h #include opt_multiprocessor.h @@ -532,7 +532,6 @@ cpu_attach_common(device_t parent, devic panic(unknown processor type??\n); } - pat_init(ci); atomic_or_32(cpus_attached, ci-ci_cpumask); #ifdef MPVERBOSE
CVS commit: src/tests/lib/libc/gen/posix_spawn
Module Name:src Committed By: martin Date: Tue Feb 14 00:13:54 UTC 2012 Modified Files: src/tests/lib/libc/gen/posix_spawn: Makefile t_fileactions.c Log Message: Add a few more posix_spawn testcases, which should detect everything that was wrong in the initial version, causing the failure reported in PR kern/45991. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/posix_spawn/Makefile \ src/tests/lib/libc/gen/posix_spawn/t_fileactions.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/posix_spawn/Makefile diff -u src/tests/lib/libc/gen/posix_spawn/Makefile:1.1 src/tests/lib/libc/gen/posix_spawn/Makefile:1.2 --- src/tests/lib/libc/gen/posix_spawn/Makefile:1.1 Mon Feb 13 21:03:08 2012 +++ src/tests/lib/libc/gen/posix_spawn/Makefile Tue Feb 14 00:13:54 2012 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2012/02/13 21:03:08 martin Exp $ +# $NetBSD: Makefile,v 1.2 2012/02/14 00:13:54 martin Exp $ NOMAN= # defined +WARNS=4 .include bsd.own.mk Index: src/tests/lib/libc/gen/posix_spawn/t_fileactions.c diff -u src/tests/lib/libc/gen/posix_spawn/t_fileactions.c:1.1 src/tests/lib/libc/gen/posix_spawn/t_fileactions.c:1.2 --- src/tests/lib/libc/gen/posix_spawn/t_fileactions.c:1.1 Mon Feb 13 21:03:08 2012 +++ src/tests/lib/libc/gen/posix_spawn/t_fileactions.c Tue Feb 14 00:13:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fileactions.c,v 1.1 2012/02/13 21:03:08 martin Exp $ */ +/* $NetBSD: t_fileactions.c,v 1.2 2012/02/14 00:13:54 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -35,17 +35,212 @@ #include stdio.h #include stdlib.h #include string.h +#include errno.h #include fcntl.h #include spawn.h #include unistd.h #include sys/wait.h + +ATF_TC(t_spawn_openmode); + +ATF_TC_HEAD(t_spawn_openmode, tc) +{ + atf_tc_set_md_var(tc, descr, + Test the proper handling of 'mode' for 'open' fileactions); + atf_tc_set_md_var(tc, require.progs, /bin/cat); +} + +static off_t +filesize(const char * restrict fname) +{ + struct stat st; + int err; + + err = stat(fname, st); + ATF_REQUIRE(err == 0); + return st.st_size; +} + +#define TESTFILE ./the_input_data +#define CHECKFILE ./the_output_data +#define TESTCONTENT marry has a little lamb + +static void +make_testfile(const char *restrict file) +{ + FILE *f; + size_t written; + + f = fopen(file, w); + ATF_REQUIRE(f != NULL); + written = fwrite(TESTCONTENT, 1, strlen(TESTCONTENT), f); + fclose(f); + ATF_REQUIRE(written == strlen(TESTCONTENT)); +} + +static void +empty_outfile(const char *restrict filename) +{ + FILE *f; + + f = fopen(filename, w); + ATF_REQUIRE(f != NULL); + fclose(f); +} + +ATF_TC_BODY(t_spawn_openmode, tc) +{ + int status, err; + pid_t pid; + size_t insize, outsize; + char * const args[2] = { __UNCONST(cat), NULL }; + posix_spawn_file_actions_t fa; + + /* + * try a cat testfile checkfile + */ + make_testfile(TESTFILE); + unlink(CHECKFILE); + + posix_spawn_file_actions_init(fa); + posix_spawn_file_actions_addopen(fa, fileno(stdin), + TESTFILE, O_RDONLY, 0); + posix_spawn_file_actions_addopen(fa, fileno(stdout), + CHECKFILE, O_WRONLY|O_CREAT, 0600); + err = posix_spawn(pid, /bin/cat, fa, NULL, args, NULL); + posix_spawn_file_actions_destroy(fa); + + ATF_REQUIRE(err == 0); + + /* ok, wait for the child to finish */ + waitpid(pid, status, 0); + ATF_REQUIRE(WIFEXITED(status) WEXITSTATUS(status) == EXIT_SUCCESS); + + /* now check that input and output have the same size */ + insize = filesize(TESTFILE); + outsize = filesize(CHECKFILE); + ATF_REQUIRE(insize == strlen(TESTCONTENT)); + ATF_REQUIRE(insize == outsize); + + /* + * try a cat testfile checkfile + */ + make_testfile(TESTFILE); + make_testfile(CHECKFILE); + + posix_spawn_file_actions_init(fa); + posix_spawn_file_actions_addopen(fa, fileno(stdin), + TESTFILE, O_RDONLY, 0); + posix_spawn_file_actions_addopen(fa, fileno(stdout), + CHECKFILE, O_WRONLY|O_APPEND, 0); + err = posix_spawn(pid, /bin/cat, fa, NULL, args, NULL); + posix_spawn_file_actions_destroy(fa); + + ATF_REQUIRE(err == 0); + + /* ok, wait for the child to finish */ + waitpid(pid, status, 0); + ATF_REQUIRE(WIFEXITED(status) WEXITSTATUS(status) == EXIT_SUCCESS); + + /* now check that output is twice as long as input */ + insize = filesize(TESTFILE); + outsize = filesize(CHECKFILE); + ATF_REQUIRE(insize == strlen(TESTCONTENT)); + ATF_REQUIRE(insize*2 == outsize); + + /* + * try a cat testfile checkfile with input and output swapped + */ + make_testfile(TESTFILE); + empty_outfile(CHECKFILE); + + posix_spawn_file_actions_init(fa); + posix_spawn_file_actions_addopen(fa, fileno(stdout), + TESTFILE, O_RDONLY, 0); + posix_spawn_file_actions_addopen(fa, fileno(stdin), + CHECKFILE, O_WRONLY, 0); + err = posix_spawn(pid, /bin/cat, fa, NULL, args, NULL); + posix_spawn_file_actions_destroy(fa); + + ATF_REQUIRE(err ==
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: riz Date: Tue Feb 14 00:39:09 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Fix the build after ipfilter tests were added. To generate a diff of this commit: cvs rdiff -u -r1.436 -r1.437 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.436 src/distrib/sets/lists/tests/mi:1.437 --- src/distrib/sets/lists/tests/mi:1.436 Mon Feb 13 21:03:06 2012 +++ src/distrib/sets/lists/tests/mi Tue Feb 14 00:39:08 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.436 2012/02/13 21:03:06 martin Exp $ +# $NetBSD: mi,v 1.437 2012/02/14 00:39:08 riz Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -1581,6 +1581,7 @@ ./usr/tests/ipf tests-ipf-tests ./usr/tests/ipf/Atffiletests-ipf-tests ./usr/tests/ipf/expected tests-ipf-tests +./usr/tests/ipf/expected/Makefile tests-ipf-tests ./usr/tests/ipf/expected/bpf-f1 tests-ipf-tests ./usr/tests/ipf/expected/bpf1 tests-ipf-tests ./usr/tests/ipf/expected/f1 tests-ipf-tests @@ -1596,8 +1597,16 @@ ./usr/tests/ipf/expected/f19 tests-ipf-tests ./usr/tests/ipf/expected/f2 tests-ipf-tests ./usr/tests/ipf/expected/f20 tests-ipf-tests +./usr/tests/ipf/expected/f21 tests-ipf-tests +./usr/tests/ipf/expected/f22 tests-ipf-tests ./usr/tests/ipf/expected/f24 tests-ipf-tests +./usr/tests/ipf/expected/f25 tests-ipf-tests +./usr/tests/ipf/expected/f26 tests-ipf-tests +./usr/tests/ipf/expected/f27 tests-ipf-tests +./usr/tests/ipf/expected/f28 tests-ipf-tests +./usr/tests/ipf/expected/f29 tests-ipf-tests ./usr/tests/ipf/expected/f3 tests-ipf-tests +./usr/tests/ipf/expected/f30 tests-ipf-tests ./usr/tests/ipf/expected/f4 tests-ipf-tests ./usr/tests/ipf/expected/f5 tests-ipf-tests ./usr/tests/ipf/expected/f6 tests-ipf-tests @@ -1614,10 +1623,13 @@ ./usr/tests/ipf/expected/i16 tests-ipf-tests ./usr/tests/ipf/expected/i17 tests-ipf-tests ./usr/tests/ipf/expected/i18 tests-ipf-tests +./usr/tests/ipf/expected/i19 tests-ipf-tests ./usr/tests/ipf/expected/i19.dist tests-ipf-tests ./usr/tests/ipf/expected/i2 tests-ipf-tests ./usr/tests/ipf/expected/i20 tests-ipf-tests ./usr/tests/ipf/expected/i21 tests-ipf-tests +./usr/tests/ipf/expected/i22 tests-ipf-tests +./usr/tests/ipf/expected/i23 tests-ipf-tests ./usr/tests/ipf/expected/i3 tests-ipf-tests ./usr/tests/ipf/expected/i4 tests-ipf-tests ./usr/tests/ipf/expected/i5 tests-ipf-tests @@ -1626,36 +1638,67 @@ ./usr/tests/ipf/expected/i8 tests-ipf-tests ./usr/tests/ipf/expected/i9 tests-ipf-tests ./usr/tests/ipf/expected/in1 tests-ipf-tests +./usr/tests/ipf/expected/in100 tests-ipf-tests +./usr/tests/ipf/expected/in101 tests-ipf-tests +./usr/tests/ipf/expected/in102 tests-ipf-tests ./usr/tests/ipf/expected/in2 tests-ipf-tests ./usr/tests/ipf/expected/in3 tests-ipf-tests ./usr/tests/ipf/expected/in4 tests-ipf-tests ./usr/tests/ipf/expected/in5 tests-ipf-tests ./usr/tests/ipf/expected/in6 tests-ipf-tests +./usr/tests/ipf/expected/in7 tests-ipf-tests ./usr/tests/ipf/expected/ip1 tests-ipf-tests ./usr/tests/ipf/expected/ip2 tests-ipf-tests +./usr/tests/ipf/expected/ip3 tests-ipf-tests ./usr/tests/ipf/expected/ipv6.1 tests-ipf-tests ./usr/tests/ipf/expected/ipv6.2 tests-ipf-tests ./usr/tests/ipf/expected/ipv6.3 tests-ipf-tests +./usr/tests/ipf/expected/ipv6.4 tests-ipf-tests ./usr/tests/ipf/expected/ipv6.5 tests-ipf-tests ./usr/tests/ipf/expected/ipv6.6 tests-ipf-tests ./usr/tests/ipf/expected/l1 tests-ipf-tests ./usr/tests/ipf/expected/l1.b tests-ipf-tests ./usr/tests/ipf/expected/n1 tests-ipf-tests ./usr/tests/ipf/expected/n10 tests-ipf-tests +./usr/tests/ipf/expected/n100 tests-ipf-tests +./usr/tests/ipf/expected/n101 tests-ipf-tests +./usr/tests/ipf/expected/n102 tests-ipf-tests +./usr/tests/ipf/expected/n103 tests-ipf-tests +./usr/tests/ipf/expected/n104 tests-ipf-tests +./usr/tests/ipf/expected/n105 tests-ipf-tests +./usr/tests/ipf/expected/n106 tests-ipf-tests ./usr/tests/ipf/expected/n11 tests-ipf-tests +./usr/tests/ipf/expected/n11_6 tests-ipf-tests ./usr/tests/ipf/expected/n12 tests-ipf-tests +./usr/tests/ipf/expected/n12_6 tests-ipf-tests ./usr/tests/ipf/expected/n13 tests-ipf-tests +./usr/tests/ipf/expected/n13_6 tests-ipf-tests ./usr/tests/ipf/expected/n14 tests-ipf-tests +./usr/tests/ipf/expected/n14_6 tests-ipf-tests +./usr/tests/ipf/expected/n15 tests-ipf-tests +./usr/tests/ipf/expected/n15_6 tests-ipf-tests ./usr/tests/ipf/expected/n16 tests-ipf-tests ./usr/tests/ipf/expected/n17 tests-ipf-tests +./usr/tests/ipf/expected/n18 tests-ipf-tests +./usr/tests/ipf/expected/n1_6 tests-ipf-tests ./usr/tests/ipf/expected/n2 tests-ipf-tests
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Tue Feb 14 01:12:43 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_anon.c uvm_km.c uvm_page.c uvm_pager.c uvm_pdaemon.c uvm_pglist.c Log Message: Add more KASSERTs (more! more! more!). When returning page to the free pool, make sure to dequeue the pages before hand or free page queue corruption will happen. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.51.28.1 src/sys/uvm/uvm_anon.c cvs rdiff -u -r1.101.4.2.4.7 -r1.101.4.2.4.8 src/sys/uvm/uvm_km.c cvs rdiff -u -r1.140.6.3.4.7 -r1.140.6.3.4.8 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.92.18.4 -r1.92.18.5 src/sys/uvm/uvm_pager.c cvs rdiff -u -r1.93.4.2.4.4 -r1.93.4.2.4.5 src/sys/uvm/uvm_pdaemon.c cvs rdiff -u -r1.42.16.11 -r1.42.16.12 src/sys/uvm/uvm_pglist.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_anon.c diff -u src/sys/uvm/uvm_anon.c:1.51 src/sys/uvm/uvm_anon.c:1.51.28.1 --- src/sys/uvm/uvm_anon.c:1.51 Fri Jan 18 10:48:23 2008 +++ src/sys/uvm/uvm_anon.c Tue Feb 14 01:12:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_anon.c,v 1.51 2008/01/18 10:48:23 yamt Exp $ */ +/* $NetBSD: uvm_anon.c,v 1.51.28.1 2012/02/14 01:12:42 matt Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.51 2008/01/18 10:48:23 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.51.28.1 2012/02/14 01:12:42 matt Exp $); #include opt_uvmhist.h @@ -192,6 +192,7 @@ uvm_anfree(struct vm_anon *anon) return; } mutex_enter(uvm_pageqlock); + uvm_pagedequeue(pg); uvm_pagefree(pg); mutex_exit(uvm_pageqlock); mutex_exit(anon-an_lock); Index: src/sys/uvm/uvm_km.c diff -u src/sys/uvm/uvm_km.c:1.101.4.2.4.7 src/sys/uvm/uvm_km.c:1.101.4.2.4.8 --- src/sys/uvm/uvm_km.c:1.101.4.2.4.7 Fri Feb 10 07:14:00 2012 +++ src/sys/uvm/uvm_km.c Tue Feb 14 01:12:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_km.c,v 1.101.4.2.4.7 2012/02/10 07:14:00 matt Exp $ */ +/* $NetBSD: uvm_km.c,v 1.101.4.2.4.8 2012/02/14 01:12:42 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -128,7 +128,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.101.4.2.4.7 2012/02/10 07:14:00 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.101.4.2.4.8 2012/02/14 01:12:42 matt Exp $); #include opt_uvmhist.h @@ -437,6 +437,7 @@ uvm_km_pgremove(vaddr_t startva, vaddr_t uao_dropswap(uobj, curoff PAGE_SHIFT); if (pg != NULL) { mutex_enter(uvm_pageqlock); + uvm_pagedequeue(pg); uvm_pagefree(pg); mutex_exit(uvm_pageqlock); } Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.140.6.3.4.7 src/sys/uvm/uvm_page.c:1.140.6.3.4.8 --- src/sys/uvm/uvm_page.c:1.140.6.3.4.7 Thu Feb 9 03:05:00 2012 +++ src/sys/uvm/uvm_page.c Tue Feb 14 01:12:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.140.6.3.4.7 2012/02/09 03:05:00 matt Exp $ */ +/* $NetBSD: uvm_page.c,v 1.140.6.3.4.8 2012/02/14 01:12:42 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.7 2012/02/09 03:05:00 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.140.6.3.4.8 2012/02/14 01:12:42 matt Exp $); #include opt_uvmhist.h #include opt_readahead.h @@ -1109,6 +1109,7 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu, /* cpu, try1 */ struct pgflist * const freeq = pgfl-pgfl_queues[free_list]; if ((pg = LIST_FIRST(freeq[try1])) != NULL) { + KASSERT(pg-pqflags PQ_FREE); KASSERT(ucpu == VM_FREE_PAGE_TO_CPU(pg)); KASSERT(pgfl == ucpu-page_free[color]); ucpu-page_cpuhit++; @@ -1118,7 +1119,11 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu, /* global, try1 */ struct pgflist * const gfreeq = gpgfl-pgfl_queues[free_list]; if ((pg = LIST_FIRST(gfreeq[try1])) != NULL) { + KASSERT(pg-pqflags PQ_FREE); ucpu = VM_FREE_PAGE_TO_CPU(pg); +#ifndef MULTIPROCESSOR + KASSERT(ucpu == uvm.cpus); +#endif pgfl = ucpu-page_free[color]; ucpu-page_cpumiss++; goto gotit; @@ -1126,6 +1131,7 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu, /* cpu, try2 */ if ((pg = LIST_FIRST(freeq[try2])) != NULL) { + KASSERT(pg-pqflags PQ_FREE); KASSERT(ucpu == VM_FREE_PAGE_TO_CPU(pg)); KASSERT(pgfl == ucpu-page_free[color]); ucpu-page_cpuhit++; @@ -1135,7 +1141,11 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu, /* global, try2 */ if ((pg = LIST_FIRST(gfreeq[try2])) != NULL) { + KASSERT(pg-pqflags PQ_FREE); ucpu = VM_FREE_PAGE_TO_CPU(pg); +#ifndef MULTIPROCESSOR + KASSERT(ucpu == uvm.cpus); +#endif pgfl = ucpu-page_free[color]; ucpu-page_cpumiss++; try1 = try2; @@ -1503,6 +1513,7 @@ uvm_pagefree(struct vm_page *pg) } #endif /* DEBUG */ + KASSERT(!uvmpdpol_pageisqueued_p(pg)); KASSERT((pg-flags
CVS commit: [matt-nb5-mips64] src/sys/arch
Module Name:src Committed By: matt Date: Tue Feb 14 01:25:53 UTC 2012 Modified Files: src/sys/arch/algor/algor [matt-nb5-mips64]: machdep.c src/sys/arch/arc/arc [matt-nb5-mips64]: machdep.c src/sys/arch/cobalt/cobalt [matt-nb5-mips64]: machdep.c src/sys/arch/evbmips/adm5120 [matt-nb5-mips64]: machdep.c src/sys/arch/evbmips/alchemy [matt-nb5-mips64]: machdep.c src/sys/arch/evbmips/atheros [matt-nb5-mips64]: machdep.c src/sys/arch/evbmips/malta [matt-nb5-mips64]: machdep.c src/sys/arch/evbmips/rasoc [matt-nb5-mips64]: machdep.c src/sys/arch/ews4800mips/ews4800mips [matt-nb5-mips64]: machdep.c src/sys/arch/hpcmips/hpcmips [matt-nb5-mips64]: machdep.c src/sys/arch/mipsco/mipsco [matt-nb5-mips64]: machdep.c src/sys/arch/newsmips/newsmips [matt-nb5-mips64]: machdep.c src/sys/arch/playstation2/playstation2 [matt-nb5-mips64]: machdep.c src/sys/arch/pmax/pmax [matt-nb5-mips64]: machdep.c src/sys/arch/sbmips/sbmips [matt-nb5-mips64]: machdep.c src/sys/arch/sgimips/sgimips [matt-nb5-mips64]: machdep.c Log Message: mem_cluster_cnt on mips is now a u_int. To generate a diff of this commit: cvs rdiff -u -r1.38.10.7 -r1.38.10.8 src/sys/arch/algor/algor/machdep.c cvs rdiff -u -r1.112.10.4 -r1.112.10.5 src/sys/arch/arc/arc/machdep.c cvs rdiff -u -r1.98.10.5 -r1.98.10.6 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r1.6.10.6 -r1.6.10.7 src/sys/arch/evbmips/adm5120/machdep.c cvs rdiff -u -r1.37.10.6 -r1.37.10.7 src/sys/arch/evbmips/alchemy/machdep.c cvs rdiff -u -r1.13.10.7 -r1.13.10.8 src/sys/arch/evbmips/atheros/machdep.c cvs rdiff -u -r1.28.10.9 -r1.28.10.10 src/sys/arch/evbmips/malta/machdep.c cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbmips/rasoc/machdep.c cvs rdiff -u -r1.14.10.4 -r1.14.10.5 \ src/sys/arch/ews4800mips/ews4800mips/machdep.c cvs rdiff -u -r1.96.10.6 -r1.96.10.7 src/sys/arch/hpcmips/hpcmips/machdep.c cvs rdiff -u -r1.58.10.4 -r1.58.10.5 src/sys/arch/mipsco/mipsco/machdep.c cvs rdiff -u -r1.98.10.6 -r1.98.10.7 src/sys/arch/newsmips/newsmips/machdep.c cvs rdiff -u -r1.23.10.2 -r1.23.10.3 \ src/sys/arch/playstation2/playstation2/machdep.c cvs rdiff -u -r1.223.8.1.2.10 -r1.223.8.1.2.11 \ src/sys/arch/pmax/pmax/machdep.c cvs rdiff -u -r1.38.10.10 -r1.38.10.11 src/sys/arch/sbmips/sbmips/machdep.c cvs rdiff -u -r1.121.8.6 -r1.121.8.7 src/sys/arch/sgimips/sgimips/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/algor/algor/machdep.c diff -u src/sys/arch/algor/algor/machdep.c:1.38.10.7 src/sys/arch/algor/algor/machdep.c:1.38.10.8 --- src/sys/arch/algor/algor/machdep.c:1.38.10.7 Sun Mar 21 17:38:32 2010 +++ src/sys/arch/algor/algor/machdep.c Tue Feb 14 01:25:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.38.10.7 2010/03/21 17:38:32 cliff Exp $ */ +/* machdep.c,v 1.38.10.7 2010/03/21 17:38:32 cliff Exp */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -106,7 +106,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.38.10.7 2010/03/21 17:38:32 cliff Exp $); +__KERNEL_RCSID(0, machdep.c,v 1.38.10.7 2010/03/21 17:38:32 cliff Exp); #include opt_algor_p4032.h #include opt_algor_p5064.h @@ -195,7 +195,7 @@ struct vm_map *phys_map = NULL; int physmem; /* # pages of physical memory */ int maxmem; /* max memory per process */ -int mem_cluster_cnt; +u_int mem_cluster_cnt; phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; char algor_ethaddr[ETHER_ADDR_LEN]; Index: src/sys/arch/arc/arc/machdep.c diff -u src/sys/arch/arc/arc/machdep.c:1.112.10.4 src/sys/arch/arc/arc/machdep.c:1.112.10.5 --- src/sys/arch/arc/arc/machdep.c:1.112.10.4 Sun Mar 21 17:38:33 2010 +++ src/sys/arch/arc/arc/machdep.c Tue Feb 14 01:25:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.112.10.4 2010/03/21 17:38:33 cliff Exp $ */ +/* machdep.c,v 1.112.10.4 2010/03/21 17:38:33 cliff Exp */ /* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */ /* @@ -78,7 +78,7 @@ /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.112.10.4 2010/03/21 17:38:33 cliff Exp $); +__KERNEL_RCSID(0, machdep.c,v 1.112.10.4 2010/03/21 17:38:33 cliff Exp); #include fs_mfs.h #include opt_ddb.h @@ -198,7 +198,7 @@ char **environment; /* On some arches, int mem_reserved[VM_PHYSSEG_MAX]; /* the cluster is reserved, i.e. not free */ phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; -int mem_cluster_cnt; +u_int mem_cluster_cnt; /* initialize bss, etc. from kernel start, before main() is called. */ void mach_init(int, char *[], u_int, void *); Index: src/sys/arch/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.5 src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.6 --- src/sys/arch/cobalt/cobalt/machdep.c:1.98.10.5 Fri Dec 24 07:52:01 2010 +++
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Tue Feb 14 01:51:12 UTC 2012 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: locore.h src/sys/arch/mips/mips [matt-nb5-mips64]: mem.c mips_machdep.c pmap.c vm_machdep.c Log Message: Fix various LP64 thinkos. To generate a diff of this commit: cvs rdiff -u -r1.78.36.1.2.34 -r1.78.36.1.2.35 \ src/sys/arch/mips/include/locore.h cvs rdiff -u -r1.35.38.11 -r1.35.38.12 src/sys/arch/mips/mips/mem.c cvs rdiff -u -r1.205.4.1.2.1.2.65 -r1.205.4.1.2.1.2.66 \ src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.179.16.41 -r1.179.16.42 src/sys/arch/mips/mips/pmap.c cvs rdiff -u -r1.121.6.1.2.27 -r1.121.6.1.2.28 \ src/sys/arch/mips/mips/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.34 src/sys/arch/mips/include/locore.h:1.78.36.1.2.35 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.34 Mon Feb 13 18:20:25 2012 +++ src/sys/arch/mips/include/locore.h Tue Feb 14 01:51:11 2012 @@ -424,12 +424,12 @@ paddr_t kvtophys(vaddr_t); extern struct phys_ram_seg mem_clusters[]; extern u_int mem_cluster_cnt; -#ifndef _LP64 /* * Helper routines for kernel coredumps. */ -bool mips_kcore_window_vtophys(vaddr_t, paddr_t *); vaddr_t mips_kcore_window_map(paddr_t, vsize_t *); +#ifndef _LP64 +bool mips_kcore_window_vtophys(vaddr_t, paddr_t *); #endif Index: src/sys/arch/mips/mips/mem.c diff -u src/sys/arch/mips/mips/mem.c:1.35.38.11 src/sys/arch/mips/mips/mem.c:1.35.38.12 --- src/sys/arch/mips/mips/mem.c:1.35.38.11 Mon Feb 13 18:20:25 2012 +++ src/sys/arch/mips/mips/mem.c Tue Feb 14 01:51:11 2012 @@ -133,10 +133,10 @@ mmrw(dev_t dev, struct uio *uio, int fla if (c vs) c = vs; if (pa mips_avail_end -+ mips_round_page(MSGBUFSIZE) - c)) { ++ mips_round_page(MSGBUFSIZE) - c) return (EFAULT); } else if (MIPS_XKSEG_P(va) - v MIPS_KSEG0_START + va MIPS_KSEG0_START !uvm_kernacc((void *)va, c, uio-uio_rw == UIO_READ ? B_READ : B_WRITE)) { return (EFAULT); Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.65 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.66 --- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.65 Mon Feb 13 18:20:25 2012 +++ src/sys/arch/mips/mips/mips_machdep.c Tue Feb 14 01:51:11 2012 @@ -2052,7 +2052,7 @@ dumpsys(void) delay(500); /* 5 seconds */ } -#ifdef MIPS3_PLUS +#if defined(MIPS3_PLUS) !defined(_LP64) static struct mips_kcore_window_info { struct tlbmask mkwi_tlb; int mkwi_tlb_slot; @@ -2063,12 +2063,10 @@ static struct mips_kcore_window_info { }, .mkwi_tlb_slot = -1, }; -#endif bool mips_kcore_window_vtophys(vaddr_t va, paddr_t *pap) { -#ifdef MIPS3_PLUS struct mips_kcore_window_info * const mkwi = mips_kcore_window_info; const vaddr_t tlb_va = mkwi-mkwi_tlb.tlb_hi -PAGE_SIZE; psize_t tlb_size = MIPS3_PG_SIZE_MASK_TO_SIZE(mkwi-mkwi_tlb.tlb_mask); @@ -2078,9 +2076,9 @@ mips_kcore_window_vtophys(vaddr_t va, pa + mips_tlbpfn_to_paddr(mkwi-mkwi_tlb.tlb_lo0); return true; } -#endif return false; } +#endif vaddr_t mips_kcore_window_map(paddr_t pa, vsize_t *vsp) @@ -2553,7 +2551,7 @@ mm_md_direct_mapped_phys(paddr_t pa, vad if (vap != NULL) *vap = MIPS_PHYS_TO_XKPHYS_CACHED(pa); if (vsp != NULL) - *vsp = MIPS_XKPHYS_TO_PHYS(MIPS_XKPHYS_MASK) - pa + 1; + *vsp = MIPS_XKPHYS_TO_PHYS(MIPS_XSEG_MASK) - pa + 1; return true; #else #ifdef ENABLE_MIPS_KSEGX @@ -2585,7 +2583,7 @@ mm_md_direct_mapped_virt(vaddr_t va, pad if (pap != NULL) *pap = pa; if (vsp != NULL) - *vsp = MIPS_XKPHYS_TO_PHYS(MIPS_XKPHYS_MASK) - pa + 1; + *vsp = MIPS_XKPHYS_TO_PHYS(MIPS_XSEG_MASK) - pa + 1; return true; } #endif Index: src/sys/arch/mips/mips/pmap.c diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.41 src/sys/arch/mips/mips/pmap.c:1.179.16.42 --- src/sys/arch/mips/mips/pmap.c:1.179.16.41 Mon Feb 13 18:20:26 2012 +++ src/sys/arch/mips/mips/pmap.c Tue Feb 14 01:51:11 2012 @@ -367,6 +367,10 @@ pmap_map_ephemeral_page(struct vm_page * vaddr_t va; if (!mm_md_direct_mapped_phys(pa, va, NULL)) { +#ifdef _LP64 + panic(%s: direct_mapped_phys failed for pa %#PRIxPADDR, + __func__, pa); +#else KASSERT(pmap_initialized); /* * Make sure to use a congruent mapping to the last mapped @@ -379,6 +383,7 @@ pmap_map_ephemeral_page(struct vm_page * + mips_cache_indexof(MIPS_CACHE_VIRTUAL_ALIAS ? pv-pv_va : pa); *old_pt_entry_p = *kvtopte(va); pmap_kenter_pa(va, pa, prot); +#endif } if (MIPS_CACHE_VIRTUAL_ALIAS) { /* Index: src/sys/arch/mips/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.27 src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.28 ---