CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Fri Mar 29 05:23:12 UTC 2019 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: Add entry for MIPS 25Kf. To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/sys/arch/mips/mips/mips_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.278 src/sys/arch/mips/mips/mips_machdep.c:1.279 --- src/sys/arch/mips/mips/mips_machdep.c:1.278 Fri Jun 9 06:43:30 2017 +++ src/sys/arch/mips/mips/mips_machdep.c Fri Mar 29 05:23:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.278 2017/06/09 06:43:30 skrll Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.279 2019/03/29 05:23:12 simonb Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.278 2017/06/09 06:43:30 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.279 2019/03/29 05:23:12 simonb Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -455,6 +455,8 @@ static const struct pridtab cputab[] = { MIPS64_FLAGS | CPU_MIPS_DOUBLE_COUNT, 0, 0, "5Kc" }, { MIPS_PRID_CID_MTI, MIPS_20Kc, -1, -1, -1, 0, MIPS64_FLAGS,0, 0, "20Kc" }, + { MIPS_PRID_CID_MTI, MIPS_25Kf, -1, -1, -1, 0, + MIPS64_FLAGS,0, 0, "25Kf" }, { MIPS_PRID_CID_MTI, MIPS_24K, -1, -1, -1, 0, MIPS32_FLAGS | CPU_MIPS_DOUBLE_COUNT, MIPS_CP0FL_USE |
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Fri Mar 29 03:11:32 UTC 2019 Modified Files: src/sys/arch/alpha/alpha: pmap.c Log Message: Fix a couple of latent MP issues in the Alpha pmap: - In pmap_activate(), even though we manipulate the active mask with atomic ops, the lev1map pointer needs to stay consistent, so we do, in fact, have to take the pmap lock there. - In pmap_emulate_reference(), some of the DEBUG checks done here are race-prone, so don't do them. (Leave them #if 0'd out for documentary purposes.) To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/arch/alpha/alpha/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/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.263 src/sys/arch/alpha/alpha/pmap.c:1.264 --- src/sys/arch/alpha/alpha/pmap.c:1.263 Fri Mar 1 04:29:20 2019 +++ src/sys/arch/alpha/alpha/pmap.c Fri Mar 29 03:11:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.263 2019/03/01 04:29:20 mrg Exp $ */ +/* $NetBSD: pmap.c,v 1.264 2019/03/29 03:11:32 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc. @@ -140,7 +140,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.263 2019/03/01 04:29:20 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.264 2019/03/29 03:11:32 thorpej Exp $"); #include #include @@ -2126,6 +2126,14 @@ pmap_activate(struct lwp *l) printf("pmap_activate(%p)\n", l); #endif + /* + * Lock the pmap across the work we do here; although the + * in-use mask is manipulated with an atomic op and the + * ASN info is per-cpu, the lev1map pointer needs to remain + * consistent across the entire call. + */ + PMAP_LOCK(pmap); + /* Mark the pmap in use by this processor. */ atomic_or_ulong(>pm_cpus, (1UL << cpu_id)); @@ -2133,6 +2141,8 @@ pmap_activate(struct lwp *l) pmap_asn_alloc(pmap, cpu_id); PMAP_ACTIVATE(pmap, l, cpu_id); + + PMAP_UNLOCK(pmap); } /* @@ -2140,10 +2150,6 @@ pmap_activate(struct lwp *l) * * Mark that the pmap used by the specified process is no longer * in use by the processor. - * - * The comment above pmap_activate() wrt. locking applies here, - * as well. Note that we use only a single `atomic' operation, - * so no locking is necessary. */ void pmap_deactivate(struct lwp *l) @@ -2156,7 +2162,8 @@ pmap_deactivate(struct lwp *l) #endif /* - * Mark the pmap no longer in use by this processor. + * Mark the pmap no longer in use by this processor. Because + * this is all we're doing, no need to take the pmap lock. */ atomic_and_ulong(>pm_cpus, ~(1UL << cpu_number())); } @@ -2635,7 +2642,7 @@ pmap_emulate_reference(struct lwp *l, va printf("*pte = 0x%lx\n", *pte); } #endif -#ifdef DEBUG/* These checks are more expensive */ +#if 0/*DEBUG*/ /* These checks are, expensive, racy, and unreliable. */ if (!pmap_pte_v(pte)) panic("pmap_emulate_reference: invalid pte"); if (type == ALPHA_MMCSR_FOW) {
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: christos Date: Fri Mar 29 02:09:14 UTC 2019 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: fix the build (pnbuf_cache move to vfs_init.c) To generate a diff of this commit: cvs rdiff -u -r1.332 -r1.333 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.332 src/sys/rump/librump/rumpkern/rump.c:1.333 --- src/sys/rump/librump/rumpkern/rump.c:1.332 Wed Dec 26 17:16:27 2018 +++ src/sys/rump/librump/rumpkern/rump.c Thu Mar 28 22:09:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.332 2018/12/26 22:16:27 thorpej Exp $ */ +/* $NetBSD: rump.c,v 1.333 2019/03/29 02:09:14 christos Exp $ */ /* * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.332 2018/12/26 22:16:27 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.333 2019/03/29 02:09:14 christos Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -112,6 +112,8 @@ static char rump_msgbuf[16*1024] __alig bool rump_ttycomponent = false; +pool_cache_t pnbuf_cache; + static void rump_aiodone_worker(struct work *wk, void *dummy) {
CVS commit: src/sys/arch/evbmips/sbmips
Module Name:src Committed By: simonb Date: Fri Mar 29 00:24:56 UTC 2019 Modified Files: src/sys/arch/evbmips/sbmips: machdep.c Log Message: Don't need an 'X' printf specifier if using PRIx64. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/sbmips/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/evbmips/sbmips/machdep.c diff -u src/sys/arch/evbmips/sbmips/machdep.c:1.3 src/sys/arch/evbmips/sbmips/machdep.c:1.4 --- src/sys/arch/evbmips/sbmips/machdep.c:1.3 Mon Nov 6 03:47:46 2017 +++ src/sys/arch/evbmips/sbmips/machdep.c Fri Mar 29 00:24:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.3 2017/11/06 03:47:46 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.4 2019/03/29 00:24:56 simonb Exp $ */ /* * Copyright 2000, 2001 @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.3 2017/11/06 03:47:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2019/03/29 00:24:56 simonb Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -224,7 +224,7 @@ mach_init(long fwhandle, long magic, lon mem_cluster_cnt = 0; while (cfe_enummem(idx, 0, , , ) == 0) { added = 0; - printf("Memory Block #%d start %08"PRIx64"X len %08"PRIx64"X: %s: ", + printf("Memory Block #%d start %08"PRIx64" len %08"PRIx64": %s: ", idx, start, len, (type == CFE_MI_AVAILABLE) ? "Available" : "Reserved"); if ((type == CFE_MI_AVAILABLE) &&
CVS commit: src/sys/arch/evbarm/nitrogen6
Module Name:src Committed By: christos Date: Fri Mar 29 00:13:26 UTC 2019 Modified Files: src/sys/arch/evbarm/nitrogen6: platform.h Log Message: include pte.h To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/nitrogen6/platform.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/evbarm/nitrogen6/platform.h diff -u src/sys/arch/evbarm/nitrogen6/platform.h:1.1 src/sys/arch/evbarm/nitrogen6/platform.h:1.2 --- src/sys/arch/evbarm/nitrogen6/platform.h:1.1 Thu Sep 25 01:05:28 2014 +++ src/sys/arch/evbarm/nitrogen6/platform.h Thu Mar 28 20:13:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: platform.h,v 1.1 2014/09/25 05:05:28 ryo Exp $ */ +/* $NetBSD: platform.h,v 1.2 2019/03/29 00:13:26 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -33,6 +33,7 @@ #define _EVBARM_NITROGEN_PLATFORM_H #include +#include /* * Memory will be mapped starting at 0x8000 through 0xbfff
CVS commit: src/sys/arch/sparc/stand/bootblk
Module Name:src Committed By: christos Date: Fri Mar 29 00:07:39 UTC 2019 Modified Files: src/sys/arch/sparc/stand/bootblk: Makefile Log Message: no more _LKM -> _MODULE To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sparc/stand/bootblk/Makefile 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/sparc/stand/bootblk/Makefile diff -u src/sys/arch/sparc/stand/bootblk/Makefile:1.16 src/sys/arch/sparc/stand/bootblk/Makefile:1.17 --- src/sys/arch/sparc/stand/bootblk/Makefile:1.16 Sat Oct 1 09:57:44 2016 +++ src/sys/arch/sparc/stand/bootblk/Makefile Thu Mar 28 20:07:39 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2016/10/01 13:57:44 christos Exp $ +# $NetBSD: Makefile,v 1.17 2019/03/29 00:07:39 christos Exp $ .include @@ -21,7 +21,7 @@ STRIPFLAG= USE_GENASSYM?= no INCLUDES= -I. -I$S/arch -I$S -I${S}/../common/include -nostdinc -CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM -D_KERNEL +CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_MODULE -D_KERNEL ffs.fth.h: genfth.cf machine sparc ${TOOL_GENASSYM} -f -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
CVS commit: src/sys/arch/sparc/include
Module Name:src Committed By: christos Date: Fri Mar 29 00:08:14 UTC 2019 Modified Files: src/sys/arch/sparc/include: vmparam.h Log Message: add more exceptions for standalone and modules To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sparc/include/vmparam.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/sparc/include/vmparam.h diff -u src/sys/arch/sparc/include/vmparam.h:1.45 src/sys/arch/sparc/include/vmparam.h:1.46 --- src/sys/arch/sparc/include/vmparam.h:1.45 Thu Mar 28 11:44:51 2019 +++ src/sys/arch/sparc/include/vmparam.h Thu Mar 28 20:08:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.45 2019/03/28 15:44:51 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.46 2019/03/29 00:08:13 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -72,7 +72,8 @@ #define PAGE_SHIFT PAGE_SHIFT_SUN4CM #elif CPU_NTYPES == 1 && defined(SUN4) #define PAGE_SHIFT PAGE_SHIFT_SUN4 -#elif defined(_KERNEL) && !defined(_RUMPKERNEL) +#elif defined(_KERNEL) && !defined(_RUMPKERNEL) \ +&& !defined(STANDALONE) && !defined(_MODULE) #error "Cannot determine page size" #else /* Default to max for userland */
CVS commit: src/lib/libcurses
Module Name:src Committed By: uwe Date: Thu Mar 28 23:24:22 UTC 2019 Modified Files: src/lib/libcurses: printw.c Log Message: winwrite - using addch() on individual bytes of e.g. UTF-8 encoding doesn't work that well. addstr() the whole buffer instead. This is still not enirely correct b/c printf can run out of stdio buffer mid-character for very long output, but deal with it later. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/printw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/printw.c diff -u src/lib/libcurses/printw.c:1.25 src/lib/libcurses/printw.c:1.26 --- src/lib/libcurses/printw.c:1.25 Thu Mar 21 21:28:55 2019 +++ src/lib/libcurses/printw.c Thu Mar 28 23:24:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: printw.c,v 1.25 2019/03/21 21:28:55 uwe Exp $ */ +/* $NetBSD: printw.c,v 1.26 2019/03/28 23:24:22 uwe Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)printw.c 8.3 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: printw.c,v 1.25 2019/03/21 21:28:55 uwe Exp $"); +__RCSID("$NetBSD: printw.c,v 1.26 2019/03/28 23:24:22 uwe Exp $"); #endif #endif/* not lint */ @@ -118,15 +118,12 @@ winwrite(void *cookie, const void *vbuf, { WINDOW *win = cookie; const char *buf = vbuf; - size_t c; + int status; + + status = waddnstr(win, buf, n); + if (status == ERR) + return -1; - for (c = 0; c < n; c++) { -#ifdef DEBUG - __CTRACE(__CTRACE_MISC, "__winwrite: %c\n", *buf); -#endif - if (waddch(win, (chtype) (*buf++ & __CHARTEXT)) == ERR) - return -1; - } return (ssize_t)n; } /*
CVS commit: src/external/bsd/mdocml/dist
Module Name:src Committed By: christos Date: Thu Mar 28 20:26:49 UTC 2019 Modified Files: src/external/bsd/mdocml/dist: out.c Log Message: PR/54069: Jason Thorpe: Prevent memory overrun. Can be easily reproduced with groff_ms.7 and -fsanitize=address. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/out.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/mdocml/dist/out.c diff -u src/external/bsd/mdocml/dist/out.c:1.3 src/external/bsd/mdocml/dist/out.c:1.4 --- src/external/bsd/mdocml/dist/out.c:1.3 Sun Mar 10 20:15:38 2019 +++ src/external/bsd/mdocml/dist/out.c Thu Mar 28 16:26:49 2019 @@ -235,6 +235,9 @@ tblcalc(struct rofftbl *tbl, const struc } else (*gp)->wanted -= width; } + if (g->endcol > maxcol) { + maxcol = g->endcol; + } if (done) { *gp = g->next; free(g);
CVS commit: src
Module Name:src Committed By: maxv Date: Thu Mar 28 19:00:41 UTC 2019 Modified Files: src/share/man/man4: nvmm.4 src/sys/arch/amd64/conf: GENERIC src/sys/dev/nvmm: files.nvmm nvmm.c Log Message: Move NVMM in the "any" class, so that it can be enabled in GENERIC. Add missing files in files.nvmm, and add NVMM (commented out) in the amd64 GENERIC. Remove the "caveats" section in the man page. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/nvmm.4 cvs rdiff -u -r1.520 -r1.521 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.1 -r1.2 src/sys/dev/nvmm/files.nvmm cvs rdiff -u -r1.11 -r1.12 src/sys/dev/nvmm/nvmm.c 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/man4/nvmm.4 diff -u src/share/man/man4/nvmm.4:1.3 src/share/man/man4/nvmm.4:1.4 --- src/share/man/man4/nvmm.4:1.3 Wed Feb 13 16:06:28 2019 +++ src/share/man/man4/nvmm.4 Thu Mar 28 19:00:40 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: nvmm.4,v 1.3 2019/02/13 16:06:28 maxv Exp $ +.\" $NetBSD: nvmm.4,v 1.4 2019/03/28 19:00:40 maxv Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 13, 2019 +.Dd March 28, 2019 .Dt NVMM 4 .Os .Sh NAME @@ -60,9 +60,3 @@ The .Nm driver was written by .An Maxime Villard . -.Sh CAVEATS -Currently, -.Nm -cannot be enabled in a kernel configuration, and must rather be -.Xr modload 8 Ns ed -dynamically from the filesystem. Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.520 src/sys/arch/amd64/conf/GENERIC:1.521 --- src/sys/arch/amd64/conf/GENERIC:1.520 Fri Mar 1 12:25:09 2019 +++ src/sys/arch/amd64/conf/GENERIC Thu Mar 28 19:00:40 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.520 2019/03/01 12:25:09 nonaka Exp $ +# $NetBSD: GENERIC,v 1.521 2019/03/28 19:00:40 maxv 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.520 $" +#ident "GENERIC-$Revision: 1.521 $" maxusers 64 # estimated number of users @@ -1169,6 +1169,7 @@ pseudo-device ksyms # /dev/ksyms pseudo-device lockstat # lock profiling pseudo-device bcsp # BlueCore Serial Protocol pseudo-device btuart # Bluetooth HCI UART (H4) +#pseudo-device nvmm # NetBSD Virtual Machine Monitor # a pseudo device needed for Coda # also needs CODA (above) pseudo-device vcoda # coda minicache <-> venus comm. Index: src/sys/dev/nvmm/files.nvmm diff -u src/sys/dev/nvmm/files.nvmm:1.1 src/sys/dev/nvmm/files.nvmm:1.2 --- src/sys/dev/nvmm/files.nvmm:1.1 Wed Nov 7 07:43:08 2018 +++ src/sys/dev/nvmm/files.nvmm Thu Mar 28 19:00:40 2019 @@ -1,11 +1,14 @@ -# $NetBSD: files.nvmm,v 1.1 2018/11/07 07:43:08 maxv Exp $ +# $NetBSD: files.nvmm,v 1.2 2019/03/28 19:00:40 maxv Exp $ defpseudo nvmm file dev/nvmm/nvmm.c nvmm ifdef amd64 +file dev/nvmm/x86/nvmm_x86.c nvmm file dev/nvmm/x86/nvmm_x86_svm.c nvmm file dev/nvmm/x86/nvmm_x86_svmfunc.S nvmm +file dev/nvmm/x86/nvmm_x86_vmx.c nvmm +file dev/nvmm/x86/nvmm_x86_vmxfunc.S nvmm endif Index: src/sys/dev/nvmm/nvmm.c diff -u src/sys/dev/nvmm/nvmm.c:1.11 src/sys/dev/nvmm/nvmm.c:1.12 --- src/sys/dev/nvmm/nvmm.c:1.11 Thu Mar 21 20:21:40 2019 +++ src/sys/dev/nvmm/nvmm.c Thu Mar 28 19:00:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm.c,v 1.11 2019/03/21 20:21:40 maxv Exp $ */ +/* $NetBSD: nvmm.c,v 1.12 2019/03/28 19:00:40 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.11 2019/03/21 20:21:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.12 2019/03/28 19:00:40 maxv Exp $"); #include #include @@ -933,7 +933,7 @@ nvmmattach(int nunits) /* nothing */ } -MODULE(MODULE_CLASS_DRIVER, nvmm, NULL); +MODULE(MODULE_CLASS_ANY, nvmm, NULL); static int nvmm_modcmd(modcmd_t cmd, void *arg)
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Thu Mar 28 18:12:24 UTC 2019 Modified Files: src/sys/kern: subr_pool.c vfs_init.c Log Message: Move pnbuf_cache into vfs_init.c, where it belongs. To generate a diff of this commit: cvs rdiff -u -r1.245 -r1.246 src/sys/kern/subr_pool.c cvs rdiff -u -r1.48 -r1.49 src/sys/kern/vfs_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/kern/subr_pool.c diff -u src/sys/kern/subr_pool.c:1.245 src/sys/kern/subr_pool.c:1.246 --- src/sys/kern/subr_pool.c:1.245 Wed Mar 27 18:27:46 2019 +++ src/sys/kern/subr_pool.c Thu Mar 28 18:12:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.245 2019/03/27 18:27:46 maxv Exp $ */ +/* $NetBSD: subr_pool.c,v 1.246 2019/03/28 18:12:24 maxv Exp $ */ /* * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.245 2019/03/27 18:27:46 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.246 2019/03/28 18:12:24 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -233,8 +233,6 @@ static struct pool pcg_large_pool; static struct pool cache_pool; static struct pool cache_cpu_pool; -pool_cache_t pnbuf_cache; /* pathname buffer cache */ - /* List of all caches. */ TAILQ_HEAD(,pool_cache) pool_cache_head = TAILQ_HEAD_INITIALIZER(pool_cache_head); Index: src/sys/kern/vfs_init.c diff -u src/sys/kern/vfs_init.c:1.48 src/sys/kern/vfs_init.c:1.49 --- src/sys/kern/vfs_init.c:1.48 Wed May 6 15:57:08 2015 +++ src/sys/kern/vfs_init.c Thu Mar 28 18:12:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_init.c,v 1.48 2015/05/06 15:57:08 hannken Exp $ */ +/* $NetBSD: vfs_init.c,v 1.49 2019/03/28 18:12:24 maxv Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.48 2015/05/06 15:57:08 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.49 2019/03/28 18:12:24 maxv Exp $"); #include #include @@ -94,6 +94,8 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v #define DODEBUG(A) #endif +pool_cache_t pnbuf_cache; + /* * The global list of vnode operations. */
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Thu Mar 28 15:45:24 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: re-enable jemalloc. To generate a diff of this commit: cvs rdiff -u -r1.1118 -r1.1119 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1118 src/share/mk/bsd.own.mk:1.1119 --- src/share/mk/bsd.own.mk:1.1118 Thu Mar 28 04:41:50 2019 +++ src/share/mk/bsd.own.mk Thu Mar 28 11:45:23 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1118 2019/03/28 08:41:50 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1119 2019/03/28 15:45:23 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -172,14 +172,7 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # What version of jemalloc we use (100 is the one # built-in to libc from 2005 (pre version 3). # -.if ${MACHINE_CPU} == "x86_64" || \ -${MACHINE_CPU} == "i386" || \ -${MACHINE_CPU} == "aarch64" || \ -${MACHINE} == "sparc64" HAVE_JEMALLOC?= 510 -.else -HAVE_JEMALLOC?= 100 -.endif .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
CVS commit: src/sys/arch/sparc/include
Module Name:src Committed By: christos Date: Thu Mar 28 15:44:51 UTC 2019 Modified Files: src/sys/arch/sparc/include: vmparam.h Log Message: make rump work again.. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sparc/include/vmparam.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/sparc/include/vmparam.h diff -u src/sys/arch/sparc/include/vmparam.h:1.44 src/sys/arch/sparc/include/vmparam.h:1.45 --- src/sys/arch/sparc/include/vmparam.h:1.44 Wed Mar 27 15:01:44 2019 +++ src/sys/arch/sparc/include/vmparam.h Thu Mar 28 11:44:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.44 2019/03/27 19:01:44 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.45 2019/03/28 15:44:51 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -72,7 +72,7 @@ #define PAGE_SHIFT PAGE_SHIFT_SUN4CM #elif CPU_NTYPES == 1 && defined(SUN4) #define PAGE_SHIFT PAGE_SHIFT_SUN4 -#elif defined(_KERNEL) +#elif defined(_KERNEL) && !defined(_RUMPKERNEL) #error "Cannot determine page size" #else /* Default to max for userland */
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Thu Mar 28 15:05:03 UTC 2019 Modified Files: src/lib/libc/stdlib: jemalloc.c Log Message: fix compilation for non _REENTRANT To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libc/stdlib/jemalloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.45 src/lib/libc/stdlib/jemalloc.c:1.46 --- src/lib/libc/stdlib/jemalloc.c:1.45 Wed Jul 25 16:05:35 2018 +++ src/lib/libc/stdlib/jemalloc.c Thu Mar 28 11:05:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.45 2018/07/25 20:05:35 kamil Exp $ */ +/* $NetBSD: jemalloc.c,v 1.46 2019/03/28 15:05:03 christos Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans . @@ -118,7 +118,7 @@ #include /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ -__RCSID("$NetBSD: jemalloc.c,v 1.45 2018/07/25 20:05:35 kamil Exp $"); +__RCSID("$NetBSD: jemalloc.c,v 1.46 2019/03/28 15:05:03 christos Exp $"); #ifdef __FreeBSD__ #include "libc_private.h" @@ -704,7 +704,9 @@ static chunk_tree_t huge; * base_pages_alloc() also uses sbrk(), but cannot lock chunks_mtx (doing so * could cause recursive lock acquisition). */ +#ifdef _REENTRANT static malloc_mutex_t brk_mtx; +#endif /* Result of first sbrk(0) call. */ static void *brk_base; /* Current end of brk, or ((void *)-1) if brk is exhausted. */
CVS commit: src/distrib/utils/libhack
Module Name:src Committed By: christos Date: Thu Mar 28 15:04:42 UTC 2019 Modified Files: src/distrib/utils/libhack: Makefile Makefile.inc Log Message: Dedup and add the small jemalloc implementation so our install media has a chance to fit again. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/distrib/utils/libhack/Makefile cvs rdiff -u -r1.27 -r1.28 src/distrib/utils/libhack/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/libhack/Makefile diff -u src/distrib/utils/libhack/Makefile:1.25 src/distrib/utils/libhack/Makefile:1.26 --- src/distrib/utils/libhack/Makefile:1.25 Sat Jun 17 23:56:39 2017 +++ src/distrib/utils/libhack/Makefile Thu Mar 28 11:04:41 2019 @@ -1,32 +1,23 @@ -# $NetBSD: Makefile,v 1.25 2017/06/18 03:56:39 manu Exp $ +# $NetBSD: Makefile,v 1.26 2019/03/28 15:04:41 christos Exp $ # # Stubs to kill off some things from libc: # This save space on a boot system. # (See Makefile.inc also.) -.PATH.c: ${.CURDIR}/../../../lib/libc/gen ${.CURDIR}/../../../lib/libc/locale - -HACKSRC?=${.CURDIR} -HACKOBJ?=${.OBJDIR} - -CPPFLAGS+= -DSMALL -CPPFLAGS+= -DLIBHACK -CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \ - -DALL_80_TO_FF_SW1 -CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include -CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net - -LIB= hack -SRCS= getcap.c getgrent.c getnet.c getnetgr.c getpwent.c \ - localeconv.c multibyte.c perror.c runetable.c setlocale.c \ - strerror.c strsignal.c syslog.c utmp.c yplib.c gethost.c - +LIB= hack WARNS= 1 NOLINKLIB= # defined NOLINT= # defined NOPIC= # defined NOPROFILE= # defined +HACKSRC?=${.CURDIR} +HACKOBJ?=${.OBJDIR} + +.include "Makefile.inc" + +OBJS= ${HACKOBJS} + realall: libhack.o libhack.o: libhack.a Index: src/distrib/utils/libhack/Makefile.inc diff -u src/distrib/utils/libhack/Makefile.inc:1.27 src/distrib/utils/libhack/Makefile.inc:1.28 --- src/distrib/utils/libhack/Makefile.inc:1.27 Sat Jun 17 23:56:39 2017 +++ src/distrib/utils/libhack/Makefile.inc Thu Mar 28 11:04:41 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.27 2017/06/18 03:56:39 manu Exp $ +# $NetBSD: Makefile.inc,v 1.28 2019/03/28 15:04:41 christos Exp $ # # Include this fragment to build libhack.o # It is .o and not .a to make sure these are the @@ -18,7 +18,7 @@ CPPFLAGS+= -DSMALL CPPFLAGS+= -DLIBHACK -HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o \ +HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o jemalloc.o \ localeconv.o multibyte.o perror.o runetable.o setlocale.o \ strerror.o strsignal.o syslog.o utmp.o yplib.o @@ -26,14 +26,20 @@ CPPFLAGS.runetable.c+= -I${HACKSRC}/../. -DALL_80_TO_FF_SW1 CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include +CPPFLAGS.jemalloc.c+= -I${HACKSRC}/../../../lib/libc/include CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net +.if !defined(LIB) libhack.o: ${HACKOBJS} ${LD} -r -o $@ ${.ALLSRC} - +.endif .if 1 -.PATH.c: ${HACKSRC} ${HACKSRC}/../../../lib/libc/gen ${HACKSRC}/../../../lib/libc/locale +.PATH.c: \ + ${HACKSRC} \ + ${HACKSRC}/../../../lib/libc/gen \ + ${HACKSRC}/../../../lib/libc/locale \ + ${HACKSRC}/../../../lib/libc/stdlib .else # XXX .PATH won't work here, because of crunchgen used by various builds getcap.o: ${HACKSRC}/../../../lib/libc/gen/getcap.c @@ -45,6 +51,7 @@ getpwent.o: ${HACKSRC}/getpwent.c localeconv.o: ${HACKSRC}/localeconv.c multibyte.o: ${HACKSRC}/multibyte.c perror.o: ${HACKSRC}/perror.c +jemalloc.o: ${HACKSRC}/../../../lib/libc/stdlib/jemalloc.c runetable.o: ${HACKSRC}/../../../lib/libc/locale/runetable.c setlocale.o: ${HACKSRC}/setlocale.c strerror.o: ${HACKSRC}/strerror.c
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Thu Mar 28 12:34:36 UTC 2019 Modified Files: src/doc: 3RDPARTY Log Message: llvm-8.0.0 out. To generate a diff of this commit: cvs rdiff -u -r1.1605 -r1.1606 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1605 src/doc/3RDPARTY:1.1606 --- src/doc/3RDPARTY:1.1605 Tue Mar 26 10:10:22 2019 +++ src/doc/3RDPARTY Thu Mar 28 12:34:36 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1605 2019/03/26 10:10:22 kre Exp $ +# $NetBSD: 3RDPARTY,v 1.1606 2019/03/28 12:34:36 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -744,7 +744,7 @@ Notes: Package: llvm Version: 7.0.0svn (r337282) -Current Vers.: 7.0.0svn +Current Vers.: 8.0.0 Maintainer: llvm-...@lists.llvm.org Home Page: https://llvm.org Date: 2019-01-09
CVS commit: src/sys/arch/evbarm/imx7
Module Name:src Committed By: christos Date: Thu Mar 28 12:07:30 UTC 2019 Modified Files: src/sys/arch/evbarm/imx7: imx7_ioconfig.c Log Message: need arm/amr32/pte.h To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/imx7/imx7_ioconfig.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/evbarm/imx7/imx7_ioconfig.c diff -u src/sys/arch/evbarm/imx7/imx7_ioconfig.c:1.1 src/sys/arch/evbarm/imx7/imx7_ioconfig.c:1.2 --- src/sys/arch/evbarm/imx7/imx7_ioconfig.c:1.1 Tue May 17 02:44:46 2016 +++ src/sys/arch/evbarm/imx7/imx7_ioconfig.c Thu Mar 28 08:07:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx7_ioconfig.c,v 1.1 2016/05/17 06:44:46 ryo Exp $ */ +/* $NetBSD: imx7_ioconfig.c,v 1.2 2019/03/28 12:07:30 christos Exp $ */ /* * Copyright (c) 2015 Ryo Shimizu @@ -26,17 +26,21 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: imx7_ioconfig.c,v 1.1 2016/05/17 06:44:46 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx7_ioconfig.c,v 1.2 2019/03/28 12:07:30 christos Exp $"); #include "opt_evbarm_boardtype.h" #include #include #include + +#include + #include #include #include #include #include + #include void imx7_setup_iomux(void);
CVS commit: src/external/bsd/jemalloc/include/jemalloc/internal
Module Name:src Committed By: christos Date: Thu Mar 28 11:56:56 UTC 2019 Modified Files: src/external/bsd/jemalloc/include/jemalloc/internal: size_classes.h Log Message: Add 2K page size tables (sun2) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h diff -u src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.3 src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.4 --- src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h:1.3 Wed Mar 27 12:16:14 2019 +++ src/external/bsd/jemalloc/include/jemalloc/internal/size_classes.h Thu Mar 28 07:56:56 2019 @@ -4165,6 +4165,470 @@ #define LARGE_MAXCLASS size_t)1) << 62) + (((size_t)3) << 60)) #endif +#if (LG_SIZEOF_PTR == 2 && LG_TINY_MIN == 3 && LG_QUANTUM == 3 && LG_PAGE == 11) +#define SIZE_CLASSES \ + /* index, lg_grp, lg_delta, ndelta, psz, bin, pgs, lg_delta_lookup */ \ +SC( 0, 3,3, 0, no, yes, 1, 3) \ +SC( 1, 3,3, 1, no, yes, 1, 3) \ +SC( 2, 3,3, 2, no, yes, 3, 3) \ +SC( 3, 3,3, 3, no, yes, 1, 3) \ + \ +SC( 4, 5,3, 1, no, yes, 5, 3) \ +SC( 5, 5,3, 2, no, yes, 3, 3) \ +SC( 6, 5,3, 3, no, yes, 7, 3) \ +SC( 7, 5,3, 4, no, yes, 1, 3) \ + \ +SC( 8, 6,4, 1, no, yes, 5, 4) \ +SC( 9, 6,4, 2, no, yes, 3, 4) \ +SC( 10, 6,4, 3, no, yes, 7, 4) \ +SC( 11, 6,4, 4, no, yes, 1, 4) \ + \ +SC( 12, 7,5, 1, no, yes, 5, 5) \ +SC( 13, 7,5, 2, no, yes, 3, 5) \ +SC( 14, 7,5, 3, no, yes, 7, 5) \ +SC( 15, 7,5, 4, no, yes, 1, 5) \ + \ +SC( 16, 8,6, 1, no, yes, 5, 6) \ +SC( 17, 8,6, 2, no, yes, 3, 6) \ +SC( 18, 8,6, 3, no, yes, 7, 6) \ +SC( 19, 8,6, 4, no, yes, 1, 6) \ + \ +SC( 20, 9,7, 1, no, yes, 5, 7) \ +SC( 21, 9,7, 2, no, yes, 3, 7) \ +SC( 22, 9,7, 3, no, yes, 7, 7) \ +SC( 23, 9,7, 4, no, yes, 1, 7) \ + \ +SC( 24, 10,8, 1, no, yes, 5, 8) \ +SC( 25, 10,8, 2, no, yes, 3, 8) \ +SC( 26, 10,8, 3, no, yes, 7, 8) \ +SC( 27, 10,8, 4, yes, yes, 1, 8) \ + \ +SC( 28, 11,9, 1, no, yes, 5, 9) \ +SC( 29, 11,9, 2, no, yes, 3, 9) \ +SC( 30, 11,9, 3, no, yes, 7, 9) \ +SC( 31, 11,9, 4, yes, yes, 2, 9) \ + \ +SC( 32, 12, 10, 1, no, yes, 5, no) \ +SC( 33, 12, 10, 2, yes, yes, 3, no) \ +SC( 34, 12, 10, 3, no, yes, 7, no) \ +SC( 35, 12, 10, 4, yes, no, 0, no) \ + \ +SC( 36, 13, 11, 1, yes, no, 0, no) \ +SC( 37, 13, 11, 2, yes, no, 0, no) \ +SC( 38, 13, 11, 3, yes, no, 0, no) \ +SC( 39, 13, 11, 4, yes, no, 0, no) \ + \ +SC( 40, 14, 12, 1, yes, no, 0, no) \ +SC( 41, 14, 12, 2, yes, no, 0, no) \ +SC( 42, 14, 12, 3, yes, no, 0, no) \ +SC( 43, 14, 12, 4, yes, no, 0, no) \ + \ +SC( 44, 15, 13, 1, yes, no, 0, no) \ +SC( 45, 15, 13, 2, yes, no, 0, no) \ +SC( 46, 15, 13, 3, yes, no, 0, no) \ +SC( 47, 15, 13, 4, yes, no, 0, no) \ + \ +SC( 48, 16, 14, 1, yes, no, 0, no) \ +SC( 49, 16, 14, 2, yes, no, 0, no) \ +SC( 50, 16, 14, 3, yes, no, 0, no) \ +SC( 51, 16,
CVS commit: src/sys/dev
Module Name:src Committed By: kardel Date: Thu Mar 28 10:44:29 UTC 2019 Modified Files: src/sys/dev/scsipi: scsi_spc.h scsiconf.c scsipi_base.c scsipiconf.c scsipiconf.h src/sys/dev/usb: umass_scsipi.c Log Message: Add reading of supported opcodes and their timeouts at attachment time. Though this information is optional, it allows to override our fixed timeouts with device provided timeouts. These timeouts will override the hardcoded values if the device provided timeouts exceed the hardcoded values and are less than a day. Using the device provided timeouts avoids premature device resets and unreliable operation due to inadequate timeouts. Due to the limited implementations of USB umass devices this feature is disabled for all umass attached devices. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/scsipi/scsi_spc.h cvs rdiff -u -r1.283 -r1.284 src/sys/dev/scsipi/scsiconf.c cvs rdiff -u -r1.181 -r1.182 src/sys/dev/scsipi/scsipi_base.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/scsipi/scsipiconf.c cvs rdiff -u -r1.129 -r1.130 src/sys/dev/scsipi/scsipiconf.h cvs rdiff -u -r1.60 -r1.61 src/sys/dev/usb/umass_scsipi.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/scsi_spc.h diff -u src/sys/dev/scsipi/scsi_spc.h:1.5 src/sys/dev/scsipi/scsi_spc.h:1.6 --- src/sys/dev/scsipi/scsi_spc.h:1.5 Sat Feb 6 23:13:59 2010 +++ src/sys/dev/scsipi/scsi_spc.h Thu Mar 28 10:44:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: scsi_spc.h,v 1.5 2010/02/06 23:13:59 cegger Exp $ */ +/* $NetBSD: scsi_spc.h,v 1.6 2019/03/28 10:44:29 kardel Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -406,6 +406,70 @@ struct scsi_reserve_release_10_idparam { */ /* + * MAINTENANCE_IN[REPORT SUPPORTED OPERATION CODES] + */ +#define SCSI_MAINTENANCE_IN 0xA3 + +struct scsi_repsuppopcode { + u_int8_t opcode; + u_int8_t svcaction; +#define RSOC_REPORT_SUPPORTED_OPCODES 0x0C + + u_int8_t repoption; +#define RSOC_ALL 0x00 /* report all */ +#define RSOC_ONE 0x01 /* report one */ +#define RSOC_ONESACD 0x02 /* report one or CHECK CONDITION */ +#define RSOC_ONESA 0x03 /* report one mark presense in data */ +#define RSOC_RCTD 0x80 /* report timeouts */ + + u_int8_t reqopcode; + u_int8_t reqsvcaction[2]; + u_int8_t alloclen[4]; + u_int8_t _res0; + u_int8_t control; +}; + +struct scsi_repsupopcode_all_commands_descriptor { +u_int8_t opcode; +u_int8_t _res0; +u_int8_t serviceaction[2]; +u_int8_t _res1; +u_int8_t flags; +#define RSOC_ACD_CTDP 0x02/* timeouts present */ +#define RSOC_ACD_SERVACTV 0x01/* service action valid */ +u_int8_t cdblen[2]; +}; + +struct scsi_repsupopcode_one_command_descriptor { +u_int8_t _res0; +u_int8_t support; +#define RSOC_OCD_CTDP 0x80 /* timeouts present */ +#define RSOC_OCD_SUP_NOT_AVAIL 0x00 /* not available */ +#define RSOC_OCD_SUP_NOT_SUPP 0x01 /* not supported */ +#define RSOC_OCD_SUP_SUPP_STD 0x03 /* supported - standard */ +#define RSOC_OCD_SUP_SUPP_VENDOR 0x05 /* supported - vendor */ +#define RSOC_OCD_SUP 0x07 /* mask for support field */ + +u_int8_t cdblen[2]; +/* + * u_int8_t usage[0...]- cdblen bytes + * usage data + */ + /* + * scsi_repsupopcode_timeouts_descriptor + * if RSOC_OCD_CTDP is set + */ +}; + +struct scsi_repsupopcode_timeouts_descriptor { +u_int8_t descriptor_length[2]; +u_int8_t _res0; +u_int8_t cmd_specific; +u_int8_t nom_process_timeout[4]; +u_int8_t cmd_process_timeout[4]; +}; + +/* * REQUEST SENSE */ Index: src/sys/dev/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.283 src/sys/dev/scsipi/scsiconf.c:1.284 --- src/sys/dev/scsipi/scsiconf.c:1.283 Sat Jan 12 13:59:53 2019 +++ src/sys/dev/scsipi/scsiconf.c Thu Mar 28 10:44:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.283 2019/01/12 13:59:53 tsutsui Exp $ */ +/* $NetBSD: scsiconf.c,v 1.284 2019/03/28 10:44:29 kardel Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.283 2019/01/12 13:59:53 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.284 2019/03/28 10:44:29 kardel Exp $"); #include #include @@ -500,9 +500,11 @@ scsibusprint(void *aux, const char *pnp) strnvisx(revision, sizeof(revision), inqbuf->revision, 4, VIS_TRIM|VIS_SAFE|VIS_OCTAL); - aprint_normal(" target %d lun %d: <%s, %s, %s> %s %s", - target, lun, vendor, product, revision, dtype, - inqbuf->removable ? "removable" : "fixed"); + aprint_normal(" target %d lun %d: <%s, %s, %s> %s %s%s", + target, lun, vendor, product, revision, dtype, + inqbuf->removable ? "removable" : "fixed", +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Mar 28 08:56:56 UTC 2019 Modified Files: src/sys/dev/pci: if_bnxreg.h Log Message: No functional change: - Fix DB_AND_RANDOMFALSE(). It has no real bug because the macro is not used from anywhere. - Wse const. - Whitespace change. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/if_bnxreg.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/pci/if_bnxreg.h diff -u src/sys/dev/pci/if_bnxreg.h:1.20 src/sys/dev/pci/if_bnxreg.h:1.21 --- src/sys/dev/pci/if_bnxreg.h:1.20 Tue Mar 5 08:25:02 2019 +++ src/sys/dev/pci/if_bnxreg.h Thu Mar 28 08:56:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnxreg.h,v 1.20 2019/03/05 08:25:02 msaitoh Exp $ */ +/* $NetBSD: if_bnxreg.h,v 1.21 2019/03/28 08:56:55 msaitoh Exp $ */ /* $OpenBSD: if_bnxreg.h,v 1.33 2009/09/05 16:02:28 claudio Exp $ */ /*- @@ -154,7 +154,7 @@ /* Returns FALSE in "defects" per 2^31 - 1 calls, otherwise returns TRUE. */ #define DB_RANDOMFALSE(defects)(random() > defects) #define DB_OR_RANDOMFALSE(defects) || (random() > defects) -#define DB_AND_RANDOMFALSE(defects) && (random() > ddfects) +#define DB_AND_RANDOMFALSE(defects) && (random() > defects) /* Returns TRUE in "defects" per 2^31 - 1 calls, otherwise returns FALSE. */ #define DB_RANDOMTRUE(defects) (random() < defects) @@ -244,7 +244,7 @@ struct bnx_type { uint16_t bnx_did; uint16_t bnx_svid; uint16_t bnx_sdid; - char *bnx_name; + const char *bnx_name; }; // @@ -1293,7 +1293,6 @@ struct l2_fhdr { #define BNX_MISC_COMMAND_PCIE_LINK_IN_L23 (1L<<27) #define BNX_MISC_COMMAND_PCIE_DIS (1L<<28) - #define BNX_MISC_CFG 0x0804 #define BNX_MISC_CFG_PCI_GRC_TMOUT (1L<<0) #define BNX_MISC_CFG_NVM_WR_EN (0x3L<<1) @@ -3275,7 +3274,6 @@ struct l2_fhdr { #define BNX_MQ_CONFIG_MAX_DEPTH (0x7fL<<8) #define BNX_MQ_CONFIG_CUR_DEPTH (0x7fL<<20) - #define BNX_MQ_ENQUEUE10x3c0c #define BNX_MQ_ENQUEUE1_OFFSET (0x3fL<<2) #define BNX_MQ_ENQUEUE1_CID (0x3fffL<<8) @@ -3344,6 +3342,7 @@ struct l2_fhdr { #define BNX_MQ_MAP_L2_5_ENA (0x1L<<31) #define BNX_MQ_MAP_L2_5_DEFAULT0x83000b08 + /* * tbdr_reg definition * offset: 0x5000
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Thu Mar 28 08:41:50 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: disable jemalloc again until we can figure out what to do with the bloat for installer media. To generate a diff of this commit: cvs rdiff -u -r1.1117 -r1.1118 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1117 src/share/mk/bsd.own.mk:1.1118 --- src/share/mk/bsd.own.mk:1.1117 Wed Mar 27 14:41:18 2019 +++ src/share/mk/bsd.own.mk Thu Mar 28 04:41:50 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1117 2019/03/27 18:41:18 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1118 2019/03/28 08:41:50 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -172,7 +172,14 @@ EXTERNAL_BINUTILS_SUBDIR= /does/not/exis # What version of jemalloc we use (100 is the one # built-in to libc from 2005 (pre version 3). # +.if ${MACHINE_CPU} == "x86_64" || \ +${MACHINE_CPU} == "i386" || \ +${MACHINE_CPU} == "aarch64" || \ +${MACHINE} == "sparc64" HAVE_JEMALLOC?= 510 +.else +HAVE_JEMALLOC?= 100 +.endif .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
CVS commit: src/sys/arch/hpcmips/include
Module Name:src Committed By: christos Date: Thu Mar 28 08:33:07 UTC 2019 Modified Files: src/sys/arch/hpcmips/include: vmparam.h Log Message: protect kernel variables To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hpcmips/include/vmparam.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/hpcmips/include/vmparam.h diff -u src/sys/arch/hpcmips/include/vmparam.h:1.5 src/sys/arch/hpcmips/include/vmparam.h:1.6 --- src/sys/arch/hpcmips/include/vmparam.h:1.5 Sun Dec 13 19:46:04 2009 +++ src/sys/arch/hpcmips/include/vmparam.h Thu Mar 28 04:33:07 2019 @@ -1,9 +1,11 @@ -/* $NetBSD: vmparam.h,v 1.5 2009/12/14 00:46:04 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.6 2019/03/28 08:33:07 christos Exp $ */ #include +#ifdef _KERNEL #include #define VM_PHYSSEG_MAX 5 extern phys_ram_seg_t mem_clusters[]; extern int mem_cluster_cnt; +#endif
CVS commit: src/sys/arch/ews4800mips/include
Module Name:src Committed By: christos Date: Thu Mar 28 08:31:40 UTC 2019 Modified Files: src/sys/arch/ews4800mips/include: vmparam.h Log Message: protect kernel variable from userland exposure XXX: if there a better place for this? To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ews4800mips/include/vmparam.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/ews4800mips/include/vmparam.h diff -u src/sys/arch/ews4800mips/include/vmparam.h:1.2 src/sys/arch/ews4800mips/include/vmparam.h:1.3 --- src/sys/arch/ews4800mips/include/vmparam.h:1.2 Sun Dec 13 19:46:03 2009 +++ src/sys/arch/ews4800mips/include/vmparam.h Thu Mar 28 04:31:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.2 2009/12/14 00:46:03 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.3 2019/03/28 08:31:40 christos Exp $ */ #ifndef _EWS4800MIPS_VMPARAM_H_ #define _EWS4800MIPS_VMPARAM_H_ @@ -18,6 +18,8 @@ /* reserve PTEs for KSEG2 I/O space */ #define KSEG2IOBUFSIZE kseg2iobufsize #endif +#ifdef _KERNEL extern vsize_t kseg2iobufsize; +#endif #endif /* !_EWS4800MIPS_VMPARAM_H_ */
CVS commit: src/sys/arch/arc/include
Module Name:src Committed By: christos Date: Thu Mar 28 08:28:16 UTC 2019 Modified Files: src/sys/arch/arc/include: vmparam.h Log Message: Expose kernel variables only to kernel. XXX: move this variable somewhere better? To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/include/vmparam.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/arc/include/vmparam.h diff -u src/sys/arch/arc/include/vmparam.h:1.10 src/sys/arch/arc/include/vmparam.h:1.11 --- src/sys/arch/arc/include/vmparam.h:1.10 Wed Dec 16 18:19:06 2009 +++ src/sys/arch/arc/include/vmparam.h Thu Mar 28 04:28:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.10 2009/12/16 23:19:06 matt Exp $ */ +/* $NetBSD: vmparam.h,v 1.11 2019/03/28 08:28:16 christos Exp $ */ /* $OpenBSD: vmparam.h,v 1.3 1997/04/19 17:19:59 pefo Exp $ */ /* NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp */ @@ -19,6 +19,7 @@ #ifndef KSEG2IOBUFSIZE #define KSEG2IOBUFSIZE kseg2iobufsize /* reserve PTEs for KSEG2 I/O space */ - +#ifdef _KERNEL extern vsize_t kseg2iobufsize; #endif +#endif
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Thu Mar 28 08:13:40 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: Add new ATF ptrace(2) tests bytes_transfer_alignment* Verify bytes transfer for potentially misaligned operation. New tests: - bytes_transfer_alignment_pt_read_i - bytes_transfer_alignment_pt_read_d - bytes_transfer_alignment_pt_write_i - bytes_transfer_alignment_pt_write_d - bytes_transfer_alignment_piod_read_i - bytes_transfer_alignment_piod_read_d - bytes_transfer_alignment_piod_write_i - bytes_transfer_alignment_piod_write_d - bytes_transfer_alignment_piod_read_auxv All tests pass (at least on x86_64). To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.100 src/tests/lib/libc/sys/t_ptrace_wait.c:1.101 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.100 Fri Mar 8 23:35:01 2019 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Thu Mar 28 08:13:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.100 2019/03/08 23:35:01 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.101 2019/03/28 08:13:40 kamil Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.100 2019/03/08 23:35:01 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.101 2019/03/28 08:13:40 kamil Exp $"); #include #include @@ -3667,6 +3667,185 @@ BYTES_TRANSFER(bytes_transfer_piod_read_ /// +static void +bytes_transfer_alignment(const char *operation) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + char *buffer; + int vector; + size_t len; + size_t i; + int op; + + struct ptrace_io_desc io; + struct ptrace_siginfo info; + + memset(, 0, sizeof(io)); + memset(, 0, sizeof(info)); + + /* Testing misaligned byte transfer crossing page boundaries */ + len = sysconf(_SC_PAGESIZE) * 2; + buffer = malloc(len); + ATF_REQUIRE(buffer != NULL); + + /* Initialize the buffer with random data */ + for (i = 0; i < len; i++) + buffer[i] = i & 0xff; + + DPRINTF("Before forking process PID=%d\n", getpid()); + SYSCALL_REQUIRE((child = fork()) != -1); + if (child == 0) { + DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + DPRINTF("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + DPRINTF("Before exiting of the child process\n"); + _exit(exitval); + } + DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); + + validate_status_stopped(status, sigval); + + DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + SYSCALL_REQUIRE(ptrace(PT_GET_SIGINFO, child, , sizeof(info)) + != -1); + + DPRINTF("Signal traced to lwpid=%d\n", info.psi_lwpid); + DPRINTF("Signal properties: si_signo=%#x si_code=%#x " + "si_errno=%#x\n", + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); + + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); + + if (strcmp(operation, "PT_READ_I") == 0 || + strcmp(operation, "PT_READ_D") == 0) { + if (strcmp(operation, "PT_READ_I")) + op = PT_READ_I; + else + op = PT_READ_D; + + for (i = 0; i <= (len - sizeof(int)); i++) { + errno = 0; + vector = ptrace(op, child, buffer + i, 0); + ATF_REQUIRE_EQ(errno, 0); + ATF_REQUIRE(!memcmp(, buffer + i, sizeof(int))); + } + } else if (strcmp(operation, "PT_WRITE_I") == 0 || + strcmp(operation, "PT_WRITE_D") == 0) { + if (strcmp(operation, "PT_WRITE_I")) + op = PT_WRITE_I; + else + op = PT_WRITE_D; + + for (i = 0; i <= (len - sizeof(int)); i++) { + memcpy(, buffer + i, sizeof(int)); + SYSCALL_REQUIRE(ptrace(op, child, buffer + 1, vector) + != -1); + } + } else if (strcmp(operation, "PIOD_READ_I") == 0 || + strcmp(operation, "PIOD_READ_D") == 0) { + if (strcmp(operation, "PIOD_READ_I")) + op = PIOD_READ_I; + else + op = PIOD_READ_D; + + io.piod_op = op; + io.piod_addr = + io.piod_len = sizeof(int); + + for (i = 0; i <= (len - sizeof(int)); i++) { + io.piod_offs = buffer + i; + + SYSCALL_REQUIRE(ptrace(PT_IO, child, , sizeof(io)) + != -1); + ATF_REQUIRE(!memcmp(, buffer + i, sizeof(int))); + } + } else if (strcmp(operation, "PIOD_WRITE_I") == 0 || + strcmp(operation, "PIOD_WRITE_D") == 0) { + if (strcmp(operation,