CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 21:50:21 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libbacktrace/arch/earm: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmeb: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmhf: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmhfeb: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6eb: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hf: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv6hfeb: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7eb: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hf: backtrace-supported.h src/external/gpl3/gcc/lib/libbacktrace/arch/earmv7hfeb: backtrace-supported.h src/external/gpl3/gcc/lib/libgcc/arch/earm: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmeb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmhf: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmhfeb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv4: defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv6: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv6eb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv6hf: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv6hfeb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv7: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv7eb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv7hf: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/arch/earmv7hfeb: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earm: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgomp/arch/earm: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmeb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmhf: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmhfeb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv6: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv6eb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv6hf: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv6hfeb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv7: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv7eb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv7hf: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libgomp/arch/earmv7hfeb: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libobjc/arch/earm: defs.mk src/external/gpl3/gcc/lib/libobjc/arch/earmeb: defs.mk
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: christos Date: Tue Feb 5 19:42:31 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_compat80.c Log Message: use -> instead of . To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/raidframe/rf_compat80.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/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.9 src/sys/dev/raidframe/rf_compat80.c:1.10 --- src/sys/dev/raidframe/rf_compat80.c:1.9 Tue Feb 5 12:13:37 2019 +++ src/sys/dev/raidframe/rf_compat80.c Tue Feb 5 14:42:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.9 2019/02/05 17:13:37 christos Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.10 2019/02/05 19:42:31 christos Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -226,8 +226,8 @@ static int rf_fail_disk80(RF_Raid_t *raidPtr, struct rf_recon_req80 *req80) { struct rf_recon_req req = { - .col = req80.col, - .flags = req80.flags, + .col = req80->col, + .flags = req80->flags, }; return rf_fail_disk(raidPtr, ); }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue Feb 5 21:01:38 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_mixer.c Log Message: Implement page flip API To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_mixer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_mixer.c diff -u src/sys/arch/arm/sunxi/sunxi_mixer.c:1.4 src/sys/arch/arm/sunxi/sunxi_mixer.c:1.5 --- src/sys/arch/arm/sunxi/sunxi_mixer.c:1.4 Tue Feb 5 00:21:35 2019 +++ src/sys/arch/arm/sunxi/sunxi_mixer.c Tue Feb 5 21:01:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_mixer.c,v 1.4 2019/02/05 00:21:35 jmcneill Exp $ */ +/* $NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.4 2019/02/05 00:21:35 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $"); #include #include @@ -222,14 +222,61 @@ struct sunxi_mixer_softc { #define to_sunxi_mixer_crtc(x) container_of(x, struct sunxi_mixer_crtc, base) #define to_sunxi_mixer_overlay(x) container_of(x, struct sunxi_mixer_overlay, base) +static int +sunxi_mixer_mode_do_set_base(struct drm_crtc *crtc, struct drm_framebuffer *fb, +int x, int y, int atomic) +{ + struct sunxi_mixer_crtc *mixer_crtc = to_sunxi_mixer_crtc(crtc); + struct sunxi_mixer_softc * const sc = mixer_crtc->sc; + struct sunxi_drm_framebuffer *sfb = atomic? + to_sunxi_drm_framebuffer(fb) : + to_sunxi_drm_framebuffer(crtc->primary->fb); + + uint64_t paddr = (uint64_t)sfb->obj->dmamap->dm_segs[0].ds_addr; + + uint32_t haddr = (paddr >> 32) & OVL_UI_TOP_HADD_LAYER0; + uint32_t laddr = paddr & 0x; + + /* Framebuffer start address */ + OVL_UI_WRITE(sc, OVL_UI_TOP_HADD, haddr); + OVL_UI_WRITE(sc, OVL_UI_TOP_LADD(0), laddr); + + return 0; +} + static void sunxi_mixer_destroy(struct drm_crtc *crtc) { drm_crtc_cleanup(crtc); } +static int +sunxi_mixer_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, +struct drm_pending_vblank_event *event, uint32_t flags) +{ + struct sunxi_mixer_crtc *mixer_crtc = to_sunxi_mixer_crtc(crtc); + struct sunxi_mixer_softc * const sc = mixer_crtc->sc; + unsigned long irqflags; + + drm_crtc_wait_one_vblank(crtc); + + sunxi_mixer_mode_do_set_base(crtc, fb, 0, 0, true); + + /* Commit settings */ + GLB_WRITE(sc, GLB_DBUFFER, GLB_DBUFFER_DOUBLE_BUFFER_RDY); + + if (event) { + spin_lock_irqsave(>dev->event_lock, irqflags); + drm_send_vblank_event(crtc->dev, drm_crtc_index(crtc), event); + spin_unlock_irqrestore(>dev->event_lock, irqflags); + } + + return 0; +} + static const struct drm_crtc_funcs sunxi_mixer_crtc_funcs = { .set_config = drm_crtc_helper_set_config, + .page_flip = sunxi_mixer_page_flip, .destroy = sunxi_mixer_destroy, }; @@ -246,28 +293,6 @@ sunxi_mixer_mode_fixup(struct drm_crtc * } static int -sunxi_mixer_mode_do_set_base(struct drm_crtc *crtc, struct drm_framebuffer *fb, -int x, int y, int atomic) -{ - struct sunxi_mixer_crtc *mixer_crtc = to_sunxi_mixer_crtc(crtc); - struct sunxi_mixer_softc * const sc = mixer_crtc->sc; - struct sunxi_drm_framebuffer *sfb = atomic? - to_sunxi_drm_framebuffer(fb) : - to_sunxi_drm_framebuffer(crtc->primary->fb); - - uint64_t paddr = (uint64_t)sfb->obj->dmamap->dm_segs[0].ds_addr; - - uint32_t haddr = (paddr >> 32) & OVL_UI_TOP_HADD_LAYER0; - uint32_t laddr = paddr & 0x; - - /* Framebuffer start address */ - OVL_UI_WRITE(sc, OVL_UI_TOP_HADD, haddr); - OVL_UI_WRITE(sc, OVL_UI_TOP_LADD(0), laddr); - - return 0; -} - -static int sunxi_mixer_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode, int x, int y, struct drm_framebuffer *old_fb)
CVS commit: src/share/doc/smm/18.net
Module Name:src Committed By: christos Date: Tue Feb 5 19:53:14 UTC 2019 Modified Files: src/share/doc/smm/18.net: 6.t Log Message: comment out the IFF_TRAILERS stuff that is no longer relevant and add the missing flags. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/doc/smm/18.net/6.t Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/doc/smm/18.net/6.t diff -u src/share/doc/smm/18.net/6.t:1.5 src/share/doc/smm/18.net/6.t:1.6 --- src/share/doc/smm/18.net/6.t:1.5 Thu Aug 7 06:30:55 2003 +++ src/share/doc/smm/18.net/6.t Tue Feb 5 14:53:13 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: 6.t,v 1.5 2003/08/07 10:30:55 agc Exp $ +.\" $NetBSD: 6.t,v 1.6 2019/02/05 19:53:13 christos Exp $ .\" .\" Copyright (c) 1983, 1986, 1993 .\" The Regents of the University of California. All rights reserved. @@ -447,14 +447,22 @@ The state of an interface and certain ch the \fIif_flags\fP field. The following values are possible: .DS ._d -#define IFF_UP 0x1 /* interface is up */ -#define IFF_BROADCAST 0x2 /* broadcast is possible */ -#define IFF_DEBUG 0x4 /* turn on debugging */ -#define IFF_LOOPBACK 0x8 /* is a loopback net */ -#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ -#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ -#define IFF_RUNNING 0x40 /* resources allocated */ -#define IFF_NOARP 0x80 /* no address resolution protocol */ +#define IFF_UP 0x0001 /* interface is up */ +#define IFF_BROADCAST 0x0002 /* broadcast address valid */ +#define IFF_DEBUG 0x0004 /* turn on debugging */ +#define IFF_LOOPBACK 0x0008 /* is a loopback net */ +#define IFF_POINTOPOINT 0x0010 /* interface is point-to-point link */ +.\" #define IFF_NOTRAILERS 0x0020 /* avoid use of trailers */ +#define IFF_RUNNING 0x0040 /* resources allocated */ +#define IFF_NOARP 0x0080 /* no address resolution protocol */ +#define IFF_PROMISC 0x0100 /* receive all packets */ +#define IFF_ALLMULTI 0x0200 /* receive all multicast packets */ +#define IFF_OACTIVE 0x0400 /* transmission in progress */ +#define IFF_SIMPLEX 0x0800 /* can't hear own transmissions */ +#define IFF_LINK0 0x1000 /* per link layer defined bit */ +#define IFF_LINK1 0x2000 /* per link layer defined bit */ +#define IFF_LINK2 0x4000 /* per link layer defined bit */ +#define IFF_MULTICAST 0x8000 /* supports multicast */ .DE If the interface is connected to a network which supports transmission of \fIbroadcast\fP packets, the IFF_BROADCAST flag will be set and @@ -467,12 +475,14 @@ and the local address of the interface, filtering incoming packets. The interface sets IFF_RUNNING after it has allocated system resources and posted an initial read on the device it manages. This state bit is used to avoid multiple allocation -requests when an interface's address is changed. The IFF_NOTRAILERS -flag indicates the interface should refrain from using a \fItrailer\fP -encapsulation on outgoing packets, or (where per-host negotiation -of trailers is possible) that trailer encapsulations should not be requested; -\fItrailer\fP protocols are described -in section 14. The IFF_NOARP flag indicates the interface should not +requests when an interface's address is changed. +.\" The IFF_NOTRAILERS +.\" flag indicates the interface should refrain from using a \fItrailer\fP +.\" encapsulation on outgoing packets, or (where per-host negotiation +.\" of trailers is possible) that trailer encapsulations should not be +.\" requested; \fItrailer\fP protocols are described +.\" in section 14. +The IFF_NOARP flag indicates the interface should not use an ``address resolution protocol'' in mapping internetwork addresses to local network addresses. .PP
CVS commit: src/sys
Module Name:src Committed By: christos Date: Tue Feb 5 23:28:02 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_compat32.c rf_compat32.h rf_compat50.c rf_compat50.h rf_compat80.c rf_compat80.h rf_netbsd.h rf_netbsdkintf.c src/sys/kern: compat_stub.c src/sys/sys: compat_stub.h Removed Files: src/sys/dev/raidframe: rf_compat50_mod.h rf_compat80_mod.h Log Message: - Redo all the ioctl compat stuff to use a standard "ioctl" interface, and provide methods to the private softc - Provide a function for constructing a RF_Raid_t from an RF_Config_t - Factor out the big inline ioctl code into functions To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/raidframe/rf_compat32.c \ src/sys/dev/raidframe/rf_compat32.h src/sys/dev/raidframe/rf_compat80.h cvs rdiff -u -r1.7 -r1.8 src/sys/dev/raidframe/rf_compat50.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/raidframe/rf_compat50.h cvs rdiff -u -r1.4 -r0 src/sys/dev/raidframe/rf_compat50_mod.h \ src/sys/dev/raidframe/rf_compat80_mod.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/rf_compat80.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/raidframe/rf_netbsd.h cvs rdiff -u -r1.366 -r1.367 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.7 -r1.8 src/sys/kern/compat_stub.c cvs rdiff -u -r1.10 -r1.11 src/sys/sys/compat_stub.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/raidframe/rf_compat32.c diff -u src/sys/dev/raidframe/rf_compat32.c:1.2 src/sys/dev/raidframe/rf_compat32.c:1.3 --- src/sys/dev/raidframe/rf_compat32.c:1.2 Sun Feb 3 03:02:24 2019 +++ src/sys/dev/raidframe/rf_compat32.c Tue Feb 5 18:28:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat32.c,v 1.2 2019/02/03 08:02:24 pgoyette Exp $ */ +/* $NetBSD: rf_compat32.c,v 1.3 2019/02/05 23:28:02 christos Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -38,6 +38,7 @@ #include #include "rf_raid.h" +#include "rf_kintf.h" #include "rf_compat32.h" #include @@ -77,58 +78,104 @@ typedef struct RF_Config_s32 { indicate that configuration should not proceed without user intervention */ -} RF_Config_t32 ; +} RF_Config_t32; -int -rf_config_netbsd32(void *data, RF_Config_t *k_cfg) +static int +rf_config_netbsd32(struct raid_softc *rs, void *data) { - RF_Config_t32 *u_cfg = NETBSD32PTR64(*(netbsd32_pointer_t *)data); - struct RF_Config_s32 *cfg32; + RF_Config_t32 *u_cfg32 = NETBSD32PTR64(*(netbsd32_pointer_t *)data); + RF_Config_t *k_cfg; + RF_Config_t32 *k_cfg32; int rv; - RF_Malloc(cfg32, sizeof(RF_Config_t), (RF_Config_t32 *)); - if (cfg32 == NULL) - return (ENOMEM); - - rv = copyin(u_cfg, cfg32, sizeof(RF_Config_t32)); - if (rv) - goto out; - - k_cfg->numCol = cfg32->numCol; - k_cfg->numSpare = cfg32->numSpare; - memcpy(k_cfg->devs, cfg32->devs, sizeof(k_cfg->devs)); - memcpy(k_cfg->devnames, cfg32->devnames, sizeof(k_cfg->devnames)); - memcpy(k_cfg->spare_devs, cfg32->spare_devs, sizeof(k_cfg->spare_devs)); - memcpy(k_cfg->spare_names, cfg32->spare_names, sizeof(k_cfg->spare_names)); - k_cfg->sectPerSU = cfg32->sectPerSU; - k_cfg->SUsPerPU = cfg32->SUsPerPU; - k_cfg->SUsPerRU = cfg32->SUsPerRU; - k_cfg->parityConfig = cfg32->parityConfig; - memcpy(k_cfg->diskQueueType, cfg32->diskQueueType, sizeof(k_cfg->diskQueueType)); - k_cfg->maxOutstandingDiskReqs = cfg32->maxOutstandingDiskReqs; - memcpy(k_cfg->debugVars, cfg32->debugVars, sizeof(k_cfg->debugVars)); - k_cfg->layoutSpecificSize = cfg32->layoutSpecificSize; - k_cfg->layoutSpecific = NETBSD32PTR64(cfg32->layoutSpecific); - k_cfg->force = cfg32->force; - - out: - RF_Free(cfg32, sizeof(RF_Config_t32)); - return rv; + RF_Malloc(k_cfg32, sizeof(RF_Config_t32), (RF_Config_t32 *)); + if (k_cfg32 == NULL) + return ENOMEM; + + rv = copyin(u_cfg32, k_cfg32, sizeof(RF_Config_t32)); + if (rv) { + RF_Free(k_cfg32, sizeof(RF_Config_t32)); + return ENOMEM; + } + + RF_Malloc(k_cfg, sizeof(RF_Config_t), (RF_Config_t *)); + if (k_cfg == NULL) { + RF_Free(k_cfg32, sizeof(RF_Config_t32)); + RF_Free(k_cfg, sizeof(RF_Config_t)); + } + k_cfg->numCol = k_cfg32->numCol; + k_cfg->numSpare = k_cfg32->numSpare; + memcpy(k_cfg->devs, k_cfg32->devs, sizeof(k_cfg->devs)); + memcpy(k_cfg->devnames, k_cfg32->devnames, sizeof(k_cfg->devnames)); + memcpy(k_cfg->spare_devs, k_cfg32->spare_devs, + sizeof(k_cfg->spare_devs)); + memcpy(k_cfg->spare_names, k_cfg32->spare_names, + sizeof(k_cfg->spare_names)); + k_cfg->sectPerSU = k_cfg32->sectPerSU; + k_cfg->SUsPerPU = k_cfg32->SUsPerPU; + k_cfg->SUsPerRU = k_cfg32->SUsPerRU; + k_cfg->parityConfig = k_cfg32->parityConfig; + memcpy(k_cfg->diskQueueType, k_cfg32->diskQueueType, + sizeof(k_cfg->diskQueueType)); + k_cfg->maxOutstandingDiskReqs = k_cfg32->maxOutstandingDiskReqs; + memcpy(k_cfg->debugVars, k_cfg32->debugVars, sizeof(k_cfg->debugVars)); + k_cfg->layoutSpecificSize =
CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3
Module Name:src Committed By: christos Date: Wed Feb 6 02:57:39 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3: Makefile Log Message: revert, somehow I got the generated file in the wrong directory. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/external/gpl3/gcc/lib/libstdc++-v3/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/gpl3/gcc/lib/libstdc++-v3/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.40 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.41 --- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.40 Tue Feb 5 21:55:54 2019 +++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Tue Feb 5 21:57:39 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2019/02/06 02:55:54 christos Exp $ +# $NetBSD: Makefile,v 1.41 2019/02/06 02:57:39 christos Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -33,7 +33,7 @@ libstdc++.a:: libstdc++-symbols.ver LDFLAGS+= -Wl,-O1 \ -Wl,--gc-sections \ - -Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver + -Wl,--version-script=libstdc++-symbols.ver .endif CXXFLAGS.clang+= -stdlib=libstdc++ -std=c++11 -D_GLIBCXX_ABI_TAG_CXX11=
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Wed Feb 6 03:07:08 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_mixer.c Log Message: Add support for hardware cursors where we can. As far as I can tell, alpha blending only works between overlay channels, and not between layers on a channel. Unfortunately, RT-Mixer1 only has a single UI channel, so this feature is limited to RT-Mixer0. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_drm.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_mixer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_drm.c diff -u src/sys/arch/arm/sunxi/sunxi_drm.c:1.6 src/sys/arch/arm/sunxi/sunxi_drm.c:1.7 --- src/sys/arch/arm/sunxi/sunxi_drm.c:1.6 Mon Feb 4 12:10:13 2019 +++ src/sys/arch/arm/sunxi/sunxi_drm.c Wed Feb 6 03:07:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_drm.c,v 1.6 2019/02/04 12:10:13 jmcneill Exp $ */ +/* $NetBSD: sunxi_drm.c,v 1.7 2019/02/06 03:07:08 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.6 2019/02/04 12:10:13 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.7 2019/02/06 03:07:08 jmcneill Exp $"); #include #include @@ -247,6 +247,7 @@ sunxi_drm_fb_create(struct drm_device *d switch (fb->base.pixel_format) { case DRM_FORMAT_XRGB: + case DRM_FORMAT_ARGB: fb->base.depth = 32; break; default: Index: src/sys/arch/arm/sunxi/sunxi_mixer.c diff -u src/sys/arch/arm/sunxi/sunxi_mixer.c:1.5 src/sys/arch/arm/sunxi/sunxi_mixer.c:1.6 --- src/sys/arch/arm/sunxi/sunxi_mixer.c:1.5 Tue Feb 5 21:01:38 2019 +++ src/sys/arch/arm/sunxi/sunxi_mixer.c Wed Feb 6 03:07:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $ */ +/* $NetBSD: sunxi_mixer.c,v 1.6 2019/02/06 03:07:08 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.5 2019/02/05 21:01:38 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.6 2019/02/06 03:07:08 jmcneill Exp $"); #include #include @@ -36,6 +36,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer. #include #include #include +#include #include #include @@ -47,13 +48,14 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer. #include +#define MIXER_CURSOR_MAXWIDTH 256 +#define MIXER_CURSOR_MAXHEIGHT 256 + #define SUNXI_MIXER_FREQ 43200 #define GLB_BASE 0x0 #define BLD_BASE 0x01000 #define OVL_BASE(n) (0x02000 + (n) * 0x1000) -#define OVL_V_BASE OVL_BASE(0) -#define OVL_UI_BASE OVL_BASE(1) #define VSU_BASE 0x2 #define CSC_BASE(n) ((n) == 0 ? 0xaa050 : 0xa) @@ -67,11 +69,20 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer. /* BLD registers */ #define BLD_FILL_COLOR_CTL 0x000 +#define BLD_FILL_COLOR_CTL_P3_EN __BIT(11) +#define BLD_FILL_COLOR_CTL_P2_EN __BIT(10) #define BLD_FILL_COLOR_CTL_P1_EN __BIT(9) #define BLD_FILL_COLOR_CTL_P0_EN __BIT(8) +#define BLD_FILL_COLOR_CTL_P3_FCEN __BIT(3) +#define BLD_FILL_COLOR_CTL_P2_FCEN __BIT(2) +#define BLD_FILL_COLOR_CTL_P1_FCEN __BIT(1) +#define BLD_FILL_COLOR_CTL_P0_FCEN __BIT(0) +#define BLD_FILL_COLOR(n) (0x004 + (n) * 0x10) #define BLD_CH_ISIZE(n) (0x008 + (n) * 0x10) #define BLD_CH_OFFSET(n) (0x00c + (n) * 0x10) #define BLD_CH_RTCTL 0x080 +#define BLD_CH_RTCTL_P3 __BITS(15,12) +#define BLD_CH_RTCTL_P2 __BITS(11,8) #define BLD_CH_RTCTL_P1 __BITS(7,4) #define BLD_CH_RTCTL_P0 __BITS(3,0) #define BLD_SIZE 0x08c @@ -88,6 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer. #define OVL_V_ATTCTL_LAY_FBFMT_YUV422 0x06 #define OVL_V_ATTCTL_LAY_FBFMT_YUV420 0x0a #define OVL_V_ATTCTL_LAY_FBFMT_YUV411 0x0e +#define OVL_V_ATTCTL_LAY_FBFMT_ARGB_ 0x00 #define OVL_V_ATTCTL_LAY_FBFMT_XRGB_ 0x04 #define OVL_V_ATTCTL_LAY0_EN __BIT(0) #define OVL_V_MBSIZE(n) (0x004 + (n) * 0x30) @@ -112,13 +124,16 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_mixer. /* OVL_UI registers */ #define OVL_UI_ATTR_CTL(n) (0x000 + (n) * 0x20) #define OVL_UI_ATTR_CTL_LAY_FBFMT __BITS(12,8) +#define OVL_UI_ATTR_CTL_LAY_FBFMT_ARGB_ 0x00 #define OVL_UI_ATTR_CTL_LAY_FBFMT_XRGB_ 0x04 #define OVL_UI_ATTR_CTL_LAY_EN __BIT(0) #define OVL_UI_MBSIZE(n) (0x004 + (n) * 0x20) #define OVL_UI_COOR(n) (0x008 + (n) * 0x20) #define OVL_UI_PITCH(n) (0x00c + (n) * 0x20) #define OVL_UI_TOP_LADD(n) (0x010 + (n) * 0x20) +#define OVL_UI_FILL_COLOR(n) (0x018 + (n) * 0x20) #define OVL_UI_TOP_HADD 0x080 +#define OVL_UI_TOP_HADD_LAYER1 __BITS(15,8) #define OVL_UI_TOP_HADD_LAYER0 __BITS(7,0) #define OVL_UI_SIZE 0x088 @@ -158,11 +173,11 @@ enum { MIXER_PORT_OUTPUT = 1, }; -static const char * const compatible[] = { - "allwinner,sun8i-h3-de2-mixer-0", -
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Feb 6 04:14:03 UTC 2019 Modified Files: src/sys/dev/pci: if_cas.c Log Message: Fix a bug that all ports' MAC address become the last port's address on Non-OF environment. The Saturn multi port card has only one VPD ROM and all ports share it. If the card has four port, it has four "local-mac-address" entries. Before this commit, the code keep the last one and use it for all ports. The Saturn four port card has three bridge. e.g. 003:02:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge) 004:00:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge) 004:04:0: Intel S21152BA,S21154AE/BE PCI-PCI Bridge (PCI bridge) 005:00:0: National Semiconductor Saturn (ethernet network, revision 0x30) 005:01:0: National Semiconductor Saturn (ethernet network, revision 0x30) 006:02:0: National Semiconductor Saturn (ethernet network, revision 0x30) 006:03:0: National Semiconductor Saturn (ethernet network, revision 0x30) The card assign each port's PCI device number to match the port number. Use it as the offset of "local-mac-address". Almost the same as FreeBSD. OK'd by mrg and martin. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_cas.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_cas.c diff -u src/sys/dev/pci/if_cas.c:1.31 src/sys/dev/pci/if_cas.c:1.32 --- src/sys/dev/pci/if_cas.c:1.31 Tue Feb 5 06:17:03 2019 +++ src/sys/dev/pci/if_cas.c Wed Feb 6 04:14:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cas.c,v 1.31 2019/02/05 06:17:03 msaitoh Exp $ */ +/* $NetBSD: if_cas.c,v 1.32 2019/02/06 04:14:03 msaitoh Exp $ */ /* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */ /* @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.31 2019/02/05 06:17:03 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.32 2019/02/06 04:14:03 msaitoh Exp $"); #ifndef _MODULE #include "opt_inet.h" @@ -203,6 +203,7 @@ static const u_int8_t cas_promdat2[] = { PCI_CLASS_NETWORK /* class code */ }; +#define CAS_LMA_MAXNUM 4 int cas_pci_enaddr(struct cas_softc *sc, struct pci_attach_args *pa, uint8_t *enaddr) @@ -212,10 +213,11 @@ cas_pci_enaddr(struct cas_softc *sc, str bus_space_handle_t romh; bus_space_tag_t romt; bus_size_t romsize = 0; + uint8_t enaddrs[CAS_LMA_MAXNUM][ETHER_ADDR_LEN]; u_int8_t buf[32], *desc; pcireg_t address; - int dataoff, vpdoff, len; - int rv = -1; + int dataoff, vpdoff, len, lma = 0; + int i, rv = -1; if (pci_mapreg_map(pa, PCI_MAPREG_ROM, PCI_MAPREG_TYPE_MEM, 0, , , NULL, )) @@ -297,8 +299,11 @@ next: continue; desc += strlen("local-mac-address") + 1; - memcpy(enaddr, desc, ETHER_ADDR_LEN); + memcpy(enaddrs[lma], desc, ETHER_ADDR_LEN); + lma++; rv = 0; + if (lma == CAS_LMA_MAXNUM) +break; } break; @@ -306,6 +311,19 @@ next: goto fail; } + i = 0; + /* + * Multi port card has bridge chip. The device number is fixed: + * e.g. + * p0: 005:00:0 + * p1: 005:01:0 + * p2: 006:02:0 + * p3: 006:03:0 + */ + if ((lma > 1) && (pa->pa_device < CAS_LMA_MAXNUM) + && (pa->pa_device < lma)) + i = pa->pa_device; + memcpy(enaddr, enaddrs[i], ETHER_ADDR_LEN); fail: if (romsize != 0) bus_space_unmap(romt, romh, romsize);
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: mrg Date: Wed Feb 6 05:04:41 UTC 2019 Modified Files: src/sys/arch/hppa/spmath: cnv_float.h Log Message: - convert shift results into logical expressions To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/spmath/cnv_float.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/hppa/spmath/cnv_float.h diff -u src/sys/arch/hppa/spmath/cnv_float.h:1.3 src/sys/arch/hppa/spmath/cnv_float.h:1.4 --- src/sys/arch/hppa/spmath/cnv_float.h:1.3 Sun Apr 6 08:03:36 2008 +++ src/sys/arch/hppa/spmath/cnv_float.h Wed Feb 6 05:04:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cnv_float.h,v 1.3 2008/04/06 08:03:36 skrll Exp $ */ +/* $NetBSD: cnv_float.h,v 1.4 2019/02/06 05:04:41 mrg Exp $ */ /* $OpenBSD: cnv_float.h,v 1.5 2001/03/29 03:58:17 mickey Exp $ */ @@ -75,19 +75,19 @@ ((exponent < (SGL_P - 1)) ?\ (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : false) -#define Int_isinexact_to_sgl(int_value) (int_value << (33 - SGL_EXP_LENGTH)) +#define Int_isinexact_to_sgl(int_value) ((int_value << (33 - SGL_EXP_LENGTH)) != 0) #define Sgl_roundnearest_from_int(int_value,sgl_value) \ if (int_value & 1<<(SGL_EXP_LENGTH - 2)) /* round bit */ \ - if ((int_value << (34 - SGL_EXP_LENGTH)) || Slow(sgl_value)) \ + if (((int_value << (34 - SGL_EXP_LENGTH)) != 0) || Slow(sgl_value)) \ Sall(sgl_value)++ #define Dint_isinexact_to_sgl(dint_valueA,dint_valueB) \ -((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) || Dintp2(dint_valueB)) +(((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) != 0) || Dintp2(dint_valueB)) #define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value) \ if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2)) \ - if ((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) || \ + if (((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) != 0) || \ Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++ #define Dint_isinexact_to_dbl(dint_value) \
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 02:49:09 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsd.h rf_netbsdkintf.c rf_raid.h Log Message: Shuffle softc declarations to a different .h file. Create missing rf_get_raid(). Things compile, but don't work correctly. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/raidframe/rf_netbsd.h cvs rdiff -u -r1.367 -r1.368 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/raidframe/rf_raid.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/raidframe/rf_netbsd.h diff -u src/sys/dev/raidframe/rf_netbsd.h:1.32 src/sys/dev/raidframe/rf_netbsd.h:1.33 --- src/sys/dev/raidframe/rf_netbsd.h:1.32 Tue Feb 5 23:28:02 2019 +++ src/sys/dev/raidframe/rf_netbsd.h Wed Feb 6 02:49:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.32 2019/02/05 23:28:02 christos Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.33 2019/02/06 02:49:09 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -103,11 +103,4 @@ typedef struct RF_ConfigSet_s { struct RF_ConfigSet_s *next; } RF_ConfigSet_t; -int rf_fail_disk(RF_Raid_t *, struct rf_recon_req *); - -int rf_inited(const struct raid_softc *); -int rf_get_unit(const struct raid_softc *); -RF_Raid_t *rf_get_raid(struct raid_softc *); -int rf_construct(struct raid_softc *, RF_Config_t *); - #endif /* _RF__RF_NETBSDSTUFF_H_ */ Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.367 src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.367 Tue Feb 5 23:28:02 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Wed Feb 6 02:49:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.367 2019/02/05 23:28:02 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.367 2019/02/05 23:28:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -182,7 +182,6 @@ static void KernelWakeupFunc(struct buf static void InitBP(struct buf *, struct vnode *, unsigned, dev_t, RF_SectorNum_t, RF_SectorCount_t, void *, void (*) (struct buf *), void *, int, struct proc *); -struct raid_softc; static void raidinit(struct raid_softc *); static int raiddoaccess(RF_Raid_t *raidPtr, struct buf *bp); static int rf_get_component_caches(RF_Raid_t *raidPtr, int *); @@ -250,26 +249,6 @@ static struct dkdriver rf_dkdriver = { .d_minphys = minphys }; -struct raid_softc { - struct dk_softc sc_dksc; - int sc_unit; - int sc_flags; /* flags */ - int sc_cflags; /* configuration flags */ - kmutex_t sc_mutex; /* interlock mutex */ - kcondvar_t sc_cv; /* and the condvar */ - uint64_t sc_size; /* size of the raid device */ - charsc_xname[20]; /* XXX external name */ - RF_Raid_t sc_r; - LIST_ENTRY(raid_softc) sc_link; -}; -/* sc_flags */ -#define RAIDF_INITED 0x01 /* unit has been initialized */ -#define RAIDF_SHUTDOWN 0x02 /* unit is being shutdown */ -#define RAIDF_DETACH 0x04 /* detach after final close */ -#define RAIDF_WANTED 0x08 /* someone waiting to obtain a lock */ -#define RAIDF_LOCKED 0x10 /* unit is locked */ -#define RAIDF_UNIT_CHANGED 0x20 /* unit is being changed */ - #define raidunit(x) DISKUNIT(x) #define raidsoftc(dev) (((struct raid_softc *)device_private(dev))->sc_r.softc) @@ -460,6 +439,11 @@ rf_inited(const struct raid_softc *rs) { return (rs->sc_flags & RAIDF_INITED) != 0; } +RF_Raid_t * +rf_get_raid(struct raid_softc *rs) { + return >sc_r; +} + int rf_get_unit(const struct raid_softc *rs) { return rs->sc_unit; Index: src/sys/dev/raidframe/rf_raid.h diff -u src/sys/dev/raidframe/rf_raid.h:1.46 src/sys/dev/raidframe/rf_raid.h:1.47 --- src/sys/dev/raidframe/rf_raid.h:1.46 Tue Jan 8 07:18:18 2019 +++ src/sys/dev/raidframe/rf_raid.h Wed Feb 6 02:49:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid.h,v 1.46 2019/01/08 07:18:18 mrg Exp $ */ +/* $NetBSD: rf_raid.h,v 1.47 2019/02/06 02:49:09 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -305,4 +305,33 @@ struct RF_Raid_s { #endif/* RF_INCLUDE_PARITYLOGGING > 0 */ struct rf_paritymap *parity_map; }; + +struct raid_softc { + struct dk_softc sc_dksc; + int sc_unit; + int sc_flags; /* flags */ + int sc_cflags; /* configuration flags */ + kmutex_t sc_mutex; /* interlock mutex */ + kcondvar_t sc_cv; /* and the condvar */ + uint64_t sc_size; /* size of the raid device */ + charsc_xname[20]; /* XXX external name */ + RF_Raid_t sc_r; +
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 02:49:51 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix logic inversion. Progress, but still broken. To generate a diff of this commit: cvs rdiff -u -r1.368 -r1.369 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 src/sys/dev/raidframe/rf_netbsdkintf.c:1.369 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.368 Wed Feb 6 02:49:09 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Wed Feb 6 02:49:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.368 2019/02/06 02:49:09 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1067,7 +1067,7 @@ rf_must_be_initialized(const struct raid case RAIDFRAME_SET_AUTOCONFIG: case RAIDFRAME_SET_COMPONENT_LABEL: case RAIDFRAME_SET_ROOT: - return (rs->sc_flags & RAIDF_INITED) != 0; + return (rs->sc_flags & RAIDF_INITED) == 0; } return false; }
CVS commit: src/external/gpl3/gcc/lib/libstdc++-v3
Module Name:src Committed By: christos Date: Wed Feb 6 02:55:54 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3: Makefile Log Message: fix objdir build To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/external/gpl3/gcc/lib/libstdc++-v3/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/gpl3/gcc/lib/libstdc++-v3/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.39 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.40 --- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.39 Fri Feb 1 05:37:13 2019 +++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Tue Feb 5 21:55:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2019/02/01 10:37:13 mrg Exp $ +# $NetBSD: Makefile,v 1.40 2019/02/06 02:55:54 christos Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -33,7 +33,7 @@ libstdc++.a:: libstdc++-symbols.ver LDFLAGS+= -Wl,-O1 \ -Wl,--gc-sections \ - -Wl,--version-script=libstdc++-symbols.ver + -Wl,--version-script=${.CURDIR}/libstdc++-symbols.ver .endif CXXFLAGS.clang+= -stdlib=libstdc++ -std=c++11 -D_GLIBCXX_ABI_TAG_CXX11=
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Feb 6 03:16:36 UTC 2019 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.1349 -r1.1350 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1348 -r1.1349 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Feb 6 03:16:08 UTC 2019 Modified Files: src/sys/dev/pci: pcidevs Log Message: >From OpenBSD: - Add NetXen's vendor ID and devices. - Add Sun Neptune. To generate a diff of this commit: cvs rdiff -u -r1.1360 -r1.1361 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1360 src/sys/dev/pci/pcidevs:1.1361 --- src/sys/dev/pci/pcidevs:1.1360 Mon Jan 28 03:37:27 2019 +++ src/sys/dev/pci/pcidevs Wed Feb 6 03:16:08 2019 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1360 2019/01/28 03:37:27 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1361 2019/02/06 03:16:08 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -657,6 +657,7 @@ vendor HINT 0x3388 HiNT vendor 3DLABS 0x3d3d 3D Labs vendor AVANCE2 0x4005 Avance Logic (2nd PCI Vendor ID) vendor ADDTRON 0x4033 Addtron Technology +vendor NETXEN 0x4040 NetXen vendor QINHENG 0x4348 Nanjing QinHeng Electronics vendor ICOMPRESSION 0x Conexant (iCompression) vendor INDCOMPSRC 0x494f Industrial Computer Source @@ -6008,6 +6009,16 @@ product NETMOS MCS9990 0x9990 MCS9990 Qu /* Network Security Technologies */ product NETSEC 7751 0x7751 7751 +/* NetXen Inc products */ +product NETXEN NXB_10GXxR 0x0001 NXB-10GXxR +product NETXEN NXB_10GCX4 0x0002 NXB-10GCX4 +product NETXEN NXB_4GCU 0x0003 NXB-4GCU +product NETXEN NXB_IMEZ 0x0004 IMEZ 10GbE +product NETXEN NXB_HMEZ 0x0005 HMEZ 10GbE +product NETXEN NXB_IMEZ_2 0x0024 IMEZ 10GbE Mgmt +product NETXEN NXB_HMEZ_2 0x0025 HMEZ 10GbE Mgmt +product NETXEN NX3031 0x0100 NX3031 + /* NexGen products */ product NEXGEN NX82C501 0x4e78 NX82C501 Host-PCI Bridge @@ -7140,6 +7151,7 @@ product SUN MS_IIep 0x9000 microSPARC II product SUN US_IIi 0xa000 UltraSPARC IIi PCI product SUN US_IIe 0xa001 UltraSPARC IIe PCI product SUN CASSINI 0xabba Cassini Gigabit Ethernet +product SUN NEPTUNE 0xabcd Neptune /* Sundance Technology products */ product SUNDANCETI IP100A 0x0200 IP100A 10/100 Ethernet
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: mrg Date: Wed Feb 6 04:07:31 UTC 2019 Modified Files: src/sys/arch/amiga/dev: wstsc.c Log Message: properly check SCI_CSR_DREQ in one place. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/dev/wstsc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/dev/wstsc.c diff -u src/sys/arch/amiga/dev/wstsc.c:1.34 src/sys/arch/amiga/dev/wstsc.c:1.35 --- src/sys/arch/amiga/dev/wstsc.c:1.34 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/wstsc.c Wed Feb 6 04:07:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wstsc.c,v 1.34 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: wstsc.c,v 1.35 2019/02/06 04:07:31 mrg Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wstsc.c,v 1.34 2014/01/22 00:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wstsc.c,v 1.35 2019/02/06 04:07:31 mrg Exp $"); #include #include @@ -405,7 +405,7 @@ wstsc_dma_xfer_in2(struct sci_softc *dev } } #else - while (!(*sci_csr * SCI_CSR_DREQ)) + while (!(*sci_csr & SCI_CSR_DREQ)) ; #endif
CVS commit: src/sys/dev/nor
Module Name:src Committed By: mrg Date: Wed Feb 6 04:20:40 UTC 2019 Modified Files: src/sys/dev/nor: cfi.c Log Message: memset(0) the structure, not the pointer itself, and what ever data happens to be after the pointer's stack location. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nor/cfi.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/nor/cfi.c diff -u src/sys/dev/nor/cfi.c:1.8 src/sys/dev/nor/cfi.c:1.9 --- src/sys/dev/nor/cfi.c:1.8 Fri Sep 18 21:30:02 2015 +++ src/sys/dev/nor/cfi.c Wed Feb 6 04:20:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $ */ +/* $NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -33,7 +33,7 @@ #include "opt_cfi.h" #include -__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $"); #include #include @@ -829,7 +829,7 @@ cfi_jedec_fill(struct cfi *cfi, const st cfi->cfi_name = jt->jt_name; struct cfi_query_data *qryp = >cfi_qry_data; - memset(, 0, sizeof(*qryp)); + memset(qryp, 0, sizeof(*qryp)); qryp->id_pri = jt->jt_id_pri; qryp->id_alt = jt->jt_id_alt; qryp->interface_code_desc = jt->jt_interface_code_desc;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: christos Date: Wed Feb 6 03:01:49 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: use 'data' directly. To generate a diff of this commit: cvs rdiff -u -r1.369 -r1.370 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.369 src/sys/dev/raidframe/rf_netbsdkintf.c:1.370 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.369 Tue Feb 5 21:49:50 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Feb 5 22:01:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.369 2019/02/06 02:49:50 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1399,7 +1399,7 @@ raidioctl(dev_t dev, u_long cmd, void *d RF_Raid_t *raidPtr; RF_AccTotals_t *totals; RF_SingleComponent_t component; - RF_DeviceConfig_t *d_cfg, *ucfgp = data; + RF_DeviceConfig_t *d_cfg; int retcode = 0; int column; RF_ComponentLabel_t *clabel; @@ -1519,7 +1519,7 @@ raidioctl(dev_t dev, u_long cmd, void *d return ENOMEM; retcode = rf_get_info(raidPtr, d_cfg); if (retcode == 0) { - retcode = copyout(d_cfg, ucfgp, sizeof(*d_cfg)); + retcode = copyout(d_cfg, data, sizeof(*d_cfg)); } RF_Free(d_cfg, sizeof(RF_DeviceConfig_t)); return retcode;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Wed Feb 6 03:37:13 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Fix GET_INFO. Yes, can probably be simplified. To generate a diff of this commit: cvs rdiff -u -r1.370 -r1.371 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.370 src/sys/dev/raidframe/rf_netbsdkintf.c:1.371 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.370 Wed Feb 6 03:01:48 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Wed Feb 6 03:37:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.370 2019/02/06 03:01:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.371 2019/02/06 03:37:13 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -1399,7 +1399,7 @@ raidioctl(dev_t dev, u_long cmd, void *d RF_Raid_t *raidPtr; RF_AccTotals_t *totals; RF_SingleComponent_t component; - RF_DeviceConfig_t *d_cfg; + RF_DeviceConfig_t *d_cfg, *ucfgp; int retcode = 0; int column; RF_ComponentLabel_t *clabel; @@ -1513,13 +1513,14 @@ raidioctl(dev_t dev, u_long cmd, void *d return rf_rebuild_in_place(raidPtr, data); case RAIDFRAME_GET_INFO: + ucfgp = *(RF_DeviceConfig_t **)data; RF_Malloc(d_cfg, sizeof(RF_DeviceConfig_t), (RF_DeviceConfig_t *)); if (d_cfg == NULL) return ENOMEM; retcode = rf_get_info(raidPtr, d_cfg); if (retcode == 0) { - retcode = copyout(d_cfg, data, sizeof(*d_cfg)); + retcode = copyout(d_cfg, ucfgp, sizeof(*d_cfg)); } RF_Free(d_cfg, sizeof(RF_DeviceConfig_t)); return retcode;
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: mrg Date: Wed Feb 6 04:00:43 UTC 2019 Modified Files: src/external/gpl3/gcc/lib: Makefile.sanitizer src/external/gpl3/gcc/lib/libasan: Makefile src/external/gpl3/gcc/lib/liblsan: Makefile src/external/gpl3/gcc/lib/libtsan: Makefile src/external/gpl3/gcc/lib/libubsan: Makefile Log Message: update the sanitizer source lists for gcc 7. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/Makefile.sanitizer cvs rdiff -u -r1.26 -r1.27 src/external/gpl3/gcc/lib/libasan/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/liblsan/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/libtsan/Makefile cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/lib/libubsan/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/gpl3/gcc/lib/Makefile.sanitizer diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.6 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.7 --- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.6 Sun Jul 1 17:41:49 2018 +++ src/external/gpl3/gcc/lib/Makefile.sanitizer Wed Feb 6 04:00:43 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.sanitizer,v 1.6 2018/07/01 17:41:49 christos Exp $ +# $NetBSD: Makefile.sanitizer,v 1.7 2019/02/06 04:00:43 mrg Exp $ SANITIZER=${GCCDIST}/libsanitizer .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common @@ -10,59 +10,55 @@ interception_type_test.cc \ interception_win.cc SANITIZER_SRCS+= \ -sanitizer_allocator.cc \ -sanitizer_common.cc \ -sanitizer_common_libcdep.cc \ -sanitizer_coverage_libcdep.cc \ -sanitizer_coverage_mapping_libcdep.cc \ -sanitizer_deadlock_detector1.cc \ -sanitizer_deadlock_detector2.cc \ -sanitizer_flags.cc \ -sanitizer_flag_parser.cc \ -sanitizer_libc.cc \ -sanitizer_libignore.cc \ -sanitizer_linux.cc \ -sanitizer_linux_libcdep.cc \ -sanitizer_mac.cc \ -sanitizer_persistent_allocator.cc \ -sanitizer_platform_limits_linux.cc \ -sanitizer_platform_limits_posix.cc \ -sanitizer_posix.cc \ -sanitizer_posix_libcdep.cc \ -sanitizer_printf.cc \ -sanitizer_procmaps_common.cc \ -sanitizer_procmaps_netbsd.cc \ -sanitizer_procmaps_freebsd.cc \ -sanitizer_procmaps_linux.cc \ -sanitizer_procmaps_mac.cc \ -sanitizer_stackdepot.cc \ -sanitizer_stacktrace.cc \ -sanitizer_stacktrace_libcdep.cc \ -sanitizer_stacktrace_printer.cc \ -sanitizer_stoptheworld_linux_libcdep.cc \ -sanitizer_suppressions.cc \ -sanitizer_symbolizer.cc \ -sanitizer_symbolizer_libbacktrace.cc \ -sanitizer_symbolizer_libcdep.cc \ -sanitizer_symbolizer_mac.cc \ -sanitizer_symbolizer_posix_libcdep.cc \ -sanitizer_symbolizer_win.cc \ -sanitizer_thread_registry.cc \ -sanitizer_tls_get_addr.cc \ -sanitizer_unwind_linux_libcdep.cc \ -sanitizer_win.cc - -.PATH: ${SANITIZER}/ubsan -UBSAN_SRCS+= \ -ubsan_diag.cc \ -ubsan_init.cc \ -ubsan_flags.cc \ -ubsan_value.cc + sanitizer_allocator.cc \ + sanitizer_common.cc \ + sanitizer_common_libcdep.cc \ + sanitizer_coverage_libcdep.cc \ + sanitizer_coverage_mapping_libcdep.cc \ + sanitizer_deadlock_detector1.cc \ + sanitizer_deadlock_detector2.cc \ + sanitizer_flags.cc \ + sanitizer_flag_parser.cc \ + sanitizer_libc.cc \ + sanitizer_libignore.cc \ + sanitizer_linux.cc \ + sanitizer_linux_libcdep.cc \ + sanitizer_linux_s390.cc \ + sanitizer_mac.cc \ + sanitizer_persistent_allocator.cc \ + sanitizer_platform_limits_linux.cc \ + sanitizer_platform_limits_posix.cc \ + sanitizer_posix.cc \ + sanitizer_posix_libcdep.cc \ + sanitizer_printf.cc \ + sanitizer_procmaps_common.cc \ + sanitizer_procmaps_freebsd.cc \ + sanitizer_procmaps_netbsd.cc \ + sanitizer_procmaps_linux.cc \ + sanitizer_procmaps_mac.cc \ + sanitizer_stackdepot.cc \ + sanitizer_stacktrace.cc \ + sanitizer_stacktrace_libcdep.cc \ + sanitizer_symbolizer_mac.cc \ + sanitizer_stacktrace_printer.cc \ + sanitizer_stoptheworld_linux_libcdep.cc \ + sanitizer_suppressions.cc \ + sanitizer_symbolizer.cc \ + sanitizer_symbolizer_libbacktrace.cc \ + sanitizer_symbolizer_libcdep.cc \ + sanitizer_symbolizer_posix_libcdep.cc \ + sanitizer_symbolizer_win.cc \ + sanitizer_termination.cc \ + sanitizer_thread_registry.cc \ + sanitizer_tls_get_addr.cc \ + sanitizer_unwind_linux_libcdep.cc \ + sanitizer_win.cc # The linux build does this to avoid preinit sections on shared libraries CSHLIBFLAGS+= -DPIC -SRCS+= ${INTERCEPTION_SRCS} ${SANITIZER_SRCS} ${UBSAN_SRCS} +#SRCS+= ${INTERCEPTION_SRCS} ${SANITIZER_SRCS} ${UBSAN_SRCS} +SRCS+= ${INTERCEPTION_SRCS} ${SANITIZER_SRCS} CPPFLAGS+=-I${SANITIZER}/include -I${SANITIZER} CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude CPPFLAGS+=-D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS Index: src/external/gpl3/gcc/lib/libasan/Makefile diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.26 src/external/gpl3/gcc/lib/libasan/Makefile:1.27 --- src/external/gpl3/gcc/lib/libasan/Makefile:1.26 Sun Jul 1 17:41:49 2018 +++
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: mrg Date: Wed Feb 6 03:59:09 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am Makefile.in Log Message: add sanitizer_procmaps_netbsd.cc To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in 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/libsanitizer/sanitizer_common/Makefile.am diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.1.1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am:1.1.1.4 Sat Jan 19 10:14:03 2019 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am Wed Feb 6 03:59:09 2019 @@ -42,6 +42,7 @@ sanitizer_common_files = \ sanitizer_printf.cc \ sanitizer_procmaps_common.cc \ sanitizer_procmaps_freebsd.cc \ + sanitizer_procmaps_netbsd.cc \ sanitizer_procmaps_linux.cc \ sanitizer_procmaps_mac.cc \ sanitizer_stackdepot.cc \ Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in:1.1.1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in:1.1.1.4 Sat Jan 19 10:14:03 2019 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in Wed Feb 6 03:59:09 2019 @@ -93,6 +93,7 @@ am__objects_1 = sanitizer_allocator.lo s sanitizer_platform_limits_posix.lo sanitizer_posix.lo \ sanitizer_posix_libcdep.lo sanitizer_printf.lo \ sanitizer_procmaps_common.lo sanitizer_procmaps_freebsd.lo \ + sanitizer_procmaps_netbsd.lo \ sanitizer_procmaps_linux.lo sanitizer_procmaps_mac.lo \ sanitizer_stackdepot.lo sanitizer_stacktrace.lo \ sanitizer_stacktrace_libcdep.lo sanitizer_symbolizer_mac.lo \ @@ -323,6 +324,7 @@ sanitizer_common_files = \ sanitizer_printf.cc \ sanitizer_procmaps_common.cc \ sanitizer_procmaps_freebsd.cc \ + sanitizer_procmaps_netbsd.cc \ sanitizer_procmaps_linux.cc \ sanitizer_procmaps_mac.cc \ sanitizer_stackdepot.cc \ @@ -464,6 +466,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_printf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_freebsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_netbsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_linux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_procmaps_mac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanitizer_stackdepot.Plo@am__quote@
CVS commit: src/external/cddl/osnet/lib/libdtrace
Module Name:src Committed By: christos Date: Wed Feb 6 04:23:16 UTC 2019 Modified Files: src/external/cddl/osnet/lib/libdtrace: Makefile Log Message: uses the idiom len = snprintf(, 1, ...) to compute length. needs -Wno-format-truncation To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/cddl/osnet/lib/libdtrace/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/lib/libdtrace/Makefile diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.19 src/external/cddl/osnet/lib/libdtrace/Makefile:1.20 --- src/external/cddl/osnet/lib/libdtrace/Makefile:1.19 Thu Jun 7 09:21:44 2018 +++ src/external/cddl/osnet/lib/libdtrace/Makefile Tue Feb 5 23:23:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2018/06/07 13:21:44 kamil Exp $ +# $NetBSD: Makefile,v 1.20 2019/02/06 04:23:16 christos Exp $ # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -105,6 +105,7 @@ CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/ CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm .PATH: ${.CURDIR}/../../dist/lib/libdtrace/arm .endif +COPTS.dt_link.c += -Wno-format-truncation LFLAGS+=-l
CVS commit: src/sys/arch/aarch64
Module Name:src Committed By: ryo Date: Wed Feb 6 05:33:41 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: pmap.c src/sys/arch/aarch64/include: pmap.h Log Message: improve pmap_remove - don't lock/unlock per page in pmap_remove() - speedup pte lookup for continuous addresses - bring out pool_cache_put(&_pmap_pv_pool, pv) from lock/unlock section To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/pmap.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/pmap.c diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.34 src/sys/arch/aarch64/aarch64/pmap.c:1.35 --- src/sys/arch/aarch64/aarch64/pmap.c:1.34 Fri Dec 21 08:01:01 2018 +++ src/sys/arch/aarch64/aarch64/pmap.c Wed Feb 6 05:33:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.34 2018/12/21 08:01:01 ryo Exp $ */ +/* $NetBSD: pmap.c,v 1.35 2019/02/06 05:33:41 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.34 2018/12/21 08:01:01 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35 2019/02/06 05:33:41 ryo Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -187,12 +187,15 @@ struct pv_entry { paddr_t pv_pa; /* debug */ pt_entry_t *pv_ptep; /* for fast pte lookup */ }; +#define pv_next pv_link.tqe_next + +#define L3INDEXMASK (L3_SIZE * Ln_ENTRIES - 1) static pt_entry_t *_pmap_pte_lookup_l3(struct pmap *, vaddr_t); static pt_entry_t *_pmap_pte_lookup_bs(struct pmap *, vaddr_t, vsize_t *); static pt_entry_t _pmap_pte_adjust_prot(pt_entry_t, vm_prot_t, vm_prot_t, bool); static pt_entry_t _pmap_pte_adjust_cacheflags(pt_entry_t, u_int); -static void _pmap_remove(struct pmap *, vaddr_t, bool); +static void _pmap_remove(struct pmap *, vaddr_t, vaddr_t, bool, struct pv_entry **); static int _pmap_enter(struct pmap *, vaddr_t, paddr_t, vm_prot_t, u_int, bool); static struct pmap kernel_pmap; @@ -614,7 +617,7 @@ pmap_extract_coherency(struct pmap *pm, bool pmap_extract(struct pmap *pm, vaddr_t va, paddr_t *pap) { - static pt_entry_t *ptep; + static pt_entry_t *ptep, pte; paddr_t pa; vsize_t blocksize = 0; extern char __kernel_text[]; @@ -630,7 +633,10 @@ pmap_extract(struct pmap *pm, vaddr_t va ptep = _pmap_pte_lookup_bs(pm, va, ); if (ptep == NULL) return false; - pa = lxpde_pa(*ptep) + (va & (blocksize - 1)); + pte = *ptep; + if (!lxpde_valid(pte)) + return false; + pa = lxpde_pa(pte) + (va & (blocksize - 1)); } if (pap != NULL) @@ -676,46 +682,30 @@ _pmap_pte_lookup_bs(struct pmap *pm, vad blocksize = L0_SIZE; l0 = pm->pm_l0table; idx = l0pde_index(va); - pde = l0[idx]; - if (!l0pde_valid(pde)) { - ptep = NULL; + ptep = [idx]; + pde = *ptep; + if (!l0pde_valid(pde)) goto done; - } blocksize = L1_SIZE; l1 = (pd_entry_t *)AARCH64_PA_TO_KVA(l0pde_pa(pde)); idx = l1pde_index(va); - pde = l1[idx]; - if (!l1pde_valid(pde)) { - ptep = NULL; - goto done; - } - if (l1pde_is_block(pde)) { - ptep = [idx]; + ptep = [idx]; + pde = *ptep; + if (!l1pde_valid(pde) || l1pde_is_block(pde)) goto done; - } blocksize = L2_SIZE; l2 = (pd_entry_t *)AARCH64_PA_TO_KVA(l1pde_pa(pde)); idx = l2pde_index(va); - pde = l2[idx]; - if (!l2pde_valid(pde)) { - ptep = NULL; - goto done; - } - if (l2pde_is_block(pde)) { - ptep = [idx]; + ptep = [idx]; + pde = *ptep; + if (!l2pde_valid(pde) || l2pde_is_block(pde)) goto done; - } blocksize = L3_SIZE; l3 = (pd_entry_t *)AARCH64_PA_TO_KVA(l2pde_pa(pde)); idx = l3pte_index(va); - pde = l3[idx]; - if (!l3pte_valid(pde)) { - ptep = NULL; - goto done; - } ptep = [idx]; done: @@ -740,21 +730,27 @@ _pmap_pte_lookup_l3(struct pmap *pm, vad void pmap_icache_sync_range(pmap_t pm, vaddr_t sva, vaddr_t eva) { - pt_entry_t *ptep, pte; + pt_entry_t *ptep = NULL, pte; vaddr_t va; vsize_t blocksize = 0; pm_lock(pm); - for (va = sva; va < eva; va += blocksize) { - ptep = _pmap_pte_lookup_bs(pm, va, ); - if (blocksize == 0) - break; - if (ptep != NULL) { + for (va = sva; va < eva; va = (va + blocksize) & ~(blocksize - 1)) { + /* va is belong to the same L3 table as before? */ + if ((blocksize == L3_SIZE) && ((va & L3INDEXMASK) != 0)) { + ptep++; + } else { + ptep = _pmap_pte_lookup_bs(pm, va, ); + if (ptep == NULL) +break; + } + + pte = *ptep; + if (lxpde_valid(pte)) { vaddr_t eob = (va + blocksize) & ~(blocksize - 1); vsize_t len = ulmin(eva, eob - va); - pte = *ptep; if (l3pte_writable(pte)) { cpu_icache_sync_range(va, len); } else { @@ -771,7 +767,6 @@ pmap_icache_sync_range(pmap_t pm, vaddr_ atomic_swap_64(ptep, opte); AARCH64_TLBI_BY_ASID_VA(pm->pm_asid, va, true); } - va &= ~(blocksize - 1); } } @@ -826,7 +821,7 @@
CVS commit: src/common/lib/libc/arch/aarch64/atomic
Module Name:src Committed By: ryo Date: Wed Feb 6 05:33:14 UTC 2019 Modified Files: src/common/lib/libc/arch/aarch64/atomic: atomic_op_asm.h Log Message: fix atomic_sub_*(). it was (delta - *ptr), should be (*ptr - delta). changing shared macro doesn't effect other atomic_ops because (*ptr [+|^] delta) and (delta [+|^] *ptr) have same result. atomic_sub_*() haven't used because non standard API? To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h diff -u src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h:1.1 src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h:1.2 --- src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h:1.1 Sun Aug 10 05:47:35 2014 +++ src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h Wed Feb 6 05:33:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_op_asm.h,v 1.1 2014/08/10 05:47:35 matt Exp $ */ +/* $NetBSD: atomic_op_asm.h,v 1.2 2019/02/06 05:33:14 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ ENTRY_NP(_atomic_##OP##_8) ;\ mov x4, x0 ;\ 1: ldxrb w0, [x4] /* load old value */ ;\ - INSN w2, w1, w0 /* calculate new value */ ;\ + INSN w2, w0, w1 /* calculate new value */ ;\ stxrb w3, w2, [x4] /* try to store */ ;\ cbnz w3, 1b /* succeed? no, try again */ ;\ dmb st ;\ @@ -49,7 +49,7 @@ END(_atomic_##OP##_8) ENTRY_NP(_atomic_##OP##_8_nv) ;\ mov x4, x0 /* need r0 for return value */ ;\ 1: ldxrb w0, [x4] /* load old value */ ;\ - INSN w2, w1, w0 /* calc new (return) value */ ;\ + INSN w2, w0, w1 /* calc new (return) value */ ;\ stxrb w3, w2, [x4] /* try to store */ ;\ cbnz w3, 1b /* succeed? no, try again */ ;\ dmb st ;\ @@ -60,7 +60,7 @@ END(_atomic_##OP##_8_nv) ENTRY_NP(_atomic_##OP##_16) ;\ mov x4, x0 ;\ 1: ldxrh w0, [x4] /* load old value */ ;\ - INSN w2, w1, w0 /* calculate new value */ ;\ + INSN w2, w0, w1 /* calculate new value */ ;\ stxrh w3, w2, [x4] /* try to store */ ;\ cbnz w3, 1b /* succeed? no, try again */ ;\ dmb st ;\ @@ -71,7 +71,7 @@ END(_atomic_##OP##_16) ENTRY_NP(_atomic_##OP##_16_nv) ;\ mov x4, x0 /* need r0 for return value */ ;\ 1: ldxrh w0, [x4] /* load old value */ ;\ - INSN w2, w1, w0 /* calc new (return) value */ ;\ + INSN w2, w0, w1 /* calc new (return) value */ ;\ stxrh w3, w2, [x4] /* try to store */ ;\ cbnz w3, 1b /* succeed? no, try again */ ;\ dmb st ;\ @@ -82,7 +82,7 @@ END(_atomic_##OP##_16_nv) ENTRY_NP(_atomic_##OP##_32) ;\ mov x4, x0 ;\ 1: ldxr w0, [x4] /* load old value */ ;\ - INSN w2, w1, w0 /* calculate new value */ ;\ + INSN w2, w0, w1 /* calculate new value */ ;\ stxr w3, w2, [x4] /* try to store */ ;\ cbnz w3, 1b /* succeed? no, try again */ ;\ dmb st ;\ @@ -104,7 +104,7 @@ END(_atomic_##OP##_32_nv) ENTRY_NP(_atomic_##OP##_64) ;\ mov x4, x0 ;\ 1: ldxr x0, [x4] /* load old value */ ;\ - INSN x2, x1, x0 /* calculate new value */ ;\ + INSN x2, x0, x1 /* calculate new value */ ;\ stxr w3, x2, [x4] /* try to store */ ;\ cbnz w3, 1b /* succeed? no, try again */ ;\ dmb st ;\
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Feb 6 07:20:13 UTC 2019 Modified Files: src/sys/dev/pci: if_wm.c Log Message: I21[01]'s RAL size is not 15 but 16(== 82575's value). Same as other OSes. To generate a diff of this commit: cvs rdiff -u -r1.623 -r1.624 src/sys/dev/pci/if_wm.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_wm.c diff -u src/sys/dev/pci/if_wm.c:1.623 src/sys/dev/pci/if_wm.c:1.624 --- src/sys/dev/pci/if_wm.c:1.623 Thu Jan 31 15:30:23 2019 +++ src/sys/dev/pci/if_wm.c Wed Feb 6 07:20:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.623 2019/01/31 15:30:23 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.623 2019/01/31 15:30:23 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -3641,6 +3641,8 @@ wm_rar_count(struct wm_softc *sc) size = WM_RAL_TABSIZE_PCH_LPT; break; case WM_T_82575: + case WM_T_I210: + case WM_T_I211: size = WM_RAL_TABSIZE_82575; break; case WM_T_82576:
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:28:01 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c Log Message: Remove useless memset. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/if_axen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.24 src/sys/dev/usb/if_axen.c:1.25 --- src/sys/dev/usb/if_axen.c:1.24 Thu Jan 31 15:27:57 2019 +++ src/sys/dev/usb/if_axen.c Wed Feb 6 07:28:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.24 2019/01/31 15:27:57 rin Exp $ */ +/* $NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.24 2019/01/31 15:27:57 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1124,9 +1124,6 @@ nextpkt: } while( pkt_count > 0); done: - /* clear buffer for next transaction */ - memset(c->axen_buf, 0, sc->axen_bufsz); - /* Setup new transfer. */ usbd_setup_xfer(xfer, c, c->axen_buf, sc->axen_bufsz, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axen_rxeof);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:28:34 UTC 2019 Modified Files: src/sys/dev/usb: if_axenreg.h Log Message: Remove unused variable in axen_softc. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_axenreg.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/usb/if_axenreg.h diff -u src/sys/dev/usb/if_axenreg.h:1.6 src/sys/dev/usb/if_axenreg.h:1.7 --- src/sys/dev/usb/if_axenreg.h:1.6 Thu Jan 31 15:27:57 2019 +++ src/sys/dev/usb/if_axenreg.h Wed Feb 6 07:28:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axenreg.h,v 1.6 2019/01/31 15:27:57 rin Exp $ */ +/* $NetBSD: if_axenreg.h,v 1.7 2019/02/06 07:28:34 rin Exp $ */ /* $OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $ */ /* @@ -293,7 +293,6 @@ struct axen_softc { int axen_link; - uint8_t axen_ipgs[3]; int axen_phyno; struct timeval axen_rx_notice; u_int axen_bufsz;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:35:47 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c Log Message: Cosmetic changes; no functional changes. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_axen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.26 src/sys/dev/usb/if_axen.c:1.27 --- src/sys/dev/usb/if_axen.c:1.26 Wed Feb 6 07:31:38 2019 +++ src/sys/dev/usb/if_axen.c Wed Feb 6 07:35:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $ */ +/* $NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1527,6 +1527,7 @@ static void axen_stop(struct ifnet *ifp, int disable) { struct axen_softc *sc = ifp->if_softc; + struct axen_chain *c; usbd_status err; int i; uint16_t rxmode, wval; @@ -1575,17 +1576,19 @@ axen_stop(struct ifnet *ifp, int disable /* Free RX resources. */ for (i = 0; i < AXEN_RX_LIST_CNT; i++) { - if (sc->axen_cdata.axen_rx_chain[i].axen_xfer != NULL) { - usbd_destroy_xfer(sc->axen_cdata.axen_rx_chain[i].axen_xfer); - sc->axen_cdata.axen_rx_chain[i].axen_xfer = NULL; + c = >axen_cdata.axen_rx_chain[i]; + if (c->axen_xfer != NULL) { + usbd_destroy_xfer(c->axen_xfer); + c->axen_xfer = NULL; } } /* Free TX resources. */ for (i = 0; i < AXEN_TX_LIST_CNT; i++) { - if (sc->axen_cdata.axen_tx_chain[i].axen_xfer != NULL) { - usbd_destroy_xfer(sc->axen_cdata.axen_tx_chain[i].axen_xfer); - sc->axen_cdata.axen_tx_chain[i].axen_xfer = NULL; + c = >axen_cdata.axen_tx_chain[i]; + if (c->axen_xfer != NULL) { + usbd_destroy_xfer(c->axen_xfer); + c->axen_xfer = NULL; } }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:48:33 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c Log Message: Fix padding for a full length USB packet in TX: - Update boundary length for SS mode, taken from OpenBSD. - Make sure everything passed to the adapter is little endian. - Specify padding bits in a similar manner to Linux. XXX I wonder whether this is really necessary... To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/if_axen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.27 src/sys/dev/usb/if_axen.c:1.28 --- src/sys/dev/usb/if_axen.c:1.27 Wed Feb 6 07:35:46 2019 +++ src/sys/dev/usb/if_axen.c Wed Feb 6 07:48:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $ */ +/* $NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.27 2019/02/06 07:35:46 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1277,23 +1277,32 @@ axen_encap(struct axen_softc *sc, struct c = >axen_cdata.axen_tx_chain[idx]; - boundary = (sc->axen_udev->ud_speed == USB_SPEED_HIGH) ? 512 : 64; - - hdr.plen = htole32(m->m_pkthdr.len); - hdr.gso = 0; /* disable segmentation offloading */ + /* XXX Is this need? */ + switch (sc->axen_udev->ud_speed) { + case USB_SPEED_SUPER: + boundary = 4096; + break; + case USB_SPEED_HIGH: + boundary = 512; + break; + default: + boundary = 64; + break; + } - memcpy(c->axen_buf, , sizeof(hdr)); - length = sizeof(hdr); + length = m->m_pkthdr.len + sizeof(hdr); - m_copydata(m, 0, m->m_pkthdr.len, c->axen_buf + length); - length += m->m_pkthdr.len; + hdr.plen = htole32(m->m_pkthdr.len); + hdr.gso = 0; /* disable segmentation offloading */ if ((length % boundary) == 0) { - hdr.plen = 0x0; - hdr.gso |= 0x80008000; /* enable padding */ - memcpy(c->axen_buf + length, , sizeof(hdr)); - length += sizeof(hdr); + DPRINTF(("%s: boundary hit\n", device_xname(sc->axen_dev))); + hdr.gso |= 0x80008000; /* XXX enable padding */ } + hdr.gso = htole32(hdr.gso); + + memcpy(c->axen_buf, , sizeof(hdr)); + m_copydata(m, 0, m->m_pkthdr.len, c->axen_buf + sizeof(hdr)); usbd_setup_xfer(c->axen_xfer, c, c->axen_buf, length, USBD_FORCE_SHORT_XFER, 1, axen_txeof);
CVS commit: src
Module Name:src Committed By: mrg Date: Wed Feb 6 07:51:20 UTC 2019 Modified Files: src/distrib/rs6000/ramdisk: Makefile src/sys/arch/rs6000/conf: INSTALL Log Message: bump image size by 1/8th of an MB. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/rs6000/ramdisk/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/rs6000/conf/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/rs6000/ramdisk/Makefile diff -u src/distrib/rs6000/ramdisk/Makefile:1.8 src/distrib/rs6000/ramdisk/Makefile:1.9 --- src/distrib/rs6000/ramdisk/Makefile:1.8 Tue Jan 24 18:04:04 2017 +++ src/distrib/rs6000/ramdisk/Makefile Wed Feb 6 07:51:20 2019 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.8 2017/01/24 18:04:04 christos Exp $ +# $NetBSD: Makefile,v 1.9 2019/02/06 07:51:20 mrg Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" IMAGE= ramdisk.fs -IMAGESIZE= 2048k +IMAGESIZE= 2176k MAKEFS_FLAGS+= -f 15 WARNS= 1 Index: src/sys/arch/rs6000/conf/INSTALL diff -u src/sys/arch/rs6000/conf/INSTALL:1.2 src/sys/arch/rs6000/conf/INSTALL:1.3 --- src/sys/arch/rs6000/conf/INSTALL:1.2 Fri Aug 8 16:56:32 2014 +++ src/sys/arch/rs6000/conf/INSTALL Wed Feb 6 07:51:20 2019 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.2 2014/08/08 16:56:32 joerg Exp $ +# $NetBSD: INSTALL,v 1.3 2019/02/06 07:51:20 mrg Exp $ include "arch/rs6000/conf/GENERIC" @@ -8,6 +8,6 @@ makeoptions COPTS="-Os" # Reduce size. options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # Force root on ram-disk -options MEMORY_DISK_ROOT_SIZE=4096 # 2mb +options MEMORY_DISK_ROOT_SIZE=4352 # 2.125 mb options MEMORY_DISK_SERVER=0 # don't need for install options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:59:24 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c Log Message: Fix previous. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/if_axen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.29 src/sys/dev/usb/if_axen.c:1.30 --- src/sys/dev/usb/if_axen.c:1.29 Wed Feb 6 07:56:14 2019 +++ src/sys/dev/usb/if_axen.c Wed Feb 6 07:59:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $ */ +/* $NetBSD: if_axen.c,v 1.30 2019/02/06 07:59:24 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.30 2019/02/06 07:59:24 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1047,7 +1047,7 @@ axen_rxeof(struct usbd_xfer *xfer, void hdr_offset = (uint16_t)(rx_hdr >> 16); pkt_count = (uint16_t)(rx_hdr & 0x); - if (total_len > sc->axen_bufsz) { + if (total_len > sc->axen_rx_bufsz) { aprint_error_dev(sc->axen_dev, "rxeof: too large transfer\n"); goto done; }
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: mrg Date: Wed Feb 6 07:32:50 UTC 2019 Modified Files: src/sys/arch/powerpc/oea: cpu_subr.c oea_machdep.c Log Message: - add or adjust fallthru comments To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/arch/powerpc/oea/cpu_subr.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/powerpc/oea/oea_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.98 src/sys/arch/powerpc/oea/cpu_subr.c:1.99 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.98 Sun Jan 6 11:20:53 2019 +++ src/sys/arch/powerpc/oea/cpu_subr.c Wed Feb 6 07:32:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.99 2019/02/06 07:32:50 mrg Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.99 2019/02/06 07:32:50 mrg Exp $"); #include "opt_ppcparam.h" #include "opt_ppccache.h" @@ -1133,6 +1133,7 @@ cpu_get_dfs(void) case MPC7448: if (mfspr(SPR_HID1) & HID1_DFS4) return 4; + /* FALLTHROUGH */ case MPC7447A: if (mfspr(SPR_HID1) & HID1_DFS2) return 2; @@ -1155,6 +1156,7 @@ cpu_set_dfs(int div) switch (vers) { case MPC7448: dfs_mask |= HID1_DFS4; + /* FALLTHROUGH */ case MPC7447A: dfs_mask |= HID1_DFS2; break; Index: src/sys/arch/powerpc/oea/oea_machdep.c diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.75 src/sys/arch/powerpc/oea/oea_machdep.c:1.76 --- src/sys/arch/powerpc/oea/oea_machdep.c:1.75 Sun Jul 15 05:16:44 2018 +++ src/sys/arch/powerpc/oea/oea_machdep.c Wed Feb 6 07:32:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: oea_machdep.c,v 1.75 2018/07/15 05:16:44 maxv Exp $ */ +/* $NetBSD: oea_machdep.c,v 1.76 2019/02/06 07:32:50 mrg Exp $ */ /* * Copyright (C) 2002 Matt Thomas @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.75 2018/07/15 05:16:44 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.76 2019/02/06 07:32:50 mrg Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -260,15 +260,14 @@ oea_init(void (*handler)(void)) #if defined(DDB) || defined(KGDB) case EXC_RUNMODETRC: #ifdef PPC_OEA601 - if (cpuvers != MPC601) { + if (cpuvers != MPC601) #endif + { size = (size_t)trapsize; memcpy((void *)exc, trapcode, size); break; -#ifdef PPC_OEA601 } /* FALLTHROUGH */ -#endif case EXC_PGM: case EXC_TRC: case EXC_BPT:
CVS commit: src/distrib/common
Module Name:src Committed By: mrg Date: Wed Feb 6 07:33:09 UTC 2019 Modified Files: src/distrib/common: Makefile.mdset Log Message: - clean the .tmp kernel targets as well To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/distrib/common/Makefile.mdset Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/Makefile.mdset diff -u src/distrib/common/Makefile.mdset:1.42 src/distrib/common/Makefile.mdset:1.43 --- src/distrib/common/Makefile.mdset:1.42 Tue Jan 16 09:59:37 2018 +++ src/distrib/common/Makefile.mdset Wed Feb 6 07:33:08 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mdset,v 1.42 2018/01/16 09:59:37 maya Exp $ +# $NetBSD: Makefile.mdset,v 1.43 2019/02/06 07:33:08 mrg Exp $ # # Makefile snippet to ${TOOL_MDSETIMAGE} file system images into kernels # @@ -125,8 +125,7 @@ _POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_P _POST.${_KERNEL.${_K}.${_F}}:= ${MDSET_POST} .endif - -CLEANFILES+= ${_KERNEL.${_K}.${_F}} +CLEANFILES+= ${_KERNEL.${_K}.${_F}} ${_KERNEL.${_K}.${_F}}.tmp .if defined(MDSET_NOIMAGE.${_FILENAME}) ${_I}=
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:31:39 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c Log Message: Drop AXEN_MEDIUM_ALWAYS_ONE (from Linux), which reduces drop erros in RX. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/if_axen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.25 src/sys/dev/usb/if_axen.c:1.26 --- src/sys/dev/usb/if_axen.c:1.25 Wed Feb 6 07:28:01 2019 +++ src/sys/dev/usb/if_axen.c Wed Feb 6 07:31:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $ */ +/* $NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.25 2019/02/06 07:28:01 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.26 2019/02/06 07:31:38 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -269,9 +269,8 @@ axen_miibus_statchg(struct ifnet *ifp) if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) val |= AXEN_MEDIUM_FDX; - val |= (AXEN_MEDIUM_RECV_EN | AXEN_MEDIUM_ALWAYS_ONE); - val |= (AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN); - + val |= AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN | + AXEN_MEDIUM_RECV_EN; switch (IFM_SUBTYPE(mii->mii_media_active)) { case IFM_1000_T: val |= AXEN_MEDIUM_GIGA | AXEN_MEDIUM_EN_125MHZ; @@ -586,9 +585,9 @@ axen_ax88179_init(struct axen_softc *sc) DPRINTF(("axen: Monitor mode = 0x%02x\n", val)); /* set medium type */ - ctl = AXEN_MEDIUM_GIGA | AXEN_MEDIUM_FDX | AXEN_MEDIUM_ALWAYS_ONE | - AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN; - ctl |= AXEN_MEDIUM_RECV_EN; + ctl = AXEN_MEDIUM_GIGA | AXEN_MEDIUM_FDX | AXEN_MEDIUM_EN_125MHZ | + AXEN_MEDIUM_RXFLOW_CTRL_EN | AXEN_MEDIUM_TXFLOW_CTRL_EN | + AXEN_MEDIUM_RECV_EN; wval = htole16(ctl); DPRINTF(("axen: set to medium mode: 0x%04x\n", ctl)); axen_cmd(sc, AXEN_CMD_MAC_WRITE2, 2, AXEN_MEDIUM_STATUS, );
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Feb 6 07:56:14 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c if_axenreg.h Log Message: Support TSOv4 (They call it LSOv1). The adapter does not support TSOv6 (aka LSOv2). To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/if_axenreg.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/usb/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.28 src/sys/dev/usb/if_axen.c:1.29 --- src/sys/dev/usb/if_axen.c:1.28 Wed Feb 6 07:48:33 2019 +++ src/sys/dev/usb/if_axen.c Wed Feb 6 07:56:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $ */ +/* $NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.28 2019/02/06 07:48:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.29 2019/02/06 07:56:14 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -50,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_axen.c,v #include +#include /* XXX for netinet/ip.h */ +#include /* XXX for IP_MAXPACKET */ + #include #include @@ -718,16 +721,20 @@ axen_attach(device_t parent, device_t se /* decide on what our bufsize will be */ switch (sc->axen_udev->ud_speed) { case USB_SPEED_SUPER: - sc->axen_bufsz = AXEN_BUFSZ_SS * 1024; + sc->axen_rx_bufsz = AXEN_BUFSZ_SS * 1024; break; case USB_SPEED_HIGH: - sc->axen_bufsz = AXEN_BUFSZ_HS * 1024; + sc->axen_rx_bufsz = AXEN_BUFSZ_HS * 1024; break; default: - sc->axen_bufsz = AXEN_BUFSZ_LS * 1024; + sc->axen_rx_bufsz = AXEN_BUFSZ_LS * 1024; break; } + sc->axen_tx_bufsz = IP_MAXPACKET + + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN + + sizeof(struct axen_sframe_hdr); + /* Find endpoints. */ for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->axen_iface, i); @@ -791,7 +798,10 @@ axen_attach(device_t parent, device_t se IFQ_SET_READY(>if_snd); sc->axen_ec.ec_capabilities = ETHERCAP_VLAN_MTU; - ifp->if_capabilities |= IFCAP_CSUM_IPv4_Rx | IFCAP_CSUM_IPv4_Tx | + + /* Adapter does not support TSOv6 (They call it LSOv2). */ + ifp->if_capabilities |= IFCAP_TSOv4 | + IFCAP_CSUM_IPv4_Rx | IFCAP_CSUM_IPv4_Tx | IFCAP_CSUM_TCPv4_Rx | IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_UDPv4_Rx | IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_TCPv6_Rx | IFCAP_CSUM_TCPv6_Tx | @@ -943,7 +953,7 @@ axen_rx_list_init(struct axen_softc *sc) c->axen_idx = i; if (c->axen_xfer == NULL) { int err = usbd_create_xfer(sc->axen_ep[AXEN_ENDPT_RX], - sc->axen_bufsz, 0, 0, >axen_xfer); + sc->axen_rx_bufsz, 0, 0, >axen_xfer); if (err) return err; c->axen_buf = usbd_get_buffer(c->axen_xfer); @@ -969,7 +979,7 @@ axen_tx_list_init(struct axen_softc *sc) c->axen_idx = i; if (c->axen_xfer == NULL) { int err = usbd_create_xfer(sc->axen_ep[AXEN_ENDPT_TX], - sc->axen_bufsz, USBD_FORCE_SHORT_XFER, 0, + sc->axen_tx_bufsz, USBD_FORCE_SHORT_XFER, 0, >axen_xfer); if (err) return err; @@ -1124,7 +1134,7 @@ nextpkt: done: /* Setup new transfer. */ - usbd_setup_xfer(xfer, c, c->axen_buf, sc->axen_bufsz, + usbd_setup_xfer(xfer, c, c->axen_buf, sc->axen_rx_bufsz, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axen_rxeof); usbd_transfer(xfer); @@ -1291,6 +1301,7 @@ axen_encap(struct axen_softc *sc, struct } length = m->m_pkthdr.len + sizeof(hdr); + KASSERT(length <= sc->axen_tx_bufsz); hdr.plen = htole32(m->m_pkthdr.len); @@ -1437,7 +1448,7 @@ axen_init(struct ifnet *ifp) for (i = 0; i < AXEN_RX_LIST_CNT; i++) { c = >axen_cdata.axen_rx_chain[i]; - usbd_setup_xfer(c->axen_xfer, c, c->axen_buf, sc->axen_bufsz, + usbd_setup_xfer(c->axen_xfer, c, c->axen_buf, sc->axen_rx_bufsz, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, axen_rxeof); usbd_transfer(c->axen_xfer); } Index: src/sys/dev/usb/if_axenreg.h diff -u src/sys/dev/usb/if_axenreg.h:1.7 src/sys/dev/usb/if_axenreg.h:1.8 --- src/sys/dev/usb/if_axenreg.h:1.7 Wed Feb 6 07:28:34 2019 +++ src/sys/dev/usb/if_axenreg.h Wed Feb 6 07:56:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axenreg.h,v 1.7 2019/02/06 07:28:34 rin Exp $ */ +/* $NetBSD: if_axenreg.h,v 1.8 2019/02/06 07:56:14 rin Exp $ */ /* $OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $ */ /* @@ -295,7 +295,8 @@ struct axen_softc { int axen_phyno; struct timeval axen_rx_notice; - u_int axen_bufsz; + u_int axen_rx_bufsz; + u_int axen_tx_bufsz; int axen_rev; #define sc_if axen_ec.ec_if
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: martin Date: Wed Feb 6 07:56:42 UTC 2019 Modified Files: src/usr.bin/ftp: cmds.c Log Message: Try to avoid a (bogus) fatal warning from clang. To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/usr.bin/ftp/cmds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/cmds.c diff -u src/usr.bin/ftp/cmds.c:1.139 src/usr.bin/ftp/cmds.c:1.140 --- src/usr.bin/ftp/cmds.c:1.139 Mon Feb 4 04:09:13 2019 +++ src/usr.bin/ftp/cmds.c Wed Feb 6 07:56:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cmds.c,v 1.139 2019/02/04 04:09:13 mrg Exp $ */ +/* $NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $ */ /*- * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ #if 0 static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: cmds.c,v 1.139 2019/02/04 04:09:13 mrg Exp $"); +__RCSID("$NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $"); #endif #endif /* not lint */ @@ -1781,6 +1781,11 @@ justquit(void) { quit(0, NULL); + /* + * quit is not __dead, but for our invocation it never will return, + * but some compilers are not smart enough to find this out. + */ + exit(0); } /*
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: msaitoh Date: Tue Feb 5 08:07:59 UTC 2019 Modified Files: src/usr.sbin/cpuctl/arch: i386.c Log Message: Add Ice Lake and Tremont from the latest Intel SDM. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/usr.sbin/cpuctl/arch/i386.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.91 src/usr.sbin/cpuctl/arch/i386.c:1.92 --- src/usr.sbin/cpuctl/arch/i386.c:1.91 Sun Jan 6 16:13:51 2019 +++ src/usr.sbin/cpuctl/arch/i386.c Tue Feb 5 08:07:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.91 2019/01/06 16:13:51 maxv Exp $ */ +/* $NetBSD: i386.c,v 1.92 2019/02/05 08:07:59 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: i386.c,v 1.91 2019/01/06 16:13:51 maxv Exp $"); +__RCSID("$NetBSD: i386.c,v 1.92 2019/02/05 08:07:59 msaitoh Exp $"); #endif /* not lint */ #include @@ -382,7 +382,9 @@ const struct cpu_cpuid_nameclass i386_cp [0x5f] = "Atom (Goldmont, Denverton)", [0x66] = "Future Core (Cannon Lake)", [0x7a] = "Atom (Goldmont Plus)", +[0x7e] = "Future Core (Ice Lake)", [0x85] = "Xeon Phi 7215, 7285, 7295 (Knights Mill)", +[0x86] = "Atom (Tremont)", [0x8e] = "7th or 8th gen Core (Kaby Lake, Coffee Lake)", [0x9e] = "7th or 8th gen Core (Kaby Lake, Coffee Lake)", },
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Tue Feb 5 08:07:19 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add new CPUID flags WAITPKG, CLDEMOTE, MOVDIRI, MOVDIR64B and IA32_CORE_CAPABILITIES from the latest Intel SDM. To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.137 src/sys/arch/x86/include/specialreg.h:1.138 --- src/sys/arch/x86/include/specialreg.h:1.137 Sun Jan 13 12:19:09 2019 +++ src/sys/arch/x86/include/specialreg.h Tue Feb 5 08:07:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.137 2019/01/13 12:19:09 maxv Exp $ */ +/* $NetBSD: specialreg.h,v 1.138 2019/02/05 08:07:19 msaitoh Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -398,6 +398,7 @@ #define CPUID_SEF_UMIP __BIT(2) /* User-Mode Instruction prevention */ #define CPUID_SEF_PKU __BIT(3) /* Protection Keys for User-mode pages */ #define CPUID_SEF_OSPKE __BIT(4) /* OS has set CR4.PKE to ena. protec. keys */ +#define CPUID_SEF_WAITPKG __BIT(5) /* TPAUSE,UMONITOR,UMWAIT */ #define CPUID_SEF_AVX512_VBMI2 __BIT(6) /* AVX-512 Vector Byte Manipulation 2 */ #define CPUID_SEF_GFNI __BIT(8) #define CPUID_SEF_VAES __BIT(9) @@ -407,16 +408,20 @@ #define CPUID_SEF_AVX512_VPOPCNTDQ __BIT(14) #define CPUID_SEF_MAWAU __BITS(21, 17) /* MAWAU for BND{LD,ST}X */ #define CPUID_SEF_RDPID __BIT(22) /* RDPID and IA32_TSC_AUX */ +#define CPUID_SEF_CLDEMOTE __BIT(25) /* Cache line demote */ +#define CPUID_SEF_MOVDIRI __BIT(27) /* MOVDIRI instruction */ +#define CPUID_SEF_MOVDIR64B __BIT(28) /* MOVDIR64B instruction */ #define CPUID_SEF_SGXLC __BIT(30) /* SGX Launch Configuration */ #define CPUID_SEF_FLAGS1 "\177\20" \ "b\0PREFETCHWT1\0" "b\1AVX512_VBMI\0" "b\2UMIP\0" "b\3PKU\0" \ - "b\4OSPKE\0" "b\6AVX512_VBMI2\0" \ + "b\4OSPKE\0" "b\5WAITPKG\0" "b\6AVX512_VBMI2\0" \ "b\10GFNI\0" "b\11VAES\0" "b\12VPCLMULQDQ\0" "b\13AVX512_VNNI\0"\ "b\14AVX512_BITALG\0" "b\16AVX512_VPOPCNTDQ\0" \ "f\21\5MAWAU\0" \ "b\26RDPID\0" \ - "b\36SGXLC\0" + "b\31CLDEMOTE\0" "b\33MOVDIRI\0" \ + "b\34MOVDIR64B\0" "b\36SGXLC\0" /* %edx */ #define CPUID_SEF_AVX512_4VNNIW __BIT(2) @@ -425,12 +430,13 @@ #define CPUID_SEF_STIBP __BIT(27) /* STIBP Speculation Control */ #define CPUID_SEF_L1D_FLUSH __BIT(28) /* IA32_FLUSH_CMD MSR */ #define CPUID_SEF_ARCH_CAP __BIT(29) /* IA32_ARCH_CAPABILITIES */ +#define CPUID_SEF_CORE_CAP __BIT(30) /* IA32_CORE_CAPABILITIES */ #define CPUID_SEF_SSBD __BIT(31) /* Speculative Store Bypass Disable */ #define CPUID_SEF_FLAGS2 "\20" \ "\3" "AVX512_4VNNIW" "\4" "AVX512_4FMAPS" \ "\33" "IBRS" "\34" "STIBP" \ - "\35" "L1D_FLUSH" "\36" "ARCH_CAP" "\40" "SSBD" + "\35" "L1D_FLUSH" "\36" "ARCH_CAP" "\37CORE_CAP" "\40" "SSBD" /* * Intel CPUID Architectural Performance Monitoring Fn000a
CVS commit: src/sys/kern
Module Name:src Committed By: pgoyette Date: Tue Feb 5 08:53:18 UTC 2019 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: Correctly handle the NULL path when no compat_10 code is available. This should address kern/53948 (thanks, kamil@, for the PR and for testing the fix) To generate a diff of this commit: cvs rdiff -u -r1.521 -r1.522 src/sys/kern/vfs_syscalls.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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.521 src/sys/kern/vfs_syscalls.c:1.522 --- src/sys/kern/vfs_syscalls.c:1.521 Thu Jan 31 02:27:06 2019 +++ src/sys/kern/vfs_syscalls.c Tue Feb 5 08:53:18 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.521 2019/01/31 02:27:06 manu Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.522 2019/02/05 08:53:18 pgoyette Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.521 2019/01/31 02:27:06 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.522 2019/02/05 08:53:18 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -1635,14 +1635,13 @@ do_sys_openat(lwp_t *l, int fdat, const int error; if (path == NULL) { - MODULE_CALL_HOOK(vfs_openat_10_hook, (), 0, error); - if (error) - return error; - } else { - error = pathbuf_copyin(path, ); - if (error) + MODULE_CALL_HOOK(vfs_openat_10_hook, (), enosys(), error); + if (error != ENOSYS) return error; } + error = pathbuf_copyin(path, ); + if (error) + return error; pathstring = pathbuf_stringcopy_get(pb);
CVS commit: src/external/gpl3/gcc/dist/gcc/c-family
Module Name:src Committed By: mrg Date: Tue Feb 5 08:53:50 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc/c-family: c-cppbuiltin.c Log Message: from the new comment: /* * NetBSD/sparc64 long ago defined signed and unsigned fast{8,16,32} to be * different to the common sparc64 definitions, and they are not the same * size for the same bitsize. GCC 7 introduced checks that they are the * same size below that trigger here. * * NETBSD_TOOLS/NETBSD_NATIVE is wrong for this, but it will do for now. */ To generate a diff of this commit: cvs rdiff -u -r1.1.1.6 -r1.2 \ src/external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.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/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c diff -u src/external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c:1.1.1.6 src/external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c:1.2 --- src/external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c:1.1.1.6 Sat Jan 19 10:14:34 2019 +++ src/external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c Tue Feb 5 08:53:50 2019 @@ -512,22 +512,35 @@ builtin_define_stdint_macros (void) builtin_define_type_max ("__UINT_LEAST64_MAX__", uint_least64_type_node); builtin_define_constants ("__UINT64_C", uint_least64_type_node); } +/* + * NetBSD/sparc64 long ago defined signed and unsigned fast{8,16,32} to be + * different to the common sparc64 definitions, and they are not the same + * size for the same bitsize. GCC 7 introduced checks that they are the + * same size below that trigger here. + * + * NETBSD_TOOLS/NETBSD_NATIVE is wrong for this, but it will do for now. + */ +#if defined(NETBSD_TOOLS) || defined(NETBSD_NATIVE) +#define builtin_define_type_width_nb(a,b,c) builtin_define_type_width(a,b,NULL_TREE) +#else +#define builtin_define_type_width_nb(a,b,c) builtin_define_type_width(a,b,c) +#endif if (int_fast8_type_node) { builtin_define_type_max ("__INT_FAST8_MAX__", int_fast8_type_node); - builtin_define_type_width ("__INT_FAST8_WIDTH__", int_fast8_type_node, + builtin_define_type_width_nb ("__INT_FAST8_WIDTH__", int_fast8_type_node, uint_fast8_type_node); } if (int_fast16_type_node) { builtin_define_type_max ("__INT_FAST16_MAX__", int_fast16_type_node); - builtin_define_type_width ("__INT_FAST16_WIDTH__", int_fast16_type_node, + builtin_define_type_width_nb ("__INT_FAST16_WIDTH__", int_fast16_type_node, uint_fast16_type_node); } if (int_fast32_type_node) { builtin_define_type_max ("__INT_FAST32_MAX__", int_fast32_type_node); - builtin_define_type_width ("__INT_FAST32_WIDTH__", int_fast32_type_node, + builtin_define_type_width_nb ("__INT_FAST32_WIDTH__", int_fast32_type_node, uint_fast32_type_node); } if (int_fast64_type_node) @@ -536,6 +549,7 @@ builtin_define_stdint_macros (void) builtin_define_type_width ("__INT_FAST64_WIDTH__", int_fast64_type_node, uint_fast64_type_node); } +#undef builtin_define_type_width_nb if (uint_fast8_type_node) builtin_define_type_max ("__UINT_FAST8_MAX__", uint_fast8_type_node); if (uint_fast16_type_node)
CVS commit: src/sys/conf
Module Name:src Committed By: mrg Date: Tue Feb 5 08:33:25 UTC 2019 Modified Files: src/sys/conf: Makefile.kern.inc Added Files: src/sys/conf: copts.mk Log Message: pass -Wno-error=implicit-fallthrough for zlib.c. XXX: consider using copts.mk for various warning/copt flags passed in kernel builds currently set via 'makeoptions' in files.* files. this is suboptimal, as those all get embedded into the kernel with config_file.h. To generate a diff of this commit: cvs rdiff -u -r1.267 -r1.268 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r0 -r1.1 src/sys/conf/copts.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.267 src/sys/conf/Makefile.kern.inc:1.268 --- src/sys/conf/Makefile.kern.inc:1.267 Sun Jan 27 02:08:41 2019 +++ src/sys/conf/Makefile.kern.inc Tue Feb 5 08:33:25 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.267 2019/01/27 02:08:41 pgoyette Exp $ +# $NetBSD: Makefile.kern.inc,v 1.268 2019/02/05 08:33:25 mrg Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -317,6 +317,7 @@ ${_s:T:R}.o: ${_s} .if "${_SKIP_DTS}" != "yes" .include "${S}/conf/dts.mk" .endif +.include "${S}/conf/copts.mk" ## ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags, Added files: Index: src/sys/conf/copts.mk diff -u /dev/null src/sys/conf/copts.mk:1.1 --- /dev/null Tue Feb 5 08:33:26 2019 +++ src/sys/conf/copts.mk Tue Feb 5 08:33:25 2019 @@ -0,0 +1,10 @@ +# $NetBSD: copts.mk,v 1.1 2019/02/05 08:33:25 mrg Exp $ + +# MI per-file compiler options required. + +.ifndef _SYS_CONF_COPTS_MK_ +_SYS_CONF_COPTS_MK_=1 + +COPTS.zlib.c+= -Wno-error=implicit-fallthrough + +.endif
CVS commit: src/external/bsd/ipf/bin
Module Name:src Committed By: mrg Date: Tue Feb 5 08:08:59 UTC 2019 Modified Files: src/external/bsd/ipf/bin/ipf: Makefile src/external/bsd/ipf/bin/ipftest: Makefile Log Message: apply -O1 for ipf_y.c on m68k and GCC 7. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/ipf/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/bin/ipftest/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/bsd/ipf/bin/ipf/Makefile diff -u src/external/bsd/ipf/bin/ipf/Makefile:1.1 src/external/bsd/ipf/bin/ipf/Makefile:1.2 --- src/external/bsd/ipf/bin/ipf/Makefile:1.1 Fri Mar 23 21:29:44 2012 +++ src/external/bsd/ipf/bin/ipf/Makefile Tue Feb 5 08:08:59 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2012/03/23 21:29:44 christos Exp $ +# $NetBSD: Makefile,v 1.2 2019/02/05 08:08:59 mrg Exp $ .include # for MKDYNAMICROOT definition @@ -41,4 +41,11 @@ BINDIR= /sbin LDSTATIC?= -static .endif +# Ugh. Generates too large offsets with -O2. +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0) +COPTS.ipf_y.c+= -O1 +. endif +.endif + .include Index: src/external/bsd/ipf/bin/ipftest/Makefile diff -u src/external/bsd/ipf/bin/ipftest/Makefile:1.4 src/external/bsd/ipf/bin/ipftest/Makefile:1.5 --- src/external/bsd/ipf/bin/ipftest/Makefile:1.4 Sat Jan 23 21:22:45 2016 +++ src/external/bsd/ipf/bin/ipftest/Makefile Tue Feb 5 08:08:59 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2016/01/23 21:22:45 christos Exp $ +# $NetBSD: Makefile,v 1.5 2019/02/05 08:08:59 mrg Exp $ .include @@ -102,4 +102,11 @@ ipf_l.h: lexer.h ${TOOL_SED} -e 's/yy/ipf_yy/g' \ ${.ALLSRC} > ${.TARGET} +# Ugh. Generates too large offsets with -O2. +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +. if ${MACHINE_CPU} == "m68k" && empty(CFLAGS:M-O0) +COPTS.ipf_y.c+= -O1 +. endif +.endif + .include
CVS commit: src/sys/dev/nand
Module Name:src Committed By: mrg Date: Tue Feb 5 08:02:19 UTC 2019 Modified Files: src/sys/dev/nand: nandemulator.c Log Message: add fallthru comments, and a comment this code needs attention To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nand/nandemulator.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/nand/nandemulator.c diff -u src/sys/dev/nand/nandemulator.c:1.7 src/sys/dev/nand/nandemulator.c:1.8 --- src/sys/dev/nand/nandemulator.c:1.7 Thu Aug 20 14:40:18 2015 +++ src/sys/dev/nand/nandemulator.c Tue Feb 5 08:02:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nandemulator.c,v 1.7 2015/08/20 14:40:18 christos Exp $ */ +/* $NetBSD: nandemulator.c,v 1.8 2019/02/05 08:02:19 mrg Exp $ */ /*- * Copyright (c) 2011 Department of Software Engineering, @@ -32,7 +32,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nandemulator.c,v 1.7 2015/08/20 14:40:18 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nandemulator.c,v 1.8 2019/02/05 08:02:19 mrg Exp $"); + +/* XXX this code likely needs work */ #include #include @@ -388,9 +390,11 @@ nandemulator_command(device_t self, uint break; case ONFI_PAGE_PROGRAM: sc->sc_register_writable = true; + /* FALLTHROUGH */ case ONFI_READ: case ONFI_BLOCK_ERASE: sc->sc_address_counter = 0; + /* FALLTHROUGH */ case ONFI_READ_ID: case ONFI_READ_PARAMETER_PAGE: sc->sc_io_len = 0;
CVS commit: src
Module Name:src Committed By: hannken Date: Tue Feb 5 09:54:36 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_ctldir.c zfs_ioctl.c zfs_vfsops.c zfs_vnops.c zfs_znode.c src/external/cddl/osnet/dist/uts/common/fs/zfs/sys: zfs_ctldir.h src/sys/modules/zfs: Makefile.zfsmod Removed Files: src/external/cddl/osnet/sys/kern: zfs_stub.c Log Message: Prepare the implementation of the ZFS control directory ".zfs". - Move the stub routines from zfs_stub.c to zfs_ctldir.c and remove now empty file zfs_stub.c - Add stub routines for zfsctl_loadvnode() to initialize control nodes and zfsctl_snapshot() to retrieve ".zfs/snapshot". - Add an initial vnode operations vector for control nodes. - Implement lookup into ".zfs" and lookup ".." from ".zfs/snapshot/". - Change nodeid of mounted snapshots to the snapshot object id. - Respect "-u" flag to "zfs rename ...". To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c cvs rdiff -u -r1.15 -r1.16 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c cvs rdiff -u -r1.18 -r1.19 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c cvs rdiff -u -r1.43 -r1.44 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c cvs rdiff -u -r1.24 -r1.25 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_ctldir.h cvs rdiff -u -r1.2 -r0 src/external/cddl/osnet/sys/kern/zfs_stub.c cvs rdiff -u -r1.8 -r1.9 src/sys/modules/zfs/Makefile.zfsmod Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.4 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.3 Mon May 28 21:05:07 2018 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 5 09:54:36 2019 @@ -1261,9 +1261,80 @@ zfsctl_umount_snapshots(vfs_t *vfsp, int #ifdef __NetBSD__ +#include #include #include +static int (**zfs_sfsop_p)(void *); + +static const struct vnodeopv_entry_desc zfs_sfsop_entries[] = { + { _default_desc, vn_default_error }, + { NULL, NULL } +}; + +const struct vnodeopv_desc zfs_sfsop_opv_desc = + { _sfsop_p, zfs_sfsop_entries }; + +void +zfsctl_init(void) +{ +} + +void +zfsctl_fini(void) +{ +} + +int +zfsctl_loadvnode(vfs_t *vfsp, vnode_t *vp, +const void *key, size_t key_len, const void **new_key) +{ + + return EINVAL; +} + +int +zfsctl_root(zfsvfs_t *zfsvfs, vnode_t **znode) +{ + + return ENOENT; +} + +int +zfsctl_snapshot(zfsvfs_t *zfsvfs, vnode_t **znode) +{ + + return ENOENT; +} + +void +zfsctl_create(zfsvfs_t *zfsvfs) +{ + + ASSERT(zfsvfs->z_ctldir == NULL); +} + +void +zfsctl_destroy(zfsvfs_t *zfsvfs) +{ + + ASSERT(zfsvfs->z_ctldir == NULL); +} + +int +zfsctl_lookup_objset(vfs_t *vfsp, uint64_t objsetid, zfsvfs_t **zfsvfsp) +{ + + return EINVAL; +} + +int +zfsctl_umount_snapshots(vfs_t *vfsp, int fflags, cred_t *cr) +{ + + return 0; +} + boolean_t zfsctl_is_node(vnode_t *vp) { Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.15 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.16 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.15 Sat Jan 12 10:43:33 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Feb 5 09:54:36 2019 @@ -3881,7 +3881,7 @@ zfs_ioc_rename(zfs_cmd_t *zc) char *at; boolean_t allow_mounted = B_TRUE; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) allow_mounted = (zc->zc_cookie & 2) != 0; #endif Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.18 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.19 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.18 Tue Jan 1 10:08:01 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Feb 5 09:54:36 2019 @@ -146,9 +146,11 @@ void zfs_init(void); void zfs_fini(void); extern const struct vnodeopv_desc zfs_vnodeop_opv_desc; +extern const struct vnodeopv_desc zfs_sfsop_opv_desc; static const struct vnodeopv_desc * const zfs_vnodeop_descs[] = { _vnodeop_opv_desc, + _sfsop_opv_desc, NULL, }; @@ -185,9 +187,11 @@ zfs_sync_selector(void *cl, struct vnode znode_t *zp; /* - * Skip the vnode/inode if inaccessible, or if the + * Skip the vnode/inode if inaccessible, is control node or if the * atime is clean. */ + if (zfsctl_is_node(vp)) + return false; zp = VTOZ(vp); return zp != NULL && vp->v_type != VNON &&
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Tue Feb 5 09:55:48 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_ctldir.c Log Message: Implement the ZFS control directory ".zfs" and its subdirectory 'snapshot". Automatically mount snapshots on access of ".zfs/snapshot/". To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.5 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c:1.4 Tue Feb 5 09:54:36 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ctldir.c Tue Feb 5 09:55:48 2019 @@ -1261,14 +1261,584 @@ zfsctl_umount_snapshots(vfs_t *vfsp, int #ifdef __NetBSD__ +#include +#include #include +#include #include #include +#include +#include + +struct zfsctl_root { + timestruc_t zc_cmtime; +}; + +struct sfs_node_key { + uint64_t parent_id; + uint64_t id; +}; +struct sfs_node { + struct sfs_node_key sn_key; +#define sn_parent_id sn_key.parent_id +#define sn_id sn_key.id + lwp_t *sn_mounting; +}; + +#define ZFS_SNAPDIR_NAME "snapshot" + +#define VTOSFS(vp) ((struct sfs_node *)((vp)->v_data)) + +#define SFS_NODE_ASSERT(vp) \ + do { \ + struct sfs_node *np = VTOSFS(vp); \ + ASSERT((vp)->v_op == zfs_sfsop_p); \ + ASSERT((vp)->v_type == VDIR); \ + } while (/*CONSTCOND*/ 0) static int (**zfs_sfsop_p)(void *); -static const struct vnodeopv_entry_desc zfs_sfsop_entries[] = { +/* + * Mount a snapshot. Cannot use do_sys_umount() as it + * doesn't allow its "path" argument from SYSSPACE. + */ +static int +sfs_snapshot_mount(vnode_t *vp, const char *snapname) +{ + struct sfs_node *node = VTOSFS(vp); + zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; + vfs_t *vfsp; + char *path, *osname; + int error; + extern int zfs_domount(vfs_t *, char *); + + path = PNBUF_GET(); + osname = PNBUF_GET(); + + dmu_objset_name(zfsvfs->z_os, path); + snprintf(osname, MAXPATHLEN, "%s@%s", path, snapname); + snprintf(path, MAXPATHLEN, + "%s/" ZFS_CTLDIR_NAME "/" ZFS_SNAPDIR_NAME "/%s", + vp->v_vfsp->mnt_stat.f_mntonname, snapname); + + vfsp = vfs_mountalloc(vp->v_vfsp->mnt_op, vp); + if (vfsp == NULL) { + error = ENOMEM; + goto out; + } + vfsp->mnt_op->vfs_refcount++; + vfsp->mnt_stat.f_owner = 0; + vfsp->mnt_flag = MNT_RDONLY | MNT_NOSUID | MNT_IGNORE; + + mutex_enter(>mnt_updating); + + error = zfs_domount(vfsp, osname); + if (error) + goto out; + + vfs_getnewfsid(vfsp); + strlcpy(vfsp->mnt_stat.f_mntfromname, osname, + sizeof(vfsp->mnt_stat.f_mntfromname)); + set_statvfs_info(path, UIO_SYSSPACE, vfsp->mnt_stat.f_mntfromname, + UIO_SYSSPACE, vfsp->mnt_op->vfs_name, vfsp, curlwp); + + vfsp->mnt_lower = vp->v_vfsp; + + mountlist_append(vfsp); + vref(vp); + vp->v_mountedhere = vfsp; + + mutex_exit(>mnt_updating); + (void) VFS_STATVFS(vfsp, >mnt_stat); + +out:; + if (error && vfsp) { + mutex_exit(>mnt_updating); + fstrans_unmount(vfsp); + vfs_rele(vfsp); + } + PNBUF_PUT(osname); + PNBUF_PUT(path); + + return error; +} + +static int +sfs_lookup_snapshot(vnode_t *dvp, struct componentname *cnp, vnode_t **vpp) +{ + zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; + vnode_t *vp; + struct sfs_node *node; + struct sfs_node_key key; + char snapname[ZFS_MAX_DATASET_NAME_LEN]; + int error; + + /* Retrieve the snapshot object id and the to be mounted on vnode. */ + if (cnp->cn_namelen >= sizeof(snapname)) + return ENOENT; + + strlcpy(snapname, cnp->cn_nameptr, cnp->cn_namelen + 1); + error = dsl_dataset_snap_lookup( dmu_objset_ds(zfsvfs->z_os), + snapname, ); + if (error) + return error; + key.parent_id = ZFSCTL_INO_SNAPDIR; + error = vcache_get(zfsvfs->z_vfs, , sizeof(key), vpp); + if (error) + return error; + + /* Handle case where the vnode is currently mounting. */ + vp = *vpp; + mutex_enter(vp->v_interlock); + node = VTOSFS(vp); + if (node->sn_mounting) { + if (node->sn_mounting == curlwp) + error = 0; + else + error = ERESTART; + mutex_exit(vp->v_interlock); + if (error) + yield(); + return error; + } + + /* If not yet mounted mount the snapshot. */ + if (vp->v_mountedhere == NULL) { + ASSERT(node->sn_mounting == NULL); + node->sn_mounting = curlwp; + mutex_exit(vp->v_interlock); + + VOP_UNLOCK(dvp, 0); + error = sfs_snapshot_mount(vp, snapname); + if (vn_lock(dvp, LK_EXCLUSIVE) != 0) { + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + error = ENOENT; + } + + mutex_enter(vp->v_interlock); + if ((node = VTOSFS(vp))) + node->sn_mounting = NULL; + mutex_exit(vp->v_interlock); + + if (error) { + vrele(vp); + *vpp = NULL; + return error; + } + } else + mutex_exit(vp->v_interlock); + + /* Return the mounted root
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 11:44:19 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc7 Log Message: arm (oabi) works. ppc64 has tools/gcc build failure. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/README.gcc7 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/README.gcc7 diff -u src/external/gpl3/gcc/README.gcc7:1.5 src/external/gpl3/gcc/README.gcc7:1.6 --- src/external/gpl3/gcc/README.gcc7:1.5 Tue Feb 5 11:02:44 2019 +++ src/external/gpl3/gcc/README.gcc7 Tue Feb 5 11:44:18 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc7,v 1.5 2019/02/05 11:02:44 mrg Exp $ +$NetBSD: README.gcc7,v 1.6 2019/02/05 11:44:18 mrg Exp $ new stuff (from gcc 5): cc1objcplus @@ -28,7 +28,7 @@ architecture tools kernels libgcc native - --- -- -- --- aarch64 y ? y y n[2] ? ? alpha y ? y y y y ? -arm y ? y y ? ? ? +arm y y y y y y ? armeb y ? y y ? ? ? earm ? ? ? ? ? ? ? earmeb ? ? ? ? ? ? ? @@ -54,7 +54,7 @@ mipsel y ? ? y ? ? ? mips64eb y y y y y y ? mips64el y ? ? y ? ? ? powerpc y y y y y y ? -powerpc64 ? ? ? ? ? ? ? +powerpc64 n[9] ? ? ? ? ? ? sh3eb y ? y y ? ? ? sh3el y ? y y ? ? ? sparc y y y y y y ? @@ -89,4 +89,6 @@ architecture tools kernels libgcc native [6] - uncommited changes that need confirming. [7] - ramdisk fails: 32,nbmakefs: Writing inode 1562 (work/./usr/mdec/boot), bytes 229376 + 4096: No space left on device [8] - ramdisk fails: 32,nbmakefs: Writing inode 1026 (work/./usr/share/zoneinfo/US/Alaska), bytes 0 + 2380: No space left on device +[9] - gcc doesn't build: + /usr/src6/tools/gcc/../../external/gpl3/gcc/dist/gcc/stor-layout.c:722:29: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: mrg Date: Tue Feb 5 09:28:00 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: fix the previous: rf_netbsd32 is only relevant on _LP64 as all the structures are the same for arm32 oabi/eabi compat. only do it for _LP64 *and* COMAPT_NETBSD32. To generate a diff of this commit: cvs rdiff -u -r1.363 -r1.364 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.363 src/sys/dev/raidframe/rf_netbsdkintf.c:1.364 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.363 Mon Feb 4 21:57:47 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Feb 5 09:28:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.363 2019/02/04 21:57:47 mrg Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.364 2019/02/05 09:28:00 mrg Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.363 2019/02/04 21:57:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.364 2019/02/05 09:28:00 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -152,7 +152,11 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin #include "rf_compat80.h" #ifdef COMPAT_NETBSD32 +#ifdef _LP64 #include "rf_compat32.h" +#define RAID_COMPAT32 +#define RAID_COMPAT32 +#endif #endif #include "ioconf.h" @@ -1110,7 +1114,7 @@ raidioctl(dev_t dev, u_long cmd, void *d case RAIDFRAME_PARITYMAP_GET_DISABLE: case RAIDFRAME_PARITYMAP_SET_DISABLE: case RAIDFRAME_PARITYMAP_SET_PARAMS: -#ifdef COMPAT_NETBSD32 +#ifdef RAID_COMPAT32 case RAIDFRAME_GET_INFO32: #endif if ((rs->sc_flags & RAIDF_INITED) == 0) @@ -1160,7 +1164,7 @@ raidioctl(dev_t dev, u_long cmd, void *d /* configure the system */ case RAIDFRAME_CONFIGURE: -#ifdef COMPAT_NETBSD32 +#ifdef RAID_COMPAT32 case RAIDFRAME_CONFIGURE32: #endif @@ -1177,7 +1181,7 @@ raidioctl(dev_t dev, u_long cmd, void *d if (k_cfg == NULL) { return (ENOMEM); } -#ifdef COMPAT_NETBSD32 +#ifdef RAID_COMPAT32 if (cmd == RAIDFRAME_CONFIGURE32 && (l->l_proc->p_flag & PK_32) != 0) MODULE_CALL_HOOK(raidframe_netbsd32_config_hook, @@ -1485,7 +1489,7 @@ raidioctl(dev_t dev, u_long cmd, void *d return(retcode); case RAIDFRAME_GET_INFO: -#ifdef COMPAT_NETBSD32 +#ifdef RAID_COMPAT32 case RAIDFRAME_GET_INFO32: #endif RF_Malloc(d_cfg, sizeof(RF_DeviceConfig_t), @@ -1494,7 +1498,7 @@ raidioctl(dev_t dev, u_long cmd, void *d return (ENOMEM); retcode = rf_get_info(raidPtr, d_cfg); if (retcode == 0) { -#ifdef COMPAT_NETBSD32 +#ifdef RAID_COMPAT32 if (raidframe_netbsd32_config_hook.hooked && cmd == RAIDFRAME_GET_INFO32) ucfgp = NETBSD32PTR64(*(netbsd32_pointer_t *)data);
CVS commit: src/sys
Module Name:src Committed By: mrg Date: Tue Feb 5 09:29:20 UTC 2019 Modified Files: src/sys/conf: copts.mk src/sys/modules/zlib: Makefile src/sys/rump/kern/lib/libz: Makefile Log Message: be sure to only apply zlib.c's -Wno-error=implicit-fallthrough to GCC 7. push the setting into the rump and module version too. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/conf/copts.mk cvs rdiff -u -r1.1 -r1.2 src/sys/modules/zlib/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libz/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/conf/copts.mk diff -u src/sys/conf/copts.mk:1.1 src/sys/conf/copts.mk:1.2 --- src/sys/conf/copts.mk:1.1 Tue Feb 5 08:33:25 2019 +++ src/sys/conf/copts.mk Tue Feb 5 09:29:19 2019 @@ -1,10 +1,12 @@ -# $NetBSD: copts.mk,v 1.1 2019/02/05 08:33:25 mrg Exp $ +# $NetBSD: copts.mk,v 1.2 2019/02/05 09:29:19 mrg Exp $ # MI per-file compiler options required. .ifndef _SYS_CONF_COPTS_MK_ _SYS_CONF_COPTS_MK_=1 +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" COPTS.zlib.c+= -Wno-error=implicit-fallthrough +.endif .endif Index: src/sys/modules/zlib/Makefile diff -u src/sys/modules/zlib/Makefile:1.1 src/sys/modules/zlib/Makefile:1.2 --- src/sys/modules/zlib/Makefile:1.1 Sun Dec 29 08:09:44 2013 +++ src/sys/modules/zlib/Makefile Tue Feb 5 09:29:20 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2013/12/29 08:09:44 pgoyette Exp $ +# $NetBSD: Makefile,v 1.2 2019/02/05 09:29:20 mrg Exp $ .include "../Makefile.inc" @@ -8,3 +8,7 @@ KMOD= zlib SRCS= zlib.c .include + +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +COPTS.zlib.c+= -Wno-error=implicit-fallthrough +.endif Index: src/sys/rump/kern/lib/libz/Makefile diff -u src/sys/rump/kern/lib/libz/Makefile:1.2 src/sys/rump/kern/lib/libz/Makefile:1.3 --- src/sys/rump/kern/lib/libz/Makefile:1.2 Mon Oct 19 16:16:37 2015 +++ src/sys/rump/kern/lib/libz/Makefile Tue Feb 5 09:29:20 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/10/19 16:16:37 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2019/02/05 09:29:20 mrg Exp $ # # zlib.c is logically in sys/net @@ -11,3 +11,7 @@ SRCS= zlib.c .include .include + +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +COPTS.zlib.c+= -Wno-error=implicit-fallthrough +.endif
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: mrg Date: Tue Feb 5 11:11:32 UTC 2019 Modified Files: src/sys/dev/scsipi: scsipi_base.c Log Message: avoid a fallthru checker complaint and make one case like the rest. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/dev/scsipi/scsipi_base.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/scsipi/scsipi_base.c diff -u src/sys/dev/scsipi/scsipi_base.c:1.180 src/sys/dev/scsipi/scsipi_base.c:1.181 --- src/sys/dev/scsipi/scsipi_base.c:1.180 Sat Nov 24 18:15:23 2018 +++ src/sys/dev/scsipi/scsipi_base.c Tue Feb 5 11:11:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_base.c,v 1.180 2018/11/24 18:15:23 bouyer Exp $ */ +/* $NetBSD: scsipi_base.c,v 1.181 2019/02/05 11:11:32 mrg Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.180 2018/11/24 18:15:23 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.181 2019/02/05 11:11:32 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_scsi.h" @@ -947,6 +947,8 @@ scsipi_interpret_sense(struct scsipi_xfe */ xs->resid = 0; /* not short read */ } + error = 0; + break; case SKEY_EQUAL: error = 0; break;
CVS commit: src/sys/dev
Module Name:src Committed By: mrg Date: Tue Feb 5 11:33:13 UTC 2019 Modified Files: src/sys/dev: mm.c Log Message: appease the gcc7 fallthru checker. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/mm.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/mm.c diff -u src/sys/dev/mm.c:1.23 src/sys/dev/mm.c:1.24 --- src/sys/dev/mm.c:1.23 Wed Dec 5 18:16:51 2018 +++ src/sys/dev/mm.c Tue Feb 5 11:33:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mm.c,v 1.23 2018/12/05 18:16:51 christos Exp $ */ +/* $NetBSD: mm.c,v 1.24 2019/02/05 11:33:13 mrg Exp $ */ /*- * Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.23 2018/12/05 18:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.24 2019/02/05 11:33:13 mrg Exp $"); #include "opt_compat_netbsd.h" @@ -359,10 +359,11 @@ mm_readwrite(dev_t dev, struct uio *uio, if (uio->uio_rw == UIO_WRITE) { return ENOSPC; } - /*FALLTHROUGH*/ #if defined(COMPAT_16) && defined(__arm) + /* FALLTHROUGH */ case _DEV_ZERO_oARM: #endif + /* FALLTHROUGH */ case DEV_ZERO: error = dev_zero_readwrite(uio, iov); break;
CVS commit: src/sys/kern
Module Name:src Committed By: hannken Date: Tue Feb 5 09:49:44 UTC 2019 Modified Files: src/sys/kern: vfs_mount.c Log Message: Allow dounmount() with file system already suspended. Remove no longer valid test for layered mounts, ZFS will unmount snapshots bottom up. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/kern/vfs_mount.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/vfs_mount.c diff -u src/sys/kern/vfs_mount.c:1.67 src/sys/kern/vfs_mount.c:1.68 --- src/sys/kern/vfs_mount.c:1.67 Mon Aug 21 09:00:21 2017 +++ src/sys/kern/vfs_mount.c Tue Feb 5 09:49:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_mount.c,v 1.67 2017/08/21 09:00:21 hannken Exp $ */ +/* $NetBSD: vfs_mount.c,v 1.68 2019/02/05 09:49:44 hannken Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.67 2017/08/21 09:00:21 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.68 2019/02/05 09:49:44 hannken Exp $"); #include #include @@ -835,10 +835,9 @@ err_unmounted: int dounmount(struct mount *mp, int flags, struct lwp *l) { - mount_iterator_t *iter; - struct mount *cmp; vnode_t *coveredvp; int error, async, used_syncer, used_extattr; + const bool was_suspended = fstrans_is_owner(mp); #if NVERIEXEC > 0 error = veriexec_unmountchk(mp); @@ -846,22 +845,12 @@ dounmount(struct mount *mp, int flags, s return (error); #endif /* NVERIEXEC > 0 */ - /* - * No unmount below layered mounts. - */ - mountlist_iterator_init(); - while ((cmp = mountlist_iterator_next(iter)) != NULL) { - if (cmp->mnt_lower == mp) { - mountlist_iterator_destroy(iter); - return EBUSY; + if (!was_suspended) { + error = vfs_suspend(mp, 0); + if (error) { + return error; } } - mountlist_iterator_destroy(iter); - - error = vfs_suspend(mp, 0); - if (error) { - return error; - } KASSERT((mp->mnt_iflag & IMNT_GONE) == 0); @@ -888,7 +877,8 @@ dounmount(struct mount *mp, int flags, s vfs_syncer_add_to_worklist(mp); mp->mnt_flag |= async; mutex_exit(>mnt_updating); - vfs_resume(mp); + if (!was_suspended) + vfs_resume(mp); if (used_extattr) { if (start_extattr(mp) != 0) mp->mnt_flag &= ~MNT_EXTATTR; @@ -905,7 +895,8 @@ dounmount(struct mount *mp, int flags, s * vfs_busy() from succeeding. */ mp->mnt_iflag |= IMNT_GONE; - vfs_resume(mp); + if (!was_suspended) + vfs_resume(mp); if ((coveredvp = mp->mnt_vnodecovered) != NULLVP) { vn_lock(coveredvp, LK_EXCLUSIVE | LK_RETRY);
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: mrg Date: Tue Feb 5 10:04:50 UTC 2019 Modified Files: src/sys/dev/wscons: wskbd.c Log Message: - call update_modifier() explicitly for the scrolling keys up event. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/dev/wscons/wskbd.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/wscons/wskbd.c diff -u src/sys/dev/wscons/wskbd.c:1.142 src/sys/dev/wscons/wskbd.c:1.143 --- src/sys/dev/wscons/wskbd.c:1.142 Tue Sep 18 06:19:28 2018 +++ src/sys/dev/wscons/wskbd.c Tue Feb 5 10:04:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.142 2018/09/18 06:19:28 mrg Exp $ */ +/* $NetBSD: wskbd.c,v 1.143 2019/02/05 10:04:49 mrg Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -105,7 +105,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.142 2018/09/18 06:19:28 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.143 2019/02/05 10:04:49 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1547,7 +1547,9 @@ internal_command(struct wskbd_softc *sc, } else { return (0); } - } + } else + update_modifier(sc->id, *type, 0, MOD_COMMAND); + break; case KS_Cmd_ScrollSlowUp: case KS_Cmd_ScrollSlowDown: @@ -1566,7 +1568,9 @@ internal_command(struct wskbd_softc *sc, } else { return (0); } - } + } else + update_modifier(sc->id, *type, 0, MOD_COMMAND); + break; #endif case KS_Cmd:
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 11:02:44 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc7 Log Message: arm and armeb are mostly done. earmv4 kernels build. (still have earm vs libgcc issue.) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc7 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/README.gcc7 diff -u src/external/gpl3/gcc/README.gcc7:1.4 src/external/gpl3/gcc/README.gcc7:1.5 --- src/external/gpl3/gcc/README.gcc7:1.4 Tue Feb 5 07:43:08 2019 +++ src/external/gpl3/gcc/README.gcc7 Tue Feb 5 11:02:44 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc7,v 1.4 2019/02/05 07:43:08 mrg Exp $ +$NetBSD: README.gcc7,v 1.5 2019/02/05 11:02:44 mrg Exp $ new stuff (from gcc 5): cc1objcplus @@ -28,13 +28,13 @@ architecture tools kernels libgcc native - --- -- -- --- aarch64 y ? y y n[2] ? ? alpha y ? y y y y ? -arm ? ? ? ? ? ? ? -armeb ? ? ? ? ? ? ? +arm y ? y y ? ? ? +armeb y ? y y ? ? ? earm ? ? ? ? ? ? ? earmeb ? ? ? ? ? ? ? earmhf ? ? ? ? ? ? ? earmhfeb ? ? ? ? ? ? ? -earmv4 y ? n[5] y ? ? ? +earmv4 y y n[5] y ? ? ? earmv4eb ? ? ? ? ? ? ? earmv6 ? ? ? ? ? ? ? earmv6eb ? ? ? ? ? ? ?
CVS commit: src/external/bsd/pkg_install
Module Name:src Committed By: mrg Date: Tue Feb 5 11:37:18 UTC 2019 Modified Files: src/external/bsd/pkg_install: Makefile.inc Log Message: show_version() doesn't return, but fallthru checker doesn't know and coplains. disable the error. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pkg_install/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/external/bsd/pkg_install/Makefile.inc diff -u src/external/bsd/pkg_install/Makefile.inc:1.4 src/external/bsd/pkg_install/Makefile.inc:1.5 --- src/external/bsd/pkg_install/Makefile.inc:1.4 Fri Sep 16 16:41:20 2011 +++ src/external/bsd/pkg_install/Makefile.inc Tue Feb 5 11:37:18 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2011/09/16 16:41:20 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.5 2019/02/05 11:37:18 mrg Exp $ DIST= ${NETBSDSRCDIR}/external/bsd/pkg_install/dist @@ -11,3 +11,9 @@ CPPFLAGS+=-DSYSCONFDIR='"/etc"' WARNS= 4 CWARNFLAGS+= -Wno-missing-noreturn + +# show_version() does not return +.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" +COPTS.main.c+= -Wno-error=implicit-fallthrough +COPTS.pkg_delete.c+= -Wno-error=implicit-fallthrough +.endif
CVS commit: src/sys/kern
Module Name:src Committed By: pgoyette Date: Tue Feb 5 09:34:38 UTC 2019 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: If the openat_10 hook is present and it returns success, continue with the rest of the syscall; don't return prematurely, as we'll report success (return value 0) but won't have set up the fd. To generate a diff of this commit: cvs rdiff -u -r1.522 -r1.523 src/sys/kern/vfs_syscalls.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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.522 src/sys/kern/vfs_syscalls.c:1.523 --- src/sys/kern/vfs_syscalls.c:1.522 Tue Feb 5 08:53:18 2019 +++ src/sys/kern/vfs_syscalls.c Tue Feb 5 09:34:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.522 2019/02/05 08:53:18 pgoyette Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.523 2019/02/05 09:34:38 pgoyette Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.522 2019/02/05 08:53:18 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.523 2019/02/05 09:34:38 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -1636,12 +1636,13 @@ do_sys_openat(lwp_t *l, int fdat, const if (path == NULL) { MODULE_CALL_HOOK(vfs_openat_10_hook, (), enosys(), error); - if (error != ENOSYS) + if (error != 0 && error != ENOSYS) + return error; + } else { + error = pathbuf_copyin(path, ); + if (error) return error; } - error = pathbuf_copyin(path, ); - if (error) - return error; pathstring = pathbuf_stringcopy_get(pb);
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: mrg Date: Tue Feb 5 09:45:38 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: remove duplicated line in previously. noticed by paulg. To generate a diff of this commit: cvs rdiff -u -r1.364 -r1.365 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.364 src/sys/dev/raidframe/rf_netbsdkintf.c:1.365 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.364 Tue Feb 5 09:28:00 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Feb 5 09:45:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.364 2019/02/05 09:28:00 mrg Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.365 2019/02/05 09:45:38 mrg Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.364 2019/02/05 09:28:00 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.365 2019/02/05 09:45:38 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -155,7 +155,6 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin #ifdef _LP64 #include "rf_compat32.h" #define RAID_COMPAT32 -#define RAID_COMPAT32 #endif #endif
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Tue Feb 5 09:50:18 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: zfs_netbsd_reclaim(): validate "z_log" before zil_commit(). To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.42 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.43 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.42 Sat Jan 5 09:20:29 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Tue Feb 5 09:50:18 2019 @@ -5680,7 +5680,8 @@ zfs_netbsd_reclaim(void *v) } } - zil_commit(zfsvfs->z_log, zp->z_id); + if (zfsvfs->z_log) + zil_commit(zfsvfs->z_log, zp->z_id); if (zp->z_sa_hdl == NULL) zfs_znode_free(zp);
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: mrg Date: Tue Feb 5 10:54:14 UTC 2019 Modified Files: src/distrib/sets/lists/comp: ad.arm Log Message: add new gcc7 arm headers: arm_cmse.h and arm_fp16.h To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/lists/comp/ad.arm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/ad.arm diff -u src/distrib/sets/lists/comp/ad.arm:1.93 src/distrib/sets/lists/comp/ad.arm:1.94 --- src/distrib/sets/lists/comp/ad.arm:1.93 Sat Jan 19 13:06:50 2019 +++ src/distrib/sets/lists/comp/ad.arm Tue Feb 5 10:54:14 2019 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.93 2019/01/19 13:06:50 mrg Exp $ +# $NetBSD: ad.arm,v 1.94 2019/02/05 10:54:14 mrg Exp $ ./usr/bin/elf2aoutcomp-sysutil-bin ./usr/include/acorn26comp-obsolete obsolete ./usr/include/acorn26/ansi.h comp-obsolete obsolete @@ -419,6 +419,8 @@ ./usr/include/gcc-6/tgmath.h comp-c-include gcc=6 ./usr/include/gcc-6/unwind-arm-common.h comp-c-include gcc=6,eabi ./usr/include/gcc-7/arm_acle.h comp-c-include gcc=7 +./usr/include/gcc-7/arm_cmse.h comp-c-include gcc=7 +./usr/include/gcc-7/arm_fp16.h comp-c-include gcc=7 ./usr/include/gcc-7/arm_neon.h comp-c-include gcc=7 ./usr/include/gcc-7/mmintrin.h comp-c-include gcc=7 ./usr/include/gcc-7/tgmath.h comp-c-include gcc=7
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Tue Feb 5 11:20:21 UTC 2019 Modified Files: src/sys/dev/pci: agp_intel.c Log Message: fix a >15 year old code rework bug, and add a missing break;. the code in rev 1.7 looks like it does in this change, but rev 1.8 would write the I443 AGP_INTEL_AGPCTRL value, and then the other value. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/agp_intel.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/agp_intel.c diff -u src/sys/dev/pci/agp_intel.c:1.37 src/sys/dev/pci/agp_intel.c:1.38 --- src/sys/dev/pci/agp_intel.c:1.37 Mon Apr 4 20:37:56 2011 +++ src/sys/dev/pci/agp_intel.c Tue Feb 5 11:20:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_intel.c,v 1.37 2011/04/04 20:37:56 dyoung Exp $ */ +/* $NetBSD: agp_intel.c,v 1.38 2019/02/05 11:20:21 mrg Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: agp_intel.c,v 1.37 2011/04/04 20:37:56 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_intel.c,v 1.38 2019/02/05 11:20:21 mrg Exp $"); #include #include @@ -209,6 +209,7 @@ agp_intel_init(struct agp_softc *sc) case CHIP_I443: pci_conf_write(sc->as_pc, sc->as_tag, AGP_INTEL_AGPCTRL, AGPCTRL_AGPRSE | AGPCTRL_GTLB); + break; default: pci_conf_write(sc->as_pc, sc->as_tag, AGP_INTEL_AGPCTRL,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Tue Feb 5 11:30:07 UTC 2019 Modified Files: src/sys/dev/pci: siside.c Log Message: add missing break; after "100NEW" configuration. don't also set "133OLD", since the 100NEW cards don't support 133. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/siside.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/siside.c diff -u src/sys/dev/pci/siside.c:1.37 src/sys/dev/pci/siside.c:1.38 --- src/sys/dev/pci/siside.c:1.37 Sat Jun 23 06:45:51 2018 +++ src/sys/dev/pci/siside.c Tue Feb 5 11:30:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: siside.c,v 1.37 2018/06/23 06:45:51 maxv Exp $ */ +/* $NetBSD: siside.c,v 1.38 2019/02/05 11:30:07 mrg Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: siside.c,v 1.37 2018/06/23 06:45:51 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siside.c,v 1.38 2019/02/05 11:30:07 mrg Exp $"); #include #include @@ -451,6 +451,7 @@ sis_setup_channel(struct ata_channel *ch sis_tim |= sis_udma100new_tim[drvp->UDMA_mode] << SIS_TIM100_UDMA_TIME_OFF(drive); +break; case SIS_TYPE_133OLD: sis_tim |= sis_udma133old_tim[drvp->UDMA_mode] <<
CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000
Module Name:src Committed By: mrg Date: Tue Feb 5 12:01:11 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h Log Message: update for GCC 7 - mirror changes in freebsd64.h in recent times. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 \ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.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/rs6000/netbsd64.h diff -u src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.17 src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.18 --- src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h:1.17 Mon Mar 5 00:17:09 2018 +++ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h Tue Feb 5 12:01:11 2019 @@ -123,6 +123,12 @@ extern int dot_symbols; rs6000_isa_flags &= ~OPTION_MASK_RELOCATABLE; \ error (INVALID_64BIT, "relocatable"); \ } \ + if (ELFv2_ABI_CHECK) \ + { \ + rs6000_current_abi = ABI_ELFv2; \ + if (dot_symbols) \ + error ("-mcall-aixdesc incompatible with -mabi=elfv2"); \ + } \ if (rs6000_isa_flags & OPTION_MASK_EABI) \ { \ rs6000_isa_flags &= ~OPTION_MASK_EABI; \ @@ -210,7 +216,7 @@ extern int dot_symbols; #endif #define ASM_SPEC32 "-a32 \ -%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ +%{mrelocatable} %{mrelocatable-lib} %{" FPIE_OR_FPIC_SPEC ":-K PIC} \ %{memb|msdata=eabi: -memb}" #define ASM_SPEC64 "-a64" @@ -256,15 +262,18 @@ extern int dot_symbols; #endif +/* Use standard DWARF numbering for DWARF debugging information. */ +#define RS6000_USE_DWARF_NUMBERING + /* PowerPC64 NetBSD word-aligns FP doubles when -malign-power is given. */ #undef ADJUST_FIELD_ALIGN -#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ - ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \ - ? 128\ - : (TARGET_64BIT \ - && TARGET_ALIGN_NATURAL == 0 \ - && TYPE_MODE (strip_array_types (TREE_TYPE (FIELD))) == DFmode) \ - ? MIN ((COMPUTED), 32) \ +#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \ + (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED)) \ + ? 128\ + : (TARGET_64BIT \ + && TARGET_ALIGN_NATURAL == 0 \ + && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \ + ? MIN ((COMPUTED), 32) \ : (COMPUTED)) /* PowerPC64 NetBSD increases natural record alignment to doubleword if @@ -391,7 +400,7 @@ extern int dot_symbols; #define MINIMAL_TOC_SECTION_ASM_OP \ (TARGET_64BIT \ ? "\t.section\t\".toc1\",\"aw\"" \ - : ((TARGET_RELOCATABLE || flag_pic) \ + : (flag_pic \ ? "\t.section\t\".got2\",\"aw\"" \ : "\t.section\t\".got1\",\"aw\"")) @@ -591,7 +600,6 @@ extern int dot_symbols; && ! TARGET_NO_FP_IN_TOC))) \ || (!TARGET_64BIT \ && !TARGET_NO_FP_IN_TOC\ - && !TARGET_RELOCATABLE\ && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \ && BITS_PER_WORD == HOST_BITS_PER_INT) @@ -600,7 +608,7 @@ extern int dot_symbols; true if the symbol may be affected by dynamic relocations. */ #undef ASM_PREFERRED_EH_DATA_FORMAT #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ - ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE) \ + (TARGET_64BIT || flag_pic \ ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \ | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \ : DW_EH_PE_absptr)
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 12:42:09 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libgcc/arch/aarch64: defs.mk src/external/gpl3/gcc/lib/libiberty: defs.mk src/external/gpl3/gcc/lib/libobjc/arch/aarch64: defs.mk src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64: defs.mk src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64: configargs.h Added Files: src/external/gpl3/gcc/usr.bin/common-target/arch: aarch64.mk Log Message: regen mknative-gcc gcc7 and arm64. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/lib/libiberty/defs.mk cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64/defs.mk cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/usr.bin/common-target/arch/aarch64.mk cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64/configargs.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/lib/libgcc/arch/aarch64/defs.mk diff -u src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk:1.4 src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk:1.5 --- src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk:1.4 Thu Jan 24 08:56:43 2019 +++ src/external/gpl3/gcc/lib/libgcc/arch/aarch64/defs.mk Tue Feb 5 12:42:08 2019 @@ -1,5 +1,5 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp +# Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_INCLUDES=-I. -I. -I../.././gcc -I${GNUHOSTDIST}/libgcc -I${GNUHOSTDIST}/libgcc/. -I${GNUHOSTDIST}/libgcc/../gcc -I${GNUHOSTDIST}/libgcc/../include @@ -19,4 +19,3 @@ G_SHLIB_MAPFILES=libgcc-std.ver G_SHLIB_NM_FLAGS=-pg G_NOEXCEPTION_FLAGS=-fno-exceptions -fno-rtti -fasynchronous-unwind-tables G_EXTRA_HEADERS=${GNUHOSTDIST}/gcc/config/aarch64/arm_fp16.h ${GNUHOSTDIST}/gcc/config/aarch64/arm_neon.h ${GNUHOSTDIST}/gcc/config/aarch64/arm_acle.h ${GNUHOSTDIST}/gcc/ginclude/tgmath.h -G_CONFIGLINKS= Index: src/external/gpl3/gcc/lib/libiberty/defs.mk diff -u src/external/gpl3/gcc/lib/libiberty/defs.mk:1.19 src/external/gpl3/gcc/lib/libiberty/defs.mk:1.20 --- src/external/gpl3/gcc/lib/libiberty/defs.mk:1.19 Tue Feb 5 12:01:44 2019 +++ src/external/gpl3/gcc/lib/libiberty/defs.mk Tue Feb 5 12:42:08 2019 @@ -4,5 +4,5 @@ # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o strverscmp.o vfork.o +G_LIBOBJS=mempcpy.o strverscmp.o G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o Index: src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk diff -u src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk:1.3 src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk:1.4 --- src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk:1.3 Thu Jan 24 08:56:44 2019 +++ src/external/gpl3/gcc/lib/libobjc/arch/aarch64/defs.mk Tue Feb 5 12:42:08 2019 @@ -1,5 +1,5 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp +# Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALL_OPT_FILES=${GNUHOSTDIST}/gcc/brig/lang.opt ${GNUHOSTDIST}/gcc/lto/lang.opt ${GNUHOSTDIST}/gcc/c-family/c.opt ${GNUHOSTDIST}/gcc/common.opt ${GNUHOSTDIST}/gcc/config/aarch64/aarch64.opt ${GNUHOSTDIST}/gcc/config/netbsd.opt ${GNUHOSTDIST}/gcc/config/netbsd-elf.opt @@ -8,4 +8,3 @@ G_INCLUDES=-I${GNUHOSTDIST}/libobjc/../g G_OBJC_SOURCE_FILES=NXConstStr.m Object.m Protocol.m accessors.m linking.m G_C_SOURCE_FILES=class.c encoding.c error.c gc.c hash.c init.c ivars.c memory.c methods.c nil_method.c objc-foreach.c objc-sync.c objects.c protocols.c sarray.c selector.c sendmsg.c thr.c exception.c G_OBJC_H=objc.h objc-exception.h objc-sync.h NXConstStr.h Object.h Protocol.h message.h
CVS commit: src
Module Name:src Committed By: maxv Date: Tue Feb 5 13:00:03 UTC 2019 Modified Files: src/distrib/sets/lists/debug: md.amd64 src/distrib/sets/lists/tests: md.amd64 src/tests/lib/libnvmm: Makefile Added Files: src/tests/lib/libnvmm: h_io_assist.c h_io_assist_asm.S t_io_assist.sh Log Message: Add 12 tests for libnvmm's I/O Assist. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/tests/md.amd64 cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libnvmm/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libnvmm/h_io_assist.c \ src/tests/lib/libnvmm/h_io_assist_asm.S \ src/tests/lib/libnvmm/t_io_assist.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/md.amd64 diff -u src/distrib/sets/lists/debug/md.amd64:1.104 src/distrib/sets/lists/debug/md.amd64:1.105 --- src/distrib/sets/lists/debug/md.amd64:1.104 Mon Dec 24 13:31:22 2018 +++ src/distrib/sets/lists/debug/md.amd64 Tue Feb 5 13:00:03 2019 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.104 2018/12/24 13:31:22 christos Exp $ +# $NetBSD: md.amd64,v 1.105 2019/02/05 13:00:03 maxv Exp $ ./usr/lib/i386/12.202++_g.a comp-c-debuglib debuglib,compat,12.202xx ./usr/lib/i386/libi386_g.a comp-c-debuglib debuglib,compat ./usr/lib/i386/libiberty_g.a comp-obsolete obsolete @@ -24,4 +24,5 @@ ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait6.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_waitid.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_waitpid.debug tests-obsolete obsolete +./usr/libdata/debug/usr/tests/lib/libnvmm/h_io_assist.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libnvmm/h_mem_assist.debug tests-lib-debug debug,atf Index: src/distrib/sets/lists/tests/md.amd64 diff -u src/distrib/sets/lists/tests/md.amd64:1.6 src/distrib/sets/lists/tests/md.amd64:1.7 --- src/distrib/sets/lists/tests/md.amd64:1.6 Sun Dec 23 21:27:45 2018 +++ src/distrib/sets/lists/tests/md.amd64 Tue Feb 5 13:00:03 2019 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.6 2018/12/23 21:27:45 jakllsch Exp $ +# $NetBSD: md.amd64,v 1.7 2019/02/05 13:00:03 maxv Exp $ ./usr/tests/kernel/arch/x86/Atffile tests-obsolete obsolete ./usr/tests/kernel/arch/x86/Kyuafile tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_wait tests-obsolete obsolete @@ -7,5 +7,7 @@ ./usr/tests/kernel/arch/x86/t_ptrace_wait6 tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_waitid tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_waitpid tests-obsolete obsolete +./usr/tests/lib/libnvmm/h_io_assist tests-lib-tests compattestfile,atf +./usr/tests/lib/libnvmm/t_io_assist tests-lib-tests compattestfile,atf ./usr/tests/lib/libnvmm/h_mem_assist tests-lib-tests compattestfile,atf ./usr/tests/lib/libnvmm/t_mem_assist tests-lib-tests compattestfile,atf Index: src/tests/lib/libnvmm/Makefile diff -u src/tests/lib/libnvmm/Makefile:1.4 src/tests/lib/libnvmm/Makefile:1.5 --- src/tests/lib/libnvmm/Makefile:1.4 Mon Dec 24 05:06:45 2018 +++ src/tests/lib/libnvmm/Makefile Tue Feb 5 13:00:03 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2018/12/24 05:06:45 kre Exp $ +# $NetBSD: Makefile,v 1.5 2019/02/05 13:00:03 maxv Exp $ NOMAN= # defined @@ -12,9 +12,14 @@ LDADD+= -lnvmm BINDIR= ${TESTSDIR} .if ${MACHINE} == "amd64" +# I/O Assist +TESTS_SH= t_io_assist +PROGS= h_io_assist +SRCS.h_io_assist= h_io_assist.c h_io_assist_asm.S + # Mem Assist -TESTS_SH= t_mem_assist -PROGS= h_mem_assist +TESTS_SH+= t_mem_assist +PROGS+= h_mem_assist SRCS.h_mem_assist= h_mem_assist.c h_mem_assist_asm.S .endif Added files: Index: src/tests/lib/libnvmm/h_io_assist.c diff -u /dev/null src/tests/lib/libnvmm/h_io_assist.c:1.1 --- /dev/null Tue Feb 5 13:00:04 2019 +++ src/tests/lib/libnvmm/h_io_assist.c Tue Feb 5 13:00:03 2019 @@ -0,0 +1,370 @@ +/* + * Copyright (c) 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Maxime Villard. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES
CVS commit: src/sys/kern
Module Name:src Committed By: kamil Date: Tue Feb 5 13:50:10 UTC 2019 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: The panic for fopen(NULL, ... is back, fix it Restore the original behavior before merging the compat refactoring branch. Now: - no compat_10 -> perform pathbuf_copyin() and report EFAULT - compat_10 and error -> report error - compat_10 and success -> return file descriptor for "." PR kern/53948 To generate a diff of this commit: cvs rdiff -u -r1.523 -r1.524 src/sys/kern/vfs_syscalls.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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.523 src/sys/kern/vfs_syscalls.c:1.524 --- src/sys/kern/vfs_syscalls.c:1.523 Tue Feb 5 09:34:38 2019 +++ src/sys/kern/vfs_syscalls.c Tue Feb 5 13:50:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.523 2019/02/05 09:34:38 pgoyette Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.524 2019/02/05 13:50:10 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.523 2019/02/05 09:34:38 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.524 2019/02/05 13:50:10 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -1636,9 +1636,12 @@ do_sys_openat(lwp_t *l, int fdat, const if (path == NULL) { MODULE_CALL_HOOK(vfs_openat_10_hook, (), enosys(), error); - if (error != 0 && error != ENOSYS) + if (error == ENOSYS) + goto no_compat; + if (error) return error; } else { +no_compat: error = pathbuf_copyin(path, ); if (error) return error;
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: mrg Date: Tue Feb 5 13:57:25 UTC 2019 Modified Files: src/distrib/sets/lists/comp: ad.aarch64 Log Message: add gcc-7 specific header. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/comp/ad.aarch64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/ad.aarch64 diff -u src/distrib/sets/lists/comp/ad.aarch64:1.29 src/distrib/sets/lists/comp/ad.aarch64:1.30 --- src/distrib/sets/lists/comp/ad.aarch64:1.29 Sat Jan 19 13:06:50 2019 +++ src/distrib/sets/lists/comp/ad.aarch64 Tue Feb 5 13:57:25 2019 @@ -1,4 +1,4 @@ -# $NetBSD: ad.aarch64,v 1.29 2019/01/19 13:06:50 mrg Exp $ +# $NetBSD: ad.aarch64,v 1.30 2019/02/05 13:57:25 mrg Exp $ ./usr/include/aarch64comp-c-include ./usr/include/aarch64/ansi.h comp-c-include ./usr/include/aarch64/aout_machdep.h comp-c-include @@ -141,6 +141,7 @@ ./usr/include/gcc-7/arm_acle.h comp-c-include gcc=7 ./usr/include/gcc-7/arm_neon.h comp-c-include gcc=7 ./usr/include/gcc-7/tgmath.h comp-c-include gcc=7 +./usr/include/gcc-7/arm_fp16.h comp-c-include gcc=7 ./usr/include/ieeefp.hcomp-c-include ./usr/lib/eabi/libarm.acomp-c-lib compat,llvm ./usr/lib/eabi/libarm.so base-sys-shlib compat,pic,llvm
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: mrg Date: Tue Feb 5 12:56:43 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc Log Message: provide empty version of Aarch64GetESR() for non-linux arm64. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc 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/libsanitizer/sanitizer_common/sanitizer_linux.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.25 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.26 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.25 Mon Feb 4 03:00:11 2019 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Tue Feb 5 12:56:43 2019 @@ -1346,6 +1346,7 @@ void internal_join_thread(void *th) {} #endif #if defined(__aarch64__) +#if SANITIZER_LINUX // Android headers in the older NDK releases miss this definition. struct __sanitizer_esr_context { struct _aarch64_ctx head; @@ -1366,6 +1367,11 @@ static bool Aarch64GetESR(ucontext_t *uc } return false; } +#else +static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) { + return false; +} +#endif #endif SignalContext::WriteFlag SignalContext::GetWriteFlag(void *context) {
CVS commit: src/lib/libc/arch/aarch64/sys
Module Name:src Committed By: mrg Date: Tue Feb 5 13:02:36 UTC 2019 Modified Files: src/lib/libc/arch/aarch64/sys: brk.S Log Message: use adrp not adr, since the data is not pc-rel. fixes brk(2). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/sys/brk.S 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/arch/aarch64/sys/brk.S diff -u src/lib/libc/arch/aarch64/sys/brk.S:1.1 src/lib/libc/arch/aarch64/sys/brk.S:1.2 --- src/lib/libc/arch/aarch64/sys/brk.S:1.1 Sun Aug 10 05:47:37 2014 +++ src/lib/libc/arch/aarch64/sys/brk.S Tue Feb 5 13:02:35 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD: brk.S,v 1.2 2019/02/05 13:02:35 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ _C_LABEL(__minbrk): * Change the data segment size */ ENTRY(_brk) - adr x9, _C_LABEL(__minbrk) + adrp x9, _C_LABEL(__minbrk) ldr x10, [x9, #:lo12:_C_LABEL(__minbrk)] /* @@ -63,7 +63,7 @@ ENTRY(_brk) _INVOKE_CERROR() /* Store the new address in curbrk */ - adr x9, _C_LABEL(__curbrk) + adrp x9, _C_LABEL(__curbrk) str x11, [x9, #:lo12:_C_LABEL(__curbrk)] /* Return 0 for success */
CVS commit: src/lib/libnvmm
Module Name:src Committed By: maxv Date: Tue Feb 5 13:56:32 UTC 2019 Modified Files: src/lib/libnvmm: libnvmm.3 Log Message: Sync with reality, and improve. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 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.9 src/lib/libnvmm/libnvmm.3:1.10 --- src/lib/libnvmm/libnvmm.3:1.9 Mon Jan 7 22:17:02 2019 +++ src/lib/libnvmm/libnvmm.3 Tue Feb 5 13:56:32 2019 @@ -1,6 +1,6 @@ -.\" $NetBSD: libnvmm.3,v 1.9 2019/01/07 22:17:02 wiz Exp $ +.\" $NetBSD: libnvmm.3,v 1.10 2019/02/05 13:56:32 maxv Exp $ .\" -.\" Copyright (c) 2018 The NetBSD Foundation, Inc. +.\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation @@ -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 7, 2019 +.Dd February 5, 2019 .Dt LIBNVMM 3 .Os .Sh NAME @@ -96,10 +96,13 @@ A virtual machine is described by an opa VMM software should not attempt to modify this structure directly, and should use the API provided by .Nm -to handle virtual machines. +to manage virtual machines. .Pp .Fn nvmm_capability gets the capabilities of NVMM. +See +.Sx NVMM Capability +below for details. .Pp .Fn nvmm_machine_create creates a virtual machine in the kernel. @@ -159,6 +162,17 @@ See .Sx VCPU State Area below for details. .Pp +.Fn nvmm_vcpu_inject +injects into the CPU identified by +.Fa cpuid +of the machine +.Fa mach +an event described by +.Fa event . +See +.Sx Event Injection +below for details. +.Pp .Fn nvmm_vcpu_run runs the CPU identified by .Fa cpuid @@ -282,17 +296,88 @@ For example, the field indicates the maximum number of virtual machines supported, while .Cd max_vcpus indicates the maximum number of VCPUs supported per virtual machine. +.Ss Guest-Host Mappings +Each virtual machine has an associated guest physical memory. +VMM software is allowed to modify this guest physical memory by mapping +it into some parts of its virtual address space. +.Pp +VMM software should follow the following steps to achieve that: +.Pp +.Bl -bullet -offset indent -compact +.It +Call +.Fn nvmm_hva_map +to create in the host's virtual address space an area of memory that can +be shared with a guest. +Typically, the +.Fa hva +parameter will be a pointer to an area that was previously mapped via +.Fn mmap . +.Fn nvmm_hva_map +will replace the content of the area, and will make it read-write (but not +executable). +.It +Make available in the guest an area of guest physical memory, by calling +.Fn nvmm_gpa_map +and passing in the +.Fa hva +parameter the value that was previously given to +.Fn nvmm_hva_map . +.Fn nvmm_gpa_map +does not replace the content of any memory, it only creates a direct link +from +.Fa gpa +into +.Fa hva . +.Fn nvmm_gpa_unmap +removes this link without modifying +.Fa hva . +.El +.Pp +The guest will then be able to use the guest physical address passed in the +.Fa gpa +parameter of +.Fn nvmm_gpa_map . +Each change the guest makes in +.Fa gpa +will be reflected in the host's +.Fa hva , +and vice versa. +.Pp +It is illegal for VMM software to use +.Fn munmap +on an area that was mapped via +.Fn nvmm_hva_map . .Ss VCPU State Area A VCPU state area is a structure that entirely defines the content of the registers of a VCPU. Only one such structure exists, for x86: .Bd -literal struct nvmm_x64_state { - ... + struct nvmm_x64_state_seg segs[NVMM_X64_NSEG]; + uint64_t gprs[NVMM_X64_NGPR]; + 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 fxsave fpu; }; .Ed .Pp Refer to functional examples to see precisely how to use this structure. +.Pp +A VCPU state area is divided in sub-states. +A +.Fa flags +parameter is used to set and get the VCPU state; it acts as a bitmap which +indicates which sub-states to set or get. +.Pp +During VM exits, a partial VCPU state area is provided in +.Va exitstate , +see +.Sx Exit Reasons +below for details. + .Ss Exit Reasons The .Cd nvmm_exit @@ -307,7 +392,8 @@ enum nvmm_exit_reason { NVMM_EXIT_MSR = 0x0003, NVMM_EXIT_INT_READY = 0x0004, NVMM_EXIT_NMI_READY = 0x0005, - NVMM_EXIT_SHUTDOWN = 0x0006, + NVMM_EXIT_HALTED = 0x0006, + NVMM_EXIT_SHUTDOWN = 0x0007, /* Instructions (x86). */ ... @@ -392,6 +478,28 @@ and NVMM will cause a VM exit with reaso or .Cd NVMM_EXIT_NMI_READY to indicate that VMM software can now reinject the desired event. +.Ss Assist Callbacks +In order to assist emulation of certain operations, +.Nm +requires VMM software to register, via +.Fn
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 12:01:44 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64: backtrace-supported.h src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: auto-target.h defs.mk src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk gcov-iov.h src/external/gpl3/gcc/lib/libgomp/arch/powerpc64: config.h libgomp_f.h omp.h src/external/gpl3/gcc/lib/libiberty: defs.mk src/external/gpl3/gcc/lib/libobjc/arch/powerpc64: defs.mk src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h cxxabi_tweaks.h defs.mk gstdint.h gthr-posix.h gthr-single.h gthr.h src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: auto-host.h bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h plugin-version.h src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64: config.h Added Files: src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: gthr-defs.mk src/external/gpl3/gcc/usr.bin/common-target/arch: powerpc64.mk Log Message: mknative-gcc for GCC 7 and ppc64. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/auto-target.h cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/gthr-defs.mk cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/config.h \ src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/libgomp_f.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/omp.h cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/lib/libiberty/defs.mk cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/lib/libobjc/arch/powerpc64/defs.mk cvs rdiff -u -r1.14 -r1.15 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/cxxabi_tweaks.h \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-posix.h \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr-single.h \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gthr.h cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/defs.mk cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/usr.bin/common-target/arch/powerpc64.mk cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/bversion.h \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/plugin-version.h cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/defs.mk cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/gtyp-input.list cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/insn-modes.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64/config.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/lib/libbacktrace/arch/powerpc64/backtrace-supported.h diff -u src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h:1.4 src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h:1.5 --- src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h:1.4 Tue Feb 6 09:18:16 2018 +++ src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h Tue Feb 5 12:01:43 2019 @@ -1,9 +1,9 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.92 2018/02/06 07:04:01 mrg Exp */ -/* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp */ +/* Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp */ +/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* backtrace-supported.h.in -- Whether stack backtrace is supported. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2017 Free Software Foundation, Inc. Written by Ian Lance Taylor, Google. Redistribution and use in source and binary forms, with or without @@ -11,13 +11,13 @@ modification, are permitted provided tha met:
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 12:08:12 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc7 Log Message: update ppc64 status: mknativeg-gcc worked. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc7 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/README.gcc7 diff -u src/external/gpl3/gcc/README.gcc7:1.6 src/external/gpl3/gcc/README.gcc7:1.7 --- src/external/gpl3/gcc/README.gcc7:1.6 Tue Feb 5 11:44:18 2019 +++ src/external/gpl3/gcc/README.gcc7 Tue Feb 5 12:08:12 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc7,v 1.6 2019/02/05 11:44:18 mrg Exp $ +$NetBSD: README.gcc7,v 1.7 2019/02/05 12:08:12 mrg Exp $ new stuff (from gcc 5): cc1objcplus @@ -54,7 +54,7 @@ mipsel y ? ? y ? ? ? mips64eb y y y y y y ? mips64el y ? ? y ? ? ? powerpc y y y y y y ? -powerpc64 n[9] ? ? ? ? ? ? +powerpc64 y ? y y ? ? ? sh3eb y ? y y ? ? ? sh3el y ? y y ? ? ? sparc y y y y y y ? @@ -89,6 +89,3 @@ architecture tools kernels libgcc native [6] - uncommited changes that need confirming. [7] - ramdisk fails: 32,nbmakefs: Writing inode 1562 (work/./usr/mdec/boot), bytes 229376 + 4096: No space left on device [8] - ramdisk fails: 32,nbmakefs: Writing inode 1026 (work/./usr/share/zoneinfo/US/Alaska), bytes 0 + 2380: No space left on device -[9] - gcc doesn't build: - /usr/src6/tools/gcc/../../external/gpl3/gcc/dist/gcc/stor-layout.c:722:29: error: macro "ADJUST_FIELD_ALIGN" passed 3 arguments, but takes just 2 -
CVS commit: src/lib/libnvmm
Module Name:src Committed By: wiz Date: Tue Feb 5 15:03:35 UTC 2019 Modified Files: src/lib/libnvmm: libnvmm.3 Log Message: Mark up NULL with Dv. Remove empty line. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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.10 src/lib/libnvmm/libnvmm.3:1.11 --- src/lib/libnvmm/libnvmm.3:1.10 Tue Feb 5 13:56:32 2019 +++ src/lib/libnvmm/libnvmm.3 Tue Feb 5 15:03:35 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: libnvmm.3,v 1.10 2019/02/05 13:56:32 maxv Exp $ +.\" $NetBSD: libnvmm.3,v 1.11 2019/02/05 15:03:35 wiz Exp $ .\" .\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -377,7 +377,6 @@ During VM exits, a partial VCPU state ar see .Sx Exit Reasons below for details. - .Ss Exit Reasons The .Cd nvmm_exit @@ -499,7 +498,8 @@ or .Fn nvmm_assist_mem are invoked. VMM software that does not intend to use either of these assists can put -NULL in the callbacks. +.Dv NULL +in the callbacks. .Ss I/O Assist When a VM exit occurs with reason .Cd NVMM_EXIT_IO ,
CVS commit: src/external/gpl3/gcc/dist/gcc/config/aarch64
Module Name:src Committed By: mrg Date: Tue Feb 5 14:01:46 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c Log Message: re-port host_detect_local_cpu() to netbsd. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.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/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.3 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.4 --- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.3 Sat Jan 19 12:10:05 2019 +++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c Tue Feb 5 14:01:46 2019 @@ -166,222 +166,30 @@ contains_core_p (unsigned *arr, unsigned #include #include #include +#endif const char * host_detect_local_cpu (int argc, const char **argv) { - const char *arch_id = NULL; - const char *res = NULL; - static const int num_exts = ARRAY_SIZE (aarch64_extensions); - char buf[128]; - bool arch = false; - bool tune = false; - bool cpu = false; - unsigned int i, curcpu; - unsigned int core_idx = 0; - const char* imps[2] = { NULL, NULL }; - const char* cores[2] = { NULL, NULL }; - unsigned int n_cores = 0; - unsigned int n_imps = 0; - bool processed_exts = false; - const char *ext_string = ""; - unsigned long extension_flags = 0; - unsigned long default_flags = 0; - size_t len; - char impl_buf[8]; - char part_buf[8]; - int mib[2], ncpu; - - gcc_assert (argc); - - if (!argv[0]) -goto not_found; - - /* Are we processing -march, mtune or mcpu? */ - arch = strcmp (argv[0], "arch") == 0; - if (!arch) -tune = strcmp (argv[0], "tune") == 0; - - if (!arch && !tune) -cpu = strcmp (argv[0], "cpu") == 0; - - if (!arch && !tune && !cpu) -goto not_found; - - mib[0] = CTL_HW; - mib[1] = HW_NCPU; - len = sizeof(ncpu); - if (sysctl(mib, 2, , , NULL, 0) == -1) -goto not_found; - - for (curcpu = 0; curcpu < ncpu; curcpu++) -{ - char path[128]; - struct aarch64_sysctl_cpu_id id; - - len = sizeof id; - snprintf(path, sizeof path, "machdep.cpu%d.cpu_id", curcpu); - if (sysctlbyname(path, , , NULL, 0) != 0) -goto not_found; - - snprintf(impl_buf, sizeof impl_buf, "0x%02x", - (int)__SHIFTOUT(id.ac_midr, MIDR_EL1_IMPL)); - snprintf(part_buf, sizeof part_buf, "0x%02x", - (int)__SHIFTOUT(id.ac_midr, MIDR_EL1_PARTNUM)); - - for (i = 0; aarch64_cpu_data[i].name != NULL; i++) -if (strstr (impl_buf, aarch64_cpu_data[i].implementer_id) != NULL -&& !contains_string_p (imps, aarch64_cpu_data[i].implementer_id)) - { -if (n_imps == 2) - goto not_found; - -imps[n_imps++] = aarch64_cpu_data[i].implementer_id; - -break; - } - - for (i = 0; aarch64_cpu_data[i].name != NULL; i++) -if (strstr (part_buf, aarch64_cpu_data[i].part_no) != NULL -&& !contains_string_p (cores, aarch64_cpu_data[i].part_no)) - { -if (n_cores == 2) - goto not_found; - -cores[n_cores++] = aarch64_cpu_data[i].part_no; -core_idx = i; -arch_id = aarch64_cpu_data[i].arch; -break; - } - - if (!tune && !processed_exts) -{ - for (i = 0; i < num_exts; i++) -{ - bool enabled; - - if (strcmp(aarch64_extensions[i].ext, "fp") == 0) -enabled = (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_FP) - == ID_AA64PFR0_EL1_FP_IMPL); - else if (strcmp(aarch64_extensions[i].ext, "simd") == 0) -enabled = (__SHIFTOUT(id.ac_aa64pfr0, ID_AA64PFR0_EL1_ADVSIMD) - == ID_AA64PFR0_EL1_ADV_SIMD_IMPL); - else if (strcmp(aarch64_extensions[i].ext, "crypto") == 0) -enabled = (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_AES) - & ID_AA64ISAR0_EL1_AES_AES) != 0; - else if (strcmp(aarch64_extensions[i].ext, "crc") == 0) -enabled = (__SHIFTOUT(id.ac_aa64isar0, ID_AA64ISAR0_EL1_CRC32) - == ID_AA64ISAR0_EL1_CRC32_CRC32X); - else if (strcmp(aarch64_extensions[i].ext, "lse") == 0) -enabled = false; - else - { - warning(0, "Unknown extension '%s'", aarch64_extensions[i].ext); - goto not_found; - } - - if (enabled) -extension_flags |= aarch64_extensions[i].flag; - else -extension_flags &= ~(aarch64_extensions[i].flag); -} - - processed_exts = true; - } -} - - /* Weird cpuinfo format that we don't know how to handle. */ - if (n_cores == 0 || n_cores > 2 || n_imps != 1) -
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Tue Feb 5 14:07:24 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc7 Log Message: - arm64 works - alpha seems to work in simple testing - armeb builds - powerpc64 has ICE building libgcc2. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/README.gcc7 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/README.gcc7 diff -u src/external/gpl3/gcc/README.gcc7:1.7 src/external/gpl3/gcc/README.gcc7:1.8 --- src/external/gpl3/gcc/README.gcc7:1.7 Tue Feb 5 12:08:12 2019 +++ src/external/gpl3/gcc/README.gcc7 Tue Feb 5 14:07:24 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc7,v 1.7 2019/02/05 12:08:12 mrg Exp $ +$NetBSD: README.gcc7,v 1.8 2019/02/05 14:07:24 mrg Exp $ new stuff (from gcc 5): cc1objcplus @@ -26,10 +26,10 @@ atf: does atf run / compare well architecture tools kernels libgcc native-gcc make release runs atf - --- -- -- --- -aarch64 y ? y y n[2] ? ? -alpha y ? y y y y ? +aarch64 y y y y y y ? +alpha y y y y y y ? arm y y y y y y ? -armeb y ? y y ? ? ? +armeb y ? y y y ? ? earm ? ? ? ? ? ? ? earmeb ? ? ? ? ? ? ? earmhf ? ? ? ? ? ? ? @@ -54,7 +54,7 @@ mipsel y ? ? y ? ? ? mips64eb y y y y y y ? mips64el y ? ? y ? ? ? powerpc y y y y y y ? -powerpc64 y ? y y ? ? ? +powerpc64 y ? y y n[9] ? ? sh3eb y ? y y ? ? ? sh3el y ? y y ? ? ? sparc y y y y y y ? @@ -71,7 +71,7 @@ architecture tools kernels libgcc native [1] - sparc64-gcc gets ICE at startup. because sizeof(ufast8/16/32) != sizeof(sfast8/16/32) -- uncommited hack to workaround it seems to work fine. -[2] - __curbrk won't link libc.so +[2] [3] - gcc can't be built: /usr/src6/external/gpl3/gcc/dist/gcc/calls.c:1361:1: error: unrecognizable insn: } @@ -89,3 +89,4 @@ architecture tools kernels libgcc native [6] - uncommited changes that need confirming. [7] - ramdisk fails: 32,nbmakefs: Writing inode 1562 (work/./usr/mdec/boot), bytes 229376 + 4096: No space left on device [8] - ramdisk fails: 32,nbmakefs: Writing inode 1026 (work/./usr/share/zoneinfo/US/Alaska), bytes 0 + 2380: No space left on device +[9] - /usr/src6/external/gpl3/gcc/dist/libgcc/libgcc2.c:2036:1: error: unrecognizable insn:
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: christos Date: Tue Feb 5 17:13:37 UTC 2019 Modified Files: src/sys/dev/raidframe: rf_compat80.c rf_netbsd.h rf_netbsdkintf.c Log Message: - Fix the FAIL_DISK handling (it would prolly trash the wrong disk before since the request structs are different and the row in the old struct is the col in the new one). - Restructure the way compat modules are loaded so that we only load them for the ioctls that need them. Put a comment explaining why... - Set retcode after loading compat (now that the fail disk passthrough hack is gone), so that various ioctls don't always fail. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/raidframe/rf_compat80.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/raidframe/rf_netbsd.h cvs rdiff -u -r1.365 -r1.366 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_compat80.c diff -u src/sys/dev/raidframe/rf_compat80.c:1.8 src/sys/dev/raidframe/rf_compat80.c:1.9 --- src/sys/dev/raidframe/rf_compat80.c:1.8 Sun Feb 3 03:02:24 2019 +++ src/sys/dev/raidframe/rf_compat80.c Tue Feb 5 12:13:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_compat80.c,v 1.8 2019/02/03 08:02:24 pgoyette Exp $ */ +/* $NetBSD: rf_compat80.c,v 1.9 2019/02/05 17:13:37 christos Exp $ */ /* * Copyright (c) 2017 Matthew R. Green @@ -222,6 +222,16 @@ rf_config80(RF_Raid_t *raidPtr, int unit return 0; } +static int +rf_fail_disk80(RF_Raid_t *raidPtr, struct rf_recon_req80 *req80) +{ + struct rf_recon_req req = { + .col = req80.col, + .flags = req80.flags, + }; + return rf_fail_disk(raidPtr, ); +} + int raidframe_ioctl_80(u_long cmd, int initted, RF_Raid_t *raidPtr, int unit, void *data, RF_Config_t **k_cfg) @@ -238,9 +248,8 @@ raidframe_ioctl_80(u_long cmd, int initt return ENXIO; break; case RAIDFRAME_CONFIGURE80: - break; case RAIDFRAME_FAIL_DISK80: - return EPASSTHROUGH; + break; default: return EPASSTHROUGH; } @@ -261,8 +270,12 @@ raidframe_ioctl_80(u_long cmd, int initt if (error != 0) return error; return EAGAIN; /* flag mainline to call generic config */ + case RAIDFRAME_FAIL_DISK80: + return rf_fail_disk80(raidPtr, data); + default: + /* abort really */ + return EPASSTHROUGH; } - return EPASSTHROUGH; } static void Index: src/sys/dev/raidframe/rf_netbsd.h diff -u src/sys/dev/raidframe/rf_netbsd.h:1.30 src/sys/dev/raidframe/rf_netbsd.h:1.31 --- src/sys/dev/raidframe/rf_netbsd.h:1.30 Sat Apr 27 17:18:42 2013 +++ src/sys/dev/raidframe/rf_netbsd.h Tue Feb 5 12:13:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.30 2013/04/27 21:18:42 christos Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.31 2019/02/05 17:13:37 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -103,4 +103,6 @@ typedef struct RF_ConfigSet_s { struct RF_ConfigSet_s *next; } RF_ConfigSet_t; +int rf_fail_disk(RF_Raid_t *, struct rf_recon_req *); + #endif /* _RF__RF_NETBSDSTUFF_H_ */ Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.365 src/sys/dev/raidframe/rf_netbsdkintf.c:1.366 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.365 Tue Feb 5 04:45:38 2019 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Tue Feb 5 12:13:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.365 2019/02/05 09:45:38 mrg Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.366 2019/02/05 17:13:37 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.365 2019/02/05 09:45:38 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.366 2019/02/05 17:13:37 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -149,6 +149,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin #include "rf_parityscan.h" #include "rf_threadstuff.h" +#include "rf_compat50.h" #include "rf_compat80.h" #ifdef COMPAT_NETBSD32 @@ -1049,6 +1050,145 @@ raid_detach_unlocked(struct raid_softc * return 0; } +static bool +rf_must_be_initialized(const struct raid_softc *rs, u_long cmd) +{ + switch (cmd) { + case RAIDFRAME_ADD_HOT_SPARE: + case RAIDFRAME_CHECK_COPYBACK_STATUS: + case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT: + case RAIDFRAME_CHECK_COPYBACK_STATUS_EXT80: + case RAIDFRAME_CHECK_PARITY: + case RAIDFRAME_CHECK_PARITYREWRITE_STATUS: + case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT: + case RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT80: + case RAIDFRAME_CHECK_RECON_STATUS: + case RAIDFRAME_CHECK_RECON_STATUS_EXT: + case RAIDFRAME_CHECK_RECON_STATUS_EXT80: + case RAIDFRAME_COPYBACK: + case RAIDFRAME_DELETE_COMPONENT: + case RAIDFRAME_FAIL_DISK: + case RAIDFRAME_FAIL_DISK80: + case RAIDFRAME_GET_ACCTOTALS: + case
CVS commit: src/tests/lib/libc/stdio
Module Name:src Committed By: kamil Date: Tue Feb 5 17:30:19 UTC 2019 Modified Files: src/tests/lib/libc/stdio: t_fopen.c Log Message: Add 2 new tests in t_fopen Added: - fopen_nullptr (without COMPAT_10) - fopen_nullptr_compat10 (with COMPAT_10) PR kern/53948 Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdio/t_fopen.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/stdio/t_fopen.c diff -u src/tests/lib/libc/stdio/t_fopen.c:1.5 src/tests/lib/libc/stdio/t_fopen.c:1.6 --- src/tests/lib/libc/stdio/t_fopen.c:1.5 Mon Nov 6 23:06:55 2017 +++ src/tests/lib/libc/stdio/t_fopen.c Tue Feb 5 17:30:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fopen.c,v 1.5 2017/11/06 23:06:55 kre Exp $ */ +/* $NetBSD: t_fopen.c,v 1.6 2019/02/05 17:30:19 kamil Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,14 +29,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fopen.c,v 1.5 2017/11/06 23:06:55 kre Exp $"); +__RCSID("$NetBSD: t_fopen.c,v 1.6 2019/02/05 17:30:19 kamil Exp $"); +#include +#include +#include #include #include #include #include #include #include +#include #include #include @@ -287,6 +291,114 @@ ATF_TC_CLEANUP(fopen_mode, tc) (void)unlink(path); } +static void +check_kernel_modular(void) +{ + int err; + + err = modctl(MODCTL_EXISTS, 0); + if (err == 0) return; + if (errno == ENOSYS) + atf_tc_skip("Kernel does not have 'options MODULAR'."); + if (errno == EPERM) + return; /* Module loading can be administratively forbidden */ + ATF_REQUIRE_EQ_MSG(errno, 0, "unexpected error %d from " + "modctl(MODCTL_EXISTS, 0)", errno); +} + +static bool +is_module_present(const char *name) +{ + bool found; + size_t len; + int count; + struct iovec iov; + modstat_t *ms; + + for (len = 8192; ;) { + iov.iov_base = malloc(len); + iov.iov_len = len; + + errno = 0; + + if (modctl(MODCTL_STAT, ) != 0) { + fprintf(stderr, "modctl(MODCTL_STAT) failed: %s\n", + strerror(errno)); + atf_tc_fail("Failed to query module status"); + } + if (len >= iov.iov_len) + break; + free(iov.iov_base); + len = iov.iov_len; + } + + found = false; + count = *(int *)iov.iov_base; + ms = (modstat_t *)((char *)iov.iov_base + sizeof(int)); + while (count > 0) { + if (strcmp(ms->ms_name, name) == 0) { + found = true; + break; + } + ms++; + count--; + } + + free(iov.iov_base); + + return found; +} + +#define COMPAT10_MODNAME "compat_10" + +ATF_TC(fopen_nullptr); +ATF_TC_HEAD(fopen_nullptr, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test fopen(3) with NULL path (without " + COMPAT10_MODNAME ")"); +} + +ATF_TC_BODY(fopen_nullptr, tc) +{ + bool compat10; + + check_kernel_modular(); + compat10 = is_module_present(COMPAT10_MODNAME); + + if (compat10) + atf_tc_skip("Kernel does have the " COMPAT10_MODNAME + " module loaded into the kernel"); + + /* NULL shall trigger error */ + ATF_REQUIRE_ERRNO(EFAULT, fopen(NULL, "r") == NULL); +} + +ATF_TC(fopen_nullptr_compat10); +ATF_TC_HEAD(fopen_nullptr_compat10, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test fopen(3) with NULL path (with " + COMPAT10_MODNAME ")"); +} + +ATF_TC_BODY(fopen_nullptr_compat10, tc) +{ + FILE *fp; + bool compat10; + + check_kernel_modular(); + compat10 = is_module_present(COMPAT10_MODNAME); + + if (!compat10) + atf_tc_skip("Kernel does not have the " COMPAT10_MODNAME + " module loaded into the kernel"); + + /* NULL is translated to "." and shall success */ + fp = fopen(NULL, "r"); + + ATF_REQUIRE(fp != NULL); + ATF_REQUIRE(fclose(fp) == 0); +} + ATF_TC(fopen_perm); ATF_TC_HEAD(fopen_perm, tc) { @@ -482,6 +594,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, fopen_append); ATF_TP_ADD_TC(tp, fopen_err); ATF_TP_ADD_TC(tp, fopen_mode); + ATF_TP_ADD_TC(tp, fopen_nullptr); + ATF_TP_ADD_TC(tp, fopen_nullptr_compat10); ATF_TP_ADD_TC(tp, fopen_perm); ATF_TP_ADD_TC(tp, fopen_regular); ATF_TP_ADD_TC(tp, fopen_symlink);
CVS commit: src/tests/lib/libnvmm
Module Name:src Committed By: maxv Date: Tue Feb 5 17:03:10 UTC 2019 Modified Files: src/tests/lib/libnvmm: h_io_assist.c Log Message: Ah, I had warnings disabled, fix the build. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libnvmm/h_io_assist.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/libnvmm/h_io_assist.c diff -u src/tests/lib/libnvmm/h_io_assist.c:1.1 src/tests/lib/libnvmm/h_io_assist.c:1.2 --- src/tests/lib/libnvmm/h_io_assist.c:1.1 Tue Feb 5 13:00:03 2019 +++ src/tests/lib/libnvmm/h_io_assist.c Tue Feb 5 17:03:10 2019 @@ -49,7 +49,7 @@ static char iobuf[IO_SIZE]; -static uint8_t *databuf; +static char *databuf; static uint8_t *instbuf; static void