CVS commit: src/sys/arch/zaurus/zaurus
Module Name:src Committed By: nonaka Date: Sat Nov 12 04:39:20 UTC 2011 Modified Files: src/sys/arch/zaurus/zaurus: machdep.c Log Message: SL-C700 has PXA250 step B instead of PXA250 step A. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/zaurus/zaurus/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/zaurus/zaurus/machdep.c diff -u src/sys/arch/zaurus/zaurus/machdep.c:1.26 src/sys/arch/zaurus/zaurus/machdep.c:1.27 --- src/sys/arch/zaurus/zaurus/machdep.c:1.26 Tue Jul 19 15:11:49 2011 +++ src/sys/arch/zaurus/zaurus/machdep.c Sat Nov 12 04:39:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.26 2011/07/19 15:11:49 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.27 2011/11/12 04:39:19 nonaka Exp $ */ /* $OpenBSD: zaurus_machdep.c,v 1.25 2006/06/20 18:24:04 todd Exp $ */ /* @@ -107,7 +107,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2011/07/19 15:11:49 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.27 2011/11/12 04:39:19 nonaka Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -713,7 +713,7 @@ initarm(void *arg) zaurus_gpioconf = pxa27x_zaurus_gpioconf; } else { zaurusmod = ZAURUS_C860; /* SL-C7x0/860 */ - if (cputype == CPU_ID_PXA250A) { + if (cputype == CPU_ID_PXA250B) { /* SL-C700 */ memsize = 0x0200; /* 32MB */ }
CVS commit: [yamt-pagecache] src/usr.bin/vmstat
Module Name:src Committed By: yamt Date: Sat Nov 12 04:12:52 UTC 2011 Modified Files: src/usr.bin/vmstat [yamt-pagecache]: vmstat.c Log Message: report some more statistics. 373597 file pages known clean 225 file pages might dirty 16 file pages known dirty 0 anonymous pages known clean 2218 anonymous pages might dirty 39055 anonymous pages known dirty To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.186.2.1 src/usr.bin/vmstat/vmstat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/vmstat/vmstat.c diff -u src/usr.bin/vmstat/vmstat.c:1.186 src/usr.bin/vmstat/vmstat.c:1.186.2.1 --- src/usr.bin/vmstat/vmstat.c:1.186 Sat Oct 15 21:59:48 2011 +++ src/usr.bin/vmstat/vmstat.c Sat Nov 12 04:12:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.186 2011/10/15 21:59:48 christos Exp $ */ +/* $NetBSD: vmstat.c,v 1.186.2.1 2011/11/12 04:12:52 yamt Exp $ */ /*- * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95"; #else -__RCSID("$NetBSD: vmstat.c,v 1.186 2011/10/15 21:59:48 christos Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.186.2.1 2011/11/12 04:12:52 yamt Exp $"); #endif #endif /* not lint */ @@ -892,6 +892,18 @@ dosum(void) if (active_kernel) { (void)printf("%9" PRIu64 " pages active\n", uvmexp2.active); (void)printf("%9" PRIu64 " pages inactive\n", uvmexp2.inactive); + (void)printf("%9" PRIu64 " file pages known clean\n", + uvmexp2.cleanpages); + (void)printf("%9" PRIu64 " file pages might dirty\n", + uvmexp2.mightdirtypages); + (void)printf("%9" PRIu64 " file pages known dirty\n", + uvmexp2.dirtypages); + (void)printf("%9" PRIu64 " anonymous pages known clean\n", + uvmexp2.cleananonpages); + (void)printf("%9" PRIu64 " anonymous pages might dirty\n", + uvmexp2.mightdirtyanonpages); + (void)printf("%9" PRIu64 " anonymous pages known dirty\n", + uvmexp2.dirtyanonpages); } (void)printf("%9u pages paging\n", uvmexp.paging); (void)printf("%9u pages wired\n", uvmexp.wired);
CVS commit: src/usr.bin/sed/TEST
Module Name:src Committed By: christos Date: Sat Nov 12 03:15:05 UTC 2011 Modified Files: src/usr.bin/sed/TEST: sed.test Log Message: compare the sed we just build with the installed one instead of bogus paths. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/sed/TEST/sed.test Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/sed/TEST/sed.test diff -u src/usr.bin/sed/TEST/sed.test:1.4 src/usr.bin/sed/TEST/sed.test:1.5 --- src/usr.bin/sed/TEST/sed.test:1.4 Mon Oct 27 15:09:49 2003 +++ src/usr.bin/sed/TEST/sed.test Fri Nov 11 22:15:05 2011 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: sed.test,v 1.4 2003/10/27 20:09:49 uwe Exp $ +# $NetBSD: sed.test,v 1.5 2011/11/12 03:15:05 christos Exp $ # # Copyright (c) 1992 Diomidis Spinellis. # Copyright (c) 1992, 1993 @@ -34,7 +34,7 @@ # SUCH DAMAGE. # # from: @(#)sed.test 8.1 (Berkeley) 6/6/93 -# $NetBSD: sed.test,v 1.4 2003/10/27 20:09:49 uwe Exp $ +# $NetBSD: sed.test,v 1.5 2011/11/12 03:15:05 christos Exp $ # # sed Regression Tests @@ -45,9 +45,9 @@ main() { - BASE=/usr/old/bin/sed + BASE=/usr/bin/sed BASELOG=sed.out - TEST=../obj/sed + TEST=$(cd $(dirname $0)/.. && make -V .OBJDIR)/sed TESTLOG=nsed.out DICT=/usr/share/dict/words @@ -93,7 +93,7 @@ tests() mark() { - MARK=`expr $MARK + 1` + MARK=$(expr $MARK + 1) exec 1>&4 2>&5 exec >"$DIR/${MARK}_$1" echo "Test $1:$MARK"
CVS commit: [yamt-pagecache] src/sys/uvm
Module Name:src Committed By: yamt Date: Sat Nov 12 02:54:04 UTC 2011 Modified Files: src/sys/uvm [yamt-pagecache]: uvm.h uvm_extern.h uvm_meter.c uvm_page.c uvm_page_status.c Log Message: redo the page clean/dirty/unknown accounting separately for file and anonymous pages To generate a diff of this commit: cvs rdiff -u -r1.62.4.1 -r1.62.4.2 src/sys/uvm/uvm.h cvs rdiff -u -r1.176.2.1 -r1.176.2.2 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.56.4.1 -r1.56.4.2 src/sys/uvm/uvm_meter.c cvs rdiff -u -r1.178.2.3 -r1.178.2.4 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/uvm/uvm_page_status.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.h diff -u src/sys/uvm/uvm.h:1.62.4.1 src/sys/uvm/uvm.h:1.62.4.2 --- src/sys/uvm/uvm.h:1.62.4.1 Fri Nov 11 10:34:24 2011 +++ src/sys/uvm/uvm.h Sat Nov 12 02:54:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm.h,v 1.62.4.1 2011/11/11 10:34:24 yamt Exp $ */ +/* $NetBSD: uvm.h,v 1.62.4.2 2011/11/12 02:54:04 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -82,7 +82,12 @@ struct uvm_cpu { int pages[PGFL_NQUEUES]; /* total of pages in page_free */ u_int emap_gen; /* emap generation number */ - int64_t pagestate[UVM_PAGE_NUM_STATUS]; + /* + * pagestate + * [0] non-anonymous + * [1] anonymous (PQ_SWAPBACKED) + */ + int64_t pagestate[2][UVM_PAGE_NUM_STATUS]; }; /* Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.176.2.1 src/sys/uvm/uvm_extern.h:1.176.2.2 --- src/sys/uvm/uvm_extern.h:1.176.2.1 Fri Nov 11 10:34:24 2011 +++ src/sys/uvm/uvm_extern.h Sat Nov 12 02:54:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.176.2.1 2011/11/11 10:34:24 yamt Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.176.2.2 2011/11/12 02:54:04 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -459,6 +459,9 @@ struct uvmexp_sysctl { int64_t mightdirtypages; int64_t cleanpages; int64_t dirtypages; + int64_t mightdirtyanonpages; + int64_t cleananonpages; + int64_t dirtyanonpages; }; #ifdef _KERNEL Index: src/sys/uvm/uvm_meter.c diff -u src/sys/uvm/uvm_meter.c:1.56.4.1 src/sys/uvm/uvm_meter.c:1.56.4.2 --- src/sys/uvm/uvm_meter.c:1.56.4.1 Fri Nov 11 10:34:24 2011 +++ src/sys/uvm/uvm_meter.c Sat Nov 12 02:54:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_meter.c,v 1.56.4.1 2011/11/11 10:34:24 yamt Exp $ */ +/* $NetBSD: uvm_meter.c,v 1.56.4.2 2011/11/12 02:54:04 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56.4.1 2011/11/11 10:34:24 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56.4.2 2011/11/12 02:54:04 yamt Exp $"); #include #include @@ -179,9 +179,14 @@ sysctl_vm_uvmexp2(SYSCTLFN_ARGS) for (CPU_INFO_FOREACH(cii, ci)) { struct uvm_cpu *ucpu = ci->ci_data.cpu_uvm; - u.mightdirtypages += ucpu->pagestate[UVM_PAGE_STATUS_UNKNOWN]; - u.cleanpages += ucpu->pagestate[UVM_PAGE_STATUS_CLEAN]; - u.dirtypages += ucpu->pagestate[UVM_PAGE_STATUS_DIRTY]; + u.mightdirtypages += + ucpu->pagestate[0][UVM_PAGE_STATUS_UNKNOWN]; + u.cleanpages += ucpu->pagestate[0][UVM_PAGE_STATUS_CLEAN]; + u.dirtypages += ucpu->pagestate[0][UVM_PAGE_STATUS_DIRTY]; + u.mightdirtyanonpages += + ucpu->pagestate[1][UVM_PAGE_STATUS_UNKNOWN]; + u.cleananonpages += ucpu->pagestate[1][UVM_PAGE_STATUS_CLEAN]; + u.dirtyanonpages += ucpu->pagestate[1][UVM_PAGE_STATUS_DIRTY]; } node = *rnode; node.sysctl_data = &u; Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.178.2.3 src/sys/uvm/uvm_page.c:1.178.2.4 --- src/sys/uvm/uvm_page.c:1.178.2.3 Fri Nov 11 10:34:24 2011 +++ src/sys/uvm/uvm_page.c Sat Nov 12 02:54:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.178.2.3 2011/11/11 10:34:24 yamt Exp $ */ +/* $NetBSD: uvm_page.c,v 1.178.2.4 2011/11/12 02:54:04 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.3 2011/11/11 10:34:24 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.4 2011/11/12 02:54:04 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -162,15 +162,15 @@ static void uvm_pageremove(struct uvm_ob * uvm_pageinsert: insert a page in the object. * * => caller must lock object - * => caller must lock page queues * => call should have already set pg's object and offset pointers - *and bumped the version counter */ static inline void uvm_pageinsert_list(struct uvm_object *uobj, struct vm_page *pg, struct vm_page *where) { + const bool isvnode = UVM_OBJ_IS_VNODE(uobj); + const bool isaobj = UVM_OBJ_IS_AOBJ(uobj); KASSERT(uobj == pg->uobject); KASSERT(mutex_owned(uobj->vmobjlock)); @@ -178,32 +178,39 @@ uvm_pageinsert_list(struct uv
CVS commit: src/doc
Module Name:src Committed By: jmmv Date: Sat Nov 12 01:22:07 UTC 2011 Modified Files: src/doc: CHANGES Log Message: Mention the addition of the asm examples. To generate a diff of this commit: cvs rdiff -u -r1.1623 -r1.1624 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.1623 src/doc/CHANGES:1.1624 --- src/doc/CHANGES:1.1623 Wed Nov 9 19:08:59 2011 +++ src/doc/CHANGES Sat Nov 12 01:22:07 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1623 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1624 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1162,3 +1162,7 @@ Changes from NetBSD 5.0 to NetBSD 6.0: regex.h and provide more tre_ -> libc names aliases. [christos 2005] postfix(1): Import version 2.8.7 [tron 2009] + asm: Add assembly language examples in share/examples/asm/. + These provide the end user with some ready-to-use sample + code for a variety of platforms, showcasing how to interact + with NetBSD system calls, APIs and binaries. [jmmv 2011]
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: jmmv Date: Sat Nov 12 01:20:05 UTC 2011 Modified Files: src/distrib/sets/lists/misc: mi src/distrib/sets/lists/tests: mi Log Message: Register the new asm examples and their tests. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/distrib/sets/lists/misc/mi cvs rdiff -u -r1.420 -r1.421 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/misc/mi diff -u src/distrib/sets/lists/misc/mi:1.174 src/distrib/sets/lists/misc/mi:1.175 --- src/distrib/sets/lists/misc/mi:1.174 Thu Mar 10 13:16:58 2011 +++ src/distrib/sets/lists/misc/mi Sat Nov 12 01:20:05 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.174 2011/03/10 13:16:58 jmmv Exp $ +# $NetBSD: mi,v 1.175 2011/11/12 01:20:05 jmmv Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -672,6 +672,12 @@ ./usr/share/examples/amd/master misc-obsolete obsolete ./usr/share/examples/amd/net misc-amd-examples share ./usr/share/examples/apm/script misc-amd-examples share +./usr/share/examples/asm misc-asm-examples +./usr/share/examples/asm/Makefile.inc misc-asm-examples share +./usr/share/examples/asm/README misc-asm-examples share +./usr/share/examples/asm/hello misc-asm-examples +./usr/share/examples/asm/hello/Makefile misc-asm-examples share +./usr/share/examples/asm/hello/powerpc.s misc-asm-examples share ./usr/share/examples/atf misc-atf-examples ./usr/share/examples/atf/atf-run.hooks misc-atf-examples share,atf ./usr/share/examples/atf/tests-results.css misc-atf-examples share,atf Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.420 src/distrib/sets/lists/tests/mi:1.421 --- src/distrib/sets/lists/tests/mi:1.420 Tue Nov 8 05:47:00 2011 +++ src/distrib/sets/lists/tests/mi Sat Nov 12 01:20:05 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.420 2011/11/08 05:47:00 jruoho Exp $ +# $NetBSD: mi,v 1.421 2011/11/12 01:20:05 jmmv Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1390,6 +1390,8 @@ ./usr/tests/dev/sysmon/Atffile tests-fs-tests atf ./usr/tests/dev/sysmon/t_swsensor tests-fs-tests atf ./usr/tests/dev/sysmon/t_swwdog tests-fs-tests atf +./usr/tests/examplestests-asm-tests +./usr/tests/examples/t_asm tests-asm-tests atf ./usr/tests/fs tests-fs-tests ./usr/tests/fs/Atffiletests-fs-tests atf ./usr/tests/fs/h_funcs.subr tests-fs-tests atf
CVS commit: src/etc/mtree
Module Name:src Committed By: jmmv Date: Sat Nov 12 01:19:40 UTC 2011 Modified Files: src/etc/mtree: NetBSD.dist.base NetBSD.dist.tests Log Message: Register directories for the new asm examples and their tests. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.55 -r1.56 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.93 src/etc/mtree/NetBSD.dist.base:1.94 --- src/etc/mtree/NetBSD.dist.base:1.93 Sat Oct 15 13:00:59 2011 +++ src/etc/mtree/NetBSD.dist.base Sat Nov 12 01:19:40 2011 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.93 2011/10/15 13:00:59 mbalmer Exp $ +# $NetBSD: NetBSD.dist.base,v 1.94 2011/11/12 01:19:40 jmmv Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -317,6 +317,8 @@ ./usr/share/examples ./usr/share/examples/amd ./usr/share/examples/apm +./usr/share/examples/asm +./usr/share/examples/asm/hello ./usr/share/examples/atf ./usr/share/examples/dhcp ./usr/share/examples/emul Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.55 src/etc/mtree/NetBSD.dist.tests:1.56 --- src/etc/mtree/NetBSD.dist.tests:1.55 Mon Nov 7 13:39:54 2011 +++ src/etc/mtree/NetBSD.dist.tests Sat Nov 12 01:19:40 2011 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.55 2011/11/07 13:39:54 njoly Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.56 2011/11/12 01:19:40 jmmv Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -134,6 +134,7 @@ ./usr/tests/dev/raidframe ./usr/tests/dev/scsipi ./usr/tests/dev/sysmon +./usr/tests/examples ./usr/tests/fs ./usr/tests/fs/ffs ./usr/tests/fs/hfs
CVS commit: src/tests
Module Name:src Committed By: jmmv Date: Sat Nov 12 01:19:25 UTC 2011 Modified Files: src/tests: Makefile Added Files: src/tests/examples: Makefile t_asm.sh Log Message: Add tests to ensure that the new asm examples build and run, just as the end-user is supposed to work with them. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/tests/Makefile cvs rdiff -u -r0 -r1.1 src/tests/examples/Makefile \ src/tests/examples/t_asm.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/Makefile diff -u src/tests/Makefile:1.33 src/tests/Makefile:1.34 --- src/tests/Makefile:1.33 Wed Sep 21 02:14:38 2011 +++ src/tests/Makefile Sat Nov 12 01:19:25 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2011/09/21 02:14:38 mrg Exp $ +# $NetBSD: Makefile,v 1.34 2011/11/12 01:19:25 jmmv Exp $ .include @@ -7,7 +7,7 @@ TESTSDIR= ${TESTSBASE} ATFFILE= yes -SUBDIR= dev fs games include ipf kernel lib libexec net +SUBDIR= dev examples fs games include ipf kernel lib libexec net SUBDIR+= rump sbin sys toolchain usr.bin usr.sbin util . if ${MKKMOD} != "no" Added files: Index: src/tests/examples/Makefile diff -u /dev/null src/tests/examples/Makefile:1.1 --- /dev/null Sat Nov 12 01:19:25 2011 +++ src/tests/examples/Makefile Sat Nov 12 01:19:25 2011 @@ -0,0 +1,9 @@ +# $NetBSD: Makefile,v 1.1 2011/11/12 01:19:25 jmmv Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/examples + +TESTS_SH= t_asm + +.include Index: src/tests/examples/t_asm.sh diff -u /dev/null src/tests/examples/t_asm.sh:1.1 --- /dev/null Sat Nov 12 01:19:25 2011 +++ src/tests/examples/t_asm.sh Sat Nov 12 01:19:25 2011 @@ -0,0 +1,74 @@ +# $NetBSD: t_asm.sh,v 1.1 2011/11/12 01:19:25 jmmv Exp $ +# +# Copyright (c) 2011 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# check_implemented +# +# Verifies if a particular asm example is implemented for the current +# platform. The example_name argument is the name of the subdirectory +# of the examples/asm/ subtree that includes the code for the example +# under test. +# +# If the example is not implemented, the calling test is skipped. If the +# check for implementation fails, the calling test is failed. +check_implemented() { + local name="${1}"; shift + + local implemented=$(cd /usr/share/examples/asm/${name}/ && \ + make check-implemented) + [ $? -eq 0 ] || atf_fail "Failed to determine if the sample" \ + "program is supported" + [ "${implemented}" = yes ] || atf_skip "Example program not" \ + "implemented on this platform" +} + +# copy_example +# +# Copies the example code and supporting Makefiles into the current +# directory. +copy_example() { + local name="${1}"; shift + + cp /usr/share/examples/asm/${name}/* . +} + +atf_test_case hello +hello_head() { + atf_set "descr" "Builds, runs and validates the 'hello' asm example" + atf_set "require.files" "/usr/share/examples/asm/hello/" + atf_set "require.progs" "make" +} +hello_body() { + check_implemented hello + copy_example hello + atf_check -s exit:0 -o ignore -e ignore make + atf_check -s exit:0 -o inline:'Hello, world!\n' -e empty ./hello +} + +atf_init_test_cases() { + atf_add_test_case hello +}
CVS commit: src/share/examples
Module Name:src Committed By: jmmv Date: Sat Nov 12 01:18:41 UTC 2011 Modified Files: src/share/examples: Makefile Added Files: src/share/examples/asm: Makefile Makefile.inc.inst README src/share/examples/asm/hello: Makefile Makefile.inst powerpc.s Log Message: Add assembly language examples in a new 'asm' subdirectory. At the moment this only provides an example for a "Hello world" program for powerpc. (Bear with me: this is my very first assembly program in powerpc; if you find anything stupid in the code, please fix it!) To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/share/examples/Makefile cvs rdiff -u -r0 -r1.1 src/share/examples/asm/Makefile \ src/share/examples/asm/Makefile.inc.inst src/share/examples/asm/README cvs rdiff -u -r0 -r1.1 src/share/examples/asm/hello/Makefile \ src/share/examples/asm/hello/Makefile.inst \ src/share/examples/asm/hello/powerpc.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/Makefile diff -u src/share/examples/Makefile:1.19 src/share/examples/Makefile:1.20 --- src/share/examples/Makefile:1.19 Sat Oct 15 13:01:00 2011 +++ src/share/examples/Makefile Sat Nov 12 01:18:40 2011 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.19 2011/10/15 13:01:00 mbalmer Exp $ +# $NetBSD: Makefile,v 1.20 2011/11/12 01:18:40 jmmv Exp $ -SUBDIR= amd apm disktab emul fstab ftpd getdate hostapd isdn lua pppd racoon \ - supfiles syslogd wsmoused +SUBDIR= amd apm asm disktab emul fstab ftpd getdate hostapd isdn lua pppd \ + racoon supfiles syslogd wsmoused .include Added files: Index: src/share/examples/asm/Makefile diff -u /dev/null src/share/examples/asm/Makefile:1.1 --- /dev/null Sat Nov 12 01:18:41 2011 +++ src/share/examples/asm/Makefile Sat Nov 12 01:18:41 2011 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2011/11/12 01:18:41 jmmv Exp $ + +.include + +SUBDIR= hello + +.if ${MKSHARE} != "no" +FILES= Makefile.inc.inst README +FILESDIR= /usr/share/examples/asm +FILESNAME_Makefile.inc.inst= Makefile.inc +.endif + +.include +.include Index: src/share/examples/asm/Makefile.inc.inst diff -u /dev/null src/share/examples/asm/Makefile.inc.inst:1.1 --- /dev/null Sat Nov 12 01:18:41 2011 +++ src/share/examples/asm/Makefile.inc.inst Sat Nov 12 01:18:41 2011 @@ -0,0 +1,17 @@ +# $NetBSD: Makefile.inc.inst,v 1.1 2011/11/12 01:18:41 jmmv Exp $ + +# This common Makefile includes logic shared among all the assembly language +# sample programs. The code in here is completely optional: i.e. each of the +# Makefiles inside a particular sample must not depend on this file at all. +# This is to allow the user to copy the sample directory anywhere else and +# build the code without having to care about other dependencies. + +# The check-implemented target is used by the tests in /usr/tests to determine +# whether a particular example should be built and tested on a platform. +.PHONY: check-implemented +check-implemented: +.if defined(PROG) && !empty(PROG) + @echo yes +.else + @echo no +.endif Index: src/share/examples/asm/README diff -u /dev/null src/share/examples/asm/README:1.1 --- /dev/null Sat Nov 12 01:18:41 2011 +++ src/share/examples/asm/README Sat Nov 12 01:18:41 2011 @@ -0,0 +1,11 @@ +$NetBSD: README,v 1.1 2011/11/12 01:18:41 jmmv Exp $ + +This directory contains example programs written in assembly language +for a variety of platforms. They are intended to illustrate the +specific details of how to write assembly code on a given platform; +they are not supposed to teach assembly (althogh they might have this +side-effect). + +If you want to build one of these example programs, you can "cp -rf" +the corresponding directory anywhere else where you have write +permissions and then issue a "make" within the directory. Index: src/share/examples/asm/hello/Makefile diff -u /dev/null src/share/examples/asm/hello/Makefile:1.1 --- /dev/null Sat Nov 12 01:18:41 2011 +++ src/share/examples/asm/hello/Makefile Sat Nov 12 01:18:41 2011 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2011/11/12 01:18:41 jmmv Exp $ + +.include + +.if ${MKSHARE} != "no" +FILES= Makefile.inst powerpc.s +FILESDIR= /usr/share/examples/asm/hello +FILESNAME_Makefile.inst= Makefile +.endif + +.include Index: src/share/examples/asm/hello/Makefile.inst diff -u /dev/null src/share/examples/asm/hello/Makefile.inst:1.1 --- /dev/null Sat Nov 12 01:18:41 2011 +++ src/share/examples/asm/hello/Makefile.inst Sat Nov 12 01:18:41 2011 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile.inst,v 1.1 2011/11/12 01:18:41 jmmv Exp $ + +.include + +.if exists(${MACHINE_ARCH}.s) +PROG= hello +MAN= # empty +LDFLAGS= -nostdlib +SRCS= ${MACHINE_ARCH}.s +.endif + +.include Index: src/share/examples/asm/hello/powerpc.s diff -u /dev/null src/share/examples/asm/hello/powerpc.s:1.1 --- /dev/null Sat Nov 12 01:18:41 2011 +++ src/share/examples/asm/hello/powerpc.s Sat Nov 12 01:18:41 2011 @@ -0,0
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Fri Nov 11 23:01:59 UTC 2011 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: Use GPP_GPC in the last place it isn't already used. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/dev/pci/if_tlp_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.120 src/sys/dev/pci/if_tlp_pci.c:1.121 --- src/sys/dev/pci/if_tlp_pci.c:1.120 Fri Nov 11 22:57:27 2011 +++ src/sys/dev/pci/if_tlp_pci.c Fri Nov 11 23:01:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.120 2011/11/11 22:57:27 jakllsch Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.121 2011/11/11 23:01:59 jakllsch Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.120 2011/11/11 22:57:27 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.121 2011/11/11 23:01:59 jakllsch Exp $"); #include #include @@ -1357,7 +1357,7 @@ static void tlp_pci_phobos_21140_reset(struct tulip_softc *sc) { - TULIP_WRITE(sc, CSR_GPP, 0x1fd); + TULIP_WRITE(sc, CSR_GPP, GPP_GPC | 0xfd); delay(10); TULIP_WRITE(sc, CSR_GPP, 0xfd); delay(10);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Fri Nov 11 22:57:27 UTC 2011 Modified Files: src/sys/dev/pci: if_tlp_pci.c Log Message: Improve punctuation and consistency in some comments. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/dev/pci/if_tlp_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_tlp_pci.c diff -u src/sys/dev/pci/if_tlp_pci.c:1.119 src/sys/dev/pci/if_tlp_pci.c:1.120 --- src/sys/dev/pci/if_tlp_pci.c:1.119 Thu Nov 10 20:12:48 2011 +++ src/sys/dev/pci/if_tlp_pci.c Fri Nov 11 22:57:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.119 2011/11/10 20:12:48 jakllsch Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.120 2011/11/11 22:57:27 jakllsch Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.119 2011/11/10 20:12:48 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.120 2011/11/11 22:57:27 jakllsch Exp $"); #include #include @@ -1341,7 +1341,7 @@ tlp_pci_phobos_21140_quirks(struct tulip struct tulip_softc *sc = &psc->sc_tulip; /* - * Phobo boards just use MII-on_SIO. + * Phobos boards just use MII-on-SIO. */ sc->sc_mediasw = &tlp_sio_mii_mediasw; sc->sc_reset = tlp_pci_phobos_21140_reset; @@ -1653,7 +1653,7 @@ tlp_pci_netwinder_21142_quirks(struct tu struct tulip_softc *sc = &psc->sc_tulip; /* - * Netwinders just use MII-on_SIO. + * Netwinders just use MII-on-SIO. */ sc->sc_mediasw = &tlp_sio_mii_mediasw; sc->sc_reset = tlp_pci_netwinder_21142_reset; @@ -1682,7 +1682,7 @@ tlp_pci_phobos_21142_quirks(struct tulip struct tulip_softc *sc = &psc->sc_tulip; /* - * Phobo boards just use MII-on_SIO. + * Phobos boards just use MII-on-SIO. */ sc->sc_mediasw = &tlp_sio_mii_mediasw; sc->sc_reset = tlp_pci_phobos_21142_reset;
CVS commit: src/external/mit/xorg/bin/ucs2any
Module Name:src Committed By: njoly Date: Fri Nov 11 22:27:33 UTC 2011 Modified Files: src/external/mit/xorg/bin/ucs2any: Makefile Log Message: Substitute __mapfilesdir__ in man page. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/ucs2any/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/mit/xorg/bin/ucs2any/Makefile diff -u src/external/mit/xorg/bin/ucs2any/Makefile:1.2 src/external/mit/xorg/bin/ucs2any/Makefile:1.3 --- src/external/mit/xorg/bin/ucs2any/Makefile:1.2 Sun Nov 21 01:25:32 2010 +++ src/external/mit/xorg/bin/ucs2any/Makefile Fri Nov 11 22:27:33 2011 @@ -1,9 +1,11 @@ -# $NetBSD: Makefile,v 1.2 2010/11/21 01:25:32 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2011/11/11 22:27:33 njoly Exp $ .include PROG= ucs2any +X11EXTRAMANDEFS+= -e 's,__mapfilesdir__,${LIBDIR}/X11/fonts/util,' + .PATH: ${X11SRCDIR.font-util} ${X11SRCDIR.font-util}/man .include
CVS commit: src
Module Name:src Committed By: gdt Date: Fri Nov 11 15:09:33 UTC 2011 Modified Files: src/sbin/route: keywords.c keywords.h keywords.sh route.8 route.c show.c src/sys/net: route.h src/sys/netinet: icmp6.h if_inarp.h src/sys/netinet6: nd6.h src/usr.bin/netstat: netstat.1 show.c Log Message: Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2. RTF_ANNOUNCE was defined as RTF_PROTO2. The flag is used to indicated that host should act as a proxy for a link level arp or ndp request. (If RTF_PROTO2 is used as an experimental flag (as advertised), various problems can occur.) This commit provides a first-class definition with its own bit for RTF_ANNOUNCE, removes the old aliasing definitions, and adds support for the new RTF_ANNOUNCE flag to netstat(8) and route(8)., Also, remove unused RTF_ flags that collide with RTF_PROTO1: netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1 netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1 (Neither of these flags are used anywhere. Both have been removed to reduce chances of collision with RTF_PROTO1.) Figuring this out and the diff are the work of Beverly Schwartz of BBN. (Passed release build, boot in VM, with no apparently related atf failures.) Approved for Public Release, Distribution Unlimited This material is based upon work supported by the Defense Advanced Research Projects Agency and Space and Naval Warfare Systems Center, Pacific, under Contract No. N66001-09-C-2073. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sbin/route/keywords.c cvs rdiff -u -r1.11 -r1.12 src/sbin/route/keywords.h cvs rdiff -u -r1.9 -r1.10 src/sbin/route/keywords.sh cvs rdiff -u -r1.45 -r1.46 src/sbin/route/route.8 cvs rdiff -u -r1.133 -r1.134 src/sbin/route/route.c cvs rdiff -u -r1.43 -r1.44 src/sbin/route/show.c cvs rdiff -u -r1.79 -r1.80 src/sys/net/route.h cvs rdiff -u -r1.42 -r1.43 src/sys/netinet/icmp6.h src/sys/netinet/if_inarp.h cvs rdiff -u -r1.54 -r1.55 src/sys/netinet6/nd6.h cvs rdiff -u -r1.61 -r1.62 src/usr.bin/netstat/netstat.1 cvs rdiff -u -r1.14 -r1.15 src/usr.bin/netstat/show.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/route/keywords.c diff -u src/sbin/route/keywords.c:1.8 src/sbin/route/keywords.c:1.9 --- src/sbin/route/keywords.c:1.8 Sat Jun 26 14:29:36 2010 +++ src/sbin/route/keywords.c Fri Nov 11 15:09:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: keywords.c,v 1.8 2010/06/26 14:29:36 kefren Exp $ */ +/* $NetBSD: keywords.c,v 1.9 2011/11/11 15:09:32 gdt Exp $ */ /* WARNING! This file was generated by keywords.sh */ @@ -61,6 +61,7 @@ struct keytab keywords[] = { {"noreject", K_NOREJECT}, {"mpls", K_MPLS}, {"tag", K_TAG}, + {"proxy", K_PROXY}, {0, 0} }; Index: src/sbin/route/keywords.h diff -u src/sbin/route/keywords.h:1.11 src/sbin/route/keywords.h:1.12 --- src/sbin/route/keywords.h:1.11 Sat Jun 26 14:29:36 2010 +++ src/sbin/route/keywords.h Fri Nov 11 15:09:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: keywords.h,v 1.11 2010/06/26 14:29:36 kefren Exp $ */ +/* $NetBSD: keywords.h,v 1.12 2011/11/11 15:09:32 gdt Exp $ */ /* WARNING! This file was generated by keywords.sh */ @@ -63,3 +63,4 @@ extern struct keytab { #define K_NOREJECT 53 #define K_MPLS 54 #define K_TAG 55 +#define K_PROXY 56 Index: src/sbin/route/keywords.sh diff -u src/sbin/route/keywords.sh:1.9 src/sbin/route/keywords.sh:1.10 --- src/sbin/route/keywords.sh:1.9 Sat Jun 26 14:29:36 2010 +++ src/sbin/route/keywords.sh Fri Nov 11 15:09:32 2011 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: keywords.sh,v 1.9 2010/06/26 14:29:36 kefren Exp $ +# $NetBSD: keywords.sh,v 1.10 2011/11/11 15:09:32 gdt Exp $ # @(#)keywords 8.2 (Berkeley) 3/19/94 # # WARNING! If you change this file, re-run it! @@ -63,6 +63,7 @@ noblackhole noreject mpls tag +proxy _EOF_ Index: src/sbin/route/route.8 diff -u src/sbin/route/route.8:1.45 src/sbin/route/route.8:1.46 --- src/sbin/route/route.8:1.45 Sun Jul 17 23:46:53 2011 +++ src/sbin/route/route.8 Fri Nov 11 15:09:32 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: route.8,v 1.45 2011/07/17 23:46:53 dholland Exp $ +.\" $NetBSD: route.8,v 1.46 2011/11/11 15:09:32 gdt Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -295,6 +295,7 @@ by indicating the following correspondin -proto1 RTF_PROTO1 - set protocol specific routing flag #1 -proto2 RTF_PROTO2 - set protocol specific routing flag #2 -llinfo RTF_LLINFO - validly translates proto addr to link addr +-proxyRTF_ANNOUNCE - make entry a link level proxy .Ed .Pp The optional modifiers Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.133 src/sbin/route/route.c:1.134 --- src/sbin/route/route.c:1.133 Fri Oct 7 09:56:15 2011 +++ src/sbin/route/route.c Fri Nov 11 15:09:32 2011 @@ -1,4 +1
CVS commit: src/sbin/gpt
Module Name:src Committed By: wiz Date: Fri Nov 11 13:26:45 UTC 2011 Modified Files: src/sbin/gpt: gpt.8 Log Message: Add an EXAMPLE section showing how to add a swap file system using gpt. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sbin/gpt/gpt.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.8 src/sbin/gpt/gpt.8:1.9 --- src/sbin/gpt/gpt.8:1.8 Mon Sep 19 10:40:35 2011 +++ src/sbin/gpt/gpt.8 Fri Nov 11 13:26:45 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpt.8,v 1.8 2011/09/19 10:40:35 wiz Exp $ +.\" $NetBSD: gpt.8,v 1.9 2011/11/11 13:26:45 wiz Exp $ .\" .\" Copyright (c) 2002 Marcel Moolenaar .\" All rights reserved. @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $ .\" -.Dd September 19, 2011 +.Dd November 11, 2011 .Dt GPT 8 .Os .Sh NAME @@ -301,6 +301,38 @@ option takes precedence over the .Fl u option. .El +.Sh EXAMPLES +.Bd -literal +nas# gpt show wd3 + startsize index contents + 0 1 PMBR + 1 3907029167 +nas# gpt create wd3 +nas# gpt show wd3 + startsize index contents + 0 1 PMBR + 1 1 Pri GPT header + 2 32 Pri GPT table + 34 3907029101 + 3907029135 32 Sec GPT table + 3907029167 1 Sec GPT header +nas# gpt add -s 10486224 -t swap -i 1 wd3 +Partition added, use: +dkctl rwd3d addwedge dk 34 10486224 +to create a wedge for it +nas# gpt label -i 1 -l swap_1 wd3 +parition 1 on rwd3d labeled swap_1 +nas# gpt show wd3 + startsize index contents + 0 1 PMBR + 1 1 Pri GPT header + 2 32 Pri GPT table + 3410486224 1 GPT part - NetBSD swap +10486258 3896542877 + 3907029135 32 Sec GPT table + 3907029167 1 Sec GPT header +nas# +.Ed .Sh SEE ALSO .Xr boot 8 , .Xr fdisk 8 ,
CVS commit: [yamt-pagecache] src/sys/uvm
Module Name:src Committed By: yamt Date: Fri Nov 11 10:34:24 UTC 2011 Modified Files: src/sys/uvm [yamt-pagecache]: uvm.h uvm_extern.h uvm_meter.c uvm_page.c uvm_page.h uvm_page_status.c Log Message: - track the number of clean/dirty/unknown pages in the system. - g/c PG_MARKER To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.62.4.1 src/sys/uvm/uvm.h cvs rdiff -u -r1.176 -r1.176.2.1 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.56 -r1.56.4.1 src/sys/uvm/uvm_meter.c cvs rdiff -u -r1.178.2.2 -r1.178.2.3 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.73.2.2 -r1.73.2.3 src/sys/uvm/uvm_page.h cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/uvm/uvm_page_status.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.h diff -u src/sys/uvm/uvm.h:1.62 src/sys/uvm/uvm.h:1.62.4.1 --- src/sys/uvm/uvm.h:1.62 Tue May 17 04:18:07 2011 +++ src/sys/uvm/uvm.h Fri Nov 11 10:34:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm.h,v 1.62 2011/05/17 04:18:07 mrg Exp $ */ +/* $NetBSD: uvm.h,v 1.62.4.1 2011/11/11 10:34:24 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -81,6 +81,8 @@ struct uvm_cpu { pages in the idle loop */ int pages[PGFL_NQUEUES]; /* total of pages in page_free */ u_int emap_gen; /* emap generation number */ + + int64_t pagestate[UVM_PAGE_NUM_STATUS]; }; /* Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.176 src/sys/uvm/uvm_extern.h:1.176.2.1 --- src/sys/uvm/uvm_extern.h:1.176 Thu Sep 1 06:40:28 2011 +++ src/sys/uvm/uvm_extern.h Fri Nov 11 10:34:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.176 2011/09/01 06:40:28 matt Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.176.2.1 2011/11/11 10:34:24 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -456,6 +456,9 @@ struct uvmexp_sysctl { int64_t colorhit; int64_t colormiss; int64_t ncolors; + int64_t mightdirtypages; + int64_t cleanpages; + int64_t dirtypages; }; #ifdef _KERNEL Index: src/sys/uvm/uvm_meter.c diff -u src/sys/uvm/uvm_meter.c:1.56 src/sys/uvm/uvm_meter.c:1.56.4.1 --- src/sys/uvm/uvm_meter.c:1.56 Wed Feb 2 15:25:27 2011 +++ src/sys/uvm/uvm_meter.c Fri Nov 11 10:34:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_meter.c,v 1.56 2011/02/02 15:25:27 chuck Exp $ */ +/* $NetBSD: uvm_meter.c,v 1.56.4.1 2011/11/11 10:34:24 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56 2011/02/02 15:25:27 chuck Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56.4.1 2011/11/11 10:34:24 yamt Exp $"); #include #include @@ -176,7 +176,13 @@ sysctl_vm_uvmexp2(SYSCTLFN_ARGS) u.colormiss = uvmexp.colormiss; u.cpuhit = uvmexp.cpuhit; u.cpumiss = uvmexp.cpumiss; + for (CPU_INFO_FOREACH(cii, ci)) { + struct uvm_cpu *ucpu = ci->ci_data.cpu_uvm; + u.mightdirtypages += ucpu->pagestate[UVM_PAGE_STATUS_UNKNOWN]; + u.cleanpages += ucpu->pagestate[UVM_PAGE_STATUS_CLEAN]; + u.dirtypages += ucpu->pagestate[UVM_PAGE_STATUS_DIRTY]; + } node = *rnode; node.sysctl_data = &u; node.sysctl_size = sizeof(u); Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.178.2.2 src/sys/uvm/uvm_page.c:1.178.2.3 --- src/sys/uvm/uvm_page.c:1.178.2.2 Sun Nov 6 22:05:00 2011 +++ src/sys/uvm/uvm_page.c Fri Nov 11 10:34:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.178.2.2 2011/11/06 22:05:00 yamt Exp $ */ +/* $NetBSD: uvm_page.c,v 1.178.2.3 2011/11/11 10:34:24 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.2 2011/11/06 22:05:00 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.3 2011/11/11 10:34:24 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -423,7 +423,15 @@ uvm_page_init(vaddr_t *kvm_startp, vaddr if (atop(paddr) >= seg->avail_start && atop(paddr) < seg->avail_end) { uvmexp.npages++; -/* add page to free pool */ +/* + * add page to free pool + * + * adjust pagestate[] so that it won't go + * negative. + */ +KASSERT(uvm_pagegetdirty(&seg->pgs[i]) +== UVM_PAGE_STATUS_UNKNOWN); +boot_cpu.pagestate[UVM_PAGE_STATUS_UNKNOWN]++; uvm_pagefree(&seg->pgs[i]); } } @@ -1308,6 +1316,7 @@ uvm_pagealloc_strat(struct uvm_object *o * otherwise we race with uvm_pglistalloc. */ pg->pqflags = 0; + ucpu->pagestate[UVM_PAGE_STATUS_CLEAN]++; mutex_spin_exit(&uvm_fpageqlock); if (anon) { anon->an_page = pg; @@ -1470,6 +1479,7 @@ uvm_pagefree(struct vm_page *pg) struct pgflist *pgfl; struct uvm_cpu *ucpu; int index, color, queue; + unsigned int status; bool iszero; #ifdef DEBUG @@ -1568,6 +1578,7 @@ uvm_pagefree(struct vm_page *pg) color = VM_PGCOLOR_BUCKET(pg); queue