CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat Jun 16 05:52:17 UTC 2018 Modified Files: src/sys/arch/x86/x86: fpu.c Log Message: Actually, don't do anything if we switch to a kernel thread. When the cpu switches back to a user thread the fpu is restored, so no point calling fninit (which doesn't clear all the states anyway). To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/fpu.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/x86/x86/fpu.c diff -u src/sys/arch/x86/x86/fpu.c:1.34 src/sys/arch/x86/x86/fpu.c:1.35 --- src/sys/arch/x86/x86/fpu.c:1.34 Thu Jun 14 18:00:15 2018 +++ src/sys/arch/x86/x86/fpu.c Sat Jun 16 05:52:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu.c,v 1.34 2018/06/14 18:00:15 maxv Exp $ */ +/* $NetBSD: fpu.c,v 1.35 2018/06/16 05:52:17 maxv Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. All @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.34 2018/06/14 18:00:15 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.35 2018/06/16 05:52:17 maxv Exp $"); #include "opt_multiprocessor.h" @@ -333,14 +333,6 @@ fpu_restore(struct lwp *l) } static void -fpu_reset(void) -{ - clts(); - fninit(); - stts(); -} - -static void fpu_eagerrestore(struct lwp *l) { struct pcb *pcb = lwp_getpcb(l); @@ -359,9 +351,7 @@ fpu_eagerswitch(struct lwp *oldlwp, stru s = splhigh(); fpusave_cpu(true); - if (newlwp->l_flag & LW_SYSTEM) - fpu_reset(); - else + if (!(newlwp->l_flag & LW_SYSTEM)) fpu_eagerrestore(newlwp); splx(s); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Sat Jun 16 01:25:23 UTC 2018 Modified Files: src/sys/dev/pci: radeonfb.c Log Message: explicitly turn off tiling translation - now software rendered characters look right again on r3xx hardware To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/radeonfb.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/radeonfb.c diff -u src/sys/dev/pci/radeonfb.c:1.97 src/sys/dev/pci/radeonfb.c:1.98 --- src/sys/dev/pci/radeonfb.c:1.97 Fri Jun 15 21:22:35 2018 +++ src/sys/dev/pci/radeonfb.c Sat Jun 16 01:25:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.97 2018/06/15 21:22:35 macallan Exp $ */ +/* $NetBSD: radeonfb.c,v 1.98 2018/06/16 01:25:23 macallan Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.97 2018/06/15 21:22:35 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.98 2018/06/16 01:25:23 macallan Exp $"); #include #include @@ -2226,7 +2226,11 @@ radeonfb_modeswitch(struct radeonfb_disp PUT32(sc, RADEON_GEN_INT_CNTL, 0); PUT32(sc, RADEON_CAP0_TRIG_CNTL, 0); PUT32(sc, RADEON_CAP1_TRIG_CNTL, 0); - PUT32(sc, RADEON_SURFACE_CNTL, 0); + /* + * Apple OF hands us R3xx radeons with tiling enabled - explicitly + * disable it here + */ + PUT32(sc, RADEON_SURFACE_CNTL, RADEON_SURF_TRANSLATION_DIS); for (i = 0; i < dp->rd_ncrtcs; i++) radeonfb_setcrtc(dp, i);
CVS commit: src/usr.bin/patch
Module Name:src Committed By: christos Date: Sat Jun 16 00:40:14 UTC 2018 Modified Files: src/usr.bin/patch: inp.c Log Message: PR/53368: Thomas Barabosch: Potential integer overflow in usr.bin/patch/inp.c To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/patch/inp.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/patch/inp.c diff -u src/usr.bin/patch/inp.c:1.24 src/usr.bin/patch/inp.c:1.25 --- src/usr.bin/patch/inp.c:1.24 Fri Jul 24 14:56:00 2015 +++ src/usr.bin/patch/inp.c Fri Jun 15 20:40:14 2018 @@ -1,7 +1,7 @@ /* * $OpenBSD: inp.c,v 1.34 2006/03/11 19:41:30 otto Exp $ * $DragonFly: src/usr.bin/patch/inp.c,v 1.6 2007/09/29 23:11:10 swildner Exp $ - * $NetBSD: inp.c,v 1.24 2015/07/24 18:56:00 christos Exp $ + * $NetBSD: inp.c,v 1.25 2018/06/16 00:40:14 christos Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: inp.c,v 1.24 2015/07/24 18:56:00 christos Exp $"); +__RCSID("$NetBSD: inp.c,v 1.25 2018/06/16 00:40:14 christos Exp $"); #include #include @@ -118,12 +118,11 @@ scan_input(const char *filename) static bool reallocate_lines(size_t *lines_allocated) { - char **p; size_t new_size; new_size = *lines_allocated * 3 / 2; - p = realloc(i_ptr, (new_size + 2) * sizeof(char *)); - if (p == NULL) { /* shucks, it was a near thing */ + int res = reallocarr(_ptr, new_size + 2, sizeof(char *)); + if (res != 0) { /* shucks, it was a near thing */ munmap(i_womp, i_size); i_womp = NULL; free(i_ptr); @@ -132,7 +131,6 @@ reallocate_lines(size_t *lines_allocated return false; } *lines_allocated = new_size; - i_ptr = p; return true; }
CVS commit: src/doc
Module Name:src Committed By: jmcneill Date: Sat Jun 16 00:19:42 UTC 2018 Modified Files: src/doc: CHANGES Log Message: arm: Add support for Rockchip RK3328 SoC. To generate a diff of this commit: cvs rdiff -u -r1.2398 -r1.2399 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2398 src/doc/CHANGES:1.2399 --- src/doc/CHANGES:1.2398 Thu Jun 14 14:48:59 2018 +++ src/doc/CHANGES Sat Jun 16 00:19:42 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2398 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2399 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -163,3 +163,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: dhcpcd: Import 7.0.5b. [roy 20180604] virtio(4): Add MMIO transport and fdt(4) attachment. [jakllsch 20180606] arm: Add support for QEMU ARM Virtual Machine ("virt"). [jmcneill 20180614] + arm: Add support for Rockchip RK3328 SoC. [jmcneill 20180615]
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Sat Jun 16 00:19:04 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 files.generic64 src/sys/dev/fdt: files.fdt Added Files: src/sys/arch/arm/rockchip: files.rockchip rk3328_cru.c rk3328_cru.h rk3328_platform.h rk_cru.c rk_cru.h rk_cru_arm.c rk_cru_composite.c rk_cru_gate.c rk_cru_mux.c rk_cru_pll.c rk_gmac.c rk_gpio.c rk_iomux.c rk_platform.c rk_usb.c src/sys/dev/fdt: dwc2_fdt.c dwcmmc_fdt.c Log Message: Add initial support for Rockchip RK3328 SoC. To generate a diff of this commit: cvs rdiff -u -r0 -r1.13 src/sys/arch/arm/rockchip/files.rockchip cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/rockchip/rk3328_cru.c \ src/sys/arch/arm/rockchip/rk3328_cru.h \ src/sys/arch/arm/rockchip/rk3328_platform.h \ src/sys/arch/arm/rockchip/rk_cru.c src/sys/arch/arm/rockchip/rk_cru.h \ src/sys/arch/arm/rockchip/rk_cru_arm.c \ src/sys/arch/arm/rockchip/rk_cru_composite.c \ src/sys/arch/arm/rockchip/rk_cru_gate.c \ src/sys/arch/arm/rockchip/rk_cru_mux.c \ src/sys/arch/arm/rockchip/rk_cru_pll.c \ src/sys/arch/arm/rockchip/rk_gmac.c src/sys/arch/arm/rockchip/rk_gpio.c \ src/sys/arch/arm/rockchip/rk_iomux.c \ src/sys/arch/arm/rockchip/rk_platform.c \ src/sys/arch/arm/rockchip/rk_usb.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/files.generic64 cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/dwc2_fdt.c \ src/sys/dev/fdt/dwcmmc_fdt.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/fdt/files.fdt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.16 src/sys/arch/evbarm/conf/GENERIC64:1.17 --- src/sys/arch/evbarm/conf/GENERIC64:1.16 Thu Jun 14 10:56:39 2018 +++ src/sys/arch/evbarm/conf/GENERIC64 Sat Jun 16 00:19:04 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.16 2018/06/14 10:56:39 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.17 2018/06/16 00:19:04 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -14,10 +14,14 @@ include "arch/evbarm/conf/GENERIC.common # makeoptions DTSARCH="arm aarch64" makeoptions DTSGNUARCH="arm arm64" -makeoptions DTSSUBDIR="allwinner broadcom nvidia" +makeoptions DTSSUBDIR="allwinner broadcom nvidia rockchip" makeoptions DTS=" bcm2837-rpi-3-b.dts + rk3328-evb.dts + rk3328-roc-cc.dts + rk3328-rock64.dts + sun50i-a64-bananapi-m64.dts sun50i-a64-nanopi-a64.dts sun50i-a64-olinuxino.dts @@ -45,6 +49,7 @@ makeoptions DTS=" options CPU_CORTEXA53 options CPU_CORTEXA57 options SOC_BCM2837 +options SOC_RK3328 options SOC_TEGRA210 options SOC_SUN50I_A64 options SOC_SUN50I_H5 @@ -62,6 +67,7 @@ options DEBUG options VERBOSE_INIT_ARM # verbose bootstrapping messages # EARLYCONS is required for early init messages from VERBOSE_INIT_ARM. #options EARLYCONS=bcm2837 +options EARLYCONS=rk3328, CONSADDR=0xff13 #options EARLYCONS=sunxi, CONSADDR=0x01c28000 #options EARLYCONS=tegra, CONSADDR=0x70006000 #options EARLYCONS=virt @@ -131,6 +137,7 @@ tegrapmc* at fdt? pass 4 # NVIDIA Tegra # Clock and Reset controller bcmcprman* at fdt? pass 1 # Broadcom BCM283x Clock Manager bcmaux* at fdt? pass 1 # Broadcom BCM283x Aux Periph Clocks +rkcru* at fdt? pass 2 # Rockchip RK3328 CRU sun8ih3ccu* at fdt? pass 2 # Allwinner H3/H5 CCU sun8ih3rccu* at fdt? pass 2 # Allwinner H3/H5 CCU (PRCM) sun50ia64ccu* at fdt? pass 2 # Allwinner A64 CCU @@ -146,12 +153,14 @@ tegra210car* at fdt? pass 3 # NVIDIA Te bcmgpio* at fdt? # Broadcom BCM283x GPIO sunxigpio* at fdt? pass 3 # Allwinner GPIO tegragpio* at fdt? pass 2 # NVIDIA Tegra GPIO +rkgpio* at rkiomux? # Rockchip GPIO gpio* at gpiobus? # PWM controller sunxipwm* at fdt? pass 3 # Allwinner PWM # MPIO / Pinmux +rkiomux* at fdt? pass 2 # Rockchip IOMUX tegrapinmux* at fdt? # NVIDIA Tegra MPIO # XUSB PADCTL @@ -165,6 +174,7 @@ ppb* at pci? dev ? function ? pci* at ppb? # Ethernet +awge* at fdt?# DesignWare Gigabit Ethernet emac* at fdt?# Allwinner Gigabit Ethernet (EMAC) re* at pci? dev ? function ? # Realtek RTL8111GS @@ -229,6 +239,7 @@ sunxirtc* at fdt? # Allwinner RTC tegrartc* at fdt? # NVIDIA Tegra RTC # SDMMC +dwcmmc* at fdt? # Designware SD/MMC mmcpwrseq* at fdt? # Simple MMC power sequence provider sdhc* at fdt? # SD Host Controller Interface sdhost* at fdt? # Broadcom BCM283x SD Host Interface @@ -302,6 +313,8 @@ sunxithermal* at fdt? # Allwinner ther tegrasoctherm* at fdt? # NVIDIA Tegra SOC_THERM # USB +rkusb* at fdt? pass 9 # Rockchip USB PHY +rkusbphy* at rkusb? sunxiusbphy* at fdt? pass 9 # Allwinner USB PHY sunxiusb3phy* at fdt? pass 9 # Allwinner USB3 PHY tegrausbphy* at fdt? # NVIDIA Tegra USB PHY Index:
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Jun 16 00:15:40 UTC 2018 Modified Files: src/sys/dev/ic: dwc_mmc_reg.h Log Message: Add VERID reg bits To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/dwc_mmc_reg.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/ic/dwc_mmc_reg.h diff -u src/sys/dev/ic/dwc_mmc_reg.h:1.6 src/sys/dev/ic/dwc_mmc_reg.h:1.7 --- src/sys/dev/ic/dwc_mmc_reg.h:1.6 Mon Jun 19 22:03:02 2017 +++ src/sys/dev/ic/dwc_mmc_reg.h Sat Jun 16 00:15:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_mmc_reg.h,v 1.6 2017/06/19 22:03:02 jmcneill Exp $ */ +/* $NetBSD: dwc_mmc_reg.h,v 1.7 2018/06/16 00:15:40 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill @@ -150,6 +150,9 @@ #define DWC_MMC_DMAC_FIX_BURST __BIT(1) #define DWC_MMC_DMAC_SOFTRESET __BIT(0) +#define DWC_MMC_VERID_ID __BITS(15,0) +#define DWC_MMC_VERID_240A 0x240a + #define DWC_MMC_IDST_HOST_ABT __BIT(10) #define DWC_MMC_IDST_ABNORMAL_INT_SUM __BIT(9) #define DWC_MMC_IDST_NORMAL_INT_SUM __BIT(8)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sat Jun 16 00:15:00 UTC 2018 Modified Files: src/sys/dev/ic: dwc_gmac.c dwc_gmac_reg.h dwc_gmac_var.h Log Message: Add flag for disabling store-and-forward mode, and a callback for notifying bus glue that the link speed has changed. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/dwc_gmac.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/dwc_gmac_reg.h cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/dwc_gmac_var.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/ic/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.45 src/sys/dev/ic/dwc_gmac.c:1.46 --- src/sys/dev/ic/dwc_gmac.c:1.45 Thu Dec 21 12:09:43 2017 +++ src/sys/dev/ic/dwc_gmac.c Sat Jun 16 00:15:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.45 2017/12/21 12:09:43 martin Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.46 2018/06/16 00:15:00 jmcneill Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.45 2017/12/21 12:09:43 martin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.46 2018/06/16 00:15:00 jmcneill Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -124,7 +124,6 @@ static uint32_t bitrev32(uint32_t x); (AWIN_GMAC_MAC_INT_TSI | AWIN_GMAC_MAC_INT_ANEG | \ AWIN_GMAC_MAC_INT_LINKCHG | AWIN_GMAC_MAC_INT_RGSMII) - #ifdef DWC_GMAC_DEBUG static void dwc_gmac_dump_dma(struct dwc_gmac_softc *sc); static void dwc_gmac_dump_tx_desc(struct dwc_gmac_softc *sc); @@ -734,6 +733,8 @@ dwc_gmac_miibus_statchg(struct ifnet *if case IFM_1000_T: break; } + if (sc->sc_set_speed) + sc->sc_set_speed(sc, IFM_SUBTYPE(mii->mii_media_active)); flow = 0; if (IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) { @@ -822,9 +823,11 @@ dwc_gmac_init_locked(struct ifnet *ifp) /* * Start RX/TX part */ - bus_space_write_4(sc->sc_bst, sc->sc_bsh, - AWIN_GMAC_DMA_OPMODE, GMAC_DMA_OP_RXSTART | GMAC_DMA_OP_TXSTART | - GMAC_DMA_OP_RXSTOREFORWARD | GMAC_DMA_OP_TXSTOREFORWARD); + uint32_t opmode = GMAC_DMA_OP_RXSTART | GMAC_DMA_OP_TXSTART; + if ((sc->sc_flags & DWC_GMAC_FORCE_THRESH_DMA_MODE) == 0) { + opmode |= GMAC_DMA_OP_RXSTOREFORWARD | GMAC_DMA_OP_TXSTOREFORWARD; + } + bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_DMA_OPMODE, opmode); sc->sc_stopping = false; Index: src/sys/dev/ic/dwc_gmac_reg.h diff -u src/sys/dev/ic/dwc_gmac_reg.h:1.15 src/sys/dev/ic/dwc_gmac_reg.h:1.16 --- src/sys/dev/ic/dwc_gmac_reg.h:1.15 Sat Nov 21 16:04:11 2015 +++ src/sys/dev/ic/dwc_gmac_reg.h Sat Jun 16 00:15:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac_reg.h,v 1.15 2015/11/21 16:04:11 martin Exp $ */ +/* $NetBSD: dwc_gmac_reg.h,v 1.16 2018/06/16 00:15:00 jmcneill Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -141,7 +141,9 @@ #define GMAC_DMA_OP_TXSTOREFORWARD __BIT(21) /* start TX when a full frame is available */ #define GMAC_DMA_OP_FLUSHTX __BIT(20) /* flush TX fifo */ +#define GMAC_DMA_OP_TTC __BITS(16,14) /* TX thresh control */ #define GMAC_DMA_OP_TXSTART __BIT(13) /* start TX DMA engine */ +#define GMAC_DMA_OP_RTC __BITS(4,3) /* RX thres control */ #define GMAC_DMA_OP_RXSTART __BIT(1) /* start RX DMA engine */ #define GMAC_DMA_INT_NIE __BIT(16) /* Normal/Summary */ Index: src/sys/dev/ic/dwc_gmac_var.h diff -u src/sys/dev/ic/dwc_gmac_var.h:1.7 src/sys/dev/ic/dwc_gmac_var.h:1.8 --- src/sys/dev/ic/dwc_gmac_var.h:1.7 Sat Jan 21 10:30:15 2017 +++ src/sys/dev/ic/dwc_gmac_var.h Sat Jun 16 00:15:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac_var.h,v 1.7 2017/01/21 10:30:15 skrll Exp $ */ +/* $NetBSD: dwc_gmac_var.h,v 1.8 2018/06/16 00:15:00 jmcneill Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -80,6 +80,8 @@ struct dwc_gmac_softc { bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; bus_dma_tag_t sc_dmat; + uint32_t sc_flags; +#define DWC_GMAC_FORCE_THRESH_DMA_MODE 0x01 /* force DMA to use threshold mode */ struct ethercom sc_ec; struct mii_data sc_mii; kmutex_t sc_mdio_lock; @@ -94,6 +96,8 @@ struct dwc_gmac_softc { kmutex_t *sc_lock; /* lock for softc operations */ struct if_percpuq *sc_ipq; /* softint-based input queues */ + + void (*sc_set_speed)(struct dwc_gmac_softc *, int); }; void dwc_gmac_attach(struct dwc_gmac_softc*, uint32_t /*mii_clk*/);
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Sat Jun 16 00:12:35 UTC 2018 Modified Files: src/sys/dev/fdt: fdt_clock.c Log Message: fdtbus_clock_assign: simplify To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/fdt_clock.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/fdt/fdt_clock.c diff -u src/sys/dev/fdt/fdt_clock.c:1.3 src/sys/dev/fdt/fdt_clock.c:1.4 --- src/sys/dev/fdt/fdt_clock.c:1.3 Tue Jun 12 10:28:55 2018 +++ src/sys/dev/fdt/fdt_clock.c Sat Jun 16 00:12:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_clock.c,v 1.3 2018/06/12 10:28:55 jmcneill Exp $ */ +/* $NetBSD: fdt_clock.c,v 1.4 2018/06/16 00:12:35 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_clock.c,v 1.3 2018/06/12 10:28:55 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_clock.c,v 1.4 2018/06/16 00:12:35 jmcneill Exp $"); #include #include @@ -224,6 +224,8 @@ fdtbus_clock_assign(int phandle) rates_len = 0; const u_int nclocks = fdtbus_clock_count_prop(phandle, "assigned-clocks"); + const u_int nparents = fdtbus_clock_count_prop(phandle, "assigned-clock-parents"); + const u_int nrates = rates_len / sizeof(*rates); for (index = 0; index < nclocks; index++) { clk = fdtbus_clock_get_index_prop(phandle, index, "assigned-clocks"); @@ -232,24 +234,27 @@ fdtbus_clock_assign(int phandle) continue; } - clk_parent = fdtbus_clock_get_index_prop(phandle, index, "assigned-clock-parents"); - if (clk_parent != NULL) { - error = clk_set_parent(clk, clk_parent); - if (error != 0) { -aprint_error("clk: failed to set %s parent to %s, error %d\n", -clk->name, clk_parent->name, error); + if (index < nparents) { + clk_parent = fdtbus_clock_get_index_prop(phandle, index, "assigned-clock-parents"); + if (clk_parent != NULL) { +error = clk_set_parent(clk, clk_parent); +if (error != 0) { + aprint_error("clk: failed to set %s parent to %s, error %d\n", + clk->name, clk_parent->name, error); +} + } else { +aprint_debug("clk: failed to set %s parent (not found)\n", clk->name); } } - if (rates_len >= sizeof(*rates)) { - const u_int rate = be32dec(rates); + if (index < nrates) { + const u_int rate = be32toh(rates[index]); if (rate != 0) { error = clk_set_rate(clk, rate); if (error != 0) aprint_error("clk: failed to set %s rate to %u Hz, error %d\n", clk->name, rate, error); } - rates_len -= sizeof(*rates); } } }
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Sat Jun 16 00:13:06 UTC 2018 Modified Files: src/sys/dev/fdt: fixedclock.c Log Message: If clock-output-names is specified, use it for the clock name instead of the node name To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/fixedclock.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/fdt/fixedclock.c diff -u src/sys/dev/fdt/fixedclock.c:1.3 src/sys/dev/fdt/fixedclock.c:1.4 --- src/sys/dev/fdt/fixedclock.c:1.3 Sat Apr 28 15:21:05 2018 +++ src/sys/dev/fdt/fixedclock.c Sat Jun 16 00:13:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fixedclock.c,v 1.3 2018/04/28 15:21:05 jmcneill Exp $ */ +/* $NetBSD: fixedclock.c,v 1.4 2018/06/16 00:13:06 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fixedclock.c,v 1.3 2018/04/28 15:21:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fixedclock.c,v 1.4 2018/06/16 00:13:06 jmcneill Exp $"); #include #include @@ -89,6 +89,11 @@ fixedclock_attach(device_t parent, devic struct fixedclock_softc * const sc = device_private(self); const struct fdt_attach_args *faa = aux; const int phandle = faa->faa_phandle; + const char *clkname; + + clkname = fdtbus_get_string(phandle, "clock-output-names"); + if (!clkname) + clkname = faa->faa_name; sc->sc_dev = self; sc->sc_phandle = phandle; @@ -101,11 +106,11 @@ fixedclock_attach(device_t parent, devic return; } sc->sc_clk.base.domain = >sc_clkdom; - sc->sc_clk.base.name = kmem_asprintf("%s", faa->faa_name); + sc->sc_clk.base.name = kmem_asprintf("%s", clkname); clk_attach(>sc_clk.base); aprint_naive("\n"); - aprint_normal(": %u Hz fixed clock\n", sc->sc_clk.rate); + aprint_normal(": %u Hz fixed clock (%s)\n", sc->sc_clk.rate, clkname); fdtbus_register_clock_controller(self, phandle, _fdt_funcs); }
CVS commit: src/sys/arch/arm/virt
Module Name:src Committed By: jmcneill Date: Fri Jun 15 23:57:55 UTC 2018 Modified Files: src/sys/arch/arm/virt: virt_platform.c Log Message: Pull in arm/locore.h for arm_dsb() on aarch64 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/virt/virt_platform.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/virt/virt_platform.c diff -u src/sys/arch/arm/virt/virt_platform.c:1.2 src/sys/arch/arm/virt/virt_platform.c:1.3 --- src/sys/arch/arm/virt/virt_platform.c:1.2 Fri Jun 15 14:37:35 2018 +++ src/sys/arch/arm/virt/virt_platform.c Fri Jun 15 23:57:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virt_platform.c,v 1.2 2018/06/15 14:37:35 jakllsch Exp $ */ +/* $NetBSD: virt_platform.c,v 1.3 2018/06/15 23:57:55 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -31,7 +31,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: virt_platform.c,v 1.2 2018/06/15 14:37:35 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virt_platform.c,v 1.3 2018/06/15 23:57:55 jmcneill Exp $"); #include #include @@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: virt_platfor #include #include +#incldue #include #include
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: wiz Date: Fri Jun 15 23:15:56 UTC 2018 Modified Files: src/external/bsd/cron/dist: crontab.5 Log Message: Fix Dd argument. Remove unnecessary whitespace. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/cron/dist/crontab.5 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/cron/dist/crontab.5 diff -u src/external/bsd/cron/dist/crontab.5:1.6 src/external/bsd/cron/dist/crontab.5:1.7 --- src/external/bsd/cron/dist/crontab.5:1.6 Thu Jun 14 22:02:57 2018 +++ src/external/bsd/cron/dist/crontab.5 Fri Jun 15 23:15:56 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: crontab.5,v 1.6 2018/06/14 22:02:57 christos Exp $ +.\" $NetBSD: crontab.5,v 1.7 2018/06/15 23:15:56 wiz Exp $ .\" .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie .\" * All rights reserved @@ -21,7 +21,7 @@ .\" .\" $OpenBSD: crontab.5,v 1.36 2018/06/13 13:27:37 jmc Exp $ .\" -.Dd June 14 2018 +.Dd June 14, 2018 .Dt CRONTAB 5 .Os .Sh NAME @@ -261,7 +261,7 @@ The variable can be set to an alternate time zone in order to affect when the job is run. Note that this only affects the scheduling of the job, not the time zone -that the job perceives when it is run. +that the job perceives when it is run. If .Ev CRON_TZ is defined but empty @@ -277,7 +277,7 @@ On a heavily loaded system, or on a syst jobs will sometimes start later than originally intended, and by skipping non-critical jobs because of delays, system load can be lightened. -If +If .Ev CRON_WITHIN is defined but empty .Pq Ev CRON_WITHIN Ns = Ns \&"" ,
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Fri Jun 15 23:13:19 UTC 2018 Modified Files: src/share/man/man4: ipsec.4 Log Message: Add missing word. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/share/man/man4/ipsec.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ipsec.4 diff -u src/share/man/man4/ipsec.4:1.44 src/share/man/man4/ipsec.4:1.45 --- src/share/man/man4/ipsec.4:1.44 Wed Jun 13 03:28:36 2018 +++ src/share/man/man4/ipsec.4 Fri Jun 15 23:13:19 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ipsec.4,v 1.44 2018/06/13 03:28:36 ozaki-r Exp $ +.\" $NetBSD: ipsec.4,v 1.45 2018/06/15 23:13:19 wiz Exp $ .\" $KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -339,7 +339,7 @@ Support for IPv6 and protocols has been added in .Nx 4.0 . .Pp -Support Network Address Translator Traversal as +Support for Network Address Translator Traversal as described in RFCs 3947 and 3948 has been added in .Nx 5.0 . .Pp
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Fri Jun 15 23:11:56 UTC 2018 Modified Files: src/share/man/man4: hifn.4 nsp.4 ubsec.4 Log Message: Sort SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/hifn.4 cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/nsp.4 cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/ubsec.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/hifn.4 diff -u src/share/man/man4/hifn.4:1.8 src/share/man/man4/hifn.4:1.9 --- src/share/man/man4/hifn.4:1.8 Wed Jun 13 03:28:36 2018 +++ src/share/man/man4/hifn.4 Fri Jun 15 23:11:56 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: hifn.4,v 1.8 2018/06/13 03:28:36 ozaki-r Exp $ +.\" $NetBSD: hifn.4,v 1.9 2018/06/15 23:11:56 wiz Exp $ .\" $OpenBSD: hifn.4,v 1.32 2002/09/26 07:55:40 miod Exp $ .\" $FreeBSD: src/share/man/man4/hifn.4,v 1.1.2.2 2003/10/08 23:57:50 sam Exp $ .\" @@ -83,8 +83,8 @@ may also supply data to the kernel subsystem. .Sh SEE ALSO .Xr crypto 4 , -.Xr ipsec 4 , .Xr intro 4 , +.Xr ipsec 4 , .Xr rnd 4 , .Xr opencrypto 9 .Sh HISTORY Index: src/share/man/man4/nsp.4 diff -u src/share/man/man4/nsp.4:1.3 src/share/man/man4/nsp.4:1.4 --- src/share/man/man4/nsp.4:1.3 Wed Jun 13 03:28:36 2018 +++ src/share/man/man4/nsp.4 Fri Jun 15 23:11:56 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: nsp.4,v 1.3 2018/06/13 03:28:36 ozaki-r Exp $ +.\" $NetBSD: nsp.4,v 1.4 2018/06/15 23:11:56 wiz Exp $ .\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -149,8 +149,8 @@ driver offer excellent performance for s achieving 75,000 or more such operations per second. .Sh SEE ALSO .Xr crypto 4 , -.Xr ipsec 4 , .Xr intro 4 , +.Xr ipsec 4 , .Xr rnd 4 , .Xr opencrypto 9 .Sh HISTORY Index: src/share/man/man4/ubsec.4 diff -u src/share/man/man4/ubsec.4:1.6 src/share/man/man4/ubsec.4:1.7 --- src/share/man/man4/ubsec.4:1.6 Wed Jun 13 03:28:36 2018 +++ src/share/man/man4/ubsec.4 Fri Jun 15 23:11:56 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ubsec.4,v 1.6 2018/06/13 03:28:36 ozaki-r Exp $ +.\" $NetBSD: ubsec.4,v 1.7 2018/06/15 23:11:56 wiz Exp $ .\" $FreeBSD: src/share/man/man4/ubsec.4,v 1.1.2.1 2002/11/21 23:57:24 sam Exp $ .\" $OpenBSD: ubsec.4,v 1.26 2003/09/03 15:55:41 jason Exp $ .\" @@ -90,8 +90,8 @@ registers itself to provide random data subsystem. .Sh SEE ALSO .Xr crypto 4 , -.Xr ipsec 4 , .Xr intro 4 , +.Xr ipsec 4 , .Xr rnd 4 , .Xr opencrypto 9 .Sh HISTORY
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: uwe Date: Fri Jun 15 23:11:39 UTC 2018 Modified Files: src/sys/arch/powerpc/oea: cpu_subr.c Log Message: Fix fmttab value for L2CR_L2PE (parity enabled) so that we don't print self-contradictory "no parity parity enabled". To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/powerpc/oea/cpu_subr.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.96 src/sys/arch/powerpc/oea/cpu_subr.c:1.97 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.96 Fri Jun 8 23:40:44 2018 +++ src/sys/arch/powerpc/oea/cpu_subr.c Fri Jun 15 23:11:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.96 2018/06/08 23:40:44 macallan Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.97 2018/06/15 23:11:39 uwe Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.96 2018/06/08 23:40:44 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.97 2018/06/15 23:11:39 uwe Exp $"); #include "opt_ppcparam.h" #include "opt_ppccache.h" @@ -97,7 +97,7 @@ static const struct fmttab cpu_7450_l2cr { L2CR_L2DO|L2CR_L2IO, L2CR_L2DO|L2CR_L2IO, " locked" }, { L2CR_L2E, ~0, " 256KB L2 cache" }, { L2CR_L2PE, 0, " no parity" }, - { L2CR_L2PE, ~0, " parity enabled" }, + { L2CR_L2PE, L2CR_L2PE, " parity enabled" }, { 0, 0, NULL } }; @@ -108,7 +108,7 @@ static const struct fmttab cpu_7448_l2cr { L2CR_L2DO|L2CR_L2IO, L2CR_L2DO|L2CR_L2IO, " locked" }, { L2CR_L2E, ~0, " 1MB L2 cache" }, { L2CR_L2PE, 0, " no parity" }, - { L2CR_L2PE, ~0, " parity enabled" }, + { L2CR_L2PE, L2CR_L2PE, " parity enabled" }, { 0, 0, NULL } }; @@ -119,7 +119,7 @@ static const struct fmttab cpu_7457_l2cr { L2CR_L2DO|L2CR_L2IO, L2CR_L2DO|L2CR_L2IO, " locked" }, { L2CR_L2E, ~0, " 512KB L2 cache" }, { L2CR_L2PE, 0, " no parity" }, - { L2CR_L2PE, ~0, " parity enabled" }, + { L2CR_L2PE, L2CR_L2PE, " parity enabled" }, { 0, 0, NULL } };
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Fri Jun 15 22:40:33 UTC 2018 Modified Files: src/share/man/man9: module.9 Log Message: Add missing .Fn mark-up To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/share/man/man9/module.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/module.9 diff -u src/share/man/man9/module.9:1.47 src/share/man/man9/module.9:1.48 --- src/share/man/man9/module.9:1.47 Fri Jun 15 15:14:15 2018 +++ src/share/man/man9/module.9 Fri Jun 15 22:40:33 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: module.9,v 1.47 2018/06/15 15:14:15 wiz Exp $ +.\" $NetBSD: module.9,v 1.48 2018/06/15 22:40:33 pgoyette Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 3, 2018 +.Dd June 16, 2018 .Dt MODULE 9 .Os .Sh NAME @@ -492,25 +492,25 @@ The argument should be the return value from the previous .Fn module_register_callbacks call. -.It module_specific_key_create "specificdata_key_t *keyp" \ +.It Fn module_specific_key_create "specificdata_key_t *keyp" \ "specificdata_dtor_t dtor" Creates a new specificdata_key for use within the .Nm domain. The key identifier is returned in .Fa keyp . -.It module_specific_key_delete "specificdata_key_t key" +.It Fn module_specific_key_delete "specificdata_key_t key" Deletes the specified specificdata_key .Fa key from the .Nm domain. -.It module_getspecific "module_t *mod" "specificdata_key_t key" +.It Fn module_getspecific "module_t *mod" "specificdata_key_t key" Retrieves the value associated with .Fa key from module .Fa mod . -.It module_setspecific "module_t *mod" "specificdata_key_t key" "void *data" +.It Fn module_setspecific "module_t *mod" "specificdata_key_t key" "void *data" Stores .Fa data as the value associated with
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Fri Jun 15 22:27:40 UTC 2018 Modified Files: src/share/man/man9: specificdata.9 Log Message: Add note that there is no way to delete an individual datum from a container. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/specificdata.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/specificdata.9 diff -u src/share/man/man9/specificdata.9:1.6 src/share/man/man9/specificdata.9:1.7 --- src/share/man/man9/specificdata.9:1.6 Fri Jun 15 22:11:17 2018 +++ src/share/man/man9/specificdata.9 Fri Jun 15 22:27:40 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: specificdata.9,v 1.6 2018/06/15 22:11:17 pgoyette Exp $ +.\" $NetBSD: specificdata.9,v 1.7 2018/06/15 22:27:40 pgoyette Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -133,6 +133,7 @@ and associate it with .Fa key . If a datum has previously been stored, the new value replaces the original; the original value is not destroyed, i.e. its destructor is not invoked. +Note that there is no provision for removing a datum without replacing it. .It Fn specificdata_setspecific_nowait sd ref key data (Unimplemented) .El
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Fri Jun 15 22:11:17 UTC 2018 Modified Files: src/share/man/man9: specificdata.9 Log Message: Bump date for previous changes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/specificdata.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/specificdata.9 diff -u src/share/man/man9/specificdata.9:1.5 src/share/man/man9/specificdata.9:1.6 --- src/share/man/man9/specificdata.9:1.5 Fri Jun 15 22:10:44 2018 +++ src/share/man/man9/specificdata.9 Fri Jun 15 22:11:17 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: specificdata.9,v 1.5 2018/06/15 22:10:44 pgoyette Exp $ +.\" $NetBSD: specificdata.9,v 1.6 2018/06/15 22:11:17 pgoyette Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 3, 2018 +.Dd June 16, 2018 .Dt SPECIFICDATA 9 .Os .Sh NAME
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Fri Jun 15 22:10:44 UTC 2018 Modified Files: src/share/man/man9: specificdata.9 Log Message: Improve synopsis, remove unnecessary .Nm markup To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/specificdata.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/specificdata.9 diff -u src/share/man/man9/specificdata.9:1.4 src/share/man/man9/specificdata.9:1.5 --- src/share/man/man9/specificdata.9:1.4 Fri Jun 15 21:51:32 2018 +++ src/share/man/man9/specificdata.9 Fri Jun 15 22:10:44 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: specificdata.9,v 1.4 2018/06/15 21:51:32 uwe Exp $ +.\" $NetBSD: specificdata.9,v 1.5 2018/06/15 22:10:44 pgoyette Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -73,13 +73,13 @@ .Sh DESCRIPTION The .Nm -facility provides a mechanism for attaching arbitrary data to the objects -within a particular domain. +facility provides a mechanism for storing arbitrary data, identified by +an index key, within containers which exist within the objects associated +with a particular domain. .Sh FUNCTIONS .Bl -tag -width abcd .It Fn specificdata_domain_create -Create a new -.Nm domain . +Create and initialize a new domain. .It Fn specificdata_domain_delete sd Deletes domain .Fa sd . @@ -100,29 +100,21 @@ Delete a key for .Fa sd , and delete any associated data from all containers within the domain. .It Fn specificdata_init sd ref -Initialize the -.Nm -container +Initialize the container .Fa ref for use in .Fa sd . .It Fn specificdata_fini sd ref -Destroy the -.Nm -container +Destroy the container .Fa ref , and destroy all of the data stuffed into the container. .It Fn specificdata_getspecific sd ref key -Retrieve the datum from the -.Nm -container +Retrieve the datum from the container .Fa ref associated with .Fa key . .It Fn specificdata_getspecific_unlocked sd ref key -Retrieve the datum from the -.Nm -container +Retrieve the datum from the container .Fa ref associated with .Fa key @@ -135,9 +127,7 @@ call or by destroying the container. .It Fn specificdata_setspecific sd ref key data Store .Fa data -in the -.Nm -container +in the container .Fa ref and associate it with .Fa key .
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: uwe Date: Fri Jun 15 22:07:14 UTC 2018 Modified Files: src/sys/arch/powerpc/powerpc: trap.c Log Message: In mtmsr emulation ignore PSL_VEC we set in mfmsr emulation just above, as it freaks out PSL_USEROK_P(). This is also congruent with how we handle PSL_FP. PR port-macppc/53360 To generate a diff of this commit: cvs rdiff -u -r1.153 -r1.154 src/sys/arch/powerpc/powerpc/trap.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/powerpc/trap.c diff -u src/sys/arch/powerpc/powerpc/trap.c:1.153 src/sys/arch/powerpc/powerpc/trap.c:1.154 --- src/sys/arch/powerpc/powerpc/trap.c:1.153 Thu Mar 16 16:13:20 2017 +++ src/sys/arch/powerpc/powerpc/trap.c Fri Jun 15 22:07:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.153 2017/03/16 16:13:20 chs Exp $ */ +/* $NetBSD: trap.c,v 1.154 2018/06/15 22:07:14 uwe Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.153 2017/03/16 16:13:20 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.154 2018/06/15 22:07:14 uwe Exp $"); #include "opt_altivec.h" #include "opt_ddb.h" @@ -1062,6 +1062,9 @@ emulated_opcode(struct lwp *l, struct tr * user code isn't allowed to change it. */ msr &= ~PSL_FP; +#ifdef ALTIVEC + msr &= ~PSL_VEC; +#endif /* * Don't let the user muck with bits he's not allowed to.
CVS commit: src/share/misc
Module Name:src Committed By: sevan Date: Fri Jun 15 21:59:17 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add POWER/PowerPC/PPC. Leaving the original PPC entry as it's a valid case. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.199 src/share/misc/acronyms.comp:1.200 --- src/share/misc/acronyms.comp:1.199 Tue May 29 02:53:24 2018 +++ src/share/misc/acronyms.comp Fri Jun 15 21:59:17 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.199 2018/05/29 02:53:24 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.200 2018/06/15 21:59:17 sevan Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1039,9 +1039,12 @@ POP power on password POSIX Portable Operating System Interface [for Unix] POST power on self test POTS plain old telephone system +POWER Performance Optimization With Enhanced RISC +PowerPC Performance Optimization With Enhanced RISC - Performance Computing PP pair programming PPB PCI [to] PCI bridge PPC PowerPC +PPC Power Performance Computing PPI pixels per inch PPM pages per minute PPP Point-to-Point Protocol
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Fri Jun 15 21:51:32 UTC 2018 Modified Files: src/share/man/man9: specificdata.9 Log Message: Fix pasto in .Dt title To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/specificdata.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/specificdata.9 diff -u src/share/man/man9/specificdata.9:1.3 src/share/man/man9/specificdata.9:1.4 --- src/share/man/man9/specificdata.9:1.3 Fri Jun 15 15:15:10 2018 +++ src/share/man/man9/specificdata.9 Fri Jun 15 21:51:32 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: specificdata.9,v 1.3 2018/06/15 15:15:10 wiz Exp $ +.\" $NetBSD: specificdata.9,v 1.4 2018/06/15 21:51:32 uwe Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd June 3, 2018 -.Dt MODULE 9 +.Dt SPECIFICDATA 9 .Os .Sh NAME .Nm specificdata ,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Jun 15 21:22:36 UTC 2018 Modified Files: src/sys/dev/pci: radeonfb.c Log Message: cosmetics, no functional change To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/radeonfb.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/radeonfb.c diff -u src/sys/dev/pci/radeonfb.c:1.96 src/sys/dev/pci/radeonfb.c:1.97 --- src/sys/dev/pci/radeonfb.c:1.96 Thu Jun 14 17:41:27 2018 +++ src/sys/dev/pci/radeonfb.c Fri Jun 15 21:22:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.96 2018/06/14 17:41:27 macallan Exp $ */ +/* $NetBSD: radeonfb.c,v 1.97 2018/06/15 21:22:35 macallan Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.96 2018/06/14 17:41:27 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.97 2018/06/15 21:22:35 macallan Exp $"); #include #include @@ -1642,14 +1642,19 @@ radeonfb_calc_dividers(struct radeonfb_s DPRINTF(("dot clock: %u\n", dotclock)); for (i = 0; (div = radeonfb_dividers[i].divider) != 0; i++) { - if ((flags & NO_ODD_FBDIV) && ((div & 1) != 0)) continue; + + if ((flags & NO_ODD_FBDIV) && ((div & 1) != 0)) + continue; + /* * XXX * the rv350 in my last generation 14" iBook G4 produces * garbage with dividers > 4. No idea if this is a hardware * limitation or an error in the divider table. */ - if ((sc->sc_family == RADEON_RV350) && (div > 4)) continue; + if ((sc->sc_family == RADEON_RV350) && (div > 4)) + continue; + outfreq = div * dotclock; if ((outfreq >= sc->sc_minpll) && (outfreq <= sc->sc_maxpll)) {
CVS commit: src/usr.bin/man
Module Name:src Committed By: mrg Date: Fri Jun 15 20:16:35 UTC 2018 Modified Files: src/usr.bin/man: man.c Log Message: move 'utsname' to the main() function scope, so that the reference to it outside the block remains valid. should fix an asan reported issue. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/usr.bin/man/man.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/man/man.c diff -u src/usr.bin/man/man.c:1.66 src/usr.bin/man/man.c:1.67 --- src/usr.bin/man/man.c:1.66 Tue May 2 14:19:23 2017 +++ src/usr.bin/man/man.c Fri Jun 15 20:16:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: man.c,v 1.66 2017/05/02 14:19:23 abhinav Exp $ */ +/* $NetBSD: man.c,v 1.67 2018/06/15 20:16:35 mrg Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 #if 0 static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95"; #else -__RCSID("$NetBSD: man.c,v 1.66 2017/05/02 14:19:23 abhinav Exp $"); +__RCSID("$NetBSD: man.c,v 1.67 2018/06/15 20:16:35 mrg Exp $"); #endif #endif /* not lint */ @@ -128,6 +128,7 @@ int main(int argc, char **argv) { static struct manstate m; + struct utsname utsname; int ch, abs_section, found; ENTRY *esubd, *epath; char *p, **ap, *cmd; @@ -204,8 +205,6 @@ main(int argc, char **argv) config(m.conffile);/* exits on error ... */ if ((m.machine = getenv("MACHINE")) == NULL) { - struct utsname utsname; - if (uname() == -1) err(EXIT_FAILURE, "uname"); m.machine = utsname.machine;
CVS commit: src/sys
Module Name:src Committed By: jakllsch Date: Fri Jun 15 19:52:01 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: VIRT src/sys/dev/fdt: files.fdt Added Files: src/sys/dev/fdt: pl061gpio_fdt.c src/sys/dev/ic: pl061reg.h Log Message: Add basic ARM PL061 GPIO driver with FDT attachment. Mostly for Qemu 'virt' platform; really needs interrupt support in gpiokeys(4) and this driver to work efficently and reliably. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/VIRT cvs rdiff -u -r1.30 -r1.31 src/sys/dev/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/pl061gpio_fdt.c cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/pl061reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/VIRT diff -u src/sys/arch/evbarm/conf/VIRT:1.2 src/sys/arch/evbarm/conf/VIRT:1.3 --- src/sys/arch/evbarm/conf/VIRT:1.2 Fri Jun 15 15:00:14 2018 +++ src/sys/arch/evbarm/conf/VIRT Fri Jun 15 19:52:01 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: VIRT,v 1.2 2018/06/15 15:00:14 jakllsch Exp $ +# $NetBSD: VIRT,v 1.3 2018/06/15 19:52:01 jakllsch Exp $ # # QEMU ARM 'virt' virtual machine # @@ -58,6 +58,9 @@ plcom* at fdt? # ARM PL011 UART # RTC plrtc* at fdt? # ARM PrimeCell RTC +# GPIO +pl061gpio* at fdt? # ARM PrimeCell GPIO + # Virtio devices virtio* at fdt?# Virtio MMIO device # the balloon driver can not work on machines with non-4k pages Index: src/sys/dev/fdt/files.fdt diff -u src/sys/dev/fdt/files.fdt:1.30 src/sys/dev/fdt/files.fdt:1.31 --- src/sys/dev/fdt/files.fdt:1.30 Fri Jun 15 15:07:56 2018 +++ src/sys/dev/fdt/files.fdt Fri Jun 15 19:52:01 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.30 2018/06/15 15:07:56 jakllsch Exp $ +# $NetBSD: files.fdt,v 1.31 2018/06/15 19:52:01 jakllsch Exp $ include "external/bsd/libfdt/conf/files.libfdt" @@ -99,3 +99,8 @@ file dev/fdt/virtio_mmio_fdt.c virtio_m # QEMU Firmware Configuration (fw_cfg) device attach qemufwcfg at fdt with qemufwcfg_fdt file dev/fdt/qemufwcfg_fdt.c qemufwcfg_fdt + +# ARM PrimeCell General Purpose Input/Output (PL061) +device pl061gpio: gpiobus +attach pl061gpio at fdt with pl061gpio_fdt +file dev/fdt/pl061gpio_fdt.c pl061gpio_fdt Added files: Index: src/sys/dev/fdt/pl061gpio_fdt.c diff -u /dev/null src/sys/dev/fdt/pl061gpio_fdt.c:1.1 --- /dev/null Fri Jun 15 19:52:01 2018 +++ src/sys/dev/fdt/pl061gpio_fdt.c Fri Jun 15 19:52:01 2018 @@ -0,0 +1,264 @@ +/* $NetBSD: pl061gpio_fdt.c,v 1.1 2018/06/15 19:52:01 jakllsch Exp $ */ + +/* + * Copyright (c) 2018 Jonathan A. Kollasch + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: pl061gpio_fdt.c,v 1.1 2018/06/15 19:52:01 jakllsch Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "gpio.h" + +#include + +#include + +static int pl061_gpio_match(device_t, cfdata_t, void *); +static void pl061_gpio_attach(device_t, device_t, void *); + +static void * pl061_gpio_fdt_acquire(device_t, const void *, + size_t, int); +static void pl061_gpio_fdt_release(device_t, void *); +static int pl061_gpio_fdt_read(device_t, void *, bool); +static void pl061_gpio_fdt_write(device_t, void *, int, bool); + +struct fdtbus_gpio_controller_func pl061_gpio_funcs = { + .acquire = pl061_gpio_fdt_acquire, + .release = pl061_gpio_fdt_release, + .read = pl061_gpio_fdt_read, + .write = pl061_gpio_fdt_write +}; + +struct pl061_gpio_softc { + device_t sc_dev; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + + struct gpio_chipset_tag sc_gc;
CVS commit: src/sys/dev
Module Name:src Committed By: jakllsch Date: Fri Jun 15 17:13:43 UTC 2018 Modified Files: src/sys/dev/fdt: virtio_mmio_fdt.c src/sys/dev/pci: virtio.c virtiovar.h src/sys/dev/virtio: virtio_mmio.c Log Message: Add cfprint_t virtiobusprint() and use it for virtio_mmio. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/virtio_mmio_fdt.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/virtio.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/virtiovar.h cvs rdiff -u -r1.1 -r1.2 src/sys/dev/virtio/virtio_mmio.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/fdt/virtio_mmio_fdt.c diff -u src/sys/dev/fdt/virtio_mmio_fdt.c:1.1 src/sys/dev/fdt/virtio_mmio_fdt.c:1.2 --- src/sys/dev/fdt/virtio_mmio_fdt.c:1.1 Wed Jun 6 20:35:36 2018 +++ src/sys/dev/fdt/virtio_mmio_fdt.c Fri Jun 15 17:13:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_mmio_fdt.c,v 1.1 2018/06/06 20:35:36 jakllsch Exp $ */ +/* $NetBSD: virtio_mmio_fdt.c,v 1.2 2018/06/15 17:13:43 jakllsch Exp $ */ /* * Copyright (c) 2018 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.1 2018/06/06 20:35:36 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.2 2018/06/15 17:13:43 jakllsch Exp $"); #include #include @@ -122,11 +122,9 @@ virtio_mmio_fdt_rescan(device_t self, co memset(, 0, sizeof(va)); va.sc_childdevid = vsc->sc_childdevid; - config_found_ia(self, attr, , NULL); + config_found_ia(self, attr, , virtiobusprint); if (vsc->sc_child == NULL) { - aprint_error_dev(self, - "no matching child driver; not configured\n"); return 0; } Index: src/sys/dev/pci/virtio.c diff -u src/sys/dev/pci/virtio.c:1.34 src/sys/dev/pci/virtio.c:1.35 --- src/sys/dev/pci/virtio.c:1.34 Fri Jun 15 01:37:40 2018 +++ src/sys/dev/pci/virtio.c Fri Jun 15 17:13:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.34 2018/06/15 01:37:40 jakllsch Exp $ */ +/* $NetBSD: virtio.c,v 1.35 2018/06/15 17:13:43 jakllsch Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.34 2018/06/15 01:37:40 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.35 2018/06/15 17:13:43 jakllsch Exp $"); #include #include @@ -928,6 +928,17 @@ virtio_features(struct virtio_softc *sc) return sc->sc_features; } +int +virtiobusprint(void *aux, const char *pnp) +{ + struct virtio_attach_args * const va = aux; + + if (pnp) + aprint_normal("Device ID %d at %s", va->sc_childdevid, pnp); + + return UNCONF; +} + MODULE(MODULE_CLASS_DRIVER, virtio, NULL); #ifdef _MODULE Index: src/sys/dev/pci/virtiovar.h diff -u src/sys/dev/pci/virtiovar.h:1.11 src/sys/dev/pci/virtiovar.h:1.12 --- src/sys/dev/pci/virtiovar.h:1.11 Sat Jun 2 22:43:15 2018 +++ src/sys/dev/pci/virtiovar.h Fri Jun 15 17:13:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virtiovar.h,v 1.11 2018/06/02 22:43:15 jakllsch Exp $ */ +/* $NetBSD: virtiovar.h,v 1.12 2018/06/15 17:13:43 jakllsch Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -224,6 +224,7 @@ uint32_t virtio_features(struct virtio_s /* autoconf(9) common */ void virtio_set_status(struct virtio_softc *, int); +int virtiobusprint(void *aux, const char *); #define virtio_device_reset(sc) virtio_set_status((sc), 0) Index: src/sys/dev/virtio/virtio_mmio.c diff -u src/sys/dev/virtio/virtio_mmio.c:1.1 src/sys/dev/virtio/virtio_mmio.c:1.2 --- src/sys/dev/virtio/virtio_mmio.c:1.1 Wed Jun 6 20:35:36 2018 +++ src/sys/dev/virtio/virtio_mmio.c Fri Jun 15 17:13:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_mmio.c,v 1.1 2018/06/06 20:35:36 jakllsch Exp $ */ +/* $NetBSD: virtio_mmio.c,v 1.2 2018/06/15 17:13:43 jakllsch Exp $ */ /* $OpenBSD: virtio_mmio.c,v 1.2 2017/02/24 17:12:31 patrick Exp $ */ /* @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio_mmio.c,v 1.1 2018/06/06 20:35:36 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_mmio.c,v 1.2 2018/06/15 17:13:43 jakllsch Exp $"); #include #include @@ -162,7 +162,6 @@ virtio_mmio_common_attach(struct virtio_ } id = bus_space_read_4(sc->sc_iot, sc->sc_ioh, VIRTIO_MMIO_DEVICE_ID); - aprint_verbose_dev(vsc->sc_dev, "Virtio ID 0x%08x\n", id); /* we could use PAGE_SIZE, but virtio(4) assumes 4KiB for now */ bus_space_write_4(sc->sc_iot, sc->sc_ioh, VIRTIO_MMIO_GUEST_PAGE_SIZE,
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jakllsch Date: Fri Jun 15 16:03:59 UTC 2018 Modified Files: src/sys/arch/arm/fdt: psci_fdt.c Log Message: Fix PSCI 0.1 detection. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/fdt/psci_fdt.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/fdt/psci_fdt.c diff -u src/sys/arch/arm/fdt/psci_fdt.c:1.4 src/sys/arch/arm/fdt/psci_fdt.c:1.5 --- src/sys/arch/arm/fdt/psci_fdt.c:1.4 Sat May 26 22:49:03 2018 +++ src/sys/arch/arm/fdt/psci_fdt.c Fri Jun 15 16:03:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: psci_fdt.c,v 1.4 2018/05/26 22:49:03 jmcneill Exp $ */ +/* $NetBSD: psci_fdt.c,v 1.5 2018/06/15 16:03:59 jakllsch Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: psci_fdt.c,v 1.4 2018/05/26 22:49:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psci_fdt.c,v 1.5 2018/06/15 16:03:59 jakllsch Exp $"); #include #include @@ -126,8 +126,7 @@ psci_fdt_init(const int phandle) return EINVAL; } - const char * const compat_0_1[] = { "arm,psci", NULL }; - if (of_match_compatible(phandle, compat_0_1)) { + if (of_match_compatible(phandle, compatible) == 1) { psci_clearfunc(); if (of_getprop_uint32(phandle, "cpu_on", ) == 0) psci_setfunc(PSCI_FUNC_CPU_ON, val);
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: jakllsch Date: Fri Jun 15 15:59:20 UTC 2018 Modified Files: src/sys/arch/arm/arm: psci.c Log Message: Use correct value for PSCI 0.2+ PSCI_CPU_ON. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/arm/psci.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/arm/psci.c diff -u src/sys/arch/arm/arm/psci.c:1.1 src/sys/arch/arm/arm/psci.c:1.2 --- src/sys/arch/arm/arm/psci.c:1.1 Wed Jun 28 23:48:23 2017 +++ src/sys/arch/arm/arm/psci.c Fri Jun 15 15:59:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: psci.c,v 1.1 2017/06/28 23:48:23 jmcneill Exp $ */ +/* $NetBSD: psci.c,v 1.2 2018/06/15 15:59:20 jakllsch Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_diagnostic.h" #include -__KERNEL_RCSID(0, "$NetBSD: psci.c,v 1.1 2017/06/28 23:48:23 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psci.c,v 1.2 2018/06/15 15:59:20 jakllsch Exp $"); #include #include @@ -43,9 +43,9 @@ __KERNEL_RCSID(0, "$NetBSD: psci.c,v 1.1 #define PSCI_SYSTEM_OFF 0x8408 #define PSCI_SYSTEM_RESET 0x8409 #if defined(__aarch64__) -#define PSCI_CPU_ON 0xc402 +#define PSCI_CPU_ON 0xc403 #else -#define PSCI_CPU_ON 0x8402 +#define PSCI_CPU_ON 0x8403 #endif static psci_fn psci_call_fn;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jakllsch Date: Fri Jun 15 15:22:01 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: std.virt Log Message: ... -mcpu=armv7-a is actually spelled -march=armv7-a ... To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/std.virt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/std.virt diff -u src/sys/arch/evbarm/conf/std.virt:1.2 src/sys/arch/evbarm/conf/std.virt:1.3 --- src/sys/arch/evbarm/conf/std.virt:1.2 Fri Jun 15 15:00:14 2018 +++ src/sys/arch/evbarm/conf/std.virt Fri Jun 15 15:22:01 2018 @@ -1,4 +1,4 @@ -# $NetBSD: std.virt,v 1.2 2018/06/15 15:00:14 jakllsch Exp $ +# $NetBSD: std.virt,v 1.3 2018/06/15 15:22:01 jakllsch Exp $ # # standard NetBSD/evbarm for VIRT options @@ -25,7 +25,7 @@ makeoptions KERNEL_BASE_PHYS="0x4100 makeoptions KERNEL_BASE_VIRT="0x8100" makeoptions BOARDTYPE="virt" makeoptions BOARDMKFRAG="${THISARM}/conf/mk.virt" -makeoptions CPUFLAGS="-mcpu=armv7-a -mfpu=neon" +makeoptions CPUFLAGS="-march=armv7-a -mfpu=neon" options ARM_INTR_IMPL="" options ARM_GENERIC_TODR
CVS commit: src/usr.sbin/dumplfs
Module Name:src Committed By: christos Date: Fri Jun 15 15:16:05 UTC 2018 Modified Files: src/usr.sbin/dumplfs: Makefile dumplfs.c Log Message: PR/53367: Thomas Barabosch: Integer overflow in usr.sbin/dumplfs While here use the "e" functions to always check for allocation errors. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/dumplfs/Makefile cvs rdiff -u -r1.63 -r1.64 src/usr.sbin/dumplfs/dumplfs.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/dumplfs/Makefile diff -u src/usr.sbin/dumplfs/Makefile:1.17 src/usr.sbin/dumplfs/Makefile:1.18 --- src/usr.sbin/dumplfs/Makefile:1.17 Wed Jun 15 10:08:24 2016 +++ src/usr.sbin/dumplfs/Makefile Fri Jun 15 11:16:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2016/06/15 14:08:24 riastradh Exp $ +# $NetBSD: Makefile,v 1.18 2018/06/15 15:16:05 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 WARNS?= 3 # XXX -Wsign-compare @@ -9,5 +9,7 @@ PROG= dumplfs SRCS= dumplfs.c lfs_cksum.c misc.c .PATH: ${NETBSDSRCDIR}/sys/ufs/lfs MAN= dumplfs.8 +LDADD+= -lutil +DPADD+= ${LIBUTIL} .include Index: src/usr.sbin/dumplfs/dumplfs.c diff -u src/usr.sbin/dumplfs/dumplfs.c:1.63 src/usr.sbin/dumplfs/dumplfs.c:1.64 --- src/usr.sbin/dumplfs/dumplfs.c:1.63 Fri Aug 12 04:22:13 2016 +++ src/usr.sbin/dumplfs/dumplfs.c Fri Jun 15 11:16:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dumplfs.c,v 1.63 2016/08/12 08:22:13 dholland Exp $ */ +/* $NetBSD: dumplfs.c,v 1.64 2018/06/15 15:16:05 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19 #if 0 static char sccsid[] = "@(#)dumplfs.c 8.5 (Berkeley) 5/24/95"; #else -__RCSID("$NetBSD: dumplfs.c,v 1.63 2016/08/12 08:22:13 dholland Exp $"); +__RCSID("$NetBSD: dumplfs.c,v 1.64 2018/06/15 15:16:05 christos Exp $"); #endif #endif /* not lint */ @@ -61,6 +61,7 @@ __RCSID("$NetBSD: dumplfs.c,v 1.63 2016/ #include #include #include +#include #include "extern.h" static void addseg(char *); @@ -226,10 +227,7 @@ main(int argc, char **argv) if ((fd = open(special, O_RDONLY, 0)) < 0) err(1, "%s", special); - sbuf = malloc(LFS_SBPAD); - if (sbuf == NULL) - err(1, "malloc"); - + sbuf = emalloc(LFS_SBPAD); if (sbdaddr == 0x0) { /* Read the proto-superblock */ __CTASSERT(sizeof(struct dlfs) == sizeof(struct dlfs64)); @@ -332,8 +330,7 @@ dump_ifile(int fd, struct lfs *lfsp, int if (!addr) addr = lfs_sb_getidaddr(lfsp); - if (!(dpage = malloc(psize))) - err(1, "malloc"); + dpage = emalloc(psize); get(fd, fsbtobyte(lfsp, addr), dpage, psize); dip = NULL; @@ -363,8 +360,7 @@ dump_ifile(int fd, struct lfs *lfsp, int block_limit = MIN(nblocks, ULFS_NDADDR); /* Get the direct block */ - if ((ipage = malloc(psize)) == NULL) - err(1, "malloc"); + ipage = emalloc(psize); for (inum = 0, i = 0; i < block_limit; i++) { pdb = lfs_dino_getdb(lfsp, dip, i); get(fd, fsbtobyte(lfsp, pdb), ipage, psize); @@ -395,8 +391,7 @@ dump_ifile(int fd, struct lfs *lfsp, int goto e0; /* Dump out blocks off of single indirect block */ - if (!(indir = malloc(psize))) - err(1, "malloc"); + indir = emalloc(psize); get(fd, fsbtobyte(lfsp, lfs_dino_getib(lfsp, dip, 0)), indir, psize); block_limit = MIN(i + lfs_sb_getnindir(lfsp), nblocks); for (offset = 0; i < block_limit; i++, offset++) { @@ -429,8 +424,7 @@ dump_ifile(int fd, struct lfs *lfsp, int goto e1; /* Get the double indirect block */ - if (!(dindir = malloc(psize))) - err(1, "malloc"); + dindir = emalloc(psize); get(fd, fsbtobyte(lfsp, lfs_dino_getib(lfsp, dip, 1)), dindir, psize); for (j = 0; j < lfs_sb_getnindir(lfsp); j++) { thisblock = lfs_iblock_get(lfsp, dindir, j); @@ -617,7 +611,7 @@ dump_sum(int fd, struct lfs *lfsp, SEGSU /* Dump out inode disk addresses */ iip = SEGSUM_IINFOSTART(lfsp, sp); - diblock = malloc(lfs_sb_getbsize(lfsp)); + diblock = emalloc(lfs_sb_getbsize(lfsp)); printf("Inode addresses:"); numbytes = 0; numblocks = 0; @@ -680,11 +674,11 @@ dump_sum(int fd, struct lfs *lfsp, SEGSU } else { el_size = sizeof(u_int32_t); } - datap = (char *)malloc(el_size * numblocks); - memset(datap, 0, el_size * numblocks); + datap = ecalloc(numblocks, el_size); + acc = 0; addr += lfs_btofsb(lfsp, lfs_sb_getsumsize(lfsp)); - buf = malloc(lfs_sb_getbsize(lfsp)); + buf = emalloc(lfs_sb_getbsize(lfsp)); for (i = 0; i < lfs_ss_getnfinfo(lfsp, sp); i++) { while (addr == lfs_ii_getblock(lfsp, iip2)) { get(fd, fsbtobyte(lfsp, addr), buf, lfs_sb_getibsize(lfsp)); @@ -737,7 +731,7 @@ dump_segment(int fd, int segnum, daddr_t (void)printf("\nSEGMENT %lld (Disk Address 0x%llx)\n", (long long)lfs_dtosn(lfsp, addr), (long long)addr); sum_offset = fsbtobyte(lfsp, addr); - sumblock = malloc(lfs_sb_getsumsize(lfsp)); + sumblock = emalloc(lfs_sb_getsumsize(lfsp)); if
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Fri Jun 15 15:15:10 UTC 2018 Modified Files: src/share/man/man9: specificdata.9 Log Message: Whitespace nit. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/specificdata.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/specificdata.9 diff -u src/share/man/man9/specificdata.9:1.2 src/share/man/man9/specificdata.9:1.3 --- src/share/man/man9/specificdata.9:1.2 Sun Jun 3 11:55:27 2018 +++ src/share/man/man9/specificdata.9 Fri Jun 15 15:15:10 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: specificdata.9,v 1.2 2018/06/03 11:55:27 pgoyette Exp $ +.\" $NetBSD: specificdata.9,v 1.3 2018/06/15 15:15:10 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -147,7 +147,7 @@ the original value is not destroyed, i.e (Unimplemented) .El .Sh CODE REFERENCES -The +The .Nm functionality is implemented in .Pa sys/kern/subr_specificdata.c .
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Fri Jun 15 15:14:15 UTC 2018 Modified Files: src/share/man/man9: module.9 Log Message: Whitespace fixes. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/share/man/man9/module.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/module.9 diff -u src/share/man/man9/module.9:1.46 src/share/man/man9/module.9:1.47 --- src/share/man/man9/module.9:1.46 Sun Jun 3 10:34:59 2018 +++ src/share/man/man9/module.9 Fri Jun 15 15:14:15 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: module.9,v 1.46 2018/06/03 10:34:59 pgoyette Exp $ +.\" $NetBSD: module.9,v 1.47 2018/06/15 15:14:15 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -503,7 +503,8 @@ The key identifier is returned in Deletes the specified specificdata_key .Fa key from the -.Nm domain. +.Nm +domain. .It module_getspecific "module_t *mod" "specificdata_key_t key" Retrieves the value associated with .Fa key @@ -516,7 +517,6 @@ as the value associated with .Fa key for module .Fa mod . - .El .Sh PROGRAMMING CONSIDERATIONS The module subsystem is designed to be called recursively, but only within
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Fri Jun 15 15:12:49 UTC 2018 Modified Files: src/share/man/man4: udp.4 Log Message: Sort errors. Use \(em. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/udp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/udp.4 diff -u src/share/man/man4/udp.4:1.15 src/share/man/man4/udp.4:1.16 --- src/share/man/man4/udp.4:1.15 Thu May 31 07:03:57 2018 +++ src/share/man/man4/udp.4 Fri Jun 15 15:12:49 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: udp.4,v 1.15 2018/05/31 07:03:57 maxv Exp $ +.\" $NetBSD: udp.4,v 1.16 2018/06/15 15:12:49 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -128,24 +128,24 @@ or .Sh DIAGNOSTICS A socket operation may fail with one of the following errors returned: .Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a port which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a socket with a network address +for which no network interface exists. .It Bq Er EISCONN when trying to establish a connection on a socket which already has one, or when trying to send a datagram with the destination address specified and the socket is already connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; .It Bq Er ENOTCONN when trying to send a datagram, but no destination address is specified, and the socket hasn't been connected; -.It Bq Er ENOBUFS -when the system runs out of memory for -an internal data structure; -.It Bq Er EADDRINUSE -when an attempt -is made to create a socket with a port which has already been -allocated; -.It Bq Er EADDRNOTAVAIL -when an attempt is made to create a socket with a network address -for which no network interface exists. .El .Sh SEE ALSO .Xr getsockopt 2 , @@ -169,7 +169,7 @@ for which no network interface exists. .%R RFC .%N 1122 .%D October 1989 -.%T "Requirements for Internet Hosts -- Communication Layers" +.%T "Requirements for Internet Hosts \(em Communication Layers" .Re .Sh HISTORY The
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jakllsch Date: Fri Jun 15 15:07:56 UTC 2018 Modified Files: src/sys/dev/fdt: files.fdt Added Files: src/sys/dev/fdt: qemufwcfg_fdt.c Log Message: add FDT "qemu,fw-cfg-mmio" glue for qemufwcfg To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/qemufwcfg_fdt.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/fdt/files.fdt diff -u src/sys/dev/fdt/files.fdt:1.29 src/sys/dev/fdt/files.fdt:1.30 --- src/sys/dev/fdt/files.fdt:1.29 Wed Jun 6 20:35:36 2018 +++ src/sys/dev/fdt/files.fdt Fri Jun 15 15:07:56 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.29 2018/06/06 20:35:36 jakllsch Exp $ +# $NetBSD: files.fdt,v 1.30 2018/06/15 15:07:56 jakllsch Exp $ include "external/bsd/libfdt/conf/files.libfdt" @@ -95,3 +95,7 @@ file dev/fdt/dwc3_fdt.c dwc3_fdt # Virtio virtio,mmio attach virtio at fdt with virtio_mmio_fdt: virtio_mmio file dev/fdt/virtio_mmio_fdt.c virtio_mmio_fdt + +# QEMU Firmware Configuration (fw_cfg) device +attach qemufwcfg at fdt with qemufwcfg_fdt +file dev/fdt/qemufwcfg_fdt.c qemufwcfg_fdt Added files: Index: src/sys/dev/fdt/qemufwcfg_fdt.c diff -u /dev/null src/sys/dev/fdt/qemufwcfg_fdt.c:1.1 --- /dev/null Fri Jun 15 15:07:56 2018 +++ src/sys/dev/fdt/qemufwcfg_fdt.c Fri Jun 15 15:07:56 2018 @@ -0,0 +1,93 @@ +/* $NetBSD: qemufwcfg_fdt.c,v 1.1 2018/06/15 15:07:56 jakllsch Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: qemufwcfg_fdt.c,v 1.1 2018/06/15 15:07:56 jakllsch Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +static int fwcfg_fdt_match(device_t, cfdata_t, void *); +static void fwcfg_fdt_attach(device_t, device_t, void *); + +CFATTACH_DECL_NEW(qemufwcfg_fdt, sizeof(struct fwcfg_softc), +fwcfg_fdt_match, +fwcfg_fdt_attach, +NULL, +NULL +); + +static const char * const compatible[] = { + "qemu,fw-cfg-mmio", + NULL +}; + + +static int +fwcfg_fdt_match(device_t parent, cfdata_t match, void *opaque) +{ + struct fdt_attach_args * const faa = opaque; + + return of_match_compatible(faa->faa_phandle, compatible); +} + +static void +fwcfg_fdt_attach(device_t parent, device_t self, void *opaque) +{ + struct fwcfg_softc *sc = device_private(self); + struct fdt_attach_args * const faa = opaque; + bus_addr_t base; + bus_size_t size; + + if (fdtbus_get_reg(faa->faa_phandle, 0, , ) != 0) { + aprint_error_dev(self, "couldn't get registers\n"); + return; + } + + sc->sc_dev = self; + sc->sc_bst = faa->faa_bst; + + if (bus_space_map(sc->sc_bst, base, size, 0, >sc_bsh) != 0) { + aprint_error_dev(self, "couldn't map registers\n"); + return; + } + + aprint_naive("\n"); + aprint_normal("\n"); + + fwcfg_attach(sc); + + pmf_device_register(self, NULL, NULL); +}
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jakllsch Date: Fri Jun 15 15:00:14 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: VIRT std.virt Log Message: 'virt' platform adjustments: - support broader CPU model range - move kernel physical and virtual base to avoid bootloader, and keep KVA at or above 2GiB - add relevant drivers To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/VIRT \ src/sys/arch/evbarm/conf/std.virt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/VIRT diff -u src/sys/arch/evbarm/conf/VIRT:1.1 src/sys/arch/evbarm/conf/VIRT:1.2 --- src/sys/arch/evbarm/conf/VIRT:1.1 Thu Jun 14 10:56:39 2018 +++ src/sys/arch/evbarm/conf/VIRT Fri Jun 15 15:00:14 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: VIRT,v 1.1 2018/06/14 10:56:39 jmcneill Exp $ +# $NetBSD: VIRT,v 1.2 2018/06/15 15:00:14 jakllsch Exp $ # # QEMU ARM 'virt' virtual machine # @@ -7,7 +7,9 @@ include "arch/evbarm/conf/std.virt" include "arch/evbarm/conf/GENERIC.common" +options CPU_CORTEXA7 options CPU_CORTEXA15 +options CPU_CORTEXA17 options SOC_VIRT options MULTIPROCESSOR @@ -19,6 +21,7 @@ pseudo-device openfirm # /dev/openfirm #options PMAP_DEBUG # Enable pmap_debug_level code #options IPKDB # remote kernel debugging #options VERBOSE_INIT_ARM # verbose bootstrapping messages +#options CONSADDR=0x0900 makeoptions DEBUG="-g" # compile full symbol table makeoptions COPY_SYMTAB=1 @@ -35,6 +38,8 @@ cpu* at cpus? fclock* at fdt? pass 4 fregulator* at fdt? pass 4 +gpiokeys* at fdt? +wskbd* at gpiokeys? console ? mux 1 # Power state coordination interface psci* at fdt? @@ -53,4 +58,23 @@ plcom* at fdt? # ARM PL011 UART # RTC plrtc* at fdt? # ARM PrimeCell RTC +# Virtio devices +virtio* at fdt?# Virtio MMIO device +# the balloon driver can not work on machines with non-4k pages +#viomb* at virtio? # Virtio memory balloon device +ld* at virtio? # Virtio disk device +vioif* at virtio? # Virtio network device +viornd* at virtio? # Virtio entropy device +vioscsi* at virtio? # Virtio SCSI device + +# SCSI +scsibus* at scsi? +sd* at scsibus? target ? lun ? # SCSI disks +st* at scsibus? target ? lun ? # SCSI tapes +cd* at scsibus? target ? lun ? # SCSI CD-ROMs +ch* at scsibus? target ? lun ? # SCSI changer devices +ss* at scsibus? target ? lun ? # SCSI scanners +ses* at scsibus? target ? lun ? # SCSI SES/SAF-TE devices +uk* at scsibus? target ? lun ? # unknown SCSI + cinclude "arch/evbarm/conf/VIRT.local" Index: src/sys/arch/evbarm/conf/std.virt diff -u src/sys/arch/evbarm/conf/std.virt:1.1 src/sys/arch/evbarm/conf/std.virt:1.2 --- src/sys/arch/evbarm/conf/std.virt:1.1 Thu Jun 14 10:56:39 2018 +++ src/sys/arch/evbarm/conf/std.virt Fri Jun 15 15:00:14 2018 @@ -1,4 +1,4 @@ -# $NetBSD: std.virt,v 1.1 2018/06/14 10:56:39 jmcneill Exp $ +# $NetBSD: std.virt,v 1.2 2018/06/15 15:00:14 jakllsch Exp $ # # standard NetBSD/evbarm for VIRT options @@ -21,11 +21,11 @@ options TPIDRPRW_IS_CURCPU options KERNEL_BASE_EXT=0x8000 options FPU_VFP -makeoptions KERNEL_BASE_PHYS="0x4000" -makeoptions KERNEL_BASE_VIRT="0x4000" +makeoptions KERNEL_BASE_PHYS="0x4100" +makeoptions KERNEL_BASE_VIRT="0x8100" makeoptions BOARDTYPE="virt" makeoptions BOARDMKFRAG="${THISARM}/conf/mk.virt" -makeoptions CPUFLAGS="-mcpu=cortex-a15 -mfpu=neon" +makeoptions CPUFLAGS="-mcpu=armv7-a -mfpu=neon" options ARM_INTR_IMPL="" options ARM_GENERIC_TODR
CVS commit: src/sys/arch
Module Name:src Committed By: jakllsch Date: Fri Jun 15 14:37:35 UTC 2018 Modified Files: src/sys/arch/arm/virt: virt_platform.c src/sys/arch/evbarm/virt: virt_start.S Log Message: Big endian support for virt_platform_early_putchar and xputc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/virt/virt_platform.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/virt/virt_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/virt/virt_platform.c diff -u src/sys/arch/arm/virt/virt_platform.c:1.1 src/sys/arch/arm/virt/virt_platform.c:1.2 --- src/sys/arch/arm/virt/virt_platform.c:1.1 Thu Jun 14 10:56:39 2018 +++ src/sys/arch/arm/virt/virt_platform.c Fri Jun 15 14:37:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virt_platform.c,v 1.1 2018/06/14 10:56:39 jmcneill Exp $ */ +/* $NetBSD: virt_platform.c,v 1.2 2018/06/15 14:37:35 jakllsch Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -31,7 +31,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: virt_platform.c,v 1.1 2018/06/14 10:56:39 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virt_platform.c,v 1.2 2018/06/15 14:37:35 jakllsch Exp $"); #include #include @@ -96,12 +96,13 @@ virt_platform_early_putchar(char c) (volatile uint32_t *)VIRT_CORE_PTOV(VIRT_UART_BASE) : (volatile uint32_t *)VIRT_UART_BASE; - while ((uartaddr[PL01XCOM_FR / 4] & PL01X_FR_TXFF) != 0) + while ((le32toh(uartaddr[PL01XCOM_FR / 4]) & PL01X_FR_TXFF) != 0) continue; - uartaddr[PL01XCOM_DR / 4] = c; + uartaddr[PL01XCOM_DR / 4] = htole32(c); + arm_dsb(); - while ((uartaddr[PL01XCOM_FR / 4] & PL01X_FR_TXFE) == 0) + while ((le32toh(uartaddr[PL01XCOM_FR / 4]) & PL01X_FR_TXFE) == 0) continue; } Index: src/sys/arch/evbarm/virt/virt_start.S diff -u src/sys/arch/evbarm/virt/virt_start.S:1.2 src/sys/arch/evbarm/virt/virt_start.S:1.3 --- src/sys/arch/evbarm/virt/virt_start.S:1.2 Fri Jun 15 14:32:29 2018 +++ src/sys/arch/evbarm/virt/virt_start.S Fri Jun 15 14:37:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virt_start.S,v 1.2 2018/06/15 14:32:29 jakllsch Exp $ */ +/* $NetBSD: virt_start.S,v 1.3 2018/06/15 14:37:35 jakllsch Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -RCSID("$NetBSD: virt_start.S,v 1.2 2018/06/15 14:32:29 jakllsch Exp $") +RCSID("$NetBSD: virt_start.S,v 1.3 2018/06/15 14:37:35 jakllsch Exp $") #ifdef VERBOSE_INIT_ARM #define XPUTC(n) mov r0, n; bl xputc @@ -139,6 +139,9 @@ _C_LABEL(virt_start): xputc: movw r2, #0x movt r2, #0x0900 +#ifdef __ARMEB__ + lsl r0, r0, #24 +#endif str r0, [r2] bx lr
CVS commit: src/sys/arch/evbarm/virt
Module Name:src Committed By: jakllsch Date: Fri Jun 15 14:32:29 UTC 2018 Modified Files: src/sys/arch/evbarm/virt: virt_start.S Log Message: fix xputc FIFO address for virt platform To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/virt/virt_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/virt/virt_start.S diff -u src/sys/arch/evbarm/virt/virt_start.S:1.1 src/sys/arch/evbarm/virt/virt_start.S:1.2 --- src/sys/arch/evbarm/virt/virt_start.S:1.1 Thu Jun 14 10:56:39 2018 +++ src/sys/arch/evbarm/virt/virt_start.S Fri Jun 15 14:32:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: virt_start.S,v 1.1 2018/06/14 10:56:39 jmcneill Exp $ */ +/* $NetBSD: virt_start.S,v 1.2 2018/06/15 14:32:29 jakllsch Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -RCSID("$NetBSD: virt_start.S,v 1.1 2018/06/14 10:56:39 jmcneill Exp $") +RCSID("$NetBSD: virt_start.S,v 1.2 2018/06/15 14:32:29 jakllsch Exp $") #ifdef VERBOSE_INIT_ARM #define XPUTC(n) mov r0, n; bl xputc @@ -138,7 +138,7 @@ _C_LABEL(virt_start): .type xputc,%function xputc: movw r2, #0x - movt r2, #0x1c09 + movt r2, #0x0900 str r0, [r2] bx lr
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jakllsch Date: Fri Jun 15 14:27:57 UTC 2018 Modified Files: src/sys/arch/arm/fdt: cpu_fdt.c Log Message: Add "arm,arm-v7" to compatible strings. (for `qemu-system-arm -M virt`) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/fdt/cpu_fdt.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/fdt/cpu_fdt.c diff -u src/sys/arch/arm/fdt/cpu_fdt.c:1.5 src/sys/arch/arm/fdt/cpu_fdt.c:1.6 --- src/sys/arch/arm/fdt/cpu_fdt.c:1.5 Sun Apr 1 04:35:04 2018 +++ src/sys/arch/arm/fdt/cpu_fdt.c Fri Jun 15 14:27:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_fdt.c,v 1.5 2018/04/01 04:35:04 ryo Exp $ */ +/* $NetBSD: cpu_fdt.c,v 1.6 2018/06/15 14:27:57 jakllsch Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.5 2018/04/01 04:35:04 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.6 2018/06/15 14:27:57 jakllsch Exp $"); #include #include @@ -59,6 +59,7 @@ struct cpu_fdt_softc { static const struct of_compat_data compat_data[] = { { "arm,arm1176jzf-s", ARM_CPU_UP }, + { "arm,arm-v7", ARM_CPU_ARMV7 }, { "arm,cortex-a5", ARM_CPU_ARMV7 }, { "arm,cortex-a7", ARM_CPU_ARMV7 }, { "arm,cortex-a8", ARM_CPU_ARMV7 },
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jakllsch Date: Fri Jun 15 14:25:22 UTC 2018 Modified Files: src/sys/arch/arm/fdt: fdt_intr.h Log Message: Bump PIC_MAXSOURCES to 352. (`qemu-system-arm -M virt` currently needs 288) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/fdt/fdt_intr.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/arm/fdt/fdt_intr.h diff -u src/sys/arch/arm/fdt/fdt_intr.h:1.2 src/sys/arch/arm/fdt/fdt_intr.h:1.3 --- src/sys/arch/arm/fdt/fdt_intr.h:1.2 Fri Aug 25 00:07:02 2017 +++ src/sys/arch/arm/fdt/fdt_intr.h Fri Jun 15 14:25:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_intr.h,v 1.2 2017/08/25 00:07:02 jmcneill Exp $ */ +/* $NetBSD: fdt_intr.h,v 1.3 2018/06/15 14:25:22 jakllsch Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -36,7 +36,7 @@ #define __HAVE_PIC_SET_PRIORITY #define __HAVE_PIC_PENDING_INTRS -#define PIC_MAXSOURCES 256 +#define PIC_MAXSOURCES 352 #define PIC_MAXMAXSOURCES (PIC_MAXSOURCES + 32) void arm_fdt_irq_set_handler(void (*)(void *));
CVS commit: src
Module Name:src Committed By: yamaguchi Date: Fri Jun 15 09:54:02 UTC 2018 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests Log Message: Add if_vlan directory to lists to fix the build failure build.sh was failed when using "-V MKDEBUG=yes" To generate a diff of this commit: cvs rdiff -u -r1.786 -r1.787 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.150 -r1.151 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.786 src/distrib/sets/lists/tests/mi:1.787 --- src/distrib/sets/lists/tests/mi:1.786 Thu Jun 14 08:22:52 2018 +++ src/distrib/sets/lists/tests/mi Fri Jun 15 09:54:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.786 2018/06/14 08:22:52 yamaguchi Exp $ +# $NetBSD: mi,v 1.787 2018/06/15 09:54:02 yamaguchi Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -161,6 +161,7 @@ ./usr/libdata/debug/usr/tests/net/icmp tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/if tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/if_looptests-net-debug compattestfile,atf +./usr/libdata/debug/usr/tests/net/if_vlantests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/in_cksumtests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/ipsec tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/mcast tests-net-debug compattestfile,atf Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.150 src/etc/mtree/NetBSD.dist.tests:1.151 --- src/etc/mtree/NetBSD.dist.tests:1.150 Wed Jan 10 11:06:06 2018 +++ src/etc/mtree/NetBSD.dist.tests Fri Jun 15 09:54:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.150 2018/01/10 11:06:06 knakahara Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.151 2018/06/15 09:54:02 yamaguchi Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -141,6 +141,7 @@ ./usr/libdata/debug/usr/tests/net/icmp ./usr/libdata/debug/usr/tests/net/if ./usr/libdata/debug/usr/tests/net/if_loop +./usr/libdata/debug/usr/tests/net/if_vlan ./usr/libdata/debug/usr/tests/net/in_cksum ./usr/libdata/debug/usr/tests/net/ipsec ./usr/libdata/debug/usr/tests/net/mcast
CVS commit: src/sys/altq
Module Name:src Committed By: mrg Date: Fri Jun 15 08:34:18 UTC 2018 Modified Files: src/sys/altq: altq_priq.c Log Message: simplify priq_class_create(): if the alloc for cl_q fails, then only clean up required to to free cl. delete all the code at err_ret that was probably used in the past, and move the free + return upon failure earlier. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/altq/altq_priq.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/altq/altq_priq.c diff -u src/sys/altq/altq_priq.c:1.24 src/sys/altq/altq_priq.c:1.25 --- src/sys/altq/altq_priq.c:1.24 Fri Jul 28 13:53:17 2017 +++ src/sys/altq/altq_priq.c Fri Jun 15 08:34:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: altq_priq.c,v 1.24 2017/07/28 13:53:17 riastradh Exp $ */ +/* $NetBSD: altq_priq.c,v 1.25 2018/06/15 08:34:18 mrg Exp $ */ /* $KAME: altq_priq.c,v 1.13 2005/04/13 03:44:25 suz Exp $ */ /* * Copyright (C) 2000-2003 @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.24 2017/07/28 13:53:17 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altq_priq.c,v 1.25 2018/06/15 08:34:18 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_altq.h" @@ -317,8 +317,10 @@ priq_class_create(struct priq_if *pif, i cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF, M_WAITOK|M_ZERO); - if (cl->cl_q == NULL) - goto err_ret; + if (cl->cl_q == NULL) { + free(cl, M_DEVBUF); + return (NULL); + } } pif->pif_classes[pri] = cl; @@ -372,22 +374,6 @@ priq_class_create(struct priq_if *pif, i #endif /* ALTQ_RED */ return (cl); - - err_ret: - if (cl->cl_red != NULL) { -#ifdef ALTQ_RIO - if (q_is_rio(cl->cl_q)) - rio_destroy((rio_t *)cl->cl_red); -#endif -#ifdef ALTQ_RED - if (q_is_red(cl->cl_q)) - red_destroy(cl->cl_red); -#endif - } - if (cl->cl_q != NULL) - free(cl->cl_q, M_DEVBUF); - free(cl, M_DEVBUF); - return (NULL); } static int
CVS commit: src/sys/compat/sys
Module Name:src Committed By: kre Date: Fri Jun 15 08:17:38 UTC 2018 Modified Files: src/sys/compat/sys: time_types.h Log Message: Revert previous, mrg's fix is better (even with possible namespace issues, which I guess are not great in compat includes) the perils of two people doing fixes at around the same time. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/compat/sys/time_types.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/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.4 src/sys/compat/sys/time_types.h:1.5 --- src/sys/compat/sys/time_types.h:1.4 Fri Jun 15 07:46:59 2018 +++ src/sys/compat/sys/time_types.h Fri Jun 15 08:17:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.4 2018/06/15 07:46:59 kre Exp $ */ +/* $NetBSD: time_types.h,v 1.5 2018/06/15 08:17:38 kre Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -97,7 +97,7 @@ static __inline void timespec_to_timespe struct timespec50 *ts50) { #if INT32_MAX < LONG_MAX /* scrub padding */ - memset(ts50, 0, sizeof(struct timespec50)); + memset(ts50, 0, offsetof(struct timespec50, tv_nsec)); #endif ts50->tv_sec = (int32_t)ts->tv_sec; ts50->tv_nsec = ts->tv_nsec;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: kre Date: Fri Jun 15 07:46:59 UTC 2018 Modified Files: src/sys/compat/sys: time_types.h Log Message: If we are going to use offsetof() we'd need to include to get it defined. Rather than deal with potential namespace issues with that, just clear the entire struct, rather than attempting to stop after the potential padding field. If the compiler is good enough it should make no difference (there are just 3 fields, 2 named ones are assigned to, immediately after the memset() - the compiler can detect that, and not bother assigning (via memset()) to the unmamed 3rd padding field). If the compiler is not smart enough to deal with this, then I doubt writing 8 more zero bytes will make enough difference to matter. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/sys/time_types.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/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.3 src/sys/compat/sys/time_types.h:1.4 --- src/sys/compat/sys/time_types.h:1.3 Fri Jun 15 07:33:27 2018 +++ src/sys/compat/sys/time_types.h Fri Jun 15 07:46:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.3 2018/06/15 07:33:27 mrg Exp $ */ +/* $NetBSD: time_types.h,v 1.4 2018/06/15 07:46:59 kre Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -97,7 +97,7 @@ static __inline void timespec_to_timespe struct timespec50 *ts50) { #if INT32_MAX < LONG_MAX /* scrub padding */ - memset(ts50, 0, offsetof(struct timespec50, tv_nsec)); + memset(ts50, 0, sizeof(struct timespec50)); #endif ts50->tv_sec = (int32_t)ts->tv_sec; ts50->tv_nsec = ts->tv_nsec;
CVS commit: src/sys/compat/sys
Module Name:src Committed By: mrg Date: Fri Jun 15 07:33:27 UTC 2018 Modified Files: src/sys/compat/sys: time_types.h Log Message: include libkern.h or string.h & stddef.h, to get the offsetof() and memset() definitions. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/compat/sys/time_types.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/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.2 src/sys/compat/sys/time_types.h:1.3 --- src/sys/compat/sys/time_types.h:1.2 Thu Jun 14 10:30:55 2018 +++ src/sys/compat/sys/time_types.h Fri Jun 15 07:33:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.2 2018/06/14 10:30:55 uwe Exp $ */ +/* $NetBSD: time_types.h,v 1.3 2018/06/15 07:33:27 mrg Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -34,6 +34,13 @@ #ifndef _COMPAT_SYS_TIME_TYPES_H_ #define _COMPAT_SYS_TIME_TYPES_H_ +#ifdef _KERNEL +#include +#else +#include +#include +#endif + /* * Structure returned by gettimeofday(2) system call, * and used in other calls.