CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Fri Dec 23 07:52:53 UTC 2016 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1309 To generate a diff of this commit: cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-7.0.3 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-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.15 src/doc/CHANGES-7.0.3:1.1.2.16 --- src/doc/CHANGES-7.0.3:1.1.2.15 Tue Dec 20 06:16:43 2016 +++ src/doc/CHANGES-7.0.3 Fri Dec 23 07:52:53 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.15 2016/12/20 06:16:43 snj Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.16 2016/12/23 07:52:53 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -221,3 +221,21 @@ common/lib/libc/stdlib/_strtoul.h 1.10 Set *endptr in all paths out of strtoul and family. [riastradh, ticket #1310] +libexec/httpd/CHANGES1.23, 1.24 +libexec/httpd/bozohttpd.8 1.60-1.62 +libexec/httpd/bozohttpd.c 1.81-1.84 +libexec/httpd/bozohttpd.h 1.46 +libexec/httpd/cgi-bozo.c 1.35 +libexec/httpd/content-bozo.c 1.14 +libexec/httpd/main.c1.14-1.16 +libexec/httpd/testsuite/Makefile 1.6 +libexec/httpd/testsuite/test-bigfile 1.3 +libexec/httpd/testsuite/test-simple 1.1, 1.2 + + update bozohttpd to 2016072: + - fix memory leak + - addd -G option to display version + - fix some content type issues + - fix issues in testsuite + [mrg, ticket #1309] +
CVS commit: [netbsd-7-0] src/libexec/httpd
Module Name:src Committed By: snj Date: Fri Dec 23 07:47:40 UTC 2016 Modified Files: src/libexec/httpd [netbsd-7-0]: CHANGES bozohttpd.8 bozohttpd.c bozohttpd.h cgi-bozo.c content-bozo.c main.c src/libexec/httpd/testsuite [netbsd-7-0]: Makefile test-bigfile Added Files: src/libexec/httpd/testsuite [netbsd-7-0]: test-simple Log Message: Pull up following revision(s) (requested by mrg in ticket #1309): libexec/httpd/CHANGES: revisions 1.23, 1.24 libexec/httpd/bozohttpd.8: revisions 1.60-1.62 libexec/httpd/bozohttpd.c: revisions 1.81-1.84 libexec/httpd/bozohttpd.h: revision 1.46 libexec/httpd/cgi-bozo.c: revision 1.35 libexec/httpd/content-bozo.c: revision 1.14 libexec/httpd/main.c: revisions 1.14-1.16 libexec/httpd/testsuite/Makefile: revision 1.6 libexec/httpd/testsuite/test-bigfile: revision 1.3 libexec/httpd/testsuite/test-simple: revisions 1.1, 1.2 update bozohttpd to 2016072: - fix memory leak - addd -G option to display version - fix some content type issues - fix issues in testsuite To generate a diff of this commit: cvs rdiff -u -r1.19.2.1.2.1 -r1.19.2.1.2.2 src/libexec/httpd/CHANGES cvs rdiff -u -r1.46.4.4.2.1 -r1.46.4.4.2.2 src/libexec/httpd/bozohttpd.8 cvs rdiff -u -r1.56.2.4.2.1 -r1.56.2.4.2.2 src/libexec/httpd/bozohttpd.c cvs rdiff -u -r1.33.2.2.2.1 -r1.33.2.2.2.2 src/libexec/httpd/bozohttpd.h cvs rdiff -u -r1.25.2.2.2.2 -r1.25.2.2.2.3 src/libexec/httpd/cgi-bozo.c cvs rdiff -u -r1.10.2.2.2.1 -r1.10.2.2.2.2 src/libexec/httpd/content-bozo.c cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/libexec/httpd/main.c cvs rdiff -u -r1.4.26.1 -r1.4.26.2 src/libexec/httpd/testsuite/Makefile cvs rdiff -u -r1.1.1.1.32.1 -r1.1.1.1.32.2 \ src/libexec/httpd/testsuite/test-bigfile cvs rdiff -u -r0 -r1.2.6.2 src/libexec/httpd/testsuite/test-simple Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/CHANGES diff -u src/libexec/httpd/CHANGES:1.19.2.1.2.1 src/libexec/httpd/CHANGES:1.19.2.1.2.2 --- src/libexec/httpd/CHANGES:1.19.2.1.2.1 Fri Apr 15 18:55:49 2016 +++ src/libexec/httpd/CHANGES Fri Dec 23 07:47:40 2016 @@ -1,4 +1,7 @@ -$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $ +$NetBSD: CHANGES,v 1.19.2.1.2.2 2016/12/23 07:47:40 snj Exp $ + +changes in bozohttpd 20160517: + o add a bozo_get_version() function which returns the version number changes in bozohttpd 20160415: o add search-word support for CGI Index: src/libexec/httpd/bozohttpd.8 diff -u src/libexec/httpd/bozohttpd.8:1.46.4.4.2.1 src/libexec/httpd/bozohttpd.8:1.46.4.4.2.2 --- src/libexec/httpd/bozohttpd.8:1.46.4.4.2.1 Fri Apr 15 18:55:49 2016 +++ src/libexec/httpd/bozohttpd.8 Fri Dec 23 07:47:40 2016 @@ -1,8 +1,8 @@ -.\" $NetBSD: bozohttpd.8,v 1.46.4.4.2.1 2016/04/15 18:55:49 snj Exp $ +.\" $NetBSD: bozohttpd.8,v 1.46.4.4.2.2 2016/12/23 07:47:40 snj Exp $ .\" .\" $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $ .\" -.\" Copyright (c) 1997-2015 Matthew R. Green +.\" Copyright (c) 1997-2016 Matthew R. Green .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 12, 2015 +.Dd December 11, 2016 .Dt BOZOHTTPD 8 .Os .Sh NAME @@ -34,7 +34,7 @@ .Nd hyper text transfer protocol version 1.1 daemon .Sh SYNOPSIS .Nm -.Op Fl EHVXefhnsu +.Op Fl EGHVXefhnsu .Op Fl C Ar suffix cgihandler .Op Fl I Ar port .Op Fl L Ar prefix script @@ -132,6 +132,10 @@ Stops the flag from .Nm detaching from the tty and going into the background. +.It Fl G +Get the +.Nm +version string, print it on standard output, and exit. .It Fl H Causes directory index mode to hide files and directories that start with a period, except for @@ -272,8 +276,9 @@ translation. Note that enabling this support implies that users can run commands as web server user, this may have security implications. .It Fl V -Sets the default virtual host directory to -.Ar slashdir . +Sets the backup virtual host directory to the +.Ar slashdir +argument. If no directory exists in .Ar virtualroot for the request, then @@ -526,7 +531,7 @@ The focus has always been simplicity and and regular code audits. This manual documents .Nm -version 20150501. +version 20160720. .Sh AUTHORS .An -nosplit .Nm Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.56.2.4.2.1 src/libexec/httpd/bozohttpd.c:1.56.2.4.2.2 --- src/libexec/httpd/bozohttpd.c:1.56.2.4.2.1 Fri Apr 15 18:55:49 2016 +++ src/libexec/httpd/bozohttpd.c Fri Dec 23 07:47:40 2016 @@ -1,9 +1,9 @@ -/* $NetBSD: bozohttpd.c,v 1.56.2.4.2.1 2016/04/15 18:55:49 snj Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.56.2.4.2.2 2016/12/23 07:47:40 snj Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp
CVS commit: src/sys/uvm
Module Name:src Committed By: cherry Date: Fri Dec 23 07:42:32 UTC 2016 Modified Files: src/sys/uvm: uvm_physseg.c Log Message: Omitted assigning handle return value for the case: (VM_PHYSSEG_STRAT == VM_PSTRAT_RANDOM) Fix this. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/uvm_physseg.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_physseg.c diff -u src/sys/uvm/uvm_physseg.c:1.2 src/sys/uvm/uvm_physseg.c:1.3 --- src/sys/uvm/uvm_physseg.c:1.2 Thu Dec 22 08:15:20 2016 +++ src/sys/uvm/uvm_physseg.c Fri Dec 23 07:42:32 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_physseg.c,v 1.2 2016/12/22 08:15:20 cherry Exp $ */ +/* $NetBSD: uvm_physseg.c,v 1.3 2016/12/23 07:42:32 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -818,6 +818,7 @@ uvm_physseg_plug(paddr_t pfn, size_t pag #if (VM_PHYSSEG_STRAT == VM_PSTRAT_RANDOM) /* random: put it at the end (easy!) */ ps = VM_PHYSMEM_PTR(vm_nphysmem); + lcv = vm_nphysmem; #elif (VM_PHYSSEG_STRAT == VM_PSTRAT_BSEARCH) { int x;
CVS commit: [netbsd-7] src/libexec/httpd
Module Name:src Committed By: snj Date: Fri Dec 23 07:42:09 UTC 2016 Modified Files: src/libexec/httpd [netbsd-7]: CHANGES bozohttpd.8 bozohttpd.c bozohttpd.h cgi-bozo.c content-bozo.c main.c src/libexec/httpd/testsuite [netbsd-7]: Makefile test-bigfile Added Files: src/libexec/httpd/testsuite [netbsd-7]: test-simple Log Message: Pull up following revision(s) (requested by mrg in ticket #1309): libexec/httpd/CHANGES: revisions 1.23, 1.24 libexec/httpd/bozohttpd.8: revisions 1.60-1.62 libexec/httpd/bozohttpd.c: revisions 1.81-1.84 libexec/httpd/bozohttpd.h: revision 1.46 libexec/httpd/cgi-bozo.c: revision 1.35 libexec/httpd/content-bozo.c: revision 1.14 libexec/httpd/main.c: revisions 1.14-1.16 libexec/httpd/testsuite/Makefile: revision 1.6 libexec/httpd/testsuite/test-bigfile: revision 1.3 libexec/httpd/testsuite/test-simple: revisions 1.1, 1.2 update bozohttpd to 2016072: - fix memory leak - addd -G option to display version - fix some content type issues - fix issues in testsuite To generate a diff of this commit: cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/libexec/httpd/CHANGES cvs rdiff -u -r1.46.4.6 -r1.46.4.7 src/libexec/httpd/bozohttpd.8 cvs rdiff -u -r1.56.2.6 -r1.56.2.7 src/libexec/httpd/bozohttpd.c cvs rdiff -u -r1.33.2.4 -r1.33.2.5 src/libexec/httpd/bozohttpd.h cvs rdiff -u -r1.25.2.5 -r1.25.2.6 src/libexec/httpd/cgi-bozo.c cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/libexec/httpd/content-bozo.c cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/libexec/httpd/main.c cvs rdiff -u -r1.4.24.1 -r1.4.24.2 src/libexec/httpd/testsuite/Makefile cvs rdiff -u -r1.1.1.1.30.1 -r1.1.1.1.30.2 \ src/libexec/httpd/testsuite/test-bigfile cvs rdiff -u -r0 -r1.2.4.2 src/libexec/httpd/testsuite/test-simple Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/CHANGES diff -u src/libexec/httpd/CHANGES:1.19.2.3 src/libexec/httpd/CHANGES:1.19.2.4 --- src/libexec/httpd/CHANGES:1.19.2.3 Fri Apr 15 19:01:05 2016 +++ src/libexec/httpd/CHANGES Fri Dec 23 07:42:09 2016 @@ -1,4 +1,7 @@ -$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $ +$NetBSD: CHANGES,v 1.19.2.4 2016/12/23 07:42:09 snj Exp $ + +changes in bozohttpd 20160517: + o add a bozo_get_version() function which returns the version number changes in bozohttpd 20160415: o add search-word support for CGI Index: src/libexec/httpd/bozohttpd.8 diff -u src/libexec/httpd/bozohttpd.8:1.46.4.6 src/libexec/httpd/bozohttpd.8:1.46.4.7 --- src/libexec/httpd/bozohttpd.8:1.46.4.6 Fri Apr 15 19:01:05 2016 +++ src/libexec/httpd/bozohttpd.8 Fri Dec 23 07:42:09 2016 @@ -1,8 +1,8 @@ -.\" $NetBSD: bozohttpd.8,v 1.46.4.6 2016/04/15 19:01:05 snj Exp $ +.\" $NetBSD: bozohttpd.8,v 1.46.4.7 2016/12/23 07:42:09 snj Exp $ .\" .\" $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $ .\" -.\" Copyright (c) 1997-2015 Matthew R. Green +.\" Copyright (c) 1997-2016 Matthew R. Green .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 12, 2015 +.Dd December 11, 2016 .Dt BOZOHTTPD 8 .Os .Sh NAME @@ -34,7 +34,7 @@ .Nd hyper text transfer protocol version 1.1 daemon .Sh SYNOPSIS .Nm -.Op Fl EHVXefhnsu +.Op Fl EGHVXefhnsu .Op Fl C Ar suffix cgihandler .Op Fl I Ar port .Op Fl L Ar prefix script @@ -132,6 +132,10 @@ Stops the flag from .Nm detaching from the tty and going into the background. +.It Fl G +Get the +.Nm +version string, print it on standard output, and exit. .It Fl H Causes directory index mode to hide files and directories that start with a period, except for @@ -272,8 +276,9 @@ translation. Note that enabling this support implies that users can run commands as web server user, this may have security implications. .It Fl V -Sets the default virtual host directory to -.Ar slashdir . +Sets the backup virtual host directory to the +.Ar slashdir +argument. If no directory exists in .Ar virtualroot for the request, then @@ -526,7 +531,7 @@ The focus has always been simplicity and and regular code audits. This manual documents .Nm -version 20150501. +version 20160720. .Sh AUTHORS .An -nosplit .Nm Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.56.2.6 src/libexec/httpd/bozohttpd.c:1.56.2.7 --- src/libexec/httpd/bozohttpd.c:1.56.2.6 Fri Apr 15 19:01:05 2016 +++ src/libexec/httpd/bozohttpd.c Fri Dec 23 07:42:09 2016 @@ -1,9 +1,9 @@ -/* $NetBSD: bozohttpd.c,v 1.56.2.6 2016/04/15 19:01:05 snj Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.56.2.7 2016/12/23 07:42:09 snj Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ /* - * Copyright (c) 1997-2015 Matthew R. Green + * Copyright (c) 1997-2016 Matthew R. Green * All
CVS commit: src/sys/arch/amiga/amiga
Module Name:src Committed By: maya Date: Fri Dec 23 07:40:05 UTC 2016 Modified Files: src/sys/arch/amiga/amiga: machdep.c Log Message: Remove conflicting declaration of physmem To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/arch/amiga/amiga/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/amiga/amiga/machdep.c diff -u src/sys/arch/amiga/amiga/machdep.c:1.246 src/sys/arch/amiga/amiga/machdep.c:1.247 --- src/sys/arch/amiga/amiga/machdep.c:1.246 Sat Apr 2 08:16:54 2016 +++ src/sys/arch/amiga/amiga/machdep.c Fri Dec 23 07:40:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.246 2016/04/02 08:16:54 mlelstv Exp $ */ +/* $NetBSD: machdep.c,v 1.247 2016/12/23 07:40:05 maya Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -50,7 +50,7 @@ #include "empm.h" #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2016/04/02 08:16:54 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2016/12/23 07:40:05 maya Exp $"); #include #include @@ -141,7 +141,6 @@ paddr_t msgbufpa; int machineid; int maxmem; /* max memory per process */ -extern int physmem; /* max supported memory, changes to actual */ extern int freebufspace; extern u_int lowram;
CVS commit: src/sys
Module Name:src Committed By: cherry Date: Fri Dec 23 07:15:28 UTC 2016 Modified Files: src/sys/arch/acorn26/acorn26: pmap.c src/sys/arch/alpha/alpha: machdep.c pmap.c src/sys/arch/amd64/amd64: machdep.c src/sys/arch/arm/arm32: bus_dma.c pmap.c src/sys/arch/i386/i386: machdep.c src/sys/arch/ia64/ia64: machdep.c pmap.c src/sys/arch/m68k/m68k: pmap_motorola.c src/sys/arch/mips/include: pmap.h src/sys/arch/mips/mips: mips_machdep.c pmap_machdep.c src/sys/arch/powerpc/ibm4xx: pmap.c src/sys/arch/powerpc/isa: isadma_machdep.c src/sys/arch/powerpc/oea: pmap.c src/sys/arch/powerpc/powerpc: bus_dma.c src/sys/arch/sh3/sh3: pmap.c vm_machdep.c src/sys/arch/vax/vax: ka650.c pmap.c src/sys/arch/x68k/x68k: machdep.c src/sys/uvm: files.uvm uvm_init.c uvm_page.c uvm_page.h uvm_pglist.c uvm_physseg.h src/sys/uvm/pmap: pmap.c Log Message: "Make NetBSD great again!" Introduce uvm_hotplug(9) to the kernel. Many thanks, in no particular order to: TNF, for funding the project. Chuck Silvers - for multiple API reviews and feedback. Nick Hudson - for testing on multiple architectures and bugfix patches. Everyone who helped with boot testing. KeK (http://www.kek.org.in) for hosting the primary developers. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/acorn26/acorn26/pmap.c cvs rdiff -u -r1.348 -r1.349 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.260 -r1.261 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.242 -r1.243 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.96 -r1.97 src/sys/arch/arm/arm32/bus_dma.c cvs rdiff -u -r1.341 -r1.342 src/sys/arch/arm/arm32/pmap.c cvs rdiff -u -r1.772 -r1.773 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/ia64/ia64/machdep.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/ia64/ia64/pmap.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/m68k/m68k/pmap_motorola.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.275 -r1.276 src/sys/arch/mips/mips/mips_machdep.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/mips/pmap_machdep.c cvs rdiff -u -r1.73 -r1.74 src/sys/arch/powerpc/ibm4xx/pmap.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/isa/isadma_machdep.c cvs rdiff -u -r1.93 -r1.94 src/sys/arch/powerpc/oea/pmap.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/powerpc/powerpc/bus_dma.c cvs rdiff -u -r1.78 -r1.79 src/sys/arch/sh3/sh3/pmap.c cvs rdiff -u -r1.76 -r1.77 src/sys/arch/sh3/sh3/vm_machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/vax/vax/ka650.c cvs rdiff -u -r1.183 -r1.184 src/sys/arch/vax/vax/pmap.c cvs rdiff -u -r1.194 -r1.195 src/sys/arch/x68k/x68k/machdep.c cvs rdiff -u -r1.27 -r1.28 src/sys/uvm/files.uvm cvs rdiff -u -r1.47 -r1.48 src/sys/uvm/uvm_init.c cvs rdiff -u -r1.189 -r1.190 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.80 -r1.81 src/sys/uvm/uvm_page.h cvs rdiff -u -r1.67 -r1.68 src/sys/uvm/uvm_pglist.c cvs rdiff -u -r1.3 -r1.4 src/sys/uvm/uvm_physseg.h cvs rdiff -u -r1.25 -r1.26 src/sys/uvm/pmap/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/acorn26/acorn26/pmap.c diff -u src/sys/arch/acorn26/acorn26/pmap.c:1.36 src/sys/arch/acorn26/acorn26/pmap.c:1.37 --- src/sys/arch/acorn26/acorn26/pmap.c:1.36 Fri May 11 15:39:17 2012 +++ src/sys/arch/acorn26/acorn26/pmap.c Fri Dec 23 07:15:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.36 2012/05/11 15:39:17 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.37 2016/12/23 07:15:27 cherry Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 Ben Harris * All rights reserved. @@ -102,7 +102,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.36 2012/05/11 15:39:17 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.37 2016/12/23 07:15:27 cherry Exp $"); #include /* for cold */ #include @@ -293,19 +293,26 @@ pmap_bootstrap(int npages, paddr_t zp_ph vaddr_t pmap_steal_memory(vsize_t size, vaddr_t *vstartp, vaddr_t *vendp) { - int i; vaddr_t addr; + uvm_physseg_t bank; + UVMHIST_FUNC("pmap_steal_memory"); UVMHIST_CALLED(pmaphist); addr = 0; size = round_page(size); - for (i = 0; i < vm_nphysseg; i++) { - if (VM_PHYSMEM_PTR(i)->avail_start < VM_PHYSMEM_PTR(i)->avail_end) { + for (bank = uvm_physseg_get_first(); + uvm_physseg_valid_p(bank); + bank = uvm_physseg_get_next(bank)) { + if (uvm_physseg_get_avail_start(bank) < uvm_physseg_get_avail_end(bank)) { + paddr_t avail_start = uvm_physseg_get_avail_start(bank); + addr = (vaddr_t) ((char*)MEMC_PHYS_BASE + -ptoa(VM_PHYSMEM_PTR(i)->avail_start)); - VM_PHYSMEM_PTR(i)->avail_start++; +ptoa(avail_start)); + avail_start++; + uvm_physseg_set_avail_start(avail_start); + break; } } Index: src/sys/arch/alpha/alpha/machdep.c diff -u src/sys/arch/alpha/alpha/machdep.c:1.348 src/sys/arch/alpha/al
CVS commit: [netbsd-7] src/distrib/sets/lists/xdebug
Module Name:src Committed By: snj Date: Fri Dec 23 06:56:52 UTC 2016 Modified Files: src/distrib/sets/lists/xdebug [netbsd-7]: md.amd64 md.i386 Log Message: Apply patch (requested by mrg in ticket #1305): Add missing debug entry to set amd64/i386 xdebug set lists. To generate a diff of this commit: cvs rdiff -u -r1.6.4.4 -r1.6.4.5 src/distrib/sets/lists/xdebug/md.amd64 cvs rdiff -u -r1.6.4.5 -r1.6.4.6 src/distrib/sets/lists/xdebug/md.i386 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/xdebug/md.amd64 diff -u src/distrib/sets/lists/xdebug/md.amd64:1.6.4.4 src/distrib/sets/lists/xdebug/md.amd64:1.6.4.5 --- src/distrib/sets/lists/xdebug/md.amd64:1.6.4.4 Mon Dec 12 09:32:35 2016 +++ src/distrib/sets/lists/xdebug/md.amd64 Fri Dec 23 06:56:52 2016 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.6.4.4 2016/12/12 09:32:35 msaitoh Exp $ +# $NetBSD: md.amd64,v 1.6.4.5 2016/12/23 06:56:52 snj Exp $ ./usr/X11R7/lib/libI810XvMC_g.a-unknown- debuglib,xorg ./usr/X11R7/lib/libIntelXvMC_g.a -unknown- debuglib,xorg ./usr/X11R7/lib/libchromeXvMCPro_g.a -unknown- debuglib,xorg @@ -71,6 +71,7 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/dri/libunichrome_dri.so.0.debug obsolete xorg,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/dri/mach64_dri.so.0.debug -unknown- obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/dri/mga_dri.so.0.debug -unknown- obsolete +./usr/libdata/debug/usr/X11R7/lib/modules/dri/nouveau_dri.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/dri/r128_dri.so.0.debug -unknown- obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/dri/r200_dri.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/dri/r300_dri.so.0.debug -unknown- xorg,debug Index: src/distrib/sets/lists/xdebug/md.i386 diff -u src/distrib/sets/lists/xdebug/md.i386:1.6.4.5 src/distrib/sets/lists/xdebug/md.i386:1.6.4.6 --- src/distrib/sets/lists/xdebug/md.i386:1.6.4.5 Mon Dec 12 09:32:35 2016 +++ src/distrib/sets/lists/xdebug/md.i386 Fri Dec 23 06:56:52 2016 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.6.4.5 2016/12/12 09:32:35 msaitoh Exp $ +# $NetBSD: md.i386,v 1.6.4.6 2016/12/23 06:56:52 snj Exp $ ./usr/X11R6/lib/modules/extensions/libGLcore_g.a -unknown- debuglib,x11 ./usr/X11R6/lib/modules/extensions/libdbe_g.a -unknown- debuglib,x11 ./usr/X11R6/lib/modules/extensions/libextmod_g.a -unknown- debuglib,x11 @@ -115,6 +115,7 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/dri/libunichrome_dri.so.0.debug obsolete xorg,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/dri/mach64_dri.so.0.debug -unknown- obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/dri/mga_dri.so.0.debug -unknown- obsolete +./usr/libdata/debug/usr/X11R7/lib/modules/dri/nouveau_dri.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/dri/r128_dri.so.0.debug -unknown- obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/dri/r200_dri.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/dri/r300_dri.so.0.debug -unknown- xorg,debug
CVS commit: xsrc/external/mit/xf86-video-glint/dist/src
Module Name:xsrc Committed By: macallan Date: Fri Dec 23 06:52:17 UTC 2016 Modified Files: xsrc/external/mit/xf86-video-glint/dist/src: glint.h glint_driver.c glint_regs.h pm2_common.c pm2_exa.c Log Message: add xrender acceleration for Permedia 2. Needs some EXA change to be useful though, a patch has been sent to xorg-devel@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xf86-video-glint/dist/src/glint.h cvs rdiff -u -r1.10 -r1.11 \ xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c cvs rdiff -u -r1.1.1.3 -r1.2 \ xsrc/external/mit/xf86-video-glint/dist/src/glint_regs.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-video-glint/dist/src/pm2_common.c cvs rdiff -u -r1.5 -r1.6 \ xsrc/external/mit/xf86-video-glint/dist/src/pm2_exa.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/xf86-video-glint/dist/src/glint.h diff -u xsrc/external/mit/xf86-video-glint/dist/src/glint.h:1.3 xsrc/external/mit/xf86-video-glint/dist/src/glint.h:1.4 --- xsrc/external/mit/xf86-video-glint/dist/src/glint.h:1.3 Sat Dec 10 01:57:54 2016 +++ xsrc/external/mit/xf86-video-glint/dist/src/glint.h Fri Dec 23 06:52:17 2016 @@ -151,7 +151,11 @@ typedef struct { XAAInfoRecPtr AccelInfoRec; #endif ExaDriverPtr pExa; -int srcoff; +int srcoff, srcpitch; +int mskoff, mskpitch; +int srcformat, dstformat, mskformat; +int fillcolour, op; +Bool source_is_solid, no_source_pixmap, render; CloseScreenProcPtr CloseScreen; ScreenBlockHandlerProcPtr BlockHandler; Index: xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c diff -u xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c:1.10 xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c:1.11 --- xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c:1.10 Sat Dec 10 01:57:54 2016 +++ xsrc/external/mit/xf86-video-glint/dist/src/glint_driver.c Fri Dec 23 06:52:17 2016 @@ -197,6 +197,7 @@ typedef enum { OPTION_RGB_BITS, OPTION_NOACCEL, OPTION_BLOCK_WRITE, +OPTION_RENDER_ACCEL, OPTION_FIREGL3000, OPTION_OVERLAY, OPTION_SHADOW_FB, @@ -210,6 +211,7 @@ static const OptionInfoRec GLINTOptions[ { OPTION_RGB_BITS, "RGBbits", OPTV_INTEGER, {0}, FALSE }, { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_BLOCK_WRITE, "BlockWrite", OPTV_BOOLEAN, {0}, FALSE }, +{ OPTION_RENDER_ACCEL, "RenderAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_FIREGL3000, "FireGL3000", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_OVERLAY, "Overlay", OPTV_ANYSTR, {0}, FALSE }, { OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE }, @@ -1054,6 +1056,10 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flag pGlint->NoAccel = TRUE; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n"); } +if (xf86ReturnOptValBool(pGlint->Options, OPTION_RENDER_ACCEL, FALSE)) { + pGlint->render = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Render Acceleration enabled\n"); +} if (xf86ReturnOptValBool(pGlint->Options, OPTION_SHADOW_FB, FALSE)) { pGlint->ShadowFB = TRUE; pGlint->NoAccel = TRUE; Index: xsrc/external/mit/xf86-video-glint/dist/src/glint_regs.h diff -u xsrc/external/mit/xf86-video-glint/dist/src/glint_regs.h:1.1.1.3 xsrc/external/mit/xf86-video-glint/dist/src/glint_regs.h:1.2 --- xsrc/external/mit/xf86-video-glint/dist/src/glint_regs.h:1.1.1.3 Sun Jun 2 07:25:12 2013 +++ xsrc/external/mit/xf86-video-glint/dist/src/glint_regs.h Fri Dec 23 06:52:17 2016 @@ -712,6 +712,9 @@ #define TexelLUTMode GLINT_TAG_ADDR(0x0c,0x0f) #define TextureColorMode GLINT_TAG_ADDR(0x0d,0x00) +# define TextureModeModulate 0 << 1 +# define TextureModeDecal 1 << 1 +# define TextureModeCopy 3 << 1 # define TextureTypeOpenGL 0 # define TextureTypeApple 1 << 4 # define TextureKsDDA 1 << 5 /* only Apple-Mode */ @@ -770,6 +773,7 @@ /* DstFBData*/ /* UNIT_DISABLE*/ +# define ABM_SrcZERO 0 << 1 # define ABM_SrcONE 1 << 1 # define ABM_SrcDST_COLOR2 << 1 # define ABM_SrcONE_MINUS_DST_COLOR 3 << 1 @@ -778,6 +782,7 @@ # define ABM_SrcDST_ALPHA6 << 1 # define ABM_SrcONE_MINUS_DST_ALPHA 7 << 1 # define ABM_SrcSRC_ALPHA_SATURATE 8 << 1 +# define ABM_DstZERO 0 << 5 # define ABM_DstONE 1 << 5 # define ABM_DstSRC_COLOR2 << 5 # define ABM_DstONE_MINUS_SRC_COLOR 3 << 5 @@ -1302,12 +1307,13 @@ do{\ } \ } -#define DO_PLANEMASK(planemask) \ +#define DO_PLANEMASK(p) \ { \ - if (planemask != pGlint->planemask) { \ - pGlint->planemask = planemask; \ - REPLICATE(planemask); \ - GLINT_WRITE_REG(planemask, FBHardwareWriteMask);\ + if (p != pGlint->planemask) {\ + CARD32 pm = p; \ + pGlint->planemask = p;\ + REPLICATE(pm); \ + GLINT_WRITE_REG(pm, FBHardwar
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: snj Date: Fri Dec 23 06:33:56 UTC 2016 Modified Files: src/sys/arch/amd64/conf [netbsd-7]: GENERIC src/sys/dev/pci [netbsd-7]: files.pci virtioreg.h Added Files: src/sys/dev/pci [netbsd-7]: vioscsi.c vioscsireg.h Log Message: Pull up following revision(s) (requested by bsiegert in ticket #1338): sys/arch/amd64/conf/GENERIC: revision 1.418 sys/dev/pci/files.pci: revision 1.379 sys/dev/pci/vioscsi.c: revisions 1.1-1.8 sys/dev/pci/vioscsireg.h: revision 1.1 sys/dev/pci/virtioreg.h: revisions 1.5, 1.6 add the common flag bits -- Add vioscsi, compile tested only (toxic) -- this is working now, remove debugging. -- add vioscsi -- kill some more debugging. -- Fake mode sense data for illegal targets. qemu reports 256 targets... -- fix the status return. -- Use SCSIPI_CHAN_NOSETTLE. -- vioscsi_req_get()/virtio_enqueue_prep() failing is actually perfectly normal - observed failures included 10, 27, 61 in-flight commands, so probably depends on particular command mix; return with XS_RESOURCE_SHORTAGE rather then panic do vioscsi_req_put() when initial bus_dmamap_load() fails, as suggested by the XXX; the vq_done hook is called by virtio, but in that case we never get to commit the request to it -- react on ADAPTER_REQ_SET_XFER_MODE so that we set tagged queuing pass tag type and set id To generate a diff of this commit: cvs rdiff -u -r1.392.2.8 -r1.392.2.9 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.371.4.3 -r1.371.4.4 src/sys/dev/pci/files.pci cvs rdiff -u -r0 -r1.8.2.2 src/sys/dev/pci/vioscsi.c cvs rdiff -u -r0 -r1.1.6.2 src/sys/dev/pci/vioscsireg.h cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/dev/pci/virtioreg.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/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.392.2.8 src/sys/arch/amd64/conf/GENERIC:1.392.2.9 --- src/sys/arch/amd64/conf/GENERIC:1.392.2.8 Fri Dec 9 05:10:45 2016 +++ src/sys/arch/amd64/conf/GENERIC Fri Dec 23 06:33:56 2016 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.392.2.8 2016/12/09 05:10:45 snj Exp $ +# $NetBSD: GENERIC,v 1.392.2.9 2016/12/23 06:33:56 snj Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.392.2.8 $" +#ident "GENERIC-$Revision: 1.392.2.9 $" maxusers 64 # estimated number of users @@ -1188,7 +1188,7 @@ viomb* at virtio? # Virtio memory ball ld* at virtio? # Virtio disk device vioif* at virtio? # Virtio network device viornd* at virtio? # Virtio entropy device - +vioscsi* at virtio? # Virtio SCSI device # Pull in optional local configuration cinclude "arch/amd64/conf/GENERIC.local" Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.371.4.3 src/sys/dev/pci/files.pci:1.371.4.4 --- src/sys/dev/pci/files.pci:1.371.4.3 Sun Apr 19 06:45:17 2015 +++ src/sys/dev/pci/files.pci Fri Dec 23 06:33:56 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.371.4.3 2015/04/19 06:45:17 riz Exp $ +# $NetBSD: files.pci,v 1.371.4.4 2016/12/23 06:33:56 snj Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -1131,7 +1131,11 @@ file dev/pci/if_vioif.c vioif device viornd attach viornd at virtio -file dev/pci/viornd.c viornd +file dev/pci/viornd.c viornd + +device vioscsi: scsi +attach vioscsi at virtio +file dev/pci/vioscsi.c vioscsi # Silicon Motion SM712(LynxEM+) frame buffer device lynxfb: wsemuldisplaydev, rasops16 Index: src/sys/dev/pci/virtioreg.h diff -u src/sys/dev/pci/virtioreg.h:1.2 src/sys/dev/pci/virtioreg.h:1.2.4.1 --- src/sys/dev/pci/virtioreg.h:1.2 Fri Dec 6 02:39:58 2013 +++ src/sys/dev/pci/virtioreg.h Fri Dec 23 06:33:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: virtioreg.h,v 1.2 2013/12/06 02:39:58 yamt Exp $ */ +/* $NetBSD: virtioreg.h,v 1.2.4.1 2016/12/23 06:33:56 snj Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -73,7 +73,11 @@ #define PCI_PRODUCT_VIRTIO_CONSOLE 3 #define PCI_PRODUCT_VIRTIO_ENTROPY 4 #define PCI_PRODUCT_VIRTIO_BALLOON 5 +#define PCI_PRODUCT_VIRTIO_IOMEM 6 +#define PCI_PRODUCT_VIRTIO_RPMSG 7 +#define PCI_PRODUCT_VIRTIO_SCSI 8 #define PCI_PRODUCT_VIRTIO_9P 9 +#define PCI_PRODUCT_VIRTIO_MAC80211 10 /* Virtio header */ #define VIRTIO_CONFIG_DEVICE_FEATURES 0 /* 32bit */ @@ -97,6 +101,13 @@ #define VIRTIO_CONFIG_DEVICE_CONFIG_NOMSI 20 #define VIRTIO_CONFIG_DEVICE_CONFIG_MSI 22 +#define VIRTIO_COMMON_FLAG_BITS \ +"\20" \ + "\x1f""BAD_FEATURE" \ + "\x1e""EVENT_IDX" \ + "\x1d""INDIRECT_DESC" \ + "\x19""NOTIFY_ON_EMPTY" + /* Virtqueue */ /* This marks a buffer as continuing via the next field. */ #define VRING_DESC_F_NEXT 1 Added files: Index: src/sys/dev/pci/vioscsi.c diff -u /
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: mrg Date: Fri Dec 23 06:22:00 UTC 2016 Modified Files: src/usr.bin/netstat: inet.c Log Message: in getpcblist_sysctl() if sysctlnametomib() fails, return NULL and set *len = 0, rather than bailing. now "netstat" doesn't give up early on kernels without INET6. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/usr.bin/netstat/inet.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/netstat/inet.c diff -u src/usr.bin/netstat/inet.c:1.106 src/usr.bin/netstat/inet.c:1.107 --- src/usr.bin/netstat/inet.c:1.106 Sun Feb 8 15:09:45 2015 +++ src/usr.bin/netstat/inet.c Fri Dec 23 06:22:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: inet.c,v 1.106 2015/02/08 15:09:45 christos Exp $ */ +/* $NetBSD: inet.c,v 1.107 2016/12/23 06:22:00 mrg Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet.c,v 1.106 2015/02/08 15:09:45 christos Exp $"); +__RCSID("$NetBSD: inet.c,v 1.107 2016/12/23 06:22:00 mrg Exp $"); #endif #endif /* not lint */ @@ -88,6 +88,8 @@ __RCSID("$NetBSD: inet.c,v 1.106 2015/02 #include #include #include +#include + #include "netstat.h" #include "vtw.h" #include "prog_ops.h" @@ -240,8 +242,14 @@ getpcblist_sysctl(const char *name, size err(1, "asprintf"); /* get dynamic pcblist node */ - if (sysctlnametomib(mibname, mib, &namelen) == -1) + if (sysctlnametomib(mibname, mib, &namelen) == -1) { + if (errno == ENOENT) { + *len = 0; + return NULL; + } + err(1, "sysctlnametomib: %s", mibname); + } free(mibname);
CVS commit: src/lib/libutil
Module Name:src Committed By: abhinav Date: Fri Dec 23 06:01:42 UTC 2016 Modified Files: src/lib/libutil: parsedate.3 Log Message: Complete a sentence and replace full stop with a comma at one place as the sentence wasn't finished To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libutil/parsedate.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/libutil/parsedate.3 diff -u src/lib/libutil/parsedate.3:1.21 src/lib/libutil/parsedate.3:1.22 --- src/lib/libutil/parsedate.3:1.21 Sun Jun 26 07:09:24 2016 +++ src/lib/libutil/parsedate.3 Fri Dec 23 06:01:41 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: parsedate.3,v 1.21 2016/06/26 07:09:24 kre Exp $ +.\" $NetBSD: parsedate.3,v 1.22 2016/12/23 06:01:41 abhinav Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -64,7 +64,7 @@ then the current time zone is used. The .Ar datestr is a sequence of white-space separated items. -The white-space is optional the concatenated items are not ambiguous. +The white-space is optional if the concatenated items are not ambiguous. An empty .Ar datestr is equivalent to midnight today (the beginning of this day). @@ -155,7 +155,7 @@ The days of the week: .Dv wednesday , .Dv thursday , .Dv friday , -.Dv saturday . +.Dv saturday , and common abbreviations for them. .Pp Time units:
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: snj Date: Fri Dec 23 05:57:40 UTC 2016 Modified Files: src/sys/dev/pci [netbsd-7]: if_vioif.c virtio.c Log Message: Pull up following revision(s) (requested by bsiegert in ticket #1337): sys/dev/pci/if_vioif.c: revision 1.21 sys/dev/pci/virtio.c: revision 1.14 PR/50636: Ryo ONODERA: Fix incorrect kmem_free() -- PR/50636: Ryo ONODERA: Reduce memory use To generate a diff of this commit: cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/dev/pci/if_vioif.c cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/dev/pci/virtio.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_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.7.2.2 src/sys/dev/pci/if_vioif.c:1.7.2.3 --- src/sys/dev/pci/if_vioif.c:1.7.2.2 Sun Sep 18 05:57:00 2016 +++ src/sys/dev/pci/if_vioif.c Fri Dec 23 05:57:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.7.2.2 2016/09/18 05:57:00 snj Exp $ */ +/* $NetBSD: if_vioif.c,v 1.7.2.3 2016/12/23 05:57:40 snj Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.7.2.2 2016/09/18 05:57:00 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.7.2.3 2016/12/23 05:57:40 snj Exp $"); #include #include @@ -397,7 +397,7 @@ vioif_alloc_mems(struct vioif_softc *sc) C_L1(txhdr_dmamaps[i], tx_hdrs[i], sizeof(struct virtio_net_hdr), 1, WRITE, "tx header"); - C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 256 /* XXX */, 0, + C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 16 /* XXX */, 0, "tx payload"); } Index: src/sys/dev/pci/virtio.c diff -u src/sys/dev/pci/virtio.c:1.6 src/sys/dev/pci/virtio.c:1.6.2.1 --- src/sys/dev/pci/virtio.c:1.6 Tue Jul 22 01:55:54 2014 +++ src/sys/dev/pci/virtio.c Fri Dec 23 05:57:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.6 2014/07/22 01:55:54 ozaki-r Exp $ */ +/* $NetBSD: virtio.c,v 1.6.2.1 2016/12/23 05:57:40 snj Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.6 2014/07/22 01:55:54 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.6.2.1 2016/12/23 05:57:40 snj Exp $"); #include #include @@ -686,7 +686,7 @@ virtio_free_vq(struct virtio_softc *sc, bus_space_write_4(sc->sc_iot, sc->sc_ioh, VIRTIO_CONFIG_QUEUE_ADDRESS, 0); - kmem_free(vq->vq_entries, vq->vq_bytesize); + kmem_free(vq->vq_entries, sizeof(*vq->vq_entries) * vq->vq_num); bus_dmamap_unload(sc->sc_dmat, vq->vq_dmamap); bus_dmamap_destroy(sc->sc_dmat, vq->vq_dmamap); bus_dmamem_unmap(sc->sc_dmat, vq->vq_vaddr, vq->vq_bytesize);
CVS commit: src/usr.bin/pmap
Module Name:src Committed By: mrg Date: Thu Dec 22 22:41:02 UTC 2016 Modified Files: src/usr.bin/pmap: pmap.h Log Message: add the member name to an error string so we know what object failed while being requested. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/pmap/pmap.h 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/pmap/pmap.h diff -u src/usr.bin/pmap/pmap.h:1.8 src/usr.bin/pmap/pmap.h:1.9 --- src/usr.bin/pmap/pmap.h:1.8 Mon Apr 13 00:27:38 2009 +++ src/usr.bin/pmap/pmap.h Thu Dec 22 22:41:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.8 2009/04/13 00:27:38 lukem Exp $ */ +/* $NetBSD: pmap.h,v 1.9 2016/12/22 22:41:02 mrg Exp $ */ /* * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -95,8 +95,8 @@ ((size_t)kvm_read((kd), (addr), (dst), (sz)) == (size_t)(sz)) #define _KDEREF(kd, addr, dst, sz) do { \ if (!_KDEREFOK((kd), (addr), (dst), (sz))) \ - errx(1, "trying to read %lu bytes from %lx: %s", \ - (unsigned long)(sz), (addr), kvm_geterr(kd)); \ + errx(1, "trying to read %lu (%s) bytes from %lx: %s", \ + (unsigned long)(sz), #sz, (addr), kvm_geterr(kd)); \ } while (0/*CONSTCOND*/) /* suck the data using the structure */
CVS commit: xsrc/external/mit/xorg-server/dist/exa
Module Name:xsrc Committed By: macallan Date: Thu Dec 22 21:31:08 UTC 2016 Modified Files: xsrc/external/mit/xorg-server/dist/exa: exa_glyphs.c Log Message: fix tpyo - now fallback to ARGB masks when rendering glyphs actually works To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ xsrc/external/mit/xorg-server/dist/exa/exa_glyphs.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/xorg-server/dist/exa/exa_glyphs.c diff -u xsrc/external/mit/xorg-server/dist/exa/exa_glyphs.c:1.1.1.4 xsrc/external/mit/xorg-server/dist/exa/exa_glyphs.c:1.2 --- xsrc/external/mit/xorg-server/dist/exa/exa_glyphs.c:1.1.1.4 Wed Aug 10 07:44:32 2016 +++ xsrc/external/mit/xorg-server/dist/exa/exa_glyphs.c Thu Dec 22 21:31:08 2016 @@ -726,7 +726,7 @@ exaGlyphs(CARD8 op, serverClient, &error); if (!pMask || (!component_alpha && pExaScr->info->CheckComposite && - !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))) + !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, pMask, NULL))) { PictFormatPtr argbFormat;
CVS commit: src/sys/dev
Module Name:src Committed By: kamil Date: Thu Dec 22 20:57:33 UTC 2016 Modified Files: src/sys/dev: cgd.c Log Message: The cgd(4) module requires des and blowfish symbols This has been exposed with the MODULAR kernel. kobj_checksyms, 979: [cgd]: linker error: symbol `BF_set_key' not found kobj_checksyms, 979: [cgd]: linker error: symbol `des_key_sched' not found kobj_checksyms, 979: [cgd]: linker error: symbol `des_ede3_cbc_encrypt' not found WARNING: module error: unable to affix module `cgd', error 8 Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/dev/cgd.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/cgd.c diff -u src/sys/dev/cgd.c:1.112 src/sys/dev/cgd.c:1.113 --- src/sys/dev/cgd.c:1.112 Sun Dec 11 00:20:49 2016 +++ src/sys/dev/cgd.c Thu Dec 22 20:57:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.112 2016/12/11 00:20:49 alnsn Exp $ */ +/* $NetBSD: cgd.c,v 1.113 2016/12/22 20:57:33 kamil Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.112 2016/12/11 00:20:49 alnsn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.113 2016/12/22 20:57:33 kamil Exp $"); #include #include @@ -1165,7 +1165,7 @@ selftest(void) printf("done\n"); } -MODULE(MODULE_CLASS_DRIVER, cgd, "dk_subr"); +MODULE(MODULE_CLASS_DRIVER, cgd, "blowfish,des,dk_subr"); #ifdef _MODULE CFDRIVER_DECL(cgd, DV_DISK, NULL);
CVS commit: src/lib/libc/time
Module Name:src Committed By: abhinav Date: Thu Dec 22 17:39:29 UTC 2016 Modified Files: src/lib/libc/time: ctime.3 Log Message: Remove trailing comma at the end of the last .Nm entry in the NAME section To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/lib/libc/time/ctime.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/time/ctime.3 diff -u src/lib/libc/time/ctime.3:1.52 src/lib/libc/time/ctime.3:1.53 --- src/lib/libc/time/ctime.3:1.52 Thu Dec 22 17:27:02 2016 +++ src/lib/libc/time/ctime.3 Thu Dec 22 17:39:28 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: ctime.3,v 1.52 2016/12/22 17:27:02 abhinav Exp $ +.\" $NetBSD: ctime.3,v 1.53 2016/12/22 17:39:28 abhinav Exp $ .\" .\" XXX: License missing? .\" @@ -18,7 +18,7 @@ .Nm localtime_r , .Nm localtime_rz , .Nm mktime , -.Nm mktime_z , +.Nm mktime_z .Nd convert date and time .Sh LIBRARY .Lb libc
CVS commit: src/lib/libc/time
Module Name:src Committed By: abhinav Date: Thu Dec 22 17:27:02 UTC 2016 Modified Files: src/lib/libc/time: ctime.3 Log Message: Grammar fixes at few places Also, don't use .D1 inside .Bd (mandoc -Tlint was complaining) Remove whitespace at the end of a sentence To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/lib/libc/time/ctime.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/time/ctime.3 diff -u src/lib/libc/time/ctime.3:1.51 src/lib/libc/time/ctime.3:1.52 --- src/lib/libc/time/ctime.3:1.51 Tue Oct 7 21:51:03 2014 +++ src/lib/libc/time/ctime.3 Thu Dec 22 17:27:02 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: ctime.3,v 1.51 2014/10/07 21:51:03 christos Exp $ +.\" $NetBSD: ctime.3,v 1.52 2016/12/22 17:27:02 abhinav Exp $ .\" .\" XXX: License missing? .\" @@ -65,7 +65,7 @@ function converts a time value contained .Fa tm structure to a string with the following general format: .Bd -literal -offset indent -.D1 Thu Nov 24 18:22:48 1986\en\e0 +Thu Nov 24 18:22:48 1986\en\e0 .Ed .Pp The @@ -77,7 +77,7 @@ The .Fn asctime_r has the same behavior as .Fn asctime , -but the result is stored to +but the result is stored in .Fa buf , which should have a size of at least 26 bytes. .It Fn ctime "clock" @@ -91,7 +91,7 @@ and returns a pointer to a string with t Years requiring fewer than four characters are padded with leading zeroes. For years longer than four characters, the string is of the form .Bd -literal -offset indent -.D1 "Thu Nov 24 18:22:48 81986\en\e0" +Thu Nov 24 18:22:48 81986\en\e0 .Ed .Pp with five spaces before the year. @@ -114,7 +114,7 @@ The .Fn ctime_r is similar to .Fn ctime , -except it places the result of the conversion on the +except it places the result of the conversion in the .Fa buf argument, which should be 26 or more bytes long, instead of using a global static buffer. @@ -165,7 +165,7 @@ is .Dv NULL , UTC is used; otherwise, .Fa zone -should be have been allocated by +should have been allocated by .Fn tzalloc and should not be freed until after all uses (e.g., by calls to .Fn strftime ) @@ -184,11 +184,11 @@ structure described in .It Fn gmtime_r "clock" "result" The .Fn gmtime_r -provides the same functionality as +function provides the same functionality as .Fn gmtime , differing in that the caller must supply a buffer area .Fa result -to which the result is stored. +in which the result is stored. .It Fn localtime "clock" Also .Fn localtime @@ -215,7 +215,7 @@ the .Fn localtime_r takes an additional buffer .Fa result -as a parameter and stores the result to it. +as a parameter and stores the result in it. Note however that .Fn localtime_r does not imply initialization of the local time conversion information; @@ -316,7 +316,7 @@ Coordinated Universal Time .Pq Tn UTC . .El .Pp -Declarations of all the functions and externals, and the +Declarations of all the functions and externals, and the .Ft tm structure, are in the .In time.h @@ -490,7 +490,7 @@ Rest of the functions conform to .Sh CAVEATS The functions that do not take an explicit .Ft timezone_t -argument return values point to static data; the data is overwritten by +argument return values pointing to static data; the data is overwritten by each call. For the above functions the .Fa tm_zone
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: maya Date: Thu Dec 22 16:32:31 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi Log Message: add new header (uvm_physseg.h) to set list. To generate a diff of this commit: cvs rdiff -u -r1.2082 -r1.2083 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.2082 src/distrib/sets/lists/comp/mi:1.2083 --- src/distrib/sets/lists/comp/mi:1.2082 Thu Dec 22 12:57:18 2016 +++ src/distrib/sets/lists/comp/mi Thu Dec 22 16:32:31 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2082 2016/12/22 12:57:18 maya Exp $ +# $NetBSD: mi,v 1.2083 2016/12/22 16:32:31 maya Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3096,6 +3096,7 @@ ./usr/include/uvm/uvm_pager_i.h comp-obsolete obsolete ./usr/include/uvm/uvm_param.h comp-c-include ./usr/include/uvm/uvm_pdaemon.h comp-c-include +./usr/include/uvm/uvm_physseg.h comp-c-include ./usr/include/uvm/uvm_pglist.h comp-c-include ./usr/include/uvm/uvm_pmap.h comp-c-include ./usr/include/uvm/uvm_prot.h comp-c-include
CVS commit: src/sys/arch
Module Name:src Committed By: bouyer Date: Thu Dec 22 16:29:05 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c src/sys/arch/i386/i386: machdep.c src/sys/arch/x86/x86: pmap.c Log Message: Xen doens't need lapic so don't allocate a lapic VA/PA for Xen. As a side effect this makes XEN3PAE boot again but I don't know why ... To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.771 -r1.772 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.234 -r1.235 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.241 src/sys/arch/amd64/amd64/machdep.c:1.242 --- src/sys/arch/amd64/amd64/machdep.c:1.241 Thu Dec 22 14:47:54 2016 +++ src/sys/arch/amd64/amd64/machdep.c Thu Dec 22 16:29:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.241 2016/12/22 14:47:54 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.242 2016/12/22 16:29:05 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.241 2016/12/22 14:47:54 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.242 2016/12/22 16:29:05 bouyer Exp $"); /* #define XENDEBUG_LOW */ @@ -1543,11 +1543,11 @@ void init_x86_64(paddr_t first_avail) { extern void consinit(void); - extern paddr_t local_apic_pa; struct region_descriptor region; struct mem_segment_descriptor *ldt_segp; int x; #ifndef XEN + extern paddr_t local_apic_pa; int ist; #endif @@ -1640,10 +1640,12 @@ init_x86_64(paddr_t first_avail) kpreempt_disable(); +#ifndef XEN pmap_kenter_pa(local_apic_va, local_apic_pa, VM_PROT_READ|VM_PROT_WRITE, 0); pmap_update(pmap_kernel()); memset((void *)local_apic_va, 0, PAGE_SIZE); +#endif pmap_kenter_pa(idt_vaddr, idt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0); pmap_kenter_pa(gdt_vaddr, gdt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0); Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.771 src/sys/arch/i386/i386/machdep.c:1.772 --- src/sys/arch/i386/i386/machdep.c:1.771 Thu Dec 22 14:47:58 2016 +++ src/sys/arch/i386/i386/machdep.c Thu Dec 22 16:29:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.771 2016/12/22 14:47:58 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.772 2016/12/22 16:29:05 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.771 2016/12/22 14:47:58 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.772 2016/12/22 16:29:05 bouyer Exp $"); #include "opt_beep.h" #include "opt_compat_ibcs2.h" @@ -1137,9 +1137,9 @@ void init386(paddr_t first_avail) { extern void consinit(void); - extern paddr_t local_apic_pa; int x; #ifndef XEN + extern paddr_t local_apic_pa; union descriptor *tgdt; struct region_descriptor region; #endif @@ -1305,10 +1305,12 @@ init386(paddr_t first_avail) cpu_info_primary.ci_pmap = pmap_kernel(); #endif +#ifndef XEN pmap_kenter_pa(local_apic_va, local_apic_pa, VM_PROT_READ|VM_PROT_WRITE, 0); pmap_update(pmap_kernel()); memset((void *)local_apic_va, 0, PAGE_SIZE); +#endif pmap_kenter_pa(idt_vaddr, idt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0); pmap_kenter_pa(gdt_vaddr, gdt_paddr, VM_PROT_READ|VM_PROT_WRITE, 0); Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.234 src/sys/arch/x86/x86/pmap.c:1.235 --- src/sys/arch/x86/x86/pmap.c:1.234 Tue Dec 20 14:03:15 2016 +++ src/sys/arch/x86/x86/pmap.c Thu Dec 22 16:29:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.234 2016/12/20 14:03:15 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.235 2016/12/22 16:29:05 bouyer Exp $ */ /*- * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.234 2016/12/20 14:03:15 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.235 2016/12/22 16:29:05 bouyer Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -480,11 +480,13 @@ static bool pmap_initialized __read_most static vaddr_t virtual_avail __read_mostly; /* VA of first free KVA */ static vaddr_t virtual_end __read_mostly; /* VA of last free KVA */ +#ifndef XEN /* * LAPIC virtual address, and fake physical address. */ volatile vaddr_t local_apic_va; paddr_t local_apic_pa; +#endif /* * pool that pmap structures are allocated from @@ -558,11 +560,11 @@ extern vaddr_t pentium_idt_vaddr; * Local prototypes */ -static void pmap_init_lapic(void); #ifdef __HAVE_DIRECT_MAP static void pmap_init_directmap(struct pmap *); #endif #ifndef XEN +static void pmap_init_lapic(void); static void pmap_remap_largepages(void); #endif @@ -1327,9 +1329,9 @@ pmap_bootstrap
CVS commit: src/sys
Module Name:src Committed By: cherry Date: Thu Dec 22 16:05:15 UTC 2016 Modified Files: src/sys/arch/cesfic/cesfic: machdep.c src/sys/arch/luna68k/luna68k: pmap_bootstrap.c src/sys/arch/netwinder/netwinder: netwinder_machdep.c src/sys/arch/x68k/x68k: pmap_bootstrap.c src/sys/rump/librump/rumpkern: emul.c src/sys/sys: systm.h src/sys/uvm: uvm_page.c Log Message: physmem should be of type psize_t Also, use PRIxPSIZE when printf(9)ing physmem. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/cesfic/cesfic/machdep.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c cvs rdiff -u -r1.84 -r1.85 \ src/sys/arch/netwinder/netwinder/netwinder_machdep.c cvs rdiff -u -r1.60 -r1.61 src/sys/arch/x68k/x68k/pmap_bootstrap.c cvs rdiff -u -r1.179 -r1.180 src/sys/rump/librump/rumpkern/emul.c cvs rdiff -u -r1.271 -r1.272 src/sys/sys/systm.h cvs rdiff -u -r1.188 -r1.189 src/sys/uvm/uvm_page.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/cesfic/cesfic/machdep.c diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.66 src/sys/arch/cesfic/cesfic/machdep.c:1.67 --- src/sys/arch/cesfic/cesfic/machdep.c:1.66 Thu Nov 5 03:48:51 2015 +++ src/sys/arch/cesfic/cesfic/machdep.c Thu Dec 22 16:05:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.66 2015/11/05 03:48:51 pgoyette Exp $ */ +/* $NetBSD: machdep.c,v 1.67 2016/12/22 16:05:14 cherry Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.66 2015/11/05 03:48:51 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.67 2016/12/22 16:05:14 cherry Exp $"); #include "opt_bufcache.h" #include "opt_ddb.h" @@ -111,7 +111,7 @@ struct vm_map *phys_map = NULL; * Declare these as initialized data so we can patch them. */ /*int maxmem;*/ /* max memory per process */ -extern int physmem; /* max supported memory, changes to actual */ +extern psize_t physmem; /* max supported memory, changes to actual */ extern u_int lowram; Index: src/sys/arch/luna68k/luna68k/pmap_bootstrap.c diff -u src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.36 src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.37 --- src/sys/arch/luna68k/luna68k/pmap_bootstrap.c:1.36 Sat Jan 26 15:46:24 2013 +++ src/sys/arch/luna68k/luna68k/pmap_bootstrap.c Thu Dec 22 16:05:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.37 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2013/01/26 15:46:24 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.37 2016/12/22 16:05:15 cherry Exp $"); #include "opt_m68k_arch.h" @@ -51,7 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstr extern char *etext; -extern int maxmem, physmem; +extern int maxmem; +extern psize_t physmem; extern paddr_t avail_start, avail_end; /* Index: src/sys/arch/netwinder/netwinder/netwinder_machdep.c diff -u src/sys/arch/netwinder/netwinder/netwinder_machdep.c:1.84 src/sys/arch/netwinder/netwinder/netwinder_machdep.c:1.85 --- src/sys/arch/netwinder/netwinder/netwinder_machdep.c:1.84 Thu Dec 22 14:47:58 2016 +++ src/sys/arch/netwinder/netwinder/netwinder_machdep.c Thu Dec 22 16:05:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: netwinder_machdep.c,v 1.84 2016/12/22 14:47:58 cherry Exp $ */ +/* $NetBSD: netwinder_machdep.c,v 1.85 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.84 2016/12/22 14:47:58 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.85 2016/12/22 16:05:15 cherry Exp $"); #include "opt_ddb.h" #include "opt_pmap_debug.h" @@ -477,7 +477,7 @@ initarm(void *arg) physmem = (physical_end - physical_start) / PAGE_SIZE; /* Tell the user about the memory */ - printf("physmemory: %d pages at 0x%08lx -> 0x%08lx\n", physmem, + printf("physmemory: %"PRIxPSIZE" pages at 0x%08lx -> 0x%08lx\n", physmem, physical_start, physical_end - 1); /* Index: src/sys/arch/x68k/x68k/pmap_bootstrap.c diff -u src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.60 src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.61 --- src/sys/arch/x68k/x68k/pmap_bootstrap.c:1.60 Sun Oct 27 02:06:06 2013 +++ src/sys/arch/x68k/x68k/pmap_bootstrap.c Thu Dec 22 16:05:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.60 2013/10/27 02:06:06 tsutsui Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.61 2016/12/22 16:05:15 cherry Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.60 2013/10/27 02:06:06 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstra
CVS commit: src/sys/uvm
Module Name:src Committed By: cherry Date: Thu Dec 22 15:54:35 UTC 2016 Modified Files: src/sys/uvm: uvm_physseg.h Log Message: Turn off uvm_hotplug option selection until we actually have it. Should fix the build. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/uvm_physseg.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/uvm/uvm_physseg.h diff -u src/sys/uvm/uvm_physseg.h:1.2 src/sys/uvm/uvm_physseg.h:1.3 --- src/sys/uvm/uvm_physseg.h:1.2 Thu Dec 22 08:15:20 2016 +++ src/sys/uvm/uvm_physseg.h Thu Dec 22 15:54:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_physseg.h,v 1.2 2016/12/22 08:15:20 cherry Exp $ */ +/* $NetBSD: uvm_physseg.h,v 1.3 2016/12/22 15:54:35 cherry Exp $ */ /* * Consolidated API from uvm_page.c and others. @@ -9,8 +9,10 @@ #define _UVM_UVM_PHYSSEG_H_ #if defined(_KERNEL_OPT) +#if notyet #include "opt_uvm_hotplug.h" #endif +#endif #include #include
CVS commit: src/sys/arch
Module Name:src Committed By: cherry Date: Thu Dec 22 14:48:00 UTC 2016 Modified Files: src/sys/arch/acorn26/acorn26: start.c src/sys/arch/acorn32/acorn32: rpc_machdep.c src/sys/arch/acorn32/eb7500atx: eb7500atx_machdep.c src/sys/arch/algor/algor: machdep.c src/sys/arch/alpha/alpha: machdep.c src/sys/arch/amd64/amd64: machdep.c src/sys/arch/amiga/amiga: pmap_bootstrap.c src/sys/arch/amigappc/amigappc: machdep.c src/sys/arch/arc/arc: machdep.c src/sys/arch/arm/arm32: arm32_boot.c src/sys/arch/arm/at91: at91bus.c src/sys/arch/atari/atari: pmap_bootstrap.c src/sys/arch/cobalt/cobalt: machdep.c src/sys/arch/emips/emips: machdep.c src/sys/arch/epoc32/epoc32: machdep.c src/sys/arch/evbarm/adi_brh: brh_machdep.c src/sys/arch/evbarm/armadillo: armadillo9_machdep.c src/sys/arch/evbarm/g42xxeb: g42xxeb_machdep.c src/sys/arch/evbarm/gemini: gemini_machdep.c src/sys/arch/evbarm/hdl_g: hdlg_machdep.c src/sys/arch/evbarm/imx31: imx31lk_machdep.c src/sys/arch/evbarm/iq80310: iq80310_machdep.c src/sys/arch/evbarm/iq80321: iq80321_machdep.c src/sys/arch/evbarm/ixdp425: ixdp425_machdep.c src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c src/sys/arch/evbarm/lubbock: lubbock_machdep.c src/sys/arch/evbarm/mini2440: mini2440_machdep.c src/sys/arch/evbarm/npwr_fc: npwr_fc_machdep.c src/sys/arch/evbarm/nslu2: nslu2_machdep.c src/sys/arch/evbarm/osk5912: osk5912_machdep.c src/sys/arch/evbarm/smdk2xx0: smdk2410_machdep.c smdk2800_machdep.c src/sys/arch/evbarm/tisdp24xx: sdp24xx_machdep.c src/sys/arch/evbarm/tsarm: tsarm_machdep.c src/sys/arch/evbarm/viper: viper_machdep.c src/sys/arch/evbmips/adm5120: machdep.c src/sys/arch/evbmips/alchemy: machdep.c src/sys/arch/evbmips/atheros: machdep.c src/sys/arch/evbmips/cavium: machdep.c src/sys/arch/evbmips/gdium: machdep.c src/sys/arch/evbmips/ingenic: machdep.c src/sys/arch/evbmips/loongson: machdep.c src/sys/arch/evbmips/malta: machdep.c src/sys/arch/evbmips/rasoc: machdep.c src/sys/arch/evbmips/rmixl: machdep.c src/sys/arch/evbppc/ev64260: machdep.c src/sys/arch/evbppc/mpc85xx: machdep.c src/sys/arch/evbppc/pmppc: machdep.c src/sys/arch/ews4800mips/ews4800mips: machdep.c src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c src/sys/arch/hpcmips/hpcmips: machdep.c src/sys/arch/hppa/hppa: pmap.c src/sys/arch/i386/i386: machdep.c src/sys/arch/ia64/ia64: machdep.c src/sys/arch/iyonix/iyonix: iyonix_machdep.c src/sys/arch/m68k/m68k: pmap_motorola.c src/sys/arch/mipsco/mipsco: machdep.c src/sys/arch/netwinder/netwinder: netwinder_machdep.c src/sys/arch/newsmips/newsmips: machdep.c src/sys/arch/playstation2/playstation2: machdep.c src/sys/arch/pmax/pmax: machdep.c src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c pmap.c src/sys/arch/powerpc/oea: ofwoea_machdep.c prep_machdep.c src/sys/arch/rs6000/rs6000: machdep.c src/sys/arch/sandpoint/sandpoint: machdep.c src/sys/arch/sbmips/sbmips: machdep.c src/sys/arch/sgimips/sgimips: machdep.c src/sys/arch/sh3/sh3: sh3_machdep.c src/sys/arch/shark/ofw: ofw.c src/sys/arch/sparc/sparc: pmap.c src/sys/arch/sparc64/sparc64: pmap.c src/sys/arch/sun2/sun2: pmap.c src/sys/arch/sun3/sun3: pmap.c src/sys/arch/sun3/sun3x: pmap.c src/sys/arch/usermode/usermode: machdep.c src/sys/arch/vax/vax: pmap.c src/sys/arch/zaurus/zaurus: machdep.c Log Message: switch all ports to use uvm_init.c:uvm_md_init() uvm_setpagesize() is now subsumed within this funciton. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/acorn26/acorn26/start.c cvs rdiff -u -r1.90 -r1.91 src/sys/arch/acorn32/acorn32/rpc_machdep.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/algor/algor/machdep.c cvs rdiff -u -r1.347 -r1.348 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.240 -r1.241 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/amiga/amiga/pmap_bootstrap.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/amigappc/amigappc/machdep.c cvs rdiff -u -r1.129 -r1.130 src/sys/arch/arc/arc/machdep.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/arm32/arm32_boot.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/at91/at91bus.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/atari/pmap_bootstrap.c cvs rdiff -u -r1.118 -r1.119 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/emips/emips/machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/epoc32/epoc32/mac
CVS commit: src/sys/kern
Module Name:src Committed By: mlelstv Date: Thu Dec 22 14:11:58 UTC 2016 Modified Files: src/sys/kern: kern_runq.c Log Message: When balancing threads over multiple CPUs, use fixpoint arithmetic for averages. Otherwise the decisions can be heavily biased by rounding errors. Add sysctl kern.sched_average_weight to change the weight of historical data, the default is 50%. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/kern/kern_runq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_runq.c diff -u src/sys/kern/kern_runq.c:1.45 src/sys/kern/kern_runq.c:1.46 --- src/sys/kern/kern_runq.c:1.45 Thu Jul 7 06:55:43 2016 +++ src/sys/kern/kern_runq.c Thu Dec 22 14:11:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_runq.c,v 1.45 2016/07/07 06:55:43 msaitoh Exp $ */ +/* $NetBSD: kern_runq.c,v 1.46 2016/12/22 14:11:58 mlelstv Exp $ */ /* * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.45 2016/07/07 06:55:43 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.46 2016/12/22 14:11:58 mlelstv Exp $"); #include "opt_dtrace.h" @@ -80,7 +80,7 @@ typedef struct { uint32_t r_bitmap[PRI_COUNT >> BITMAP_SHIFT]; /* Counters */ u_int r_count; /* Count of the threads */ - u_int r_avgcount; /* Average count of threads */ + u_int r_avgcount; /* Average count of threads (* 256) */ u_int r_mcount; /* Count of migratable threads */ /* Runqueues */ queue_t r_rt_queue[PRI_RT_COUNT]; @@ -118,6 +118,7 @@ int sched_kpreempt_pri = 1000; static u_int cacheht_time; /* Cache hotness time */ static u_int min_catch; /* Minimal LWP count for catching */ static u_int balance_period; /* Balance period */ +static u_int average_weight; /* Weight old thread count average */ static struct cpu_info *worker_ci; /* Victim CPU */ #ifdef MULTIPROCESSOR static struct callout balance_ch; /* Callout of balancer */ @@ -138,6 +139,8 @@ runq_init(void) /* Minimal count of LWPs for catching */ min_catch = 1; + /* Weight of historical average */ + average_weight = 50; /* 0.5 */ /* Initialize balancing callout and run it */ #ifdef MULTIPROCESSOR @@ -525,6 +528,10 @@ sched_balance(void *nocallout) runqueue_t *ci_rq; CPU_INFO_ITERATOR cii; u_int highest; + u_int weight; + + /* sanitize sysctl value */ + weight = MIN(average_weight, 100); hci = curcpu(); highest = 0; @@ -533,8 +540,15 @@ sched_balance(void *nocallout) for (CPU_INFO_FOREACH(cii, ci)) { ci_rq = ci->ci_schedstate.spc_sched_info; - /* Average count of the threads */ - ci_rq->r_avgcount = (ci_rq->r_avgcount + ci_rq->r_mcount) >> 1; + /* + * Average count of the threads + * + * The average is computed as a fixpoint number with + * 8 fractional bits. + */ + ci_rq->r_avgcount = ( + weight * ci_rq->r_avgcount + (100 - weight) * 256 * ci_rq->r_mcount + ) / 100; /* Look for CPU with the highest average */ if (ci_rq->r_avgcount > highest) { @@ -840,6 +854,12 @@ SYSCTL_SETUP(sysctl_sched_setup, "sysctl CTL_CREATE, CTL_EOL); sysctl_createv(clog, 0, &node, NULL, CTLFLAG_PERMANENT | CTLFLAG_READWRITE, + CTLTYPE_INT, "average_weight", + SYSCTL_DESCR("Thread count averaging weight (in percent)"), + NULL, 0, &average_weight, 0, + CTL_CREATE, CTL_EOL); + sysctl_createv(clog, 0, &node, NULL, + CTLFLAG_PERMANENT | CTLFLAG_READWRITE, CTLTYPE_INT, "min_catch", SYSCTL_DESCR("Minimal count of threads for catching"), NULL, 0, &min_catch, 0,
CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Thu Dec 22 13:42:15 UTC 2016 Modified Files: src/sys/dev: dksubr.c dkvar.h src/sys/sys: param.h Log Message: Fix race condition in dksubr, where a dk_start from another thread or interrupt was ignored while the queue was processed. Bump kernel revision for changed dk_softc. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/dev/dksubr.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/dkvar.h cvs rdiff -u -r1.518 -r1.519 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dksubr.c diff -u src/sys/dev/dksubr.c:1.93 src/sys/dev/dksubr.c:1.94 --- src/sys/dev/dksubr.c:1.93 Thu Dec 8 12:22:56 2016 +++ src/sys/dev/dksubr.c Thu Dec 22 13:42:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.93 2016/12/08 12:22:56 mlelstv Exp $ */ +/* $NetBSD: dksubr.c,v 1.94 2016/12/22 13:42:14 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.93 2016/12/08 12:22:56 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.94 2016/12/22 13:42:14 mlelstv Exp $"); #include #include @@ -378,9 +378,16 @@ dk_start(struct dk_softc *dksc, struct b if (bp != NULL) bufq_put(dksc->sc_bufq, bp); - if (dksc->sc_busy) + /* + * If another thread is running the queue, increment + * busy counter to 2 so that the queue is retried, + * because the driver may now accept additional + * requests. + */ + if (dksc->sc_busy < 2) + dksc->sc_busy++; + if (dksc->sc_busy > 1) goto done; - dksc->sc_busy = true; /* * Peeking at the buffer queue and committing the operation @@ -393,34 +400,37 @@ dk_start(struct dk_softc *dksc, struct b * This keeps order of I/O operations, unlike bufq_put. */ - bp = dksc->sc_deferred; - dksc->sc_deferred = NULL; + while (dksc->sc_busy > 0) { - if (bp == NULL) - bp = bufq_get(dksc->sc_bufq); + bp = dksc->sc_deferred; + dksc->sc_deferred = NULL; - while (bp != NULL) { + if (bp == NULL) + bp = bufq_get(dksc->sc_bufq); - disk_busy(&dksc->sc_dkdev); - mutex_exit(&dksc->sc_iolock); - error = dkd->d_diskstart(dksc->sc_dev, bp); - mutex_enter(&dksc->sc_iolock); - if (error == EAGAIN) { - dksc->sc_deferred = bp; - disk_unbusy(&dksc->sc_dkdev, 0, (bp->b_flags & B_READ)); - break; - } + while (bp != NULL) { + + disk_busy(&dksc->sc_dkdev); + mutex_exit(&dksc->sc_iolock); + error = dkd->d_diskstart(dksc->sc_dev, bp); + mutex_enter(&dksc->sc_iolock); + if (error == EAGAIN) { +dksc->sc_deferred = bp; +disk_unbusy(&dksc->sc_dkdev, 0, (bp->b_flags & B_READ)); +break; + } + + if (error != 0) { +bp->b_error = error; +bp->b_resid = bp->b_bcount; +dk_done1(dksc, bp, false); + } - if (error != 0) { - bp->b_error = error; - bp->b_resid = bp->b_bcount; - dk_done1(dksc, bp, false); + bp = bufq_get(dksc->sc_bufq); } - bp = bufq_get(dksc->sc_bufq); + dksc->sc_busy--; } - - dksc->sc_busy = false; done: mutex_exit(&dksc->sc_iolock); } Index: src/sys/dev/dkvar.h diff -u src/sys/dev/dkvar.h:1.27 src/sys/dev/dkvar.h:1.28 --- src/sys/dev/dkvar.h:1.27 Mon Oct 24 17:14:27 2016 +++ src/sys/dev/dkvar.h Thu Dec 22 13:42:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dkvar.h,v 1.27 2016/10/24 17:14:27 jdolecek Exp $ */ +/* $NetBSD: dkvar.h,v 1.28 2016/12/22 13:42:14 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ struct dk_softc { struct bufq_state *sc_bufq; /* buffer queue */ int sc_dtype; /* disk type */ struct buf *sc_deferred; /* retry after start failed */ - bool sc_busy; /* processing buffers */ + int sc_busy; /* processing buffers */ krndsource_t sc_rnd_source; /* entropy source */ }; Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.518 src/sys/sys/param.h:1.519 --- src/sys/sys/param.h:1.518 Fri Dec 16 23:37:21 2016 +++ src/sys/sys/param.h Thu Dec 22 13:42:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.518 2016/12/16 23:37:21 riastradh Exp $ */ +/* $NetBSD: param.h,v 1.519 2016/12/22 13:42:14 mlelstv Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799005100 /* NetBSD 7.99.51 */ +#define __NetBSD_Version__ 799005200 /* NetBSD 7.99.52 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/sys/uvm
Module Name:src Committed By: cherry Date: Thu Dec 22 13:26:25 UTC 2016 Modified Files: src/sys/uvm: Makefile uvm.h uvm_extern.h uvm_page.c Log Message: Use uvm_physseg.h:uvm_page_physload() instead of uvm_extern.h For this, include uvm_physseg.h in the build and include tree, make a cosmetic modification to the prototype for uvm_page_physload(). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/uvm/Makefile cvs rdiff -u -r1.66 -r1.67 src/sys/uvm/uvm.h cvs rdiff -u -r1.199 -r1.200 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.187 -r1.188 src/sys/uvm/uvm_page.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/Makefile diff -u src/sys/uvm/Makefile:1.9 src/sys/uvm/Makefile:1.10 --- src/sys/uvm/Makefile:1.9 Sat Feb 11 12:45:07 2006 +++ src/sys/uvm/Makefile Thu Dec 22 13:26:24 2016 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.9 2006/02/11 12:45:07 yamt Exp $ +# $NetBSD: Makefile,v 1.10 2016/12/22 13:26:24 cherry Exp $ INCSDIR= /usr/include/uvm INCS= uvm.h uvm_amap.h uvm_anon.h uvm_aobj.h uvm_device.h \ uvm_extern.h uvm_fault.h uvm_fault_i.h uvm_glue.h \ uvm_km.h uvm_loan.h \ - uvm_map.h uvm_object.h uvm_page.h \ + uvm_map.h uvm_object.h uvm_page.h uvm_physseg.h \ uvm_pager.h uvm_param.h uvm_pdaemon.h uvm_pglist.h \ uvm_pmap.h uvm_prot.h uvm_stat.h \ uvm_swap.h Index: src/sys/uvm/uvm.h diff -u src/sys/uvm/uvm.h:1.66 src/sys/uvm/uvm.h:1.67 --- src/sys/uvm/uvm.h:1.66 Mon Apr 13 22:04:44 2015 +++ src/sys/uvm/uvm.h Thu Dec 22 13:26:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm.h,v 1.66 2015/04/13 22:04:44 riastradh Exp $ */ +/* $NetBSD: uvm.h,v 1.67 2016/12/22 13:26:24 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -57,6 +57,7 @@ #include #include #include +#include #include #include Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.199 src/sys/uvm/uvm_extern.h:1.200 --- src/sys/uvm/uvm_extern.h:1.199 Thu Dec 22 12:55:21 2016 +++ src/sys/uvm/uvm_extern.h Thu Dec 22 13:26:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.199 2016/12/22 12:55:21 cherry Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.200 2016/12/22 13:26:24 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -475,6 +475,14 @@ extern bool vm_page_zero_enable; #endif /* + * Include the uvm_hotplug(9) API unconditionally until + * uvm_page_physload() et. al. are obsoleted + * + * After this, MD code will have to explicitly include it if needed. + */ +#include + +/* * helpers for calling ubc_release() */ #ifdef PMAP_CACHE_VIVT @@ -709,9 +717,6 @@ void uvm_pagereplace(struct vm_page *, struct vm_page *); void uvm_pagerealloc(struct vm_page *, struct uvm_object *, voff_t); -/* Actually, uvm_page_physload takes PF#s which need their own type */ -void uvm_page_physload(paddr_t, paddr_t, paddr_t, - paddr_t, int); void uvm_setpagesize(void); /* uvm_pager.c */ Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.187 src/sys/uvm/uvm_page.c:1.188 --- src/sys/uvm/uvm_page.c:1.187 Sat Apr 11 19:24:13 2015 +++ src/sys/uvm/uvm_page.c Thu Dec 22 13:26:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.187 2015/04/11 19:24:13 joerg Exp $ */ +/* $NetBSD: uvm_page.c,v 1.188 2016/12/22 13:26:25 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.187 2015/04/11 19:24:13 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.188 2016/12/22 13:26:25 cherry Exp $"); #include "opt_ddb.h" #include "opt_uvm.h" @@ -735,7 +735,7 @@ uvm_page_physget(paddr_t *paddrp) * => we are limited to VM_PHYSSEG_MAX physical memory segments */ -void +uvm_physseg_t uvm_page_physload(paddr_t start, paddr_t end, paddr_t avail_start, paddr_t avail_end, int free_list) { @@ -761,7 +761,7 @@ uvm_page_physload(paddr_t start, paddr_t printf("\t%d segments allocated, ignoring 0x%llx -> 0x%llx\n", VM_PHYSSEG_MAX, (long long)start, (long long)end); printf("\tincrease VM_PHYSSEG_MAX\n"); - return; + return 0; } /* @@ -840,6 +840,8 @@ uvm_page_physload(paddr_t start, paddr_t if (!preload) { uvmpdpol_reinit(); } + + return 0; } /*
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: maya Date: Thu Dec 22 12:57:18 UTC 2016 Modified Files: src/distrib/sets/lists/comp: mi Log Message: fix release build after the addition of uvm_hotplug man9 page by adding it to the set lists. To generate a diff of this commit: cvs rdiff -u -r1.2081 -r1.2082 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.2081 src/distrib/sets/lists/comp/mi:1.2082 --- src/distrib/sets/lists/comp/mi:1.2081 Fri Dec 16 22:11:04 2016 +++ src/distrib/sets/lists/comp/mi Thu Dec 22 12:57:18 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2081 2016/12/16 22:11:04 christos Exp $ +# $NetBSD: mi,v 1.2082 2016/12/22 12:57:18 maya Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -11130,6 +11130,7 @@ ./usr/share/man/cat9/uvm_init.0 comp-sys-catman .cat ./usr/share/man/cat9/uvm_init_limits.0 comp-sys-catman .cat ./usr/share/man/cat9/uvm_io.0 comp-sys-catman .cat +./usr/share/man/cat9/uvm_hotplug.0 comp-sys-catman .cat ./usr/share/man/cat9/uvm_kernacc.0 comp-sys-catman .cat ./usr/share/man/cat9/uvm_km.0 comp-sys-catman .cat ./usr/share/man/cat9/uvm_km_alloc.0 comp-sys-catman .cat @@ -18317,6 +18318,7 @@ ./usr/share/man/html9/uvm_init.html comp-sys-htmlman html ./usr/share/man/html9/uvm_init_limits.html comp-sys-htmlman html ./usr/share/man/html9/uvm_io.html comp-sys-htmlman html +./usr/share/man/html9/uvm_hotplug.html comp-sys-htmlman html ./usr/share/man/html9/uvm_kernacc.html comp-sys-htmlman html ./usr/share/man/html9/uvm_km.html comp-sys-htmlman html ./usr/share/man/html9/uvm_km_alloc.html comp-sys-htmlman html @@ -25716,6 +25718,7 @@ ./usr/share/man/man9/uvm_init.9 comp-sys-man .man ./usr/share/man/man9/uvm_init_limits.9 comp-sys-man .man ./usr/share/man/man9/uvm_io.9 comp-sys-man .man +./usr/share/man/man9/uvm_hotplug.9 comp-sys-man .man ./usr/share/man/man9/uvm_kernacc.9 comp-sys-man .man ./usr/share/man/man9/uvm_km.9 comp-sys-man .man ./usr/share/man/man9/uvm_km_alloc.9 comp-sys-man .man
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: ozaki-r Date: Thu Dec 22 12:55:28 UTC 2016 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Fix that rump.ifconfig shmifN destroy hangs up rump.ifconfig shmifN destroy sometimes hangs up on closing a file descriptor of kqueue under heavy load. It seems it happens because of a race condition between closing a fd and kevent to the same fd on another kthread for packet Rx. Fix it by executing the close operation after the kthread left. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/rump/net/lib/libshmif/if_shmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.71 src/sys/rump/net/lib/libshmif/if_shmem.c:1.72 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.71 Thu Dec 22 10:13:09 2016 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Thu Dec 22 12:55:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.71 2016/12/22 10:13:09 ozaki-r Exp $ */ +/* $NetBSD: if_shmem.c,v 1.72 2016/12/22 12:55:28 ozaki-r Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.71 2016/12/22 10:13:09 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.72 2016/12/22 12:55:28 ozaki-r Exp $"); #include #include @@ -374,7 +374,6 @@ shmif_unclone(struct ifnet *ifp) shmif_stop(ifp, 1); if_down(ifp); - finibackend(sc); mutex_enter(&sc->sc_mtx); sc->sc_dying = true; @@ -385,6 +384,13 @@ shmif_unclone(struct ifnet *ifp) kthread_join(sc->sc_rcvl); sc->sc_rcvl = NULL; + /* + * Need to be called after the kthread left, otherwise closing kqueue + * (sc_kq) hangs sometimes perhaps because of a race condition between + * close and kevent in the kthread on the kqueue. + */ + finibackend(sc); + vmem_xfree(shmif_units, sc->sc_unit+1, 1); ether_ifdetach(ifp);
CVS commit: src/sys/uvm
Module Name:src Committed By: cherry Date: Thu Dec 22 12:55:21 UTC 2016 Modified Files: src/sys/uvm: uvm_extern.h uvm_init.c Log Message: Add a new function called uvm_md_init() that can be called at the appropriate time in the boot path by MD code. To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.46 -r1.47 src/sys/uvm/uvm_init.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_extern.h diff -u src/sys/uvm/uvm_extern.h:1.198 src/sys/uvm/uvm_extern.h:1.199 --- src/sys/uvm/uvm_extern.h:1.198 Wed Jul 20 12:38:43 2016 +++ src/sys/uvm/uvm_extern.h Thu Dec 22 12:55:21 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.198 2016/07/20 12:38:43 maxv Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.199 2016/12/22 12:55:21 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -619,6 +619,7 @@ void uvm_cpu_attach(struct cpu_info *) /* uvm_init.c */ +void uvm_md_init(void); void uvm_init(void); /* uvm_io.c */ Index: src/sys/uvm/uvm_init.c diff -u src/sys/uvm/uvm_init.c:1.46 src/sys/uvm/uvm_init.c:1.47 --- src/sys/uvm/uvm_init.c:1.46 Fri Apr 3 01:03:42 2015 +++ src/sys/uvm/uvm_init.c Thu Dec 22 12:55:21 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_init.c,v 1.46 2015/04/03 01:03:42 riastradh Exp $ */ +/* $NetBSD: uvm_init.c,v 1.47 2016/12/22 12:55:21 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.46 2015/04/03 01:03:42 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.47 2016/12/22 12:55:21 cherry Exp $"); #include #include @@ -69,6 +69,17 @@ kmutex_t uvm_kentry_lock; kmutex_t uvm_swap_data_lock; /* + * uvm_md_init: Init dependant on the MD boot context. + * called from MD code. + */ + +void +uvm_md_init(void) +{ + uvm_setpagesize(); /* initialize PAGE_SIZE-dependent variables */ +} + +/* * uvm_init: init the VM system. called from kern/init_main.c. */
CVS commit: src/libexec/fingerd
Module Name:src Committed By: abhinav Date: Thu Dec 22 12:42:25 UTC 2016 Modified Files: src/libexec/fingerd: fingerd.8 Log Message: We don't have any ``name'' program, so remove its reference and use markup to refer finger(1). ok wiz@ To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/libexec/fingerd/fingerd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/fingerd/fingerd.8 diff -u src/libexec/fingerd/fingerd.8:1.20 src/libexec/fingerd/fingerd.8:1.21 --- src/libexec/fingerd/fingerd.8:1.20 Sun Nov 2 11:27:49 2003 +++ src/libexec/fingerd/fingerd.8 Thu Dec 22 12:42:24 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: fingerd.8,v 1.20 2003/11/02 11:27:49 wiz Exp $ +.\" $NetBSD: fingerd.8,v 1.21 2016/12/22 12:42:24 abhinav Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,8 @@ .Nm is a simple protocol based on RFC 1288 that provides an interface to the -Name and Finger programs at several network sites. +.Xr finger 1 +at several network sites. The program is supposed to return a friendly, human-oriented status report on either the system at the moment or a particular person in depth.
CVS commit: src/usr.bin/finger
Module Name:src Committed By: abhinav Date: Thu Dec 22 12:39:40 UTC 2016 Modified Files: src/usr.bin/finger: finger.1 Log Message: Instead of saying "The finger displays information..." say "The finger utility" (not sure if it was intentionally written like that :) Also, add an xref to fingerd(8) To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/finger/finger.1 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/finger/finger.1 diff -u src/usr.bin/finger/finger.1:1.18 src/usr.bin/finger/finger.1:1.19 --- src/usr.bin/finger/finger.1:1.18 Fri Dec 26 12:45:57 2014 +++ src/usr.bin/finger/finger.1 Thu Dec 22 12:39:40 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: finger.1,v 1.18 2014/12/26 12:45:57 christos Exp $ +.\" $NetBSD: finger.1,v 1.19 2016/12/22 12:39:40 abhinav Exp $ .\" .\" Copyright (c) 1989, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Sh DESCRIPTION The .Nm -displays information about the system users. +utility displays information about the system users. .Pp Options are: .Bl -tag -width flag @@ -180,8 +180,9 @@ If no arguments are specified, .Nm will print an entry for each user currently logged into the system. .Pp +The .Nm -may be used to look up users on a remote machine. +utility may be used to look up users on a remote machine. The format is to specify a .Ar user as @@ -205,7 +206,8 @@ last login data base .Sh SEE ALSO .Xr chpass 1 , .Xr w 1 , -.Xr who 1 +.Xr who 1 , +.Xr fingerd 8 .Sh HISTORY The .Nm
CVS commit: src/share/man/man9
Module Name:src Committed By: cherry Date: Thu Dec 22 11:46:48 UTC 2016 Modified Files: src/share/man/man9: Makefile Log Message: Add the uvm_hotplug.9 manpage to the build tree. To generate a diff of this commit: cvs rdiff -u -r1.398 -r1.399 src/share/man/man9/Makefile 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/Makefile diff -u src/share/man/man9/Makefile:1.398 src/share/man/man9/Makefile:1.399 --- src/share/man/man9/Makefile:1.398 Mon Nov 28 11:00:24 2016 +++ src/share/man/man9/Makefile Thu Dec 22 11:46:48 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.398 2016/11/28 11:00:24 mlelstv Exp $ +# $NetBSD: Makefile,v 1.399 2016/12/22 11:46:48 cherry Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -59,8 +59,8 @@ MAN= accept_filter.9 accf_data.9 accf_ht vattr.9 veriexec.9 vcons.9 vfs.9 vfs_hooks.9 vfsops.9 vfssubr.9 \ video.9 vme.9 \ vnfileops.9 vnode.9 vnodeops.9 vnsubr.9 \ - ubc.9 usbd_status.9 usbdi.9 uvm.9 uvm_km.9 uvm_map.9 vmem.9 \ - wapbl.9 wdc.9 workqueue.9 \ + ubc.9 usbd_status.9 usbdi.9 uvm.9 uvm_hotplug.9 uvm_km.9 uvm_map.9 \ + vmem.9 wapbl.9 wdc.9 workqueue.9 \ wscons.9 wsdisplay.9 wsfont.9 wskbd.9 wsmouse.9 \ xcall.9
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: mlelstv Date: Thu Dec 22 11:19:21 UTC 2016 Modified Files: src/sys/dev/scsipi: scsipi_base.c Log Message: fix comment. request_sense is called unlocked. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/dev/scsipi/scsipi_base.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/scsipi/scsipi_base.c diff -u src/sys/dev/scsipi/scsipi_base.c:1.174 src/sys/dev/scsipi/scsipi_base.c:1.175 --- src/sys/dev/scsipi/scsipi_base.c:1.174 Sun Dec 18 15:32:36 2016 +++ src/sys/dev/scsipi/scsipi_base.c Thu Dec 22 11:19:21 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_base.c,v 1.174 2016/12/18 15:32:36 skrll Exp $ */ +/* $NetBSD: scsipi_base.c,v 1.175 2016/12/22 11:19:21 mlelstv Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.174 2016/12/18 15:32:36 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.175 2016/12/22 11:19:21 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_scsi.h" @@ -1719,7 +1719,7 @@ scsipi_complete(struct scsipi_xfer *xs) /* * Issue a request sense for the given scsipi_xfer. Called when the xfer * returns with a CHECK_CONDITION status. Must be called in valid thread - * context and with channel lock held. + * context. */ static void
CVS commit: othersrc/usr.bin/guest2core
Module Name:othersrc Committed By: mlelstv Date: Thu Dec 22 10:31:17 UTC 2016 Added Files: othersrc/usr.bin/guest2core: Makefile README main.c Log Message: Translates the dump of qemu guest memory to a NetBSD core file. So far x86_64 only. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/usr.bin/guest2core/Makefile \ othersrc/usr.bin/guest2core/README othersrc/usr.bin/guest2core/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: othersrc/usr.bin/guest2core/Makefile diff -u /dev/null othersrc/usr.bin/guest2core/Makefile:1.1 --- /dev/null Thu Dec 22 10:31:17 2016 +++ othersrc/usr.bin/guest2core/Makefile Thu Dec 22 10:31:17 2016 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2016/12/22 10:31:17 mlelstv Exp $ +# @(#)Makefile8.1 (Berkeley) 6/6/93 + +.include + +WARNS= 3 +PROG= guest2core +SRCS= main.c +MAN= + +LDADD+= -lelf +DPADD+= ${LIBELF} + +.include Index: othersrc/usr.bin/guest2core/README diff -u /dev/null othersrc/usr.bin/guest2core/README:1.1 --- /dev/null Thu Dec 22 10:31:17 2016 +++ othersrc/usr.bin/guest2core/README Thu Dec 22 10:31:17 2016 @@ -0,0 +1,20 @@ + +This program translates the output of a qemu "dump-guest-memory" +command into a NetBSD core dump to be analyzed by crash or gdb. + +So far this is for x86_64 only. + +The x86_64 core dump needs a single parameter, the physical address +of the PDP to find the MMU tables to translate the phyiscal address +core dump to virtual (KVA) addresses used by libkvm. This value +needs to be passed to the program as an extra argument. + +The value is stored on the running guest in the kernel variable +PDPpaddr. The value doesn't change between runs but between +different kernels. + +You can get the value either from qemu console by looking at the +virtual memory of the guest or by attaching a remote gdb to qemu. +In either case you need an unstripped version of the guest kernel +to find the virtual address of PDPpaddr. + Index: othersrc/usr.bin/guest2core/main.c diff -u /dev/null othersrc/usr.bin/guest2core/main.c:1.1 --- /dev/null Thu Dec 22 10:31:17 2016 +++ othersrc/usr.bin/guest2core/main.c Thu Dec 22 10:31:17 2016 @@ -0,0 +1,227 @@ +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#define MID_MACHINE MID_X86_64 + +struct chunk { + u_quad_t adr; /* physical load address */ + u_quad_t sz; /* size */ + off_t pos; /* position in ELF file */ +}; + +static int +write_padding(int fd, size_t sz) +{ + static char padding[128]; + ssize_t out = 0; + + while (sz > sizeof(padding)) { + out += write(fd, padding, sizeof(padding)); + sz -= sizeof(padding); + } + if (sz > 0) + out += write(fd, padding, sz); + + printf("padding %zd\n",out); + + return out; +} + +static void +write_header(int fd, int n, struct chunk *chunk, uint64_t ptd) +{ + struct kcore_hdr hdr; + struct kcore_seg seg; + struct cpu_kcore_hdr cpu; + struct phys_ram_seg phys; + uint64_t total; + int i; + ssize_t hdrsz; + + hdrsz = 0; + + hdr.c_hdrsize = ALIGN(sizeof(hdr)); + hdr.c_seghdrsize = ALIGN(sizeof(seg)); + hdr.c_nseg = 2; + CORE_SETMAGIC(hdr, KCORE_MAGIC, MID_MACHINE, 0); + hdrsz += write(fd, &hdr, sizeof(hdr)); + hdrsz += write_padding(fd, hdr.c_hdrsize - sizeof(hdr)); + + seg.c_size = ALIGN(sizeof(cpu) + n * sizeof(phys)); + CORE_SETMAGIC(seg, KCORESEG_MAGIC, MID_MACHINE, CORE_CPU); + hdrsz += write(fd, &seg, sizeof(seg)); + hdrsz += write_padding(fd, hdr.c_seghdrsize - sizeof(seg)); + + cpu.ptdpaddr = ptd; + cpu.nmemsegs = n; + hdrsz += write(fd, &cpu, sizeof(cpu)); + + total = 0; + for (i=0; i chunklet) +chunksz = chunklet; + + buf = mmap(NULL, chunksz, +PROT_READ, +MAP_FILE | MAP_PRIVATE, +infd, chunk[i].pos + start); + if (buf == MAP_FAILED) +err(1, "mmap"); + + write(fd, buf, chunksz); + + munmap(buf, chunksz); + + start += chunksz; + } + } +} + +static void +errelf(int code, const char *mess) +{ + errx(code, "%s: %s", mess, elf_errmsg(-1)); +} + +static int +elf_load(int fd, struct chunk out[], int num) +{ + Elf *e; + GElf_Phdr phdr; + int i; + size_t n; + const char *typ; + int nout = 0; + + e = elf_begin(fd, ELF_C_READ, NULL); + if (e == NULL) errelf(1, "elf_begin"); + + if (elf_kind(e) != ELF_K_ELF) + errx(1, "Not an ELF object"); + + if ((i = gelf_getclass(e)) == ELFCLASSNONE) + errelf(1, "getclass"); + + printf("%d-bit ELF object\n", i == ELFCLASS32 ? 32 : 64); + + if (elf_getphdrnum(e, &n) != 0) + errelf(1, "getphdrnum"); + + printf("phnum %zu\n", n); + + for (i=0; i 0 && nout < num) { + out[nout].adr = phdr.p_paddr; + out[nout].sz = phdr.p_filesz; + out[nout].pos = phdr.p_offset; + ++nout; + } + } + + elf_end(e); + + return nout; +} + +int +main(int argc, char *argv[]) +{ + struct chunk C[10]; + int n, elffd, kvmfd; + uint64_t ptd; + + if (argc < 4) + errx(1, "usage: %s infile outfile ptd", argv
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: ozaki-r Date: Thu Dec 22 10:13:09 UTC 2016 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Fix handling return value of rumpcomp_shmif_watchwait To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/rump/net/lib/libshmif/if_shmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.70 src/sys/rump/net/lib/libshmif/if_shmem.c:1.71 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.70 Thu Dec 15 09:28:07 2016 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Thu Dec 22 10:13:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.70 2016/12/15 09:28:07 ozaki-r Exp $ */ +/* $NetBSD: if_shmem.c,v 1.71 2016/12/22 10:13:09 ozaki-r Exp $ */ /* * Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.70 2016/12/15 09:28:07 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.71 2016/12/22 10:13:09 ozaki-r Exp $"); #include #include @@ -685,8 +685,7 @@ shmif_rcv(void *arg) shmif_nextpktoff(busmem, busmem->shm_last) == sc->sc_nextpacket) { shmif_unlockbus(busmem); - error = 0; - rumpcomp_shmif_watchwait(sc->sc_kq); + error = rumpcomp_shmif_watchwait(sc->sc_kq); if (__predict_false(error)) printf("shmif_rcv: wait failed %d\n", error); membar_consumer();
CVS commit: src/usr.sbin/mountd
Module Name:src Committed By: abhinav Date: Thu Dec 22 09:44:56 UTC 2016 Modified Files: src/usr.sbin/mountd: mountd.8 Log Message: Add xrefs to ipsec_set_policy(3) and signal(7) To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/mountd/mountd.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/mountd/mountd.8 diff -u src/usr.sbin/mountd/mountd.8:1.36 src/usr.sbin/mountd/mountd.8:1.37 --- src/usr.sbin/mountd/mountd.8:1.36 Wed Nov 2 20:27:33 2011 +++ src/usr.sbin/mountd/mountd.8 Thu Dec 22 09:44:56 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: mountd.8,v 1.36 2011/11/02 20:27:33 wiz Exp $ +.\" $NetBSD: mountd.8,v 1.37 2016/12/22 09:44:56 abhinav Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -138,7 +138,9 @@ the list of remotely mounted filesystems .Sh SEE ALSO .Xr nfsstat 1 , .Xr nfssvc 2 , +.Xr ipsec_set_policy 3 , .Xr exports 5 , +.Xr signal 7 , .Xr nfsd 8 , .Xr rpcbind 8 , .Xr showmount 8
CVS commit: src
Module Name:src Committed By: cherry Date: Thu Dec 22 08:15:20 UTC 2016 Modified Files: src/sys/uvm: uvm_physseg.c uvm_physseg.h src/tests/sys/uvm: t_uvm_physseg.c t_uvm_physseg_load.c Log Message: convention about function names for predicate checking: s/uvm_physseg_valid()/uvm_physseg_valid_p()/ per. matt@ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/uvm/uvm_physseg.c src/sys/uvm/uvm_physseg.h cvs rdiff -u -r1.1 -r1.2 src/tests/sys/uvm/t_uvm_physseg.c \ src/tests/sys/uvm/t_uvm_physseg_load.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_physseg.c diff -u src/sys/uvm/uvm_physseg.c:1.1 src/sys/uvm/uvm_physseg.c:1.2 --- src/sys/uvm/uvm_physseg.c:1.1 Mon Dec 19 12:21:29 2016 +++ src/sys/uvm/uvm_physseg.c Thu Dec 22 08:15:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_physseg.c,v 1.1 2016/12/19 12:21:29 cherry Exp $ */ +/* $NetBSD: uvm_physseg.c,v 1.2 2016/12/22 08:15:20 cherry Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -417,7 +417,7 @@ uvm_physseg_t uvm_physseg_get_next(uvm_physseg_t upm) { /* next of invalid is invalid, not fatal */ - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return UVM_PHYSSEG_TYPE_INVALID; return (uvm_physseg_t) rb_tree_iterate(&(uvm_physseg_graph.rb_tree), upm, @@ -428,7 +428,7 @@ uvm_physseg_t uvm_physseg_get_prev(uvm_physseg_t upm) { /* prev of invalid is invalid, not fatal */ - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return UVM_PHYSSEG_TYPE_INVALID; return (uvm_physseg_t) rb_tree_iterate(&(uvm_physseg_graph.rb_tree), upm, @@ -603,7 +603,7 @@ int uvm_physseg_get_next(uvm_physseg_t lcv) { /* next of invalid is invalid, not fatal */ - if (uvm_physseg_valid(lcv) == false) + if (uvm_physseg_valid_p(lcv) == false) return UVM_PHYSSEG_TYPE_INVALID; return (lcv + 1); @@ -613,7 +613,7 @@ int uvm_physseg_get_prev(uvm_physseg_t lcv) { /* prev of invalid is invalid, not fatal */ - if (uvm_physseg_valid(lcv) == false) + if (uvm_physseg_valid_p(lcv) == false) return UVM_PHYSSEG_TYPE_INVALID; return (lcv - 1); @@ -778,7 +778,7 @@ uvm_physseg_plug(paddr_t pfn, size_t pag uvm_physseg_t upm; upm = uvm_physseg_find(pfn, &off); - if (uvm_physseg_valid(upm)) /* XXX; do we allow "update" plugs ? */ + if (uvm_physseg_valid_p(upm)) /* XXX; do we allow "update" plugs ? */ return false; #endif @@ -972,7 +972,7 @@ vm_physseg_find_linear(struct uvm_physse #endif /* UVM_HOTPLUG */ bool -uvm_physseg_valid(uvm_physseg_t upm) +uvm_physseg_valid_p(uvm_physseg_t upm) { struct uvm_physseg *ps; @@ -1007,7 +1007,7 @@ uvm_physseg_valid(uvm_physseg_t upm) paddr_t uvm_physseg_get_start(uvm_physseg_t upm) { - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return (paddr_t) -1; return HANDLE_TO_PHYSSEG_NODE(upm)->start; @@ -1016,7 +1016,7 @@ uvm_physseg_get_start(uvm_physseg_t upm) paddr_t uvm_physseg_get_end(uvm_physseg_t upm) { - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return (paddr_t) -1; return HANDLE_TO_PHYSSEG_NODE(upm)->end; @@ -1025,7 +1025,7 @@ uvm_physseg_get_end(uvm_physseg_t upm) paddr_t uvm_physseg_get_avail_start(uvm_physseg_t upm) { - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return (paddr_t) -1; return HANDLE_TO_PHYSSEG_NODE(upm)->avail_start; @@ -1034,7 +1034,7 @@ uvm_physseg_get_avail_start(uvm_physseg_ paddr_t uvm_physseg_get_avail_end(uvm_physseg_t upm) { - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return (paddr_t) -1; return HANDLE_TO_PHYSSEG_NODE(upm)->avail_end; @@ -1043,7 +1043,7 @@ uvm_physseg_get_avail_end(uvm_physseg_t struct vm_page * uvm_physseg_get_pg(uvm_physseg_t upm, paddr_t idx) { - KASSERT(uvm_physseg_valid(upm)); + KASSERT(uvm_physseg_valid_p(upm)); return &HANDLE_TO_PHYSSEG_NODE(upm)->pgs[idx]; } @@ -1051,7 +1051,7 @@ uvm_physseg_get_pg(uvm_physseg_t upm, pa struct pmap_physseg * uvm_physseg_get_pmseg(uvm_physseg_t upm) { - KASSERT(uvm_physseg_valid(upm)); + KASSERT(uvm_physseg_valid_p(upm)); return &(HANDLE_TO_PHYSSEG_NODE(upm)->pmseg); } #endif @@ -1059,21 +1059,21 @@ uvm_physseg_get_pmseg(uvm_physseg_t upm) int uvm_physseg_get_free_list(uvm_physseg_t upm) { - KASSERT(uvm_physseg_valid(upm)); + KASSERT(uvm_physseg_valid_p(upm)); return HANDLE_TO_PHYSSEG_NODE(upm)->free_list; } u_int uvm_physseg_get_start_hint(uvm_physseg_t upm) { - KASSERT(uvm_physseg_valid(upm)); + KASSERT(uvm_physseg_valid_p(upm)); return HANDLE_TO_PHYSSEG_NODE(upm)->start_hint; } bool uvm_physseg_set_start_hint(uvm_physseg_t upm, u_int start_hint) { - if (uvm_physseg_valid(upm) == false) + if (uvm_physseg_valid_p(upm) == false) return false; HANDLE_TO_PHYSSEG_N