CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Apr 8 03:56:08 UTC 2019 Modified Files: src/sys/dev/pci: if_bnx.c Log Message: Make it compilable with BNX_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/if_bnx.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_bnx.c diff -u src/sys/dev/pci/if_bnx.c:1.79 src/sys/dev/pci/if_bnx.c:1.80 --- src/sys/dev/pci/if_bnx.c:1.79 Fri Apr 5 07:25:06 2019 +++ src/sys/dev/pci/if_bnx.c Mon Apr 8 03:56:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.79 2019/04/05 07:25:06 msaitoh Exp $ */ +/* $NetBSD: if_bnx.c,v 1.80 2019/04/08 03:56:08 msaitoh Exp $ */ /* $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.79 2019/04/05 07:25:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.80 2019/04/08 03:56:08 msaitoh Exp $"); /* * The following controllers are supported by this driver: @@ -6596,7 +6596,8 @@ bnx_dump_hw_state(struct bnx_softc *sc) " Hardware State " "\n"); - BNX_PRINTF(sc, "0x%08X : bootcode version\n", sc->bnx_fw_ver); + val1 = REG_RD_IND(sc, sc->bnx_shmem_base + BNX_DEV_INFO_BC_REV); + BNX_PRINTF(sc, "0x%08X : bootcode version\n", val1); val1 = REG_RD(sc, BNX_MISC_ENABLE_STATUS_BITS); BNX_PRINTF(sc, "0x%08X : (0x%04X) misc_enable_status_bits\n",
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Mon Apr 8 00:47:21 UTC 2019 Modified Files: src/sys/arch/alpha/alpha: cpu.c cpuconf.c src/sys/arch/alpha/include: rpb.h Log Message: Add some additional CPU and system types. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/alpha/alpha/cpu.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/alpha/alpha/cpuconf.c cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/include/rpb.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/alpha/alpha/cpu.c diff -u src/sys/arch/alpha/alpha/cpu.c:1.96 src/sys/arch/alpha/alpha/cpu.c:1.97 --- src/sys/arch/alpha/alpha/cpu.c:1.96 Sat Oct 10 17:00:12 2015 +++ src/sys/arch/alpha/alpha/cpu.c Mon Apr 8 00:47:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.96 2015/10/10 17:00:12 martin Exp $ */ +/* $NetBSD: cpu.c,v 1.97 2019/04/08 00:47:21 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.96 2015/10/10 17:00:12 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.97 2019/04/08 00:47:21 thorpej Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -147,6 +147,9 @@ const struct cputable_struct { { PCS_PROC_EV68CB, "21264C", NULL }, { PCS_PROC_EV68AL, "21264B", NULL }, { PCS_PROC_EV68CX, "21264D", NULL }, + { PCS_PROC_EV7, "21364", NULL }, + { PCS_PROC_EV79, "EV79", NULL }, + { PCS_PROC_EV69, "EV69", NULL }, }; /* Index: src/sys/arch/alpha/alpha/cpuconf.c diff -u src/sys/arch/alpha/alpha/cpuconf.c:1.36 src/sys/arch/alpha/alpha/cpuconf.c:1.37 --- src/sys/arch/alpha/alpha/cpuconf.c:1.36 Mon Sep 23 16:41:56 2013 +++ src/sys/arch/alpha/alpha/cpuconf.c Mon Apr 8 00:47:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuconf.c,v 1.36 2013/09/23 16:41:56 tsutsui Exp $ */ +/* $NetBSD: cpuconf.c,v 1.37 2019/04/08 00:47:21 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpuconf.c,v 1.36 2013/09/23 16:41:56 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpuconf.c,v 1.37 2019/04/08 00:47:21 thorpej Exp $"); #include #include @@ -226,14 +226,18 @@ static const struct cpuinit cpuinit[] = cpu_init(ST_DEC_4100, dec_kn300_init, "DEC_KN300"), cpu_notsupp(ST_DEC_EV45_PBP, "EV45 Passive Backplane Board"), cpu_init(ST_DEC_2100A_A500, dec_2100a_a500_init, "DEC_2100A_A500"), + cpu_notsupp(ST_DEC_XL, "Alpha XL"), cpu_init(ST_EB164, dec_eb164_init, "DEC_EB164"), cpu_init(ST_DEC_1000A, dec_1000a_init, "DEC_1000A"), cpu_notsupp(ST_DEC_ALPHAVME_224, "AlphaVME 224"), cpu_init(ST_DEC_550, dec_550_init, "DEC_550"), + cpu_notsupp(ST_DEC_XXM, "DEC XXM"), cpu_notsupp(ST_DEC_EV56_PBP, "EV56 Passive Backplane Board"), cpu_notsupp(ST_DEC_ALPHAVME_320, "AlphaVME 320"), cpu_init(ST_DEC_6600, dec_6600_init, "DEC_6600"), cpu_init(ST_DEC_TITAN, dec_6600_init, "DEC_6600"), + cpu_notsupp(ST_DEC_MARVEL, "DEC_MARVEL"), + cpu_notsupp(ST_DTI_RUFFIAN, "DTI_RUFFIAN"), cpu_init(ST_API_NAUTILUS, api_up1000_init, "API_UP1000"), }; static const int ncpuinit = (sizeof(cpuinit) / sizeof(cpuinit[0])); Index: src/sys/arch/alpha/include/rpb.h diff -u src/sys/arch/alpha/include/rpb.h:1.42 src/sys/arch/alpha/include/rpb.h:1.43 --- src/sys/arch/alpha/include/rpb.h:1.42 Mon Feb 6 02:14:13 2012 +++ src/sys/arch/alpha/include/rpb.h Mon Apr 8 00:47:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rpb.h,v 1.42 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: rpb.h,v 1.43 2019/04/08 00:47:21 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -71,10 +71,12 @@ struct rpb { #define ST_DEC_4100 22 /* "Rawhide" (PCI/EISA) */ #define ST_DEC_EV45_PBP 23 /* "Lego" K2 Passive SBC */ #define ST_DEC_2100A_A500 24 /* "Lynx" */ +#define ST_DEC_XL 25 /* Alpha XL */ #define ST_EB164 26 /* EB164 (PCI/ISA) */ #define ST_DEC_1000A 27 /* "Noritake" (PCI/EISA)*/ #define ST_DEC_ALPHAVME_224 28 /* "Cortex" */ #define ST_DEC_550 30 /* "Miata" (PCI/ISA) */ +#define ST_DEC_XXM 31 /* XXM */ #define ST_DEC_EV56_PBP 32 /* "Takara" */ #define ST_DEC_ALPHAVME_320 33 /* "Yukon" (VME) */ #define ST_DEC_6600 34 /* EV6-Tsunami based systems */ @@ -82,6 +84,10 @@ struct rpb { #define ST_DEC_CUSCO 36 /* "CUSCO" */ #define ST_DEC_EIGER 37 /* "Eiger" */ #define ST_DEC_TITAN 38 /* "Titan" */ +#define ST_DEC_MARVEL 39 /* "Marvel" */ + + /* DTI systypes */ +#define ST_DTI_RUFFIAN 101 /* EV56-Pyxis + ARC? */ /* Alpha Processor, Inc. systypes */ #define ST_API_NAUTILUS 201 /* EV6-AMD 751 UP1000 */ @@ -284,6 +290,9 @@ struct pcs { #define PCS_PROC_EV68CB 12 /* EV68CB: 21264C */ #define PCS_PROC_EV68AL 13 /* EV68AL: 21264B */ #define PCS_PROC_EV68CX 14 /* EV68CX: 21264D */ +#define PCS_PROC_EV7 15 /* EV7: 21364 */
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Sun Apr 7 22:31:54 UTC 2019 Modified Files: src/lib/libc/time: strftime.c Log Message: don't print ???, requested by kre@ To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libc/time/strftime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/strftime.c diff -u src/lib/libc/time/strftime.c:1.45 src/lib/libc/time/strftime.c:1.46 --- src/lib/libc/time/strftime.c:1.45 Sun Apr 7 10:51:14 2019 +++ src/lib/libc/time/strftime.c Sun Apr 7 18:31:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: strftime.c,v 1.45 2019/04/07 14:51:14 christos Exp $ */ +/* $NetBSD: strftime.c,v 1.46 2019/04/07 22:31:54 christos Exp $ */ /* Convert a broken-down timestamp to a string. */ @@ -35,7 +35,7 @@ static char elsieid[] = "@(#)strftime.c 7.64"; static char elsieid[] = "@(#)strftime.c 8.3"; #else -__RCSID("$NetBSD: strftime.c,v 1.45 2019/04/07 14:51:14 christos Exp $"); +__RCSID("$NetBSD: strftime.c,v 1.46 2019/04/07 22:31:54 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -550,7 +550,8 @@ label: tzgetname(sp, dst); if (z == NULL) z = tzgetname(sp, !dst); - pt = _add(z ? z : "???", pt, ptlim); + if (z != NULL) + pt = _add(z, pt, ptlim); errno = oerrno; } #endif
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Sun Apr 7 22:32:10 UTC 2019 Modified Files: src/share/man/man9: module.9 Log Message: Make explicit note that MODULE_CLASS_ANY should note be used as the class of a MODULE(). MODULE_CLASS_ANY is intended only to indicate a "wildcard" match when (auto)loading modules. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/module.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/module.9 diff -u src/share/man/man9/module.9:1.51 src/share/man/man9/module.9:1.52 --- src/share/man/man9/module.9:1.51 Sun Jan 27 17:44:02 2019 +++ src/share/man/man9/module.9 Sun Apr 7 22:32:10 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: module.9,v 1.51 2019/01/27 17:44:02 wiz Exp $ +.\" $NetBSD: module.9,v 1.52 2019/04/07 22:32:10 pgoyette Exp $ .\" .\" Copyright (c) 2010 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 September 8, 2018 +.Dd April 8, 2019 .Dt MODULE 9 .Os .Sh NAME @@ -131,7 +131,10 @@ macro creates and initializes a structure. The .Fa class -argument identifies the class of module, and must be one of the following: +argument identifies the class of module, and must be one of the following +(note that +.Dv MODULE_CLASS_ANY +should not be used here): .Bl -tag -width MODULE_CLASS_SECMODEL -offset indent .It Dv MODULE_CLASS_VFS The module provide a virtual file system - see
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: rmind Date: Sun Apr 7 22:23:40 UTC 2019 Modified Files: src/usr.sbin/npf/npfctl: npf.conf.5 Log Message: npf.conf(5): Add more info about ifaddrs(). To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/usr.sbin/npf/npfctl/npf.conf.5 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/npf/npfctl/npf.conf.5 diff -u src/usr.sbin/npf/npfctl/npf.conf.5:1.84 src/usr.sbin/npf/npfctl/npf.conf.5:1.85 --- src/usr.sbin/npf/npfctl/npf.conf.5:1.84 Sat Jan 19 21:19:32 2019 +++ src/usr.sbin/npf/npfctl/npf.conf.5 Sun Apr 7 22:23:40 2019 @@ -1,4 +1,4 @@ -.\"$NetBSD: npf.conf.5,v 1.84 2019/01/19 21:19:32 rmind Exp $ +.\"$NetBSD: npf.conf.5,v 1.85 2019/04/07 22:23:40 rmind Exp $ .\" .\" Copyright (c) 2009-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 January 14, 2019 +.Dd February 2, 2019 .Dt NPF.CONF 5 .Os .Sh NAME @@ -148,12 +148,16 @@ The .Cm family keyword of a filtering rule can be used in combination to explicitly select an IP address type. +This function can also be used with +.Cm map +to specify the translation address, see below. .El .Pp Example of configuration: .Bd -literal -offset indent $var1 = inet4(wm0) $var2 = ifaddrs(wm0) + group default { block in on wm0 all # rule 1 block in on $var1 all # rule 2 @@ -350,6 +354,11 @@ redirecting the public port 9022 to the .Pp .Dl map $ext_if dynamic proto tcp 10.1.1.2 port 22 <- $ext_if port 9022 .Pp +The translation address can also by dynamic, based on the interface. +The following would select IPv4 address currently assigned to the interface: +.Pp +.Dl map $ext_if dynamic 10.1.1.0/24 -> ifaddrs($ext_if) +.Pp If the dynamic NAT is configured with multiple translation addresses, then a custom selection algorithm can be chosen using the .Cm algo @@ -587,10 +596,9 @@ $localnet = { 10.1.1.0/24 } alg "icmp" -# Note: if $ext_if has multiple IP address (e.g. IPv6 as well), -# then the translation address has to be specified explicitly. -map $ext_if dynamic 10.1.1.0/24 -> $ext_if -map $ext_if dynamic proto tcp 10.1.1.2 port 22 <- $ext_if port 9022 +# These NAT rules will dynamically select the interface address(es). +map $ext_if dynamic 10.1.1.0/24 -> ifaddrs($ext_if) +map $ext_if dynamic proto tcp 10.1.1.2 port 22 <- ifaddrs($ext_if) port 9022 procedure "log" { # The logging facility can be used together with npfd(8). @@ -635,7 +643,7 @@ group default { .Xr npfctl 8 , .Xr npfd 8 .Pp -.Lk http://www.netbsd.org/~rmind/npf/ "NPF documentation website" +.Lk http://rmind.github.io/npf/ "NPF documentation website" .Sh HISTORY NPF first appeared in .Nx 6.0 .
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Sun Apr 7 21:01:43 UTC 2019 Modified Files: src/sys/kern: subr_kcov.c Log Message: Switch kcov module class to MODULE_CLASS_MISC MODULE_CLASS_ANY is not intended to be used by modules. Noted by To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/kern/subr_kcov.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_kcov.c diff -u src/sys/kern/subr_kcov.c:1.6 src/sys/kern/subr_kcov.c:1.7 --- src/sys/kern/subr_kcov.c:1.6 Sun Mar 10 22:34:14 2019 +++ src/sys/kern/subr_kcov.c Sun Apr 7 21:01:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kcov.c,v 1.6 2019/03/10 22:34:14 kamil Exp $ */ +/* $NetBSD: subr_kcov.c,v 1.7 2019/04/07 21:01:43 kamil Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -547,7 +547,7 @@ __sanitizer_cov_trace_switch(uint64_t va /* -- */ -MODULE(MODULE_CLASS_ANY, kcov, NULL); +MODULE(MODULE_CLASS_MISC, kcov, NULL); static void kcov_init(void)
CVS commit: src/distrib/pmax/instkernel
Module Name:src Committed By: christos Date: Sun Apr 7 20:28:55 UTC 2019 Modified Files: src/distrib/pmax/instkernel: Makefile Log Message: bump To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/distrib/pmax/instkernel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/pmax/instkernel/Makefile diff -u src/distrib/pmax/instkernel/Makefile:1.42 src/distrib/pmax/instkernel/Makefile:1.43 --- src/distrib/pmax/instkernel/Makefile:1.42 Sun Mar 31 22:02:54 2019 +++ src/distrib/pmax/instkernel/Makefile Sun Apr 7 16:28:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2019/04/01 02:02:54 christos Exp $ +# $NetBSD: Makefile,v 1.43 2019/04/07 20:28:55 christos Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -10,7 +10,7 @@ SFX= 64 .endif IMAGE= diskimage -IMAGESIZE= 2900k +IMAGESIZE= 3000k LISTS= ${.CURDIR}/list${SFX} MTREECONF= ${DISTRIBDIR}/common/mtree.dot IMAGEENDIAN= le
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: maya Date: Sun Apr 7 20:28:41 UTC 2019 Modified Files: src/sys/external/bsd/drm2/include/drm: drm_os_netbsd.h Removed Files: src/sys/external/bsd/drm2/include/drm: drm_copy_netbsd.h Log Message: Remove unused definitions. (These appear to have existed in old-drm) To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 \ src/sys/external/bsd/drm2/include/drm/drm_copy_netbsd.h cvs rdiff -u -r1.13 -r1.14 \ src/sys/external/bsd/drm2/include/drm/drm_os_netbsd.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/external/bsd/drm2/include/drm/drm_os_netbsd.h diff -u src/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h:1.13 src/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h:1.14 --- src/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h:1.13 Tue Aug 28 03:41:39 2018 +++ src/sys/external/bsd/drm2/include/drm/drm_os_netbsd.h Sun Apr 7 20:28:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_os_netbsd.h,v 1.13 2018/08/28 03:41:39 riastradh Exp $ */ +/* $NetBSD: drm_os_netbsd.h,v 1.14 2019/04/07 20:28:41 maya Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -69,7 +69,6 @@ #include #include -#include #include #include
CVS commit: xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe
Module Name:xsrc Committed By: christos Date: Sun Apr 7 19:35:14 UTC 2019 Modified Files: xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe: p_compiler.h Log Message: - we re-define u{int,short,char} in types.h - handle lint To generate a diff of this commit: cvs rdiff -u -r1.1.1.5 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe/p_compiler.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe/p_compiler.h diff -u xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe/p_compiler.h:1.1.1.5 xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe/p_compiler.h:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe/p_compiler.h:1.1.1.5 Sat Mar 9 22:42:45 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/include/pipe/p_compiler.h Sun Apr 7 15:35:14 2019 @@ -69,7 +69,7 @@ extern "C" { #endif -#if !defined(__HAIKU__) && !defined(__USE_MISC) +#if !defined(__HAIKU__) && !defined(__USE_MISC) && !defined(_NETBSD_SOURCE) #if !defined(PIPE_OS_ANDROID) typedef unsigned int uint; #endif @@ -142,7 +142,7 @@ typedef unsigned char boolean; #define PIPE_ALIGN_STACK -#elif defined(SWIG) +#elif defined(SWIG) || defined(__lint__) #define PIPE_ALIGN_TYPE(_alignment, _type) _type #define PIPE_ALIGN_VAR(_alignment) @@ -164,6 +164,10 @@ typedef unsigned char boolean; #define PIPE_READ_WRITE_BARRIER() _ReadWriteBarrier() +#elif defined(__lint__) + +#define PIPE_READ_WRITE_BARRIER() /* */ + #else #warning "Unsupported compiler"
CVS commit: xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri
Module Name:xsrc Committed By: christos Date: Sun Apr 7 19:35:43 UTC 2019 Modified Files: xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri: gbm_dri.c Log Message: don't return void To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c diff -u xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c:1.3 xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c:1.4 --- xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c:1.3 Sat Mar 9 23:15:46 2019 +++ xsrc/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c Sun Apr 7 15:35:43 2019 @@ -182,8 +182,8 @@ swrast_put_image(__DRIdrawable *driDrawa char *data, void *loaderPrivate) { - return swrast_put_image2(driDrawable, op, x, y, width, height, -width * 4, data, loaderPrivate); + swrast_put_image2(driDrawable, op, x, y, width, height, + width * 4, data, loaderPrivate); } static void
CVS commit: xsrc/external/mit/MesaLib/dist/include/GL/internal
Module Name:xsrc Committed By: christos Date: Sun Apr 7 19:34:18 UTC 2019 Modified Files: xsrc/external/mit/MesaLib/dist/include/GL/internal: dri_interface.h Log Message: prevent re-definitions from drm.h To generate a diff of this commit: cvs rdiff -u -r1.1.1.7 -r1.2 \ xsrc/external/mit/MesaLib/dist/include/GL/internal/dri_interface.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/include/GL/internal/dri_interface.h diff -u xsrc/external/mit/MesaLib/dist/include/GL/internal/dri_interface.h:1.1.1.7 xsrc/external/mit/MesaLib/dist/include/GL/internal/dri_interface.h:1.2 --- xsrc/external/mit/MesaLib/dist/include/GL/internal/dri_interface.h:1.1.1.7 Sat Mar 9 22:42:48 2019 +++ xsrc/external/mit/MesaLib/dist/include/GL/internal/dri_interface.h Sun Apr 7 15:34:18 2019 @@ -43,10 +43,12 @@ #ifdef HAVE_LIBDRM #include #else +#ifndef _DRM_H_ typedef unsigned int drm_context_t; typedef unsigned int drm_drawable_t; typedef struct drm_clip_rect drm_clip_rect_t; #endif +#endif #include
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sun Apr 7 19:32:24 UTC 2019 Modified Files: src/share/mk: bsd.README sys.mk Log Message: Add -r so that we get the location of redefinitions To generate a diff of this commit: cvs rdiff -u -r1.389 -r1.390 src/share/mk/bsd.README cvs rdiff -u -r1.138 -r1.139 src/share/mk/sys.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.README diff -u src/share/mk/bsd.README:1.389 src/share/mk/bsd.README:1.390 --- src/share/mk/bsd.README:1.389 Wed Apr 3 11:26:35 2019 +++ src/share/mk/bsd.README Sun Apr 7 15:32:24 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.389 2019/04/03 15:26:35 joerg Exp $ +# $NetBSD: bsd.README,v 1.390 2019/04/07 19:32:24 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -2041,7 +2041,7 @@ LDFLAGS Options to ${CC} during the lin LINT C program verifier. [lint] -LINTFLAGS Options to ${LINT}. [-chapbxzgFS] +LINTFLAGS Options to ${LINT}. [-chapbrxzgFS] LORDER List dependencies for object files. [lorder] Index: src/share/mk/sys.mk diff -u src/share/mk/sys.mk:1.138 src/share/mk/sys.mk:1.139 --- src/share/mk/sys.mk:1.138 Mon Jan 21 16:11:54 2019 +++ src/share/mk/sys.mk Sun Apr 7 15:32:24 2019 @@ -1,4 +1,4 @@ -# $NetBSD: sys.mk,v 1.138 2019/01/21 21:11:54 christos Exp $ +# $NetBSD: sys.mk,v 1.139 2019/04/07 19:32:24 christos Exp $ # @(#)sys.mk 8.2 (Berkeley) 3/21/94 # # This file contains the basic rules for make(1) and is read first @@ -95,7 +95,7 @@ LFLAGS?= LEX.l?= ${LEX} ${LFLAGS} LINT?= lint -LINTFLAGS?= -chapbxzgFS +LINTFLAGS?= -chapbrxzgFS LORDER?= lorder
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Sun Apr 7 19:31:38 UTC 2019 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: make trap 0x70 a TRAP() not UTRAP(). we should be able to handle fast ECC error as a normal trap, and i saw this once a few years ago but it never repeated so i haven't been able to test this. To generate a diff of this commit: cvs rdiff -u -r1.419 -r1.420 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.419 src/sys/arch/sparc64/sparc64/locore.s:1.420 --- src/sys/arch/sparc64/sparc64/locore.s:1.419 Fri Feb 8 20:34:23 2019 +++ src/sys/arch/sparc64/sparc64/locore.s Sun Apr 7 19:31:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.419 2019/02/08 20:34:23 palle Exp $ */ +/* $NetBSD: locore.s,v 1.420 2019/04/07 19:31:38 mrg Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -763,7 +763,8 @@ ufast_DMMU_protection: ! 06c = fast da #endif nop TA32 - UTRAP(0x070) ! Implementation dependent traps + TRAP(0x070) ! 0x070 fast_ECC_error + ! Implementation dependent traps UTRAP(0x071); UTRAP(0x072); UTRAP(0x073); UTRAP(0x074); UTRAP(0x075); UTRAP(0x076) UTRAP(0x077); UTRAP(0x078); UTRAP(0x079); UTRAP(0x07a); UTRAP(0x07b); UTRAP(0x07c) UTRAP(0x07d); UTRAP(0x07e); UTRAP(0x07f) @@ -973,7 +974,8 @@ kfast_DMMU_protection: ! 06c = fast da #endif nop TA32 - UTRAP(0x070) ! Implementation dependent traps + TRAP(0x070) ! 0x070 fast_ECC_error + ! Implementation dependent traps UTRAP(0x071); UTRAP(0x072); UTRAP(0x073); UTRAP(0x074); UTRAP(0x075); UTRAP(0x076) UTRAP(0x077); UTRAP(0x078); UTRAP(0x079); UTRAP(0x07a); UTRAP(0x07b); UTRAP(0x07c) UTRAP(0x07d); UTRAP(0x07e); UTRAP(0x07f)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: bouyer Date: Sun Apr 7 17:46:50 UTC 2019 Modified Files: src/sys/dev/ic: ahcisata_core.c Log Message: If Command List Override is not supported by the controller, the FIS setting the WDC_RST bit will fail if the drive already has BSY or DRQ set. In this case, reset the channel and retry the drive reset. With this, the drive reset will succeed after a atactl sleep command on a controller without the CLO feature. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/ic/ahcisata_core.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/ic/ahcisata_core.c diff -u src/sys/dev/ic/ahcisata_core.c:1.74 src/sys/dev/ic/ahcisata_core.c:1.75 --- src/sys/dev/ic/ahcisata_core.c:1.74 Fri Jan 18 19:16:50 2019 +++ src/sys/dev/ic/ahcisata_core.c Sun Apr 7 17:46:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.74 2019/01/18 19:16:50 jdolecek Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.75 2019/04/07 17:46:49 bouyer Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.74 2019/01/18 19:16:50 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.75 2019/04/07 17:46:49 bouyer Exp $"); #include #include @@ -808,9 +808,11 @@ ahci_do_reset_drive(struct ata_channel * struct ahci_cmd_header *cmd_h; int i, error = 0; uint32_t sig; + int noclo_retry = 0; ata_channel_lock_owned(chp); +again: /* clear port interrupt register */ AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), 0x); /* clear SErrors and start operations */ @@ -848,6 +850,17 @@ ahci_do_reset_drive(struct ata_channel * switch (ahci_exec_fis(chp, 100, flags, c_slot)) { case ERR_DF: case TIMEOUT: + /* + * without CLO we can't make sure a software reset will + * success, as the drive may still have BSY or DRQ set. + * in this case, reset the whole channel and retry the + * drive reset. The channel reset should clear BSY and DRQ + */ + if ((sc->sc_ahci_cap & AHCI_CAP_CLO) == 0 && noclo_retry == 0) { + noclo_retry++; + ahci_reset_channel(chp, flags); + goto again; + } aprint_error("%s port %d: setting WDCTL_RST failed " "for drive %d\n", AHCINAME(sc), chp->ch_channel, drive); error = EBUSY;
CVS commit: src/external/mit/xorg/lib/gallium
Module Name:src Committed By: christos Date: Sun Apr 7 17:31:32 UTC 2019 Modified Files: src/external/mit/xorg/lib/gallium: Makefile Log Message: Fix stack protector build. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/mit/xorg/lib/gallium/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/gallium/Makefile diff -u src/external/mit/xorg/lib/gallium/Makefile:1.21 src/external/mit/xorg/lib/gallium/Makefile:1.22 --- src/external/mit/xorg/lib/gallium/Makefile:1.21 Sun Apr 7 01:28:09 2019 +++ src/external/mit/xorg/lib/gallium/Makefile Sun Apr 7 13:31:32 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2019/04/07 05:28:09 rin Exp $ +# $NetBSD: Makefile,v 1.22 2019/04/07 17:31:32 christos Exp $ # Link the gallium mega driver. @@ -1126,6 +1126,23 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR} COPTS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :} .endif +.for f in \ + dd_context.c \ + draw.c \ + nir_from_ssa.c \ + nir_inline_functions.c \ + nir_instr_set.c \ + nir_instr_set.c \ + nir_liveness.c \ + nir_lower_registers_to_ssa.c \ + nir_lower_regs_to_ssa.c \ + nir_phi_builder.c \ + shaderapi.c \ + spirv_to_nir.c \ + vtn_cfg.c +COPTS.${f}+=-Wno-error=stack-protector +.endfor + .include # Don't regenerate c files .y.c:
CVS commit: src/sys/kern
Module Name:src Committed By: thorpej Date: Sun Apr 7 16:27:41 UTC 2019 Modified Files: src/sys/kern: subr_copy.c Log Message: Exclude references to _ucas_{32,64}_mp() for _RUMPKERNEL. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/kern/subr_copy.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_copy.c diff -u src/sys/kern/subr_copy.c:1.10 src/sys/kern/subr_copy.c:1.11 --- src/sys/kern/subr_copy.c:1.10 Sat Apr 6 15:52:35 2019 +++ src/sys/kern/subr_copy.c Sun Apr 7 16:27:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_copy.c,v 1.10 2019/04/06 15:52:35 thorpej Exp $ */ +/* $NetBSD: subr_copy.c,v 1.11 2019/04/07 16:27:41 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008, 2019 @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_copy.c,v 1.10 2019/04/06 15:52:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_copy.c,v 1.11 2019/04/07 16:27:41 thorpej Exp $"); #define __UFETCHSTORE_PRIVATE #define __UCAS_PRIVATE @@ -538,7 +538,8 @@ ucas_32(volatile uint32_t *uaddr, uint32 ASSERT_SLEEPABLE(); CHECK_ALIGNMENT(); -#if defined(__HAVE_UCAS_MP) && defined(MULTIPROCESSOR) +#if (defined(__HAVE_UCAS_MP) && defined(MULTIPROCESSOR)) && \ +!defined(_RUMPKERNEL) if (ncpu > 1) { return _ucas_32_mp(uaddr, old, new, ret); } @@ -553,7 +554,8 @@ ucas_64(volatile uint64_t *uaddr, uint64 ASSERT_SLEEPABLE(); CHECK_ALIGNMENT(); -#if defined(__HAVE_UCAS_MP) && defined(MULTIPROCESSOR) +#if (defined(__HAVE_UCAS_MP) && defined(MULTIPROCESSOR)) && \ +!defined(_RUMPKERNEL) if (ncpu > 1) { return _ucas_64_mp(uaddr, old, new, ret); }
CVS commit: src/tests/modules/ufetchstore
Module Name:src Committed By: thorpej Date: Sun Apr 7 15:50:13 UTC 2019 Modified Files: src/tests/modules/ufetchstore: t_ufetchstore.c Log Message: Add a test to make sure an overflowing-into-kernel-space fetch/store near vm_max_address fails with EFAULT. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/modules/ufetchstore/t_ufetchstore.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/modules/ufetchstore/t_ufetchstore.c diff -u src/tests/modules/ufetchstore/t_ufetchstore.c:1.3 src/tests/modules/ufetchstore/t_ufetchstore.c:1.4 --- src/tests/modules/ufetchstore/t_ufetchstore.c:1.3 Sun Apr 7 03:43:55 2019 +++ src/tests/modules/ufetchstore/t_ufetchstore.c Sun Apr 7 15:50:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ufetchstore.c,v 1.3 2019/04/07 03:43:55 rin Exp $ */ +/* $NetBSD: t_ufetchstore.c,v 1.4 2019/04/07 15:50:12 thorpej Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2019\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ufetchstore.c,v 1.3 2019/04/07 03:43:55 rin Exp $"); +__RCSID("$NetBSD: t_ufetchstore.c,v 1.4 2019/04/07 15:50:12 thorpej Exp $"); #include #include @@ -101,8 +101,8 @@ unload_module(void) #endif /* ! SKIP_MODULE */ } -static void * -vm_max_address(void) +static unsigned long +vm_max_address_raw(void) { static unsigned long max_addr = 0; int rv; @@ -114,7 +114,19 @@ vm_max_address(void) if (rv != 0) err(1, "sysctlbyname('vm.maxaddress')"); } - return (void *)max_addr; + return max_addr; +} + +static void * +vm_max_address(void) +{ + return (void *)vm_max_address_raw(); +} + +static void * +vm_max_address_minus(unsigned int adj) +{ + return (void *)(vm_max_address_raw() - adj); } static int @@ -604,6 +616,87 @@ ATF_TC_CLEANUP(ufetch_64_max, tc) } #endif /* _LP64 */ +ATF_TC_WITH_CLEANUP(ufetch_16_nearmax_overflow); +ATF_TC_HEAD(ufetch_16_nearmax_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "test for correct ufetch_16 near-VM_MAX_ADDRESS pointer behavior"); +} +ATF_TC_BODY(ufetch_16_nearmax_overflow, tc) +{ + uint16_t res; + + CHECK_MODULE(); + + /* + * For no-strict-alignment platforms: address checks must return + * EFAULT. + * + * For strict-alignment platforms: alignment checks must return + * EFAULT. + */ + ATF_REQUIRE_EQ(do_ufetch_16(vm_max_address_minus(1), ), EFAULT); +} +ATF_TC_CLEANUP(ufetch_16_nearmax_overflow, tc) +{ + unload_module(); +} + +ATF_TC_WITH_CLEANUP(ufetch_32_nearmax_overflow); +ATF_TC_HEAD(ufetch_32_nearmax_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "test for correct ufetch_32 near-VM_MAX_ADDRESS pointer behavior"); +} +ATF_TC_BODY(ufetch_32_nearmax_overflow, tc) +{ + uint32_t res; + + CHECK_MODULE(); + + /* + * For no-strict-alignment platforms: address checks must return + * EFAULT. + * + * For strict-alignment platforms: alignment checks must return + * EFAULT. + */ + ATF_REQUIRE_EQ(do_ufetch_32(vm_max_address_minus(3), ), EFAULT); +} +ATF_TC_CLEANUP(ufetch_32_nearmax_overflow, tc) +{ + unload_module(); +} + +#ifdef _LP64 +ATF_TC_WITH_CLEANUP(ufetch_64_nearmax_overflow); +ATF_TC_HEAD(ufetch_64_nearmax_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "test for correct ufetch_64 near-VM_MAX_ADDRESS pointer behavior"); +} +ATF_TC_BODY(ufetch_64_nearmax_overflow, tc) +{ + uint64_t res; + + CHECK_MODULE(); + + /* + * For no-strict-alignment platforms: address checks must return + * EFAULT. + * + * For strict-alignment platforms: alignment checks must return + * EFAULT. + */ + ATF_REQUIRE_EQ(do_ufetch_64(vm_max_address_minus(7), ), EFAULT); +} +ATF_TC_CLEANUP(ufetch_64_nearmax_overflow, tc) +{ + unload_module(); +} +#endif /* _LP64 */ + + ATF_TC_WITH_CLEANUP(ustore_8); ATF_TC_HEAD(ustore_8, tc) { @@ -830,6 +923,81 @@ ATF_TC_CLEANUP(ustore_64_max, tc) } #endif /* _LP64 */ +ATF_TC_WITH_CLEANUP(ustore_16_nearmax_overflow); +ATF_TC_HEAD(ustore_16_nearmax_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "test for correct ustore_16 VM_MAX_ADDRESS pointer behavior"); +} +ATF_TC_BODY(ustore_16_nearmax_overflow, tc) +{ + CHECK_MODULE(); + + /* + * For no-strict-alignment platforms: address checks must return + * EFAULT. + * + * For strict-alignment platforms: alignment checks must return + * EFAULT. + */ + ATF_REQUIRE_EQ(do_ustore_16(vm_max_address_minus(1), 0), EFAULT); +} +ATF_TC_CLEANUP(ustore_16_nearmax_overflow, tc) +{ + unload_module(); +} + +ATF_TC_WITH_CLEANUP(ustore_32_nearmax_overflow); +ATF_TC_HEAD(ustore_32_nearmax_overflow, tc) +{ + atf_tc_set_md_var(tc, "descr", + "test for correct ustore_32 VM_MAX_ADDRESS pointer behavior"); +} +ATF_TC_BODY(ustore_32_nearmax_overflow, tc) +{ + CHECK_MODULE(); + + /* + * For no-strict-alignment platforms: address checks must return + * EFAULT. + * + *
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: jdc Date: Sun Apr 7 15:44:44 UTC 2019 Modified Files: src/sys/arch/sandpoint/sandpoint: com_eumb.c Log Message: Call com_init_regs() in eumbcnattach() to set up com port register mapping. Fixes broken console output after changes to remove COM_REGMAP. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sandpoint/sandpoint/com_eumb.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/sandpoint/sandpoint/com_eumb.c diff -u src/sys/arch/sandpoint/sandpoint/com_eumb.c:1.9 src/sys/arch/sandpoint/sandpoint/com_eumb.c:1.10 --- src/sys/arch/sandpoint/sandpoint/com_eumb.c:1.9 Sat Dec 8 17:46:12 2018 +++ src/sys/arch/sandpoint/sandpoint/com_eumb.c Sun Apr 7 15:44:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: com_eumb.c,v 1.9 2018/12/08 17:46:12 thorpej Exp $ */ +/* $NetBSD: com_eumb.c,v 1.10 2019/04/07 15:44:44 jdc Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_eumb.c,v 1.9 2018/12/08 17:46:12 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_eumb.c,v 1.10 2019/04/07 15:44:44 jdc Exp $"); #include #include @@ -111,6 +111,9 @@ eumbcnattach(bus_space_tag_t tag, int conaddr, int conspeed, int confreq, int contype, int conmode) { static int attached = 0; + bus_space_handle_t dummy_bsh; /* XXX see com.c:comcnattach() */ + + memset(_bsh, 0, sizeof(dummy_bsh)); if (attached) return 0; @@ -119,5 +122,6 @@ eumbcnattach(bus_space_tag_t tag, cnregs.cr_iot = tag; cnregs.cr_iobase = conaddr; cnregs.cr_nports = COM_NPORTS; + com_init_regs(, tag, dummy_bsh, conaddr); return comcnattach1(, conspeed, confreq, contype, conmode); }
CVS commit: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util
Module Name:xsrc Committed By: christos Date: Sun Apr 7 15:34:47 UTC 2019 Modified Files: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util: u_format_tests.c Log Message: VAXinate (No IEEE math) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_format_tests.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_format_tests.c diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_format_tests.c:1.3 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_format_tests.c:1.4 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_format_tests.c:1.3 Sat Mar 9 23:15:36 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_format_tests.c Sun Apr 7 11:34:46 2019 @@ -921,15 +921,19 @@ util_format_test_cases[] = #if !defined(PIPE_CC_MSVC) +#ifdef NAN /* NaNs */ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x), PACKED_1x16(0x7c01), UNPACKED_1x1(NAN, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x), PACKED_1x16(0xfc01), UNPACKED_1x1( -NAN, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x), PACKED_1x16(0x7fff), UNPACKED_1x1(NAN, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x), PACKED_1x16(0x), UNPACKED_1x1( -NAN, 0.0, 0.0, 1.0)}, +#endif +#ifdef INFINITY /* Inf */ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x), PACKED_1x16(0x7c00), UNPACKED_1x1(INFINITY, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x), PACKED_1x16(0xfc00), UNPACKED_1x1( -INFINITY, 0.0, 0.0, 1.0)}, +#endif #endif
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Sun Apr 7 14:58:25 UTC 2019 Modified Files: src/lib/libc/time: localtime.c Log Message: only need to initialize the first type. To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/lib/libc/time/localtime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.118 src/lib/libc/time/localtime.c:1.119 --- src/lib/libc/time/localtime.c:1.118 Sun Apr 7 10:44:51 2019 +++ src/lib/libc/time/localtime.c Sun Apr 7 10:58:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.118 2019/04/07 14:44:51 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.119 2019/04/07 14:58:25 christos Exp $ */ /* Convert timestamp from time_t to struct tm. */ @@ -12,7 +12,7 @@ #if 0 static char elsieid[] = "@(#)localtime.c 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.118 2019/04/07 14:44:51 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.119 2019/04/07 14:58:25 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -1394,7 +1394,7 @@ zoneinit(struct state *sp, char const *n sp->typecnt = 1; sp->charcnt = 0; sp->goback = sp->goahead = false; - sp->types[0] = sp->types[1] = 0; + sp->types[0] = 0; init_ttinfo(>ttis[0], 0, false, 0); strcpy(sp->chars, gmt); sp->defaulttype = 0;
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Sun Apr 7 14:51:15 UTC 2019 Modified Files: src/lib/libc/time: strftime.c Log Message: Don't try to print NULL if we can't get a timezone name. First we try dst, then we try the non-dst name and finally we just print ??? if that did not work. This is not needed to handle the "TZ= date" case which was crashing before because the default timezone was not consistently initialized, but should handle any timezone now. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/lib/libc/time/strftime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/strftime.c diff -u src/lib/libc/time/strftime.c:1.44 src/lib/libc/time/strftime.c:1.45 --- src/lib/libc/time/strftime.c:1.44 Fri Apr 5 17:27:44 2019 +++ src/lib/libc/time/strftime.c Sun Apr 7 10:51:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: strftime.c,v 1.44 2019/04/05 21:27:44 christos Exp $ */ +/* $NetBSD: strftime.c,v 1.45 2019/04/07 14:51:14 christos Exp $ */ /* Convert a broken-down timestamp to a string. */ @@ -35,7 +35,7 @@ static char elsieid[] = "@(#)strftime.c 7.64"; static char elsieid[] = "@(#)strftime.c 8.3"; #else -__RCSID("$NetBSD: strftime.c,v 1.44 2019/04/05 21:27:44 christos Exp $"); +__RCSID("$NetBSD: strftime.c,v 1.45 2019/04/07 14:51:14 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -544,9 +544,15 @@ label: #ifdef TM_ZONE pt = _add(t->TM_ZONE, pt, ptlim); #elif HAVE_TZNAME -if (t->tm_isdst >= 0) - pt = _add(tzgetname(sp, t->tm_isdst), - pt, ptlim); +if (t->tm_isdst >= 0) { + int oerrno = errno, dst = t->tm_isdst; + const char *z = + tzgetname(sp, dst); + if (z == NULL) + z = tzgetname(sp, !dst); + pt = _add(z ? z : "???", pt, ptlim); + errno = oerrno; +} #endif /* ** C99 and later say that %Z must be
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Sun Apr 7 14:50:41 UTC 2019 Modified Files: src/sys/kern: kern_fork.c Log Message: Add a paranoid racy lock check in child_return() In theory a child could be detached for some reason or another during the time window between checking for PSL_TRACED and acquiring proc_lock. Acquire the proc_lock mutex and recheck for PSL_TRACED before emitting SIGTRAP. sigswitch() must acquite it internally anyway so this does not have a negative impact and adds an extra sanity check. For !PSL_TRACED case there is no impact. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 src/sys/kern/kern_fork.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_fork.c diff -u src/sys/kern/kern_fork.c:1.208 src/sys/kern/kern_fork.c:1.209 --- src/sys/kern/kern_fork.c:1.208 Sat Apr 6 11:54:21 2019 +++ src/sys/kern/kern_fork.c Sun Apr 7 14:50:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_fork.c,v 1.208 2019/04/06 11:54:21 kamil Exp $ */ +/* $NetBSD: kern_fork.c,v 1.209 2019/04/07 14:50:41 kamil Exp $ */ /*- * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.208 2019/04/06 11:54:21 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.209 2019/04/07 14:50:41 kamil Exp $"); #include "opt_ktrace.h" #include "opt_dtrace.h" @@ -619,16 +619,24 @@ child_return(void *arg) struct proc *p = l->l_proc; if (p->p_slflag & PSL_TRACED) { + /* Paranoid check */ + mutex_enter(proc_lock); + if (!(p->p_slflag & PSL_TRACED)) { + mutex_exit(proc_lock); + goto my_tracer_is_gone; + } + mutex_enter(p->p_lock); p->p_xsig = SIGTRAP; p->p_sigctx.ps_faked = true; // XXX p->p_sigctx.ps_info._signo = p->p_xsig; p->p_sigctx.ps_info._code = TRAP_CHLD; - sigswitch(0, SIGTRAP, true); + sigswitch(0, SIGTRAP, false); // XXX ktrpoint(KTR_PSIG) mutex_exit(p->p_lock); } +my_tracer_is_gone: md_child_return(l); /*
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Sun Apr 7 14:44:51 UTC 2019 Modified Files: src/lib/libc/time: localtime.c Log Message: Initialize the default timezone a bit more so that tzgetname(3) works. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/lib/libc/time/localtime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.117 src/lib/libc/time/localtime.c:1.118 --- src/lib/libc/time/localtime.c:1.117 Thu Apr 4 15:27:28 2019 +++ src/lib/libc/time/localtime.c Sun Apr 7 10:44:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.117 2019/04/04 19:27:28 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.118 2019/04/07 14:44:51 christos Exp $ */ /* Convert timestamp from time_t to struct tm. */ @@ -12,7 +12,7 @@ #if 0 static char elsieid[] = "@(#)localtime.c 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.117 2019/04/04 19:27:28 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.118 2019/04/07 14:44:51 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -290,7 +290,6 @@ tzgetname(const timezone_t sp, int isdst int i; for (i = 0; i < sp->typecnt; ++i) { const struct ttinfo *const ttisp = >ttis[sp->types[i]]; - if (ttisp->tt_isdst == isdst) return >chars[ttisp->tt_abbrind]; } @@ -1392,9 +1391,10 @@ zoneinit(struct state *sp, char const *n */ sp->leapcnt = 0; /* so, we're off a little */ sp->timecnt = 0; - sp->typecnt = 0; + sp->typecnt = 1; sp->charcnt = 0; sp->goback = sp->goahead = false; + sp->types[0] = sp->types[1] = 0; init_ttinfo(>ttis[0], 0, false, 0); strcpy(sp->chars, gmt); sp->defaulttype = 0;
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: maxv Date: Sun Apr 7 14:28:50 UTC 2019 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_svm.c nvmm_x86_vmx.c Log Message: Invert the filtering priority: now the kernel-managed cpuid leaves are overwritable by the virtualizer. This is useful to virtualizers that want to 100% control every leaf. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/nvmm/x86/nvmm_x86_svm.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/nvmm/x86/nvmm_x86_svm.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.37 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.38 --- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.37 Sat Apr 6 11:49:53 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c Sun Apr 7 14:28:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_svm.c,v 1.37 2019/04/06 11:49:53 maxv Exp $ */ +/* $NetBSD: nvmm_x86_svm.c,v 1.38 2019/04/07 14:28:50 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.37 2019/04/06 11:49:53 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.38 2019/04/07 14:28:50 maxv Exp $"); #include #include @@ -853,6 +853,8 @@ svm_exit_cpuid(struct nvmm_machine *mach cpudata->gprs[NVMM_X64_GPR_RCX] = descs[2]; cpudata->gprs[NVMM_X64_GPR_RDX] = descs[3]; + svm_inkernel_handle_cpuid(vcpu, eax, ecx); + for (i = 0; i < SVM_NCPUIDS; i++) { cpuid = >cpuid[i]; if (!machdata->cpuidpresent[i]) { @@ -877,9 +879,6 @@ svm_exit_cpuid(struct nvmm_machine *mach break; } - /* Overwrite non-tunable leaves. */ - svm_inkernel_handle_cpuid(vcpu, eax, ecx); - svm_inkernel_advance(cpudata->vmcb); exit->reason = NVMM_EXIT_NONE; } Index: src/sys/dev/nvmm/x86/nvmm_x86_vmx.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.24 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.25 --- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.24 Sat Apr 6 11:49:53 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Sun Apr 7 14:28:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_vmx.c,v 1.24 2019/04/06 11:49:53 maxv Exp $ */ +/* $NetBSD: nvmm_x86_vmx.c,v 1.25 2019/04/07 14:28:50 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.24 2019/04/06 11:49:53 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.25 2019/04/07 14:28:50 maxv Exp $"); #include #include @@ -1169,6 +1169,8 @@ vmx_exit_cpuid(struct nvmm_machine *mach cpudata->gprs[NVMM_X64_GPR_RCX] = descs[2]; cpudata->gprs[NVMM_X64_GPR_RDX] = descs[3]; + vmx_inkernel_handle_cpuid(vcpu, eax, ecx); + for (i = 0; i < VMX_NCPUIDS; i++) { cpuid = >cpuid[i]; if (!machdata->cpuidpresent[i]) { @@ -1193,9 +1195,6 @@ vmx_exit_cpuid(struct nvmm_machine *mach break; } - /* Overwrite non-tunable leaves. */ - vmx_inkernel_handle_cpuid(vcpu, eax, ecx); - vmx_inkernel_advance(); exit->reason = NVMM_EXIT_NONE; }
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: maya Date: Sun Apr 7 14:26:26 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc Log Message: Claim ifunc support on a number of architectures. (Architecture list taken from src/tests/libexec/ld.elf_so/t_ifunc.c) This is needed for attribute target_clones to work. Non-functional until a mknative run. Tested by doing a regular GCC build. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/external/gpl3/gcc/dist/gcc/config.gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.55 src/external/gpl3/gcc/dist/gcc/config.gcc:1.56 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.55 Sun Apr 7 14:14:05 2019 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Sun Apr 7 14:26:26 2019 @@ -802,6 +802,11 @@ case ${target} in esac nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h" default_use_cxa_atexit=yes + case ${target} in +arm*-* | i[34567]86-* | powerpc*-* | sparc*-* | x86_64-*) + default_gnu_indirect_function=yes + ;; + esac ;; *-*-openbsd*) tmake_file="t-openbsd"
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: thorpej Date: Sun Apr 7 14:14:03 UTC 2019 Modified Files: src/sys/arch/arm/arm: fusu.S Log Message: ...and now I really have the list of arch versions that require the armv2 style of ufetch_16/ustore_16. And since it's so many, just stop naming it for the arch version, and name it for the instruction capability. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/arm/fusu.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/fusu.S diff -u src/sys/arch/arm/arm/fusu.S:1.6 src/sys/arch/arm/arm/fusu.S:1.7 --- src/sys/arch/arm/arm/fusu.S:1.6 Sun Apr 7 04:11:56 2019 +++ src/sys/arch/arm/arm/fusu.S Sun Apr 7 14:14:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fusu.S,v 1.6 2019/04/07 04:11:56 thorpej Exp $ */ +/* $NetBSD: fusu.S,v 1.7 2019/04/07 14:14:03 thorpej Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -70,6 +70,10 @@ #include +#if (ARM_ARCH_2 + ARM_ARCH_3 + ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6) > 0 +#define NO_LDRHT_STRHT +#endif + #define RETURN_SUCCESS \ mov r0, #0x ; \ mov pc, lr @@ -99,9 +103,9 @@ ENTRY(_ufetch_8) RETURN_SUCCESS END(_ufetch_8) -#if (ARM_ARCH_2 + ARM_ARCH_3 + ARM_ARCH_4 + ARM_ARCH_5) > 0 -/* LINTSTUB: int _ufetch_16_armv2(const uint16_t *uaddr, uint16_t *valp); */ -ENTRY(_ufetch_16_armv2) +#ifdef NO_LDRHT_STRHT +/* LINTSTUB: int _ufetch_16_no_ldrht(const uint16_t *uaddr, uint16_t *valp); */ +ENTRY(_ufetch_16_no_ldrht) UFETCHSTORE_PROLOGUE ldrbt r3, [r0], #1 @@ -112,15 +116,15 @@ ENTRY(_ufetch_16_armv2) UFETCHSTORE_EPILOGUE RETURN_SUCCESS -END(_ufetch_16_armv2) +END(_ufetch_16_no_ldrht) /* LINTSTUB: int _ufetch_16(const uint16_t *uaddr, uint16_t *valp); */ -STRONG_ALIAS(_ufetch_16,_ufetch_16_armv2) +STRONG_ALIAS(_ufetch_16,_ufetch_16_no_ldrht) #else /* XXX */ -/* LINTSTUB: int _ufetch_16_armv6(const uint16_t *uaddr, uint16_t *valp); */ -ENTRY(_ufetch_16_armv6) +/* LINTSTUB: int _ufetch_16_ldrht(const uint16_t *uaddr, uint16_t *valp); */ +ENTRY(_ufetch_16_ldrht) UFETCHSTORE_PROLOGUE ldrht r3, [r0] @@ -128,11 +132,11 @@ ENTRY(_ufetch_16_armv6) UFETCHSTORE_EPILOGUE RETURN_SUCCESS -END(_ufetch_16_armv6) +END(_ufetch_16_ldrht) /* LINTSTUB: int _ufetch_16(const uint16_t *uaddr, uint16_t *valp); */ -STRONG_ALIAS(_ufetch_16,_ufetch_16_armv6) -#endif /* (ARM_ARCH_2 + ARM_ARCH_3 + ARM_ARCH_4 + ARM_ARCH_5) > 0 */ +STRONG_ALIAS(_ufetch_16,_ufetch_16_ldrht) +#endif /* NO_LDRHT_STRHT */ /* LINTSTUB: int _ufetch_32(const uint32_t *uaddr, uint32_t *valp); */ ENTRY(_ufetch_32) @@ -155,9 +159,9 @@ ENTRY(_ustore_8) RETURN_SUCCESS END(_ustore_8) -#if (ARM_ARCH_2 + ARM_ARCH_3 + ARM_ARCH_4 + ARM_ARCH_5) > 0 -/* LINTSTUB: int _ustore_16_armv2(uint16_t *uaddr, uint16_t val); */ -ENTRY(_ustore_16_armv2) +#ifdef NO_LDRHT_STRHT +/* LINTSTUB: int _ustore_16_no_strht(uint16_t *uaddr, uint16_t val); */ +ENTRY(_ustore_16_no_strht) UFETCHSTORE_PROLOGUE #ifdef __ARMEB__ @@ -171,26 +175,26 @@ ENTRY(_ustore_16_armv2) UFETCHSTORE_EPILOGUE RETURN_SUCCESS -END(_ustore_16_armv2) +END(_ustore_16_no_strht) /* LINTSTUB: int _ustore_16(uint16_t *uaddr, uint16_t val); */ -STRONG_ALIAS(_ustore_16,_ustore_16_armv2) +STRONG_ALIAS(_ustore_16,_ustore_16_no_strht) #else /* XXX */ -/* LINTSTUB: int _ustore_16_armv4(uint16_t *uaddr, uint16_t val); */ -ENTRY(_ustore_16_armv6) +/* LINTSTUB: int _ustore_16_strht(uint16_t *uaddr, uint16_t val); */ +ENTRY(_ustore_16_strht) UFETCHSTORE_PROLOGUE strht r1, [r0] UFETCHSTORE_EPILOGUE RETURN_SUCCESS -END(_ustore_16_armv6) +END(_ustore_16_strht) /* LINTSTUB: int _ustore_16(uint16_t *uaddr, uint16_t val); */ -STRONG_ALIAS(_ustore_16,_ustore_16_armv6) -#endif /* (ARM_ARCH_2 + ARM_ARCH_3 + ARM_ARCH_4 + ARM_ARCH_5) > 0 */ +STRONG_ALIAS(_ustore_16,_ustore_16_strht) +#endif /* NO_LDRHT_STRHT */ /* LINTSTUB: int _ustore_32(uint32_t *uaddr, uint32_t val); */ ENTRY(_ustore_32)
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: maya Date: Sun Apr 7 14:14:05 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc Log Message: don't append to nbsd_tm_file. This is the sole definition so fine to do. Only done to reduce diff to upstream. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/external/gpl3/gcc/dist/gcc/config.gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.54 src/external/gpl3/gcc/dist/gcc/config.gcc:1.55 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.54 Sun Apr 7 14:11:23 2019 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Sun Apr 7 14:14:05 2019 @@ -800,7 +800,7 @@ case ${target} in case ${enable_threads} in "" | yes | posix) thread_file='posix' ;; esac - nbsd_tm_file="${nbsd_tm_file} netbsd.h netbsd-stdint.h netbsd-elf.h" + nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h" default_use_cxa_atexit=yes ;; *-*-openbsd*)
CVS commit: src/lib/libnvmm
Module Name:src Committed By: maxv Date: Sun Apr 7 14:13:03 UTC 2019 Modified Files: src/lib/libnvmm: libnvmm.3 Log Message: Sync, and fix grammar. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libnvmm/libnvmm.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/libnvmm/libnvmm.3 diff -u src/lib/libnvmm/libnvmm.3:1.13 src/lib/libnvmm/libnvmm.3:1.14 --- src/lib/libnvmm/libnvmm.3:1.13 Thu Apr 4 17:33:47 2019 +++ src/lib/libnvmm/libnvmm.3 Sun Apr 7 14:13:03 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: libnvmm.3,v 1.13 2019/04/04 17:33:47 maxv Exp $ +.\" $NetBSD: libnvmm.3,v 1.14 2019/04/07 14:13:03 maxv Exp $ .\" .\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 4, 2019 +.Dd April 7, 2019 .Dt LIBNVMM 3 .Os .Sh NAME @@ -361,7 +361,7 @@ struct nvmm_x64_state { uint64_t crs[NVMM_X64_NCR]; uint64_t drs[NVMM_X64_NDR]; uint64_t msrs[NVMM_X64_NMSR]; - uint64_t misc[NVMM_X64_NMISC]; + struct nvmm_x64_state_intr intr; struct fxsave fpu; }; .Ed @@ -466,7 +466,7 @@ event, if: the event is a hardware interrupt, and the VCPU runs with interrupts disabled, or .It -the event is a non-maskable interrupt (NMI), and the VCPU is already in a +the event is a non-maskable interrupt (NMI), and the VCPU is already in an in-NMI context. .El .Pp
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: maya Date: Sun Apr 7 14:11:23 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc src/external/gpl3/gcc/dist/gcc/config: netbsd.h Log Message: Reduce diff to upstream (in config.gcc): Make the NETBSD_ENABLE_PTHREADS unconditional (we don't use the else case) To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/external/gpl3/gcc/dist/gcc/config.gcc cvs rdiff -u -r1.27 -r1.28 src/external/gpl3/gcc/dist/gcc/config/netbsd.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/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.53 src/external/gpl3/gcc/dist/gcc/config.gcc:1.54 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.53 Sun Apr 7 14:08:35 2019 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Sun Apr 7 14:11:23 2019 @@ -798,10 +798,7 @@ case ${target} in gnu_ld=yes use_gcc_stdint=wrap case ${enable_threads} in -"" | yes | posix) - thread_file='posix' - tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS" - ;; +"" | yes | posix) thread_file='posix' ;; esac nbsd_tm_file="${nbsd_tm_file} netbsd.h netbsd-stdint.h netbsd-elf.h" default_use_cxa_atexit=yes Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.27 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.28 --- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.27 Sun Feb 3 11:10:26 2019 +++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h Sun Apr 7 14:11:23 2019 @@ -107,16 +107,12 @@ along with GCC; see the file COPYING3. FIXME: Could eliminate the duplication here if we were allowed to use string concatenation. */ -#ifdef NETBSD_ENABLE_PTHREADS #define NETBSD_LIB_SPEC_PTHREAD \ "%{pthread: \ %{!p: \ %{!pg:-lpthread}} \ %{p:-lpthread_p} \ %{pg:-lpthread_p}}" -#else -#define NETBSD_LIB_SPEC_PTHREAD -#endif #define NETBSD_LIB_SPEC \ NETBSD_LIB_SPEC_PTHREAD \
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: maya Date: Sun Apr 7 14:08:35 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc Log Message: Make the post-netbsd 2.0 case the only case. NFC. (Reducing diff to upstream) To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/external/gpl3/gcc/dist/gcc/config.gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.52 src/external/gpl3/gcc/dist/gcc/config.gcc:1.53 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.52 Tue Mar 19 23:55:28 2019 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Sun Apr 7 14:08:35 2019 @@ -797,32 +797,14 @@ case ${target} in gas=yes gnu_ld=yes use_gcc_stdint=wrap - - # NetBSD 2.0 and later get POSIX threads enabled by default. - # Allow them to be explicitly enabled on any other version. case ${enable_threads} in -"") - case ${target} in -*-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*) - thread_file='posix' - tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS" - ;; - esac - ;; -yes | posix) +"" | yes | posix) thread_file='posix' tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS" ;; esac - - # NetBSD 2.0 and later provide __cxa_atexit(), which we use by - # default (unless overridden by --disable-__cxa_atexit). - case ${target} in -*-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*) - default_use_cxa_atexit=yes - ;; - esac nbsd_tm_file="${nbsd_tm_file} netbsd.h netbsd-stdint.h netbsd-elf.h" + default_use_cxa_atexit=yes ;; *-*-openbsd*) tmake_file="t-openbsd"
CVS commit: src/sys/dev/nvmm
Module Name:src Committed By: maxv Date: Sun Apr 7 14:05:15 UTC 2019 Modified Files: src/sys/dev/nvmm: nvmm.c Log Message: Don't allow unloading when there are still VMs registered, and don't allow auto-unloading at all. Not a big problem actually, because since I changed the module class it's not auto-loadable anymore. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 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/sys/dev/nvmm/nvmm.c diff -u src/sys/dev/nvmm/nvmm.c:1.12 src/sys/dev/nvmm/nvmm.c:1.13 --- src/sys/dev/nvmm/nvmm.c:1.12 Thu Mar 28 19:00:40 2019 +++ src/sys/dev/nvmm/nvmm.c Sun Apr 7 14:05:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm.c,v 1.12 2019/03/28 19:00:40 maxv Exp $ */ +/* $NetBSD: nvmm.c,v 1.13 2019/04/07 14:05:15 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.12 2019/03/28 19:00:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.13 2019/04/07 14:05:15 maxv Exp $"); #include #include @@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.1 #include static struct nvmm_machine machines[NVMM_MAX_MACHINES]; +static volatile unsigned int nmachines __cacheline_aligned; static const struct nvmm_impl *nvmm_impl_list[] = { _x86_svm, /* x86 AMD SVM */ @@ -80,6 +81,7 @@ nvmm_machine_alloc(struct nvmm_machine * mach->present = true; *ret = mach; + atomic_inc_uint(); return 0; } @@ -92,6 +94,7 @@ nvmm_machine_free(struct nvmm_machine *m KASSERT(rw_write_held(>lock)); KASSERT(mach->present); mach->present = false; + atomic_dec_uint(); } static int @@ -845,7 +848,6 @@ nvmm_fini(void) for (n = 0; n < NVMM_MAX_VCPUS; n++) { mutex_destroy([i].cpus[n].lock); } - /* TODO need to free stuff, etc */ } (*nvmm_impl->fini)(); @@ -963,6 +965,9 @@ nvmm_modcmd(modcmd_t cmd, void *arg) return 0; case MODULE_CMD_FINI: + if (nmachines > 0) { + return EBUSY; + } #if defined(_MODULE) { error = devsw_detach(NULL, _cdevsw); @@ -974,6 +979,9 @@ nvmm_modcmd(modcmd_t cmd, void *arg) nvmm_fini(); return 0; + case MODULE_CMD_AUTOUNLOAD: + return EBUSY; + default: return ENOTTY; }
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Apr 7 13:50:29 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: GENERIC GENERIC64 Log Message: Explicitly include bold8x16 and bold16x32 fonts To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/GENERIC cvs rdiff -u -r1.84 -r1.85 src/sys/arch/evbarm/conf/GENERIC64 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/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.28 src/sys/arch/evbarm/conf/GENERIC:1.29 --- src/sys/arch/evbarm/conf/GENERIC:1.28 Sun Mar 31 13:26:09 2019 +++ src/sys/arch/evbarm/conf/GENERIC Sun Apr 7 13:50:29 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.28 2019/03/31 13:26:09 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.29 2019/04/07 13:50:29 jmcneill Exp $ # # GENERIC ARM (aarch32) kernel # @@ -574,6 +574,8 @@ options WSDISPLAY_MULTICONS options WSDISPLAY_SCROLLSUPPORT pseudo-device wsmux pseudo-device wsfont +options FONT_BOLD8x16 +options FONT_BOLD16x32 # GPU #nouveau* at fdt? # NVIDIA GPU Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.84 src/sys/arch/evbarm/conf/GENERIC64:1.85 --- src/sys/arch/evbarm/conf/GENERIC64:1.84 Sun Mar 17 08:17:56 2019 +++ src/sys/arch/evbarm/conf/GENERIC64 Sun Apr 7 13:50:29 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.84 2019/03/17 08:17:56 skrll Exp $ +# $NetBSD: GENERIC64,v 1.85 2019/04/07 13:50:29 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -414,6 +414,8 @@ options WSDISPLAY_MULTICONS options WSDISPLAY_SCROLLSUPPORT pseudo-device wsmux pseudo-device wsfont +options FONT_BOLD8x16 +options FONT_BOLD16x32 # GPU #nouveau* at fdt? # NVIDIA GPU
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Apr 7 13:48:23 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1228 To generate a diff of this commit: cvs rdiff -u -r1.1.2.125 -r1.1.2.126 src/doc/CHANGES-8.1 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-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.125 src/doc/CHANGES-8.1:1.1.2.126 --- src/doc/CHANGES-8.1:1.1.2.125 Sun Apr 7 11:02:13 2019 +++ src/doc/CHANGES-8.1 Sun Apr 7 13:48:23 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.125 2019/04/07 11:02:13 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.126 2019/04/07 13:48:23 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2822,3 +2822,8 @@ sys/dev/ic/msm6242b.c1.4 Remove misplaced semicolon. [rin, ticket #1227] +sys/dev/pci/if_bge.c1.328 + + Fix ASIC revision check. + [bouyer, ticket #1228] +
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Apr 7 13:46:39 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-8]: if_bge.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1228): sys/dev/pci/if_bge.c: revision 1.328 Fix ASIC check, BGE_ASICREV(sc->bge_chipid) is not a chipid. Fixes bogus input error reporting in stat. This is cosmetic, exept for routed(8) which thinks that the interface is broken and stops accepting routes from it. To generate a diff of this commit: cvs rdiff -u -r1.310.2.5 -r1.310.2.6 src/sys/dev/pci/if_bge.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_bge.c diff -u src/sys/dev/pci/if_bge.c:1.310.2.5 src/sys/dev/pci/if_bge.c:1.310.2.6 --- src/sys/dev/pci/if_bge.c:1.310.2.5 Thu Mar 7 17:38:59 2019 +++ src/sys/dev/pci/if_bge.c Sun Apr 7 13:46:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.310.2.5 2019/03/07 17:38:59 martin Exp $ */ +/* $NetBSD: if_bge.c,v 1.310.2.6 2019/04/07 13:46:39 martin Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.310.2.5 2019/03/07 17:38:59 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.310.2.6 2019/04/07 13:46:39 martin Exp $"); #include #include @@ -4769,8 +4769,8 @@ bge_stats_update_regs(struct bge_softc * * ignore the counter */ if (BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5717 && - BGE_ASICREV(sc->bge_chipid) != BGE_CHIPID_BCM5719_A0 && - BGE_ASICREV(sc->bge_chipid) != BGE_CHIPID_BCM5720_A0) { + sc->bge_chipid != BGE_CHIPID_BCM5719_A0 && + sc->bge_chipid != BGE_CHIPID_BCM5720_A0) { ifp->if_ierrors += CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_DROPS); } ifp->if_ierrors += CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_ERRORS);
CVS commit: src/sys/dev/ata
Module Name:src Committed By: bouyer Date: Sun Apr 7 13:00:00 UTC 2019 Modified Files: src/sys/dev/ata: wd.c Log Message: Really implement WDF_DIRTY. patch(1) did something silly here ... To generate a diff of this commit: cvs rdiff -u -r1.448 -r1.449 src/sys/dev/ata/wd.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/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.448 src/sys/dev/ata/wd.c:1.449 --- src/sys/dev/ata/wd.c:1.448 Fri Apr 5 21:31:44 2019 +++ src/sys/dev/ata/wd.c Sun Apr 7 13:00:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.448 2019/04/05 21:31:44 bouyer Exp $ */ +/* $NetBSD: wd.c,v 1.449 2019/04/07 13:00:00 bouyer Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.448 2019/04/05 21:31:44 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.449 2019/04/07 13:00:00 bouyer Exp $"); #include "opt_ata.h" #include "opt_wd.h" @@ -719,8 +719,12 @@ wdstart1(struct wd_softc *wd, struct buf if (wd->sc_flags & WDF_LBA) xfer->c_bio.flags |= ATA_LBA; - if (bp->b_flags & B_READ) + if (bp->b_flags & B_READ) { xfer->c_bio.flags |= ATA_READ; + } else { + /* it's a write */ + wd->sc_flags |= WDF_DIRTY; + } if (bp->b_flags & B_MEDIA_FUA) { /* If not using NCQ, the command WRITE DMA FUA EXT is LBA48 */ KASSERT((wd->sc_flags & WDF_LBA48) != 0); @@ -1144,7 +1148,8 @@ wd_lastclose(device_t self) KASSERTMSG(bufq_peek(wd->sc_dksc.sc_bufq) == NULL, "bufq not empty"); - wd_flushcache(wd, AT_WAIT, false); + if (wd->sc_flags & WDF_DIRTY) + wd_flushcache(wd, AT_WAIT, false); wd->atabus->ata_delref(wd->drvp); wd->sc_flags &= ~WDF_OPEN; @@ -1847,6 +1852,7 @@ wd_flushcache(struct wd_softc *wd, int f error = EIO; goto out_xfer; } + wd->sc_flags &= ~WDF_DIRTY; error = 0; out_xfer: @@ -2235,7 +2241,6 @@ wddebug(void) atachannel_debug(wd->drvp->chnl_softc); } - wd->sc_flags &= ~WDF_DIRTY; return 0; } #endif /* ATADEBUG */
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: bouyer Date: Sun Apr 7 12:23:54 UTC 2019 Modified Files: src/sys/arch/xen/include: xenring.h Log Message: blkif_x86_{32,64}_* are not identical to blkif_*, internal fields have different alignements and this change their sizes. Copy them back from their netbsd-8 definitions. Fixes PR port-xen/54099 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/xen/include/xenring.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/xen/include/xenring.h diff -u src/sys/arch/xen/include/xenring.h:1.3 src/sys/arch/xen/include/xenring.h:1.4 --- src/sys/arch/xen/include/xenring.h:1.3 Sat Feb 2 15:09:32 2019 +++ src/sys/arch/xen/include/xenring.h Sun Apr 7 12:23:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xenring.h,v 1.3 2019/02/02 15:09:32 cherry Exp $ */ +/* $NetBSD: xenring.h,v 1.4 2019/04/07 12:23:54 bouyer Exp $ */ /* * Glue goop for xbd ring request/response protocol structures. @@ -32,14 +32,46 @@ * Define ring types. These were previously part of the public API. * Not anymore. */ -DEFINE_RING_TYPES(blkif_x86_32, struct blkif_request, struct blkif_response); -DEFINE_RING_TYPES(blkif_x86_64, struct blkif_request, struct blkif_response); +/* i386 requests/responses */ +struct blkif_x86_32_request { +uint8_toperation;/* BLKIF_OP_??? */ +uint8_tnr_segments; /* number of segments */ +blkif_vdev_t handle; /* only for read/write requests */ +uint64_t id; /* private guest value, echoed in resp */ +blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ +struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; +} __packed; +typedef struct blkif_x86_32_request blkif_x86_32_request_t; + +struct blkif_x86_32_response { +uint64_tid; /* copied from request */ +uint8_t operation; /* copied from request */ +uint8_t _pad; +int16_t status; /* BLKIF_RSP_??? */ +} __packed; +typedef struct blkif_x86_32_response blkif_x86_32_response_t; + +/* amd64-type requests/responses (always used in frontends ) */ + +struct blkif_x86_64_request { +uint8_toperation;/* BLKIF_OP_??? */ +uint8_tnr_segments; /* number of segments */ +blkif_vdev_t handle; /* only for read/write requests */ +uint64_t __attribute__((__aligned__(8))) id;/* private guest value, echoed in resp */ +blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ +struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; +}; +typedef struct blkif_x86_64_request blkif_x86_64_request_t; -typedef struct blkif_request blkif_x86_64_request_t; -typedef struct blkif_response blkif_x86_64_response_t; -typedef struct blkif_request blkif_x86_32_request_t; -typedef struct blkif_response blkif_x86_32_response_t; +struct blkif_x86_64_response { +uint64_t __attribute__((__aligned__(8))) id; /* copied from request */ +uint8_t operation; /* copied from request */ +int16_t status; /* BLKIF_RSP_??? */ +}; +typedef struct blkif_x86_64_response blkif_x86_64_response_t; +DEFINE_RING_TYPES(blkif_x86_32, struct blkif_x86_32_request, struct blkif_x86_32_response); +DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request, struct blkif_x86_64_response); union blkif_back_ring_proto { blkif_back_ring_t ring_n; /* native/common members */
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Sun Apr 7 12:21:21 UTC 2019 Modified Files: src/sys/arch/xen/xen: xbdback_xenbus.c Log Message: Adjyst some debug printfs To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/xen/xen/xbdback_xenbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.71 src/sys/arch/xen/xen/xbdback_xenbus.c:1.72 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.71 Sat Feb 2 12:32:55 2019 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Sun Apr 7 12:21:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.71 2019/02/02 12:32:55 cherry Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.72 2019/04/07 12:21:20 bouyer Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.71 2019/02/02 12:32:55 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.72 2019/04/07 12:21:20 bouyer Exp $"); #include #include @@ -1501,8 +1501,8 @@ xbdback_co_io_gotfrag2(struct xbdback_in } xbd_io->xio_buf.b_bcount += (daddr_t)(seg_size * VBD_BSIZE); - XENPRINTF(("xbdback_io domain %d: start sect %d size %d\n", - xbdi->xbdi_domid, (int)xbdi->xbdi_next_sector, seg_size)); + XENPRINTF(("xbdback_io domain %d: start sect %ld size %d\n", + xbdi->xbdi_domid, (long)xbdi->xbdi_next_sector, seg_size)); /* Finally, the end of the segment loop! */ xbdi->xbdi_next_sector += seg_size; @@ -1663,7 +1663,7 @@ xbdback_iodone(struct buf *bp) : BLKIF_RSP_OKAY; XENPRINTF(("xbdback_io domain %d: end request %"PRIu64 - "error=%d\n", + " error=%d\n", xbdi->xbdi_domid, xbd_req->rq_id, error)); xbdback_send_reply(xbdi, xbd_req->rq_id, xbd_req->rq_operation, error);
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Apr 7 11:02:13 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1227 To generate a diff of this commit: cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-8.1 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-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.124 src/doc/CHANGES-8.1:1.1.2.125 --- src/doc/CHANGES-8.1:1.1.2.124 Fri Apr 5 08:42:48 2019 +++ src/doc/CHANGES-8.1 Sun Apr 7 11:02:13 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.124 2019/04/05 08:42:48 msaitoh Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.125 2019/04/07 11:02:13 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2816,3 +2816,9 @@ sys/sys/dkio.h 1.25 Add a disk ioctl DIOCRMWEDGES to remove all wedges of a given disk (if not busy). [martin, ticket #1223] + +sys/dev/ic/msm6242b.c1.4 + + Remove misplaced semicolon. + [rin, ticket #1227] +
CVS commit: [netbsd-8] src/sys/dev/ic
Module Name:src Committed By: martin Date: Sun Apr 7 10:55:24 UTC 2019 Modified Files: src/sys/dev/ic [netbsd-8]: msm6242b.c Log Message: Pull up following revision(s) (requested by rin in ticket #1227): sys/dev/ic/msm6242b.c: revision 1.4 Remove misplaced semicolon, found by GCC 6. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.22.1 src/sys/dev/ic/msm6242b.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/ic/msm6242b.c diff -u src/sys/dev/ic/msm6242b.c:1.3 src/sys/dev/ic/msm6242b.c:1.3.22.1 --- src/sys/dev/ic/msm6242b.c:1.3 Wed Dec 4 07:48:59 2013 +++ src/sys/dev/ic/msm6242b.c Sun Apr 7 10:55:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msm6242b.c,v 1.3 2013/12/04 07:48:59 rkujawa Exp $ */ +/* $NetBSD: msm6242b.c,v 1.3.22.1 2019/04/07 10:55:24 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: msm6242b.c,v 1.3 2013/12/04 07:48:59 rkujawa Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msm6242b.c,v 1.3.22.1 2019/04/07 10:55:24 martin Exp $"); /* * Driver for OKI MSM6242B Real Time Clock. Somewhat based on an ancient, amiga @@ -123,7 +123,7 @@ msm6242b_gettime_ymdhms(todr_chip_handle MSM6242B_PMAM_BIT) == 0 && dt->dt_hour == 12) dt->dt_hour = 0; else if ((msm6242b_read(sc, MSM6242B_10HOUR_PMAM) & - MSM6242B_PMAM_BIT) && dt->dt_hour != 12); + MSM6242B_PMAM_BIT) && dt->dt_hour != 12) dt->dt_hour += 12; }
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sun Apr 7 09:20:04 UTC 2019 Modified Files: src/sys/kern: kern_malloc.c subr_asan.c subr_kmem.c subr_pool.c src/sys/sys: asan.h src/sys/uvm: uvm_glue.c Log Message: Provide a code argument in kasan_mark(), and give a code to each caller. Five codes used: GenericRedZone, MallocRedZone, KmemRedZone, PoolRedZone, and PoolUseAfterFree. This can greatly help debugging complex memory corruptions. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/kern/kern_malloc.c cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_asan.c cvs rdiff -u -r1.74 -r1.75 src/sys/kern/subr_kmem.c cvs rdiff -u -r1.247 -r1.248 src/sys/kern/subr_pool.c cvs rdiff -u -r1.9 -r1.10 src/sys/sys/asan.h cvs rdiff -u -r1.166 -r1.167 src/sys/uvm/uvm_glue.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_malloc.c diff -u src/sys/kern/kern_malloc.c:1.156 src/sys/kern/kern_malloc.c:1.157 --- src/sys/kern/kern_malloc.c:1.156 Thu Mar 7 18:32:10 2019 +++ src/sys/kern/kern_malloc.c Sun Apr 7 09:20:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_malloc.c,v 1.156 2019/03/07 18:32:10 maxv Exp $ */ +/* $NetBSD: kern_malloc.c,v 1.157 2019/04/07 09:20:04 maxv Exp $ */ /* * Copyright (c) 1987, 1991, 1993 @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.156 2019/03/07 18:32:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.157 2019/04/07 09:20:04 maxv Exp $"); #include #include @@ -139,7 +139,7 @@ kern_malloc(unsigned long reqsize, int f #endif mh++; - kasan_mark(mh, origsize, size); + kasan_mark(mh, origsize, size, KASAN_MALLOC_REDZONE); return mh; } @@ -153,7 +153,7 @@ kern_free(void *addr) mh--; kasan_mark(addr, mh->mh_size - sizeof(struct malloc_header), - mh->mh_size - sizeof(struct malloc_header)); + mh->mh_size - sizeof(struct malloc_header), KASAN_MALLOC_REDZONE); if (mh->mh_size >= PAGE_SIZE + sizeof(struct malloc_header)) kmem_intr_free((char *)addr - PAGE_SIZE, Index: src/sys/kern/subr_asan.c diff -u src/sys/kern/subr_asan.c:1.5 src/sys/kern/subr_asan.c:1.6 --- src/sys/kern/subr_asan.c:1.5 Sun Feb 24 10:44:41 2019 +++ src/sys/kern/subr_asan.c Sun Apr 7 09:20:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_asan.c,v 1.5 2019/02/24 10:44:41 maxv Exp $ */ +/* $NetBSD: subr_asan.c,v 1.6 2019/04/07 09:20:04 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.5 2019/02/24 10:44:41 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.6 2019/04/07 09:20:04 maxv Exp $"); #include #include @@ -51,17 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: subr_asan.c, /* The MD code. */ #include -/* Our redzone values. */ -#define KASAN_MEMORY_FREED 0xFA -#define KASAN_MEMORY_REDZONE 0xFB - -/* Stack redzone values. Part of the compiler ABI. */ -#define KASAN_STACK_LEFT 0xF1 -#define KASAN_STACK_MID 0xF2 -#define KASAN_STACK_RIGHT 0xF3 -#define KASAN_STACK_PARTIAL 0xF4 -#define KASAN_USE_AFTER_SCOPE 0xF8 - /* ASAN ABI version. */ #if defined(__clang__) && (__clang_major__ - 0 >= 6) #define ASAN_ABI_VERSION 8 @@ -167,10 +156,16 @@ static inline const char * kasan_code_name(uint8_t code) { switch (code) { - case KASAN_MEMORY_FREED: - return "UseAfterFree"; - case KASAN_MEMORY_REDZONE: - return "RedZone"; + case KASAN_GENERIC_REDZONE: + return "GenericRedZone"; + case KASAN_MALLOC_REDZONE: + return "MallocRedZone"; + case KASAN_KMEM_REDZONE: + return "KmemRedZone"; + case KASAN_POOL_REDZONE: + return "PoolRedZone"; + case KASAN_POOL_FREED: + return "PoolUseAfterFree"; case 1 ... 7: return "RedZonePartial"; case KASAN_STACK_LEFT: @@ -217,7 +212,7 @@ kasan_shadow_Nbyte_markvalid(const void } static __always_inline void -kasan_shadow_Nbyte_fill(const void *addr, size_t size, uint8_t val) +kasan_shadow_Nbyte_fill(const void *addr, size_t size, uint8_t code) { void *shad; @@ -232,7 +227,7 @@ kasan_shadow_Nbyte_fill(const void *addr shad = (void *)kasan_md_addr_to_shad(addr); size = size >> KASAN_SHADOW_SCALE_SHIFT; - __builtin_memset(shad, val, size); + __builtin_memset(shad, code, size); } void @@ -243,13 +238,13 @@ kasan_add_redzone(size_t *size) } static void -kasan_markmem(const void *addr, size_t size, bool valid) +kasan_markmem(const void *addr, size_t size, bool valid, uint8_t code) { KASSERT((vaddr_t)addr % KASAN_SHADOW_SCALE_SIZE == 0); if (valid) { kasan_shadow_Nbyte_markvalid(addr, size); } else { - kasan_shadow_Nbyte_fill(addr, size, KASAN_MEMORY_REDZONE); + kasan_shadow_Nbyte_fill(addr, size, code); } } @@ -265,16 +260,16 @@ kasan_softint(struct lwp *l) * In an area of size 'sz_with_redz', mark the 'size' first bytes as valid, * and the rest as invalid. There are generally two use cases: * - * o
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sun Apr 7 08:37:38 UTC 2019 Modified Files: src/sys/kern: subr_pool.c Log Message: Fix tiny race in pool+KASAN, that resulted in occasional false positives. We were uselessly marking already valid areas as valid. When doing that, our KASAN code emits two calls to kasan_markmem, and there is a very small window where the area becomes invalid. So, if the area happens to be already globally referenced, and if another thread happens to read the buffer via this reference, we get a false positive. This happens only with pool_caches that have a pc_ctor that creates a global reference to the buffer, and there is one single pool_cache that does that: 'file_cache'. So now, two changes: - In pool_cache_get_slow(), the pool_get() has already redzoned the object, so no need to call pool_redzone_fill(). - In pool_cache_destruct_object1(), don't re-mark the object. If there is no ctor pool_put is fine with already-invalid objects, if there is a ctor the object was not marked as invalid in the first place; so in either case, the re-marking is not needed. Fixes PR/53674. Although very rare and difficult to reproduce, a local quarantine patch of mine made the false positives recurrent. To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/kern/subr_pool.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.246 src/sys/kern/subr_pool.c:1.247 --- src/sys/kern/subr_pool.c:1.246 Thu Mar 28 18:12:24 2019 +++ src/sys/kern/subr_pool.c Sun Apr 7 08:37:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.246 2019/03/28 18:12:24 maxv Exp $ */ +/* $NetBSD: subr_pool.c,v 1.247 2019/04/07 08:37:38 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.246 2019/03/28 18:12:24 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.247 2019/04/07 08:37:38 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -2129,16 +2129,6 @@ pool_cache_reclaim(pool_cache_t pc) static void pool_cache_destruct_object1(pool_cache_t pc, void *object) { - if (pc->pc_pool.pr_redzone) { - /* - * The object is marked as invalid. Temporarily mark it as - * valid for the destructor. pool_put below will re-mark it - * as invalid. - */ - kasan_mark(object, pc->pc_pool.pr_reqsize, - pc->pc_pool.pr_reqsize_with_redzone); - } - (*pc->pc_dtor)(pc->pc_arg, object); pool_put(>pc_pool, object); } @@ -2396,7 +2386,6 @@ pool_cache_get_slow(pool_cache_cpu_t *cc } FREECHECK_OUT(>pc_freecheck, object); - pool_redzone_fill(>pc_pool, object); pool_cache_kleak_fill(pc, object); return false; }
CVS commit: src/external/mit/xorg/lib
Module Name:src Committed By: maya Date: Sun Apr 7 08:14:21 UTC 2019 Modified Files: src/external/mit/xorg/lib: libglsl.mk Log Message: workaround gcc/vax bugs To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libglsl.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/libglsl.mk diff -u src/external/mit/xorg/lib/libglsl.mk:1.4 src/external/mit/xorg/lib/libglsl.mk:1.5 --- src/external/mit/xorg/lib/libglsl.mk:1.4 Sun Mar 10 10:51:58 2019 +++ src/external/mit/xorg/lib/libglsl.mk Sun Apr 7 08:14:20 2019 @@ -1,4 +1,4 @@ -# $NetBSD: libglsl.mk,v 1.4 2019/03/10 10:51:58 mrg Exp $ +# $NetBSD: libglsl.mk,v 1.5 2019/04/07 08:14:20 maya Exp $ LIBGLSL_GENERATED_CXX_FILES = \ glsl_lexer.cpp \ @@ -127,6 +127,13 @@ LIBGLSL_FILES = \ nir_types.cpp \ shader_enums.c +# XXX +.if ${MACHINE} == "vax" +COPTS.ir_constant_expression.cpp+= -O0 +COPTS.ir.cpp+= -O0 +COPTS.nir_constant_expressions.c+= -O0 +.endif + LIBGLCPP_GENERATED_FILES = \ glcpp-lex.c \ glcpp-parse.c