CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Wed Oct 31 06:36:19 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: pmap.c Log Message: invalidate icache correctly. l3pte_executable() should be used for only valid pte. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/aarch64/aarch64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/pmap.c diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.31 src/sys/arch/aarch64/aarch64/pmap.c:1.32 --- src/sys/arch/aarch64/aarch64/pmap.c:1.31 Thu Oct 18 09:01:51 2018 +++ src/sys/arch/aarch64/aarch64/pmap.c Wed Oct 31 06:36:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.31 2018/10/18 09:01:51 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.32 2018/10/31 06:36:19 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.31 2018/10/18 09:01:51 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.32 2018/10/31 06:36:19 ryo Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -1302,7 +1302,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va, unsigned int idx; int error = 0; const bool user = (pm != pmap_kernel()); - bool executable; + bool need_sync_icache; bool l3only = true; UVMHIST_FUNC(__func__); @@ -1405,7 +1405,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va, #ifdef UVMHIST opte = pte; #endif - executable = l3pte_executable(pte, user); + need_sync_icache = (prot & VM_PROT_EXECUTE); if (l3pte_valid(pte)) { KASSERT(!kenter); /* pmap_kenter_pa() cannot override */ @@ -1413,7 +1413,11 @@ _pmap_enter(struct pmap *pm, vaddr_t va, PMAP_COUNT(remappings); /* pte is Already mapped */ - if (l3pte_pa(pte) != pa) { + if (l3pte_pa(pte) == pa) { + if (need_sync_icache && l3pte_executable(pte, user)) +need_sync_icache = false; + + } else { struct vm_page *opg; #ifdef PMAPCOUNTERS @@ -1492,7 +1496,7 @@ _pmap_enter(struct pmap *pm, vaddr_t va, pte = pa | attr; - if (!executable && (prot & VM_PROT_EXECUTE)) { + if (need_sync_icache) { /* non-exec -> exec */ UVMHIST_LOG(pmaphist, "icache_sync: pm=%p, va=%016lx, pte: %016lx -> %016lx",
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Wed Oct 31 06:26:26 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: machdep.c src/sys/arch/amd64/conf: Makefile.amd64 files.amd64 src/sys/arch/amd64/include: Makefile src/sys/arch/x86/x86: pmap.c src/sys/kern: files.kern src/sys/sys: asan.h Added Files: src/sys/arch/amd64/include: asan.h src/sys/kern: subr_asan.c Removed Files: src/sys/arch/amd64/amd64: asan.c Log Message: Move the MI parts of KASAN into kern/subr_asan.c. This file includes machine/asan.h, which contains the MD functions. We use an include rather than a plain C file, because we want GCC to optimize/inline some functions into one single block. The amd64 MD parts of KASAN are moved accordingly. The naming convention we use is: kasan_* a generic kasan object, declared in subr_asan.c kasan_md_* an MD kasan object, declared in machine/asan.h, and used in subr_asan.c __md_* an MD object, declared in machine/asan.h, and not used outside Overall this makes it easier to add KASAN support on more architectures. Discussed with several people. To generate a diff of this commit: cvs rdiff -u -r1.10 -r0 src/sys/arch/amd64/amd64/asan.c cvs rdiff -u -r1.319 -r1.320 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.74 -r1.75 src/sys/arch/amd64/conf/Makefile.amd64 cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amd64/conf/files.amd64 cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/include/asan.h cvs rdiff -u -r1.308 -r1.309 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.23 -r1.24 src/sys/kern/files.kern cvs rdiff -u -r0 -r1.1 src/sys/kern/subr_asan.c cvs rdiff -u -r1.7 -r1.8 src/sys/sys/asan.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.319 src/sys/arch/amd64/amd64/machdep.c:1.320 --- src/sys/arch/amd64/amd64/machdep.c:1.319 Sun Sep 23 00:59:59 2018 +++ src/sys/arch/amd64/amd64/machdep.c Wed Oct 31 06:26:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.319 2018/09/23 00:59:59 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.320 2018/10/31 06:26:25 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.319 2018/09/23 00:59:59 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.320 2018/10/31 06:26:25 maxv Exp $"); #include "opt_modular.h" #include "opt_user_ldt.h" @@ -152,6 +152,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #ifdef KGDB #include @@ -1683,8 +1684,7 @@ init_x86_64(paddr_t first_avail) init_pte(); #ifdef KASAN - void kasan_early_init(void); - kasan_early_init(); + kasan_early_init((void *)lwp0uarea); #endif uvm_lwp_setuarea(&lwp0, lwp0uarea); @@ -1766,7 +1766,6 @@ init_x86_64(paddr_t first_avail) init_x86_msgbuf(); #ifdef KASAN - void kasan_init(void); kasan_init(); #endif Index: src/sys/arch/amd64/conf/Makefile.amd64 diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.74 src/sys/arch/amd64/conf/Makefile.amd64:1.75 --- src/sys/arch/amd64/conf/Makefile.amd64:1.74 Sat Sep 22 12:24:01 2018 +++ src/sys/arch/amd64/conf/Makefile.amd64 Wed Oct 31 06:26:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.74 2018/09/22 12:24:01 rin Exp $ +# $NetBSD: Makefile.amd64,v 1.75 2018/10/31 06:26:25 maxv Exp $ # Makefile for NetBSD # @@ -53,7 +53,7 @@ CFLAGS+= -mindirect-branch-register KASANFLAGS= -fsanitize=kernel-address \ --param asan-globals=1 --param asan-stack=1 \ -fasan-shadow-offset=0xDFFF9000 -.for f in asan.c +.for f in subr_asan.c KASANFLAGS.${f}= # empty .endfor CFLAGS+= ${KASANFLAGS.${.IMPSRC:T}:U${KASANFLAGS}} Index: src/sys/arch/amd64/conf/files.amd64 diff -u src/sys/arch/amd64/conf/files.amd64:1.106 src/sys/arch/amd64/conf/files.amd64:1.107 --- src/sys/arch/amd64/conf/files.amd64:1.106 Mon Aug 20 15:04:51 2018 +++ src/sys/arch/amd64/conf/files.amd64 Wed Oct 31 06:26:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.amd64,v 1.106 2018/08/20 15:04:51 maxv Exp $ +# $NetBSD: files.amd64,v 1.107 2018/10/31 06:26:25 maxv Exp $ # # new style config file for amd64 architecture # @@ -39,7 +39,6 @@ file arch/amd64/amd64/spl.S machdep file arch/amd64/amd64/amd64func.S machdep file arch/amd64/amd64/amd64_trap.S machdep -file arch/amd64/amd64/asan.c kasan file arch/amd64/amd64/autoconf.c machdep file arch/amd64/amd64/busfunc.S machdep file arch/amd64/amd64/cpu_in_cksum.S (inet | inet6) & cpu_in_cksum Index: src/sys/arch/amd64/include/Makefile diff -u src/sys/arch/amd64/include/Makefile:1.20 src/sys/arch/amd64/include/Makefile:1.21 --- src/sys/arch/amd64/include/Makefile:1.20
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Oct 31 06:04:48 UTC 2018 Modified Files: src/sys/dev/pci: if_wm.c Log Message: - 82574 and newer's document says the status field has neither EC (Excessive Collision) bit nor LC (Late Collision) bit (reserved). Refer "PCIe GbE Controller Open Source Software Developer's Manual", 82574 datasheet and newer. XXX I saw the LC bit was set on I218 even though the media was full duplex, so the bit might be used for other meaning ...(I have no document). - Use macro. To generate a diff of this commit: cvs rdiff -u -r1.589 -r1.590 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.589 src/sys/dev/pci/if_wm.c:1.590 --- src/sys/dev/pci/if_wm.c:1.589 Fri Oct 5 08:23:58 2018 +++ src/sys/dev/pci/if_wm.c Wed Oct 31 06:04:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.589 2018/10/05 08:23:58 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.590 2018/10/31 06:04:48 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.589 2018/10/05 08:23:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.590 2018/10/31 06:04:48 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -8188,13 +8188,27 @@ wm_txeof(struct wm_txqueue *txq, u_int l WM_Q_EVCNT_INCR(txq, underrun); #endif /* WM_EVENT_COUNTERS */ - if (status & (WTX_ST_EC | WTX_ST_LC)) { + /* + * 82574 and newer's document says the status field has neither + * EC (Excessive Collision) bit nor LC (Late Collision) bit + * (reserved). Refer "PCIe GbE Controller Open Source Software + * Developer's Manual", 82574 datasheet and newer. + * + * XXX I saw the LC bit was set on I218 even though the media + * was full duplex, so the bit might be used for other + * meaning ...(I have no document). + */ + + if (((status & (WTX_ST_EC | WTX_ST_LC)) != 0) + && ((sc->sc_type < WM_T_82574) + || (sc->sc_type == WM_T_80003))) { ifp->if_oerrors++; if (status & WTX_ST_LC) log(LOG_WARNING, "%s: late collision\n", device_xname(sc->sc_dev)); else if (status & WTX_ST_EC) { -ifp->if_collisions += 16; +ifp->if_collisions += +TX_COLLISION_THRESHOLD + 1; log(LOG_WARNING, "%s: excessive collisions\n", device_xname(sc->sc_dev)); }
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Tue Oct 30 23:59:47 UTC 2018 Modified Files: src/sys/arch/arm/cortex: gic_v2m.c Log Message: Fail gracefully when an attempt to allocate MSI vectors is made on a device without MSI capabilities. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/gic_v2m.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/cortex/gic_v2m.c diff -u src/sys/arch/arm/cortex/gic_v2m.c:1.1 src/sys/arch/arm/cortex/gic_v2m.c:1.2 --- src/sys/arch/arm/cortex/gic_v2m.c:1.1 Sun Oct 21 00:42:05 2018 +++ src/sys/arch/arm/cortex/gic_v2m.c Tue Oct 30 23:59:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gic_v2m.c,v 1.1 2018/10/21 00:42:05 jmcneill Exp $ */ +/* $NetBSD: gic_v2m.c,v 1.2 2018/10/30 23:59:47 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gic_v2m.c,v 1.1 2018/10/21 00:42:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gic_v2m.c,v 1.2 2018/10/30 23:59:47 jmcneill Exp $"); #include #include @@ -141,7 +141,10 @@ gic_v2m_msi_alloc(struct arm_pci_msi *ms { struct gic_v2m_frame * const frame = msi->msi_priv; pci_intr_handle_t *vectors; - int n; + int n, off; + + if (!pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_MSI, &off, NULL)) + return NULL; const int avail = gic_v2m_msi_available_spi(frame); if (exact && *count > avail)
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Tue Oct 30 22:32:33 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: files.fdt Log Message: build fdt_memory.c To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/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/files.fdt diff -u src/sys/arch/evbarm/conf/files.fdt:1.4 src/sys/arch/evbarm/conf/files.fdt:1.5 --- src/sys/arch/evbarm/conf/files.fdt:1.4 Sun Apr 1 04:35:04 2018 +++ src/sys/arch/evbarm/conf/files.fdt Tue Oct 30 22:32:33 2018 @@ -1,8 +1,9 @@ -# $NetBSD: files.fdt,v 1.4 2018/04/01 04:35:04 ryo Exp $ +# $NetBSD: files.fdt,v 1.5 2018/10/30 22:32:33 jmcneill Exp $ # # FDT-based kernel configuration info # file arch/evbarm/fdt/fdt_machdep.c fdt +file arch/evbarm/fdt/fdt_memory.c fdt include "arch/arm/fdt/files.fdt"
CVS commit: src/sys/arch/evbarm/fdt
Module Name:src Committed By: jmcneill Date: Tue Oct 30 21:32:35 UTC 2018 Modified Files: src/sys/arch/evbarm/fdt: fdt_machdep.c Added Files: src/sys/arch/evbarm/fdt: fdt_memory.c fdt_memory.h Log Message: Replace extent(9) with our own code to deal with adding and reserving memory ranges. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/evbarm/fdt/fdt_machdep.c cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/fdt/fdt_memory.c \ src/sys/arch/evbarm/fdt/fdt_memory.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/fdt/fdt_machdep.c diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.48 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.49 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.48 Tue Oct 30 16:41:53 2018 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Tue Oct 30 21:32:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.48 2018/10/30 16:41:53 skrll Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.49 2018/10/30 21:32:35 jmcneill Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.48 2018/10/30 16:41:53 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.49 2018/10/30 21:32:35 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_bootconfig.h" @@ -55,7 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep. #include #include #include -#include #include #include #include @@ -80,6 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep. #include #include #include +#include #include @@ -110,9 +110,6 @@ char *boot_args = NULL; u_long uboot_args[4] __attribute__((__section__(".data"))); const uint8_t *fdt_addr_r __attribute__((__section__(".data"))); -static char fdt_memory_ext_storage[EXTENT_FIXED_STORAGE_SIZE(DRAM_BLOCKS)]; -static struct extent *fdt_memory_ext; - static uint64_t initrd_start, initrd_end; #include @@ -198,16 +195,7 @@ fdt_get_memory(uint64_t *pstart, uint64_ void fdt_add_reserved_memory_range(uint64_t addr, uint64_t size) { - uint64_t start = addr; - uint64_t end = addr + size; - - int error = extent_free(fdt_memory_ext, start, - end - start, EX_NOWAIT); - if (error != 0) - printf("MEM ERROR: res %" PRIx64 "-%" PRIx64 " failed: %d\n", - start, end, error); - else - VPRINTF("MEM: res %" PRIx64 "-%" PRIx64 "\n", start, end); + fdt_memory_remove_range(addr, size); } /* @@ -248,6 +236,49 @@ fdt_add_reserved_memory(uint64_t min_add } } +static void +fdt_add_dram_blocks(const struct fdt_memory *m, void *arg) +{ + BootConfig *bc = arg; + + VPRINTF(" %lx - %lx\n", m->start, m->end - 1); + bc->dram[bc->dramblocks].address = m->start; + bc->dram[bc->dramblocks].pages = + (m->end - m->start) / PAGE_SIZE; + bc->dramblocks++; +} + +#define MAX_PHYSMEM 64 +static int nfdt_physmem = 0; +static struct boot_physmem fdt_physmem[MAX_PHYSMEM]; + +static void +fdt_add_boot_physmem(const struct fdt_memory *m, void *arg) +{ + struct boot_physmem *bp = &fdt_physmem[nfdt_physmem++]; + + VPRINTF(" %lx - %lx\n", m->start, m->end - 1); + + KASSERT(nfdt_physmem <= MAX_PHYSMEM); + + bp->bp_start = atop(round_page(m->start)); + bp->bp_pages = atop(trunc_page(m->end)) - bp->bp_start; + bp->bp_freelist = VM_FREELIST_DEFAULT; + +#ifdef _LP64 + if (m->end > 0x1) + bp->bp_freelist = VM_FREELIST_HIGHMEM; +#endif + +#ifdef PMAP_NEED_ALLOC_POOLPAGE + const uint64_t memory_size = *(uint64_t *)arg; + if (atop(memory_size) > bp->bp_pages) { + arm_poolpage_vmfreelist = VM_FREELIST_DIRECTMAP; + bp->bp_freelist = VM_FREELIST_DIRECTMAP; + } +#endif +} + /* * Define usable memory regions. */ @@ -256,12 +287,8 @@ fdt_build_bootconfig(uint64_t mem_start, { const int memory = OF_finddevice("/memory"); BootConfig *bc = &bootconfig; - struct extent_region *er; uint64_t addr, size; - int index, error; - - fdt_memory_ext = extent_create("FDT Memory", mem_start, mem_end, - fdt_memory_ext_storage, sizeof(fdt_memory_ext_storage), EX_EARLY); + int index; for (index = 0; fdtbus_get_reg64(memory, index, &addr, &size) == 0; @@ -271,19 +298,14 @@ fdt_build_bootconfig(uint64_t mem_start, if (addr + size > mem_end) size = mem_end - addr; - error = extent_alloc_region(fdt_memory_ext, addr, size, - EX_NOWAIT); - if (error != 0) - printf("MEM ERROR: add %" PRIx64 "-%" PRIx64 " failed: %d\n", - addr, addr + size, error); - VPRINTF("MEM: add %" PRIx64 "-%" PRIx64 "\n", addr, addr + size); + fdt_memory_add_range(addr, size); } fdt_add_reserved_memory(mem_start, mem_end); const uint64_t initrd_size = initrd_end - initrd_start; if (initrd_size > 0) - fdt_add_reserved_memory_range(initrd_start, initrd_size); + fdt_memory_remove_range(initrd_start, initrd_size); const int framebuffer = OF_finddevice("/chosen/framebuffer"); if (framebuffer >= 0) { @@ -296,13 +318,7 @@ fdt_build_bootconfig
CVS commit: src/libexec/rpc.rstatd
Module Name:src Committed By: kre Date: Tue Oct 30 21:18:39 UTC 2018 Modified Files: src/libexec/rpc.rstatd: rstat_proc.c Log Message: sysctl(KERN_BOOTTIME) is a struct timespec, not struct timeval and has eben since 2009.Adapt. NFCI - while the tv_usec (now tv_nsec) field is used, we will keep its uses to microsecond precision to avoid any compat issues. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/libexec/rpc.rstatd/rstat_proc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/rpc.rstatd/rstat_proc.c diff -u src/libexec/rpc.rstatd/rstat_proc.c:1.52 src/libexec/rpc.rstatd/rstat_proc.c:1.53 --- src/libexec/rpc.rstatd/rstat_proc.c:1.52 Thu Jun 26 03:24:51 2014 +++ src/libexec/rpc.rstatd/rstat_proc.c Tue Oct 30 21:18:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rstat_proc.c,v 1.52 2014/06/26 03:24:51 dholland Exp $ */ +/* $NetBSD: rstat_proc.c,v 1.53 2018/10/30 21:18:39 kre Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -36,7 +36,7 @@ static char sccsid[] = static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; #endif -__RCSID("$NetBSD: rstat_proc.c,v 1.52 2014/06/26 03:24:51 dholland Exp $"); +__RCSID("$NetBSD: rstat_proc.c,v 1.53 2018/10/30 21:18:39 kre Exp $"); /* * rstat service: built with rstat.x and derived from rpc.rstatd.c @@ -180,7 +180,8 @@ updatestat(int dummy) int mib[2], s; struct uvmexp_sysctl uvmexp; double avrun[3]; - struct timeval tm, btm; + struct timeval tm; + struct timespec btm; #ifdef DEBUG syslog(LOG_DEBUG, "entering updatestat"); @@ -221,7 +222,7 @@ updatestat(int dummy) exit(1); } stats_all.s3.boottime.tv_sec = btm.tv_sec; - stats_all.s3.boottime.tv_usec = btm.tv_usec; + stats_all.s3.boottime.tv_usec = (suseconds_t)(btm.tv_nsec / 1000L); #ifdef DEBUG @@ -245,7 +246,7 @@ updatestat(int dummy) stats_all.s3.v_swtch = uvmexp.swtch; gettimeofday(&tm, (struct timezone *) 0); stats_all.s3.v_intr -= hz*(tm.tv_sec - btm.tv_sec) + - hz*(tm.tv_usec - btm.tv_usec)/100; + hz*(tm.tv_usec - (suseconds_t)(btm.tv_nsec / 1000))/100; stats_all.s3.if_ipackets = 0; stats_all.s3.if_opackets = 0;
CVS commit: src
Module Name:src Committed By: kre Date: Tue Oct 30 21:15:09 UTC 2018 Modified Files: src/external/bsd/top/dist/machine: m_netbsd.c src/usr.bin/w: w.c src/usr.sbin/rwhod: rwhod.c Log Message: sysctl(KERN_BOPOTIME) started returning a struct timespec in 2009. Update to matchWe're slow but we get there eventually! NFC for any of these programs, struct timeval and struct timespec are the same size, and only the tv_sec field of boottime is used, and that's unchanged. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/external/bsd/top/dist/machine/m_netbsd.c cvs rdiff -u -r1.83 -r1.84 src/usr.bin/w/w.c cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/rwhod/rwhod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/top/dist/machine/m_netbsd.c diff -u src/external/bsd/top/dist/machine/m_netbsd.c:1.20 src/external/bsd/top/dist/machine/m_netbsd.c:1.21 --- src/external/bsd/top/dist/machine/m_netbsd.c:1.20 Thu May 31 10:14:21 2018 +++ src/external/bsd/top/dist/machine/m_netbsd.c Tue Oct 30 21:15:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: m_netbsd.c,v 1.20 2018/05/31 10:14:21 kamil Exp $ */ +/* $NetBSD: m_netbsd.c,v 1.21 2018/10/30 21:15:09 kre Exp $ */ /* * top - a top users display for Unix @@ -37,12 +37,12 @@ * Andrew Doran * * - * $Id: m_netbsd.c,v 1.20 2018/05/31 10:14:21 kamil Exp $ + * $Id: m_netbsd.c,v 1.21 2018/10/30 21:15:09 kre Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: m_netbsd.c,v 1.20 2018/05/31 10:14:21 kamil Exp $"); +__RCSID("$NetBSD: m_netbsd.c,v 1.21 2018/10/30 21:15:09 kre Exp $"); #endif #include @@ -306,7 +306,7 @@ machine_init(statics) int mib[2]; size_t size; struct clockinfo clockinfo; - struct timeval boottime; + struct timespec boottime; if ((kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open")) == NULL) return -1; Index: src/usr.bin/w/w.c diff -u src/usr.bin/w/w.c:1.83 src/usr.bin/w/w.c:1.84 --- src/usr.bin/w/w.c:1.83 Wed Nov 16 02:03:30 2016 +++ src/usr.bin/w/w.c Tue Oct 30 21:15:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: w.c,v 1.83 2016/11/16 02:03:30 christos Exp $ */ +/* $NetBSD: w.c,v 1.84 2018/10/30 21:15:09 kre Exp $ */ /*- * Copyright (c) 1980, 1991, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)w.c 8.6 (Berkeley) 6/30/94"; #else -__RCSID("$NetBSD: w.c,v 1.83 2016/11/16 02:03:30 christos Exp $"); +__RCSID("$NetBSD: w.c,v 1.84 2018/10/30 21:15:09 kre Exp $"); #endif #endif /* not lint */ @@ -86,7 +86,7 @@ __RCSID("$NetBSD: w.c,v 1.83 2016/11/16 #include "extern.h" -struct timeval boottime; +struct timespec boottime; struct winsize ws; kvm_t *kd; time_t now; /* the current time of day */ Index: src/usr.sbin/rwhod/rwhod.c diff -u src/usr.sbin/rwhod/rwhod.c:1.40 src/usr.sbin/rwhod/rwhod.c:1.41 --- src/usr.sbin/rwhod/rwhod.c:1.40 Sun Nov 4 22:32:01 2012 +++ src/usr.sbin/rwhod/rwhod.c Tue Oct 30 21:15:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rwhod.c,v 1.40 2012/11/04 22:32:01 christos Exp $ */ +/* $NetBSD: rwhod.c,v 1.41 2018/10/30 21:15:09 kre Exp $ */ /* * Copyright (c) 1983, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: rwhod.c,v 1.40 2012/11/04 22:32:01 christos Exp $"); +__RCSID("$NetBSD: rwhod.c,v 1.41 2018/10/30 21:15:09 kre Exp $"); #endif #endif /* not lint */ @@ -426,7 +426,7 @@ getboottime(void) { int mib[2]; size_t size; - struct timeval tm; + struct timespec tm; mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME;
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: christos Date: Tue Oct 30 20:23:29 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: no param names in prototype. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.44 src/sys/arch/acorn32/stand/boot32/boot32.c:1.45 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.44 Tue Oct 30 16:15:57 2018 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Tue Oct 30 16:23:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.44 2018/10/30 20:15:57 christos Exp $ */ +/* $NetBSD: boot32.c,v 1.45 2018/10/30 20:23:29 christos Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -760,7 +760,7 @@ create_configuration(int argc, char **ar } } -int main(int, char **argv); +int main(int, char **); int main(int argc, char **argv)
CVS commit: src/distrib/i386/installimage
Module Name:src Committed By: christos Date: Tue Oct 30 20:18:30 UTC 2018 Modified Files: src/distrib/i386/installimage: Makefile Log Message: bump for clang To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/i386/installimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/i386/installimage/Makefile diff -u src/distrib/i386/installimage/Makefile:1.11 src/distrib/i386/installimage/Makefile:1.12 --- src/distrib/i386/installimage/Makefile:1.11 Mon Sep 18 10:42:16 2017 +++ src/distrib/i386/installimage/Makefile Tue Oct 30 16:18:30 2018 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.11 2017/09/18 14:42:16 joerg Exp $ +# $NetBSD: Makefile,v 1.12 2018/10/30 20:18:30 christos Exp $ .include INSTIMGBASE= NetBSD-${DISTRIBVER}-i386-install # gives ${IMGBASE}.img BOOTDISK= sd0 # for USB flash etc. -INSTIMAGEMB?= 1400 # for all installation binaries +INSTIMAGEMB?= 1450 # for all installation binaries PRIMARY_BOOT= bootxx_ffsv1 SECONDARY_BOOT= boot
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: christos Date: Tue Oct 30 20:15:57 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: provide a main prototype (this is standalone) To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.43 src/sys/arch/acorn32/stand/boot32/boot32.c:1.44 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.43 Wed Jan 24 04:04:44 2018 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Tue Oct 30 16:15:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.43 2018/01/24 09:04:44 skrll Exp $ */ +/* $NetBSD: boot32.c,v 1.44 2018/10/30 20:15:57 christos Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -760,6 +760,7 @@ create_configuration(int argc, char **ar } } +int main(int, char **argv); int main(int argc, char **argv)
CVS commit: src/share/man/man9
Module Name:src Committed By: kre Date: Tue Oct 30 20:10:23 UTC 2018 Modified Files: src/share/man/man9: time_second.9 Log Message: Minor update. This already knew that boottime is a timespec. Just a minor wording change to avoid pretending that time_t variables contain nanoseconds, and that the base time is UTC. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/time_second.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/time_second.9 diff -u src/share/man/man9/time_second.9:1.6 src/share/man/man9/time_second.9:1.7 --- src/share/man/man9/time_second.9:1.6 Tue Mar 14 07:23:50 2017 +++ src/share/man/man9/time_second.9 Tue Oct 30 20:10:23 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: time_second.9,v 1.6 2017/03/14 07:23:50 dholland Exp $ +.\" $NetBSD: time_second.9,v 1.7 2018/10/30 20:10:23 kre Exp $ .\" .\" Copyright (c) 1994 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <> .\" -.Dd March 14, 2017 +.Dd October 30, 2018 .Dt TIME_SECOND 9 .Os .Sh NAME @@ -76,8 +76,10 @@ with The variable may be read and written without special precautions. .Pp All of these variables contain times -expressed in seconds and nanoseconds since midnight (0 hour), -January 1, 1970. +expressed in seconds (and for +.Va boottime , +nanoseconds) since midnight (0 hour), +January 1, 1970, UTC. .Pp The .Xr bintime 9 ,
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Oct 30 19:54:56 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1637, #1644, #1645, #1646 To generate a diff of this commit: cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.10 src/doc/CHANGES-7.3:1.1.2.11 --- src/doc/CHANGES-7.3:1.1.2.10 Tue Oct 30 10:54:41 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 19:54:56 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.10 2018/10/30 10:54:41 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.11 2018/10/30 19:54:56 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -112,3 +112,60 @@ usr.bin/systat/main.c1.52 via patch Alpha-sort the option handling. [mrg, ticket #1639] +distrib/sgimips/instkernel/Makefile 1.13 +sys/arch/sgimips/conf/INSTALL32_IP2x 1.10 +sys/arch/sgimips/stand/boot/Makefile 1.20 + + Disable misc options to shrink an INSTALL kernel for IP2x. + Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for + old machines. + [tsutsui, ticket #1637] + +external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.6 +external/public-domain/tz/dist/Makefile up to 1.1.1.22 +external/public-domain/tz/dist/NEWS up to 1.1.1.24 +external/public-domain/tz/dist/README up to 1.1.1.7 +external/public-domain/tz/dist/TZDATA_VERSION up to 1.14 +external/public-domain/tz/dist/africa up to 1.1.1.17 +external/public-domain/tz/dist/antarctica up to 1.1.1.11 +external/public-domain/tz/dist/asia up to 1.1.1.21 +external/public-domain/tz/dist/australasia up to 1.1.1.16 +external/public-domain/tz/dist/backward up to 1.1.1.9 +external/public-domain/tz/dist/backzone up to 1.1.1.15 +external/public-domain/tz/dist/etcetera up to 1.1.1.3 +external/public-domain/tz/dist/europe up to 1.1.1.23 +external/public-domain/tz/dist/factory up to 1.1.1.3 +external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10 +external/public-domain/tz/dist/leapseconds up to 1.1.1.11 +external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.7 +external/public-domain/tz/dist/northamerica up to 1.1.1.21 +external/public-domain/tz/dist/pacificnew up to 1.1.1.2 +external/public-domain/tz/dist/southamerica up to 1.1.1.15 +external/public-domain/tz/dist/systemv up to 1.1.1.2 +external/public-domain/tz/dist/theory.html up to 1.1.1.6 +external/public-domain/tz/dist/version up to 1.1.1.11 +external/public-domain/tz/dist/yearistype.shup to 1.1.1.2 +external/public-domain/tz/dist/ziguard.awk up to 1.1.1.3 +external/public-domain/tz/dist/zishrink.awk up to 1.1.1.5 +external/public-domain/tz/dist/zone.tab up to 1.1.1.15 +external/public-domain/tz/dist/zone1970.tab up to 1.1.1.17 +external/public-domain/tz/dist/zoneinfo2tdf.pl up to 1.1.1.2 +doc/3RDPARTY (apply patch) + + Updated tzdata to 2018g. + [kre, ticket #1644] + +common/include/prop/prop_array.h 1.15,1.16 +common/include/prop/prop_dictionary.h 1.16 +common/lib/libprop/prop_copyin_ioctl.9 1.12 +common/lib/libprop/prop_kern.c 1.21-1.23 (patch) + + proplib: add sized versions of the copyin ioctls and document them. + [sborrill, ticket #1645] + +sys/net/npf/npf_ctl.c1.47 (partial, patch) + + Increase copyin buffer size to 4MB to allow larger rulesets + to be loaded. + [sborrill, ticket #1646] +
CVS commit: [netbsd-7] src/sys/net/npf
Module Name:src Committed By: martin Date: Tue Oct 30 19:52:57 UTC 2018 Modified Files: src/sys/net/npf [netbsd-7]: npf_ctl.c Log Message: Pull up following revision(s) (requested by sborrill in ticket #1646): sys/net/npf/npf_ctl.c: revision 1.47 (partial, via patch) - Increase copyin buffer size to 4M To generate a diff of this commit: cvs rdiff -u -r1.38.2.3 -r1.38.2.4 src/sys/net/npf/npf_ctl.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/net/npf/npf_ctl.c diff -u src/sys/net/npf/npf_ctl.c:1.38.2.3 src/sys/net/npf/npf_ctl.c:1.38.2.4 --- src/sys/net/npf/npf_ctl.c:1.38.2.3 Wed Jun 10 16:57:58 2015 +++ src/sys/net/npf/npf_ctl.c Tue Oct 30 19:52:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ctl.c,v 1.38.2.3 2015/06/10 16:57:58 snj Exp $ */ +/* $NetBSD: npf_ctl.c,v 1.38.2.4 2018/10/30 19:52:56 martin Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.38.2.3 2015/06/10 16:57:58 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.38.2.4 2018/10/30 19:52:56 martin Exp $"); #include #include @@ -512,7 +512,8 @@ npfctl_load(u_long cmd, void *data) /* Retrieve the dictionary. */ #ifndef _NPF_TESTING - error = prop_dictionary_copyin_ioctl(pref, cmd, &npf_dict); + error = prop_dictionary_copyin_ioctl_size(pref, cmd, &npf_dict, + 4 * 1024 * 1024); if (error) return error; #else
CVS commit: src
Module Name:src Committed By: kre Date: Tue Oct 30 19:41:21 UTC 2018 Modified Files: src/sbin/sysctl: sysctl.c src/share/man/man7: sysctl.7 Log Message: kern.boottime was changed from a struct timeval to a struct timespec in January 2009 (the Christos' time merge, when time_t went to 64 bits). sysctl needs to catch up. (So do other progs, which will happen, eventually, but most of them are unaffected in any practical way.) If you are running a system (NetBSD 6 or later) without this change, try sysctl -nn kern.boottime and marvel at the result (in theory, seconds.microseconds) most probably being something like: jinx$ sysctl -nn kern.boottime 1540801874.95564 (There is a 1 in 1000 chance your system will have booted in the interval [0 , 99] nanoseconds after some second, in which case this will not be observed. You should get (almost) the same value after this change - just now it is as it should be (there should now always be 9 digits after the '.'). On the other hand, if you're on a big-endian 64 bit host (running 64 bit sysctl) you would have always seen 0 for the microseconds field. That should be fixed by this. In sysctl(7) also document what we mean by "the time the system booted". XXX Pullup -8 XXX Pullup -7 XXX Pullup -6 (oops, missed that one...) To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sbin/sysctl/sysctl.c cvs rdiff -u -r1.133 -r1.134 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/sysctl/sysctl.c diff -u src/sbin/sysctl/sysctl.c:1.160 src/sbin/sysctl/sysctl.c:1.161 --- src/sbin/sysctl/sysctl.c:1.160 Sun Feb 4 09:03:23 2018 +++ src/sbin/sysctl/sysctl.c Tue Oct 30 19:41:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.160 2018/02/04 09:03:23 mrg Exp $ */ +/* $NetBSD: sysctl.c,v 1.161 2018/10/30 19:41:21 kre Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #if 0 static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: sysctl.c,v 1.160 2018/02/04 09:03:23 mrg Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.161 2018/10/30 19:41:21 kre Exp $"); #endif #endif /* not lint */ @@ -2189,32 +2189,32 @@ kern_clockrate(HANDLER_ARGS) static void kern_boottime(HANDLER_ARGS) { - struct timeval timeval; + struct timespec timespec; time_t boottime; size_t sz; int rc; - sz = sizeof(timeval); - rc = prog_sysctl(name, namelen, &timeval, &sz, NULL, 0); + sz = sizeof(timespec); + rc = prog_sysctl(name, namelen, ×pec, &sz, NULL, 0); if (rc == -1) { sysctlerror(1); return; } - if (sz != sizeof(timeval)) + if (sz != sizeof(timespec)) errx(EXIT_FAILURE, "%s: !returned size wrong!", sname); - boottime = timeval.tv_sec; + boottime = timespec.tv_sec; if (xflag || rflag) - display_struct(pnode, sname, &timeval, sz, + display_struct(pnode, sname, ×pec, sz, DISPLAY_VALUE); else if (!nflag) /* ctime() provides the \n */ printf("%s%s%s", sname, eq, ctime(&boottime)); else if (nflag == 1) - printf("%ld\n", (long)boottime); + printf("%lld\n", (long long)boottime); else - printf("%ld.%06ld\n", (long)timeval.tv_sec, - (long)timeval.tv_usec); + printf("%lld.%9.9ld\n", (long long)timespec.tv_sec, + timespec.tv_nsec); } /*ARGSUSED*/ Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.133 src/share/man/man7/sysctl.7:1.134 --- src/share/man/man7/sysctl.7:1.133 Sat Oct 6 13:53:58 2018 +++ src/share/man/man7/sysctl.7 Tue Oct 30 19:41:21 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.133 2018/10/06 13:53:58 wiz Exp $ +.\" $NetBSD: sysctl.7,v 1.134 2018/10/30 19:41:21 kre Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" -.Dd October 5, 2018 +.Dd October 30, 2018 .Dt SYSCTL 7 .Os .Sh NAME @@ -278,7 +278,7 @@ privilege may change the value. .It kern.arandom integer no .It kern.argmax integer no .It kern.boothowto integer no -.It kern.boottime struct timeval no +.It kern.boottime struct timespec no .It kern.buildinfo string no .\".It kern.bufq node not applicable .It kern.ccpu integer no @@ -396,9 +396,11 @@ Flags passed from the boot loader; see for the meanings of the flags. .It Li kern.boottime ( Dv KERN_BOOTTIME ) A -.Vt struct timeval +.Vt struct timespec structure is returned. This structure contains the time that the system was booted. +That time is defined (for this purpose) to be the time at +which the kernel first started accumulating clock ticks. .It Li kern.bufq This variable contains information on the .Xr bufq 9
CVS commit: [netbsd-7] src/common
Module Name:src Committed By: martin Date: Tue Oct 30 19:49:07 UTC 2018 Modified Files: src/common/include/prop [netbsd-7]: prop_array.h prop_dictionary.h src/common/lib/libprop [netbsd-7]: prop_copyin_ioctl.9 prop_kern.c Log Message: Pull up following revision(s) (requested by sborrill in ticket #1645): common/include/prop/prop_dictionary.h: revision 1.16 common/include/prop/prop_array.h: revision 1.15 common/lib/libprop/prop_kern.c: revision 1.21 common/lib/libprop/prop_copyin_ioctl.9: revision 1.12 common/include/prop/prop_array.h: revision 1.16 common/lib/libprop/prop_kern.c: revision 1.22 (patch) common/lib/libprop/prop_kern.c: revision 1.23 (patch) add sized versions of the copyin ioctls. - add sized versions of the copyin ioctls - Update for the new *_size() functions recently added. Mention the implicit size limit (128KB) for the functions which do not take an explicit limit argument. - fix args - missing brace - call the proper size functions To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.22.1 src/common/include/prop/prop_array.h cvs rdiff -u -r1.14 -r1.14.22.1 src/common/include/prop/prop_dictionary.h cvs rdiff -u -r1.9 -r1.9.26.1 src/common/lib/libprop/prop_copyin_ioctl.9 cvs rdiff -u -r1.17.22.2 -r1.17.22.3 src/common/lib/libprop/prop_kern.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/include/prop/prop_array.h diff -u src/common/include/prop/prop_array.h:1.13 src/common/include/prop/prop_array.h:1.13.22.1 --- src/common/include/prop/prop_array.h:1.13 Fri Sep 30 22:08:18 2011 +++ src/common/include/prop/prop_array.h Tue Oct 30 19:49:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_array.h,v 1.13 2011/09/30 22:08:18 jym Exp $*/ +/* $NetBSD: prop_array.h,v 1.13.22.1 2018/10/30 19:49:07 martin Exp $*/ /*- * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc. @@ -79,9 +79,14 @@ int prop_array_recv_syscall(const struc prop_array_t *); #elif defined(_KERNEL) int prop_array_copyin(const struct plistref *, prop_array_t *); +int prop_array_copyin_size(const struct plistref *, prop_array_t *, + size_t); int prop_array_copyout(struct plistref *, prop_array_t); int prop_array_copyin_ioctl(const struct plistref *, const u_long, prop_array_t *); +int prop_array_copyin_ioctl_size(const struct plistref *, + const u_long, prop_array_t *, + size_t); int prop_array_copyout_ioctl(struct plistref *, const u_long, prop_array_t); #endif Index: src/common/include/prop/prop_dictionary.h diff -u src/common/include/prop/prop_dictionary.h:1.14 src/common/include/prop/prop_dictionary.h:1.14.22.1 --- src/common/include/prop/prop_dictionary.h:1.14 Fri Sep 30 22:08:18 2011 +++ src/common/include/prop/prop_dictionary.h Tue Oct 30 19:49:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary.h,v 1.14 2011/09/30 22:08:18 jym Exp $ */ +/* $NetBSD: prop_dictionary.h,v 1.14.22.1 2018/10/30 19:49:07 martin Exp $ */ /*- * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc. @@ -102,11 +102,16 @@ int prop_dictionary_recv_syscall(const #elif defined(_KERNEL) int prop_dictionary_copyin(const struct plistref *, prop_dictionary_t *); +int prop_dictionary_copyin_size(const struct plistref *, + prop_dictionary_t *, size_t); int prop_dictionary_copyout(struct plistref *, prop_dictionary_t); int prop_dictionary_copyin_ioctl(const struct plistref *, const u_long, prop_dictionary_t *); +int prop_dictionary_copyin_ioctl_size(const struct plistref *, + const u_long, + prop_dictionary_t *, size_t); int prop_dictionary_copyout_ioctl(struct plistref *, const u_long, prop_dictionary_t); Index: src/common/lib/libprop/prop_copyin_ioctl.9 diff -u src/common/lib/libprop/prop_copyin_ioctl.9:1.9 src/common/lib/libprop/prop_copyin_ioctl.9:1.9.26.1 --- src/common/lib/libprop/prop_copyin_ioctl.9:1.9 Thu Jan 20 10:47:33 2011 +++ src/common/lib/libprop/prop_copyin_ioctl.9 Tue Oct 30 19:49:07 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: prop_copyin_ioctl.9,v 1.9 2011/01/20 10:47:33 wiz Exp $ +.\" $NetBSD: prop_copyin_ioctl.9,v 1.9.26.1 2018/10/30 19:49:07 martin Exp $ .\" .\" Copyright (c) 2006, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 17, 2011 +.Dd January 29, 2017 .Dt PROP_COPYIN_IOCTL 9 .Os .Sh NAME @@ -46,9 +46,15 @@ .Fn prop_array_copyin_ioctl "const struct plistref *pref" \ "const u_long cmd" "prop_array_t *arrayp" .Ft int +.Fn prop_array_copyin_ioctl_size "const struct plistref *pref" \ +"const u_long cmd" "prop_array_t *arrayp" "size_t lim" +.Ft int .Fn prop_array_copyin "const s
CVS commit: src
Module Name:src Committed By: kre Date: Tue Oct 30 19:40:36 UTC 2018 Modified Files: src/sbin/dmesg: dmesg.8 dmesg.c src/sys/kern: init_main.c Log Message: Correct the 6 second offset issue between the time reported by dmesg -T and the actual time a message was produced, noted on current-users by Geoff Wing (Oct 27, 2018). The size of the offset would depend upon architecture, and processor, but was the delay from starting the clocks to initialising the time of day (after mounting root, in case that is needed). Change the kernel to set boottime to be the time at which the clocks were started, rather than the time at which it is init'd (by subtracting the interval between). Correct dmesg to properly compute the ToD based upon the boottime (which is a timespec, not a timeval, and has been since Jan 2009) and the time logged in the message. Note that this can (rarely) be 1 second earlier than date reports. This occurs when the time when the message was logged was actually in the next second, but the timecounters have not yet processed the tick, and so the time of the last tick, near the end of the previous second, is reported instead. Since times are always truncated, rather than rounded, it is occasionally possible to observe that disparity (if you try hard enough). IOW: sys/kern/subr_prf.c:addtstamp() uses getnanouptime() rather than nanouptime(). Note in dmesg(8) that -T conversions are gibberish other than when the message comes from current the running kernel. (It could be fixed when -M is used, for messages generated by the kernel whose corpse is being observed. But hasn't been...) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sbin/dmesg/dmesg.8 cvs rdiff -u -r1.40 -r1.41 src/sbin/dmesg/dmesg.c cvs rdiff -u -r1.499 -r1.500 src/sys/kern/init_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/dmesg/dmesg.8 diff -u src/sbin/dmesg/dmesg.8:1.25 src/sbin/dmesg/dmesg.8:1.26 --- src/sbin/dmesg/dmesg.8:1.25 Thu Sep 20 10:03:31 2018 +++ src/sbin/dmesg/dmesg.8 Tue Oct 30 19:40:36 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: dmesg.8,v 1.25 2018/09/20 10:03:31 kre Exp $ +.\" $NetBSD: dmesg.8,v 1.26 2018/10/30 19:40:36 kre Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)dmesg.8 8.1 (Berkeley) 6/5/93 .\" -.Dd September 18, 2018 +.Dd October 30, 2018 .Dt DMESG 8 .Os .Sh NAME @@ -98,6 +98,12 @@ The command appeared in .Bx 3.0 . .Sh BUGS +The +.Fl T +option will report nonsense when displaying lines from +the message buffer that were not added by the current +running kernel. +.Pp When .Fl TT is used, the duration is always given with maximum units of hours, Index: src/sbin/dmesg/dmesg.c diff -u src/sbin/dmesg/dmesg.c:1.40 src/sbin/dmesg/dmesg.c:1.41 --- src/sbin/dmesg/dmesg.c:1.40 Thu Sep 20 23:46:42 2018 +++ src/sbin/dmesg/dmesg.c Tue Oct 30 19:40:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dmesg.c,v 1.40 2018/09/20 23:46:42 kre Exp $ */ +/* $NetBSD: dmesg.c,v 1.41 2018/10/30 19:40:36 kre Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -38,7 +38,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19 #if 0 static char sccsid[] = "@(#)dmesg.c 8.1 (Berkeley) 6/5/93"; #else -__RCSID("$NetBSD: dmesg.c,v 1.40 2018/09/20 23:46:42 kre Exp $"); +__RCSID("$NetBSD: dmesg.c,v 1.41 2018/10/30 19:40:36 kre Exp $"); #endif #endif /* not lint */ @@ -151,7 +151,7 @@ main(int argc, char *argv[]) #ifndef SMALL char tbuf[64]; char *memf, *nlistf; - struct timeval boottime; + struct timespec boottime; struct timespec lasttime; intmax_t sec; long nsec, fsec; @@ -168,7 +168,7 @@ main(int argc, char *argv[]) radix = "."; /* could also select "," */ boottime.tv_sec = 0; - boottime.tv_usec = 0; + boottime.tv_nsec = 0; lasttime.tv_sec = 0; lasttime.tv_nsec = 0; deltas = quiet = humantime = 0; @@ -337,6 +337,13 @@ main(int argc, char *argv[]) struct tm tm; t = boottime.tv_sec + sec; + if (nsec + boottime.tv_nsec >= + ( 1L /* 1 second */ + * 1000L /* ms */ + * 1000L /* us */ + * 1000L /* ns */ )) + t++; + if (localtime_r(&t, &tm) != NULL) { strftime(tbuf, sizeof(tbuf), "%a %b %e %H:%M:%S %Z %Y", Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.499 src/sys/kern/init_main.c:1.500 --- src/sys/kern/init_main.c:1.499 Fri Oct 26 18:16:42 2018 +++ src/sys/kern/init_main.c Tue Oct 30 19:40:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.499 2018/10/26 18:16:42 martin Exp $ */ +/* $NetBSD: init_main.c,v 1.500 2018/10/30 19:40:35 kre Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.499 2018/10/26 18:16:
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Tue Oct 30 19:39:06 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1644 To generate a diff of this commit: cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.111 src/doc/CHANGES-7.0.3:1.1.2.112 --- src/doc/CHANGES-7.0.3:1.1.2.111 Wed Aug 29 07:58:14 2018 +++ src/doc/CHANGES-7.0.3 Tue Oct 30 19:39:06 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.111 2018/08/29 07:58:14 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.112 2018/10/30 19:39:06 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5496,4 +5496,37 @@ xsrc/external/mit/libX11/dist/src/ListEx Fixed crash on invalid reply (CVE-2018-14598) [mrg, ticket #1635] +external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.6 +external/public-domain/tz/dist/Makefile up to 1.1.1.22 +external/public-domain/tz/dist/NEWS up to 1.1.1.24 +external/public-domain/tz/dist/README up to 1.1.1.7 +external/public-domain/tz/dist/TZDATA_VERSION up to 1.14 +external/public-domain/tz/dist/africa up to 1.1.1.17 +external/public-domain/tz/dist/antarctica up to 1.1.1.11 +external/public-domain/tz/dist/asia up to 1.1.1.21 +external/public-domain/tz/dist/australasia up to 1.1.1.16 +external/public-domain/tz/dist/backward up to 1.1.1.9 +external/public-domain/tz/dist/backzone up to 1.1.1.15 +external/public-domain/tz/dist/etcetera up to 1.1.1.3 +external/public-domain/tz/dist/europe up to 1.1.1.23 +external/public-domain/tz/dist/factory up to 1.1.1.3 +external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10 +external/public-domain/tz/dist/leapseconds up to 1.1.1.11 +external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.7 +external/public-domain/tz/dist/northamerica up to 1.1.1.21 +external/public-domain/tz/dist/pacificnew up to 1.1.1.2 +external/public-domain/tz/dist/southamerica up to 1.1.1.15 +external/public-domain/tz/dist/systemv up to 1.1.1.2 +external/public-domain/tz/dist/theory.html up to 1.1.1.6 +external/public-domain/tz/dist/version up to 1.1.1.11 +external/public-domain/tz/dist/yearistype.shup to 1.1.1.2 +external/public-domain/tz/dist/ziguard.awk up to 1.1.1.3 +external/public-domain/tz/dist/zishrink.awk up to 1.1.1.5 +external/public-domain/tz/dist/zone.tab up to 1.1.1.15 +external/public-domain/tz/dist/zone1970.tab up to 1.1.1.17 +external/public-domain/tz/dist/zoneinfo2tdf.pl up to 1.1.1.2 +doc/3RDPARTY (apply patch) + + Updated tzdata to 2018g. + [kre, ticket #1644]
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Tue Oct 30 19:32:07 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Ticket #1644 To generate a diff of this commit: cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-7.1.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.3 diff -u src/doc/CHANGES-7.1.3:1.1.2.18 src/doc/CHANGES-7.1.3:1.1.2.19 --- src/doc/CHANGES-7.1.3:1.1.2.18 Wed Aug 29 07:57:13 2018 +++ src/doc/CHANGES-7.1.3 Tue Oct 30 19:32:07 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.3,v 1.1.2.18 2018/08/29 07:57:13 martin Exp $ +# $NetBSD: CHANGES-7.1.3,v 1.1.2.19 2018/10/30 19:32:07 martin Exp $ A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3 release: @@ -188,3 +188,37 @@ xsrc/external/mit/libX11/dist/src/ListEx Fixed crash on invalid reply (CVE-2018-14598) [mrg, ticket #1635] +external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.6 +external/public-domain/tz/dist/Makefile up to 1.1.1.22 +external/public-domain/tz/dist/NEWS up to 1.1.1.24 +external/public-domain/tz/dist/README up to 1.1.1.7 +external/public-domain/tz/dist/TZDATA_VERSION up to 1.14 +external/public-domain/tz/dist/africa up to 1.1.1.17 +external/public-domain/tz/dist/antarctica up to 1.1.1.11 +external/public-domain/tz/dist/asia up to 1.1.1.21 +external/public-domain/tz/dist/australasia up to 1.1.1.16 +external/public-domain/tz/dist/backward up to 1.1.1.9 +external/public-domain/tz/dist/backzone up to 1.1.1.15 +external/public-domain/tz/dist/etcetera up to 1.1.1.3 +external/public-domain/tz/dist/europe up to 1.1.1.23 +external/public-domain/tz/dist/factory up to 1.1.1.3 +external/public-domain/tz/dist/leap-seconds.list up to 1.1.1.10 +external/public-domain/tz/dist/leapseconds up to 1.1.1.11 +external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.7 +external/public-domain/tz/dist/northamerica up to 1.1.1.21 +external/public-domain/tz/dist/pacificnew up to 1.1.1.2 +external/public-domain/tz/dist/southamerica up to 1.1.1.15 +external/public-domain/tz/dist/systemv up to 1.1.1.2 +external/public-domain/tz/dist/theory.html up to 1.1.1.6 +external/public-domain/tz/dist/version up to 1.1.1.11 +external/public-domain/tz/dist/yearistype.shup to 1.1.1.2 +external/public-domain/tz/dist/ziguard.awk up to 1.1.1.3 +external/public-domain/tz/dist/zishrink.awk up to 1.1.1.5 +external/public-domain/tz/dist/zone.tab up to 1.1.1.15 +external/public-domain/tz/dist/zone1970.tab up to 1.1.1.17 +external/public-domain/tz/dist/zoneinfo2tdf.pl up to 1.1.1.2 +doc/3RDPARTY (apply patch) + + Updated tzdata to 2018g. + [kre, ticket #1644] +
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Tue Oct 30 19:02:51 UTC 2018 Modified Files: src/distrib/sgimips/instkernel [netbsd-7]: Makefile src/sys/arch/sgimips/conf [netbsd-7]: INSTALL32_IP2x src/sys/arch/sgimips/stand/boot [netbsd-7]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1637): sys/arch/sgimips/conf/INSTALL32_IP2x: revision 1.10 sys/arch/sgimips/stand/boot/Makefile: revision 1.20 distrib/sgimips/instkernel/Makefile: revision 1.13 Disable misc options to shrink an INSTALL kernel for IP2x. The ARC BIOS on Indy seems to have ~8MB limit. Fixes PR port-sgimips/53378 from Naruaki Etomi. Should be pulled up to netbsd-7 and netbsd-8. - Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old machines. objcopy(1) was used instead of elf2ecoff(1) since Makefile rev 1.9: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/stand/boot/Makefile#rev1.9 but it looks ELF binaries generated by recent binutils are too complicated to convert them to ecoff for old machines by objcopy(1). Reported by Naruaki Etomi in PR port-sgimips/53519. Should be pulled up to at least netbsd-8. - Use elf2ecoff(1) rather than objcopy(1) to generate ecoff kernel. Reported by Naruaki Etomi in PR port-sgimips/53518. Should be pulled up to netbsd-7 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.4.1 src/distrib/sgimips/instkernel/Makefile cvs rdiff -u -r1.9 -r1.9.22.1 src/sys/arch/sgimips/conf/INSTALL32_IP2x cvs rdiff -u -r1.19 -r1.19.30.1 src/sys/arch/sgimips/stand/boot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sgimips/instkernel/Makefile diff -u src/distrib/sgimips/instkernel/Makefile:1.11 src/distrib/sgimips/instkernel/Makefile:1.11.4.1 --- src/distrib/sgimips/instkernel/Makefile:1.11 Sat Aug 31 10:42:18 2013 +++ src/distrib/sgimips/instkernel/Makefile Tue Oct 30 19:02:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2013/08/31 10:42:18 he Exp $ +# $NetBSD: Makefile,v 1.11.4.1 2018/10/30 19:02:51 martin Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -30,9 +30,7 @@ MDSETTARGETS= INSTALL${NX}_IP2x ${RAMDIS MDSET_RELEASEDIR= binary/kernel MDSET_SUFFIXES.netbsd-INSTALL${NX}_IP2x=ecoff create-ecoff -create-ecoff= ${OBJCOPY} --impure -O ecoff-bigmips \ - -R .pdr -R .mdebug.abi32 -R .comment -R .ident \ - ${.TARGET:R} ${.TARGET} +create-ecoff= ${ELF2ECOFF} ${.TARGET:R} ${.TARGET} IMAGE_RELEASEDIR= installation/diskimage Index: src/sys/arch/sgimips/conf/INSTALL32_IP2x diff -u src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9 src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9.22.1 --- src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9 Sat Feb 4 22:27:26 2012 +++ src/sys/arch/sgimips/conf/INSTALL32_IP2x Tue Oct 30 19:02:51 2018 @@ -5,7 +5,7 @@ # Pull in standard `install' config include "arch/sgimips/conf/GENERIC32_IP2x" -makeoptions COPTS="-Os" +makeoptions COPTS="-Os -mmemcpy" # Enable the hooks used for initializing the root memory-disk. options MEMORY_DISK_HOOKS @@ -13,3 +13,60 @@ options MEMORY_DISK_IS_ROOT options MEMORY_DISK_SERVER=0# no userspace memory disk support options MEMORY_DISK_ROOT_SIZE=6400 # size of memory disk in blocks (3200k) options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode + +# shrink kernel since ARC BIOS seems to have 8MB limit +options FFS_NO_SNAPSHOT + +no options KTRACE +no options SYSVMSG +no options SYSVSEM +no options SYSVSHM +no options SYSCTL_INCLUDE_DESCR +no options COMPAT_15 +no options COMPAT_16 +no options COMPAT_20 +no options COMPAT_30 +no options COMPAT_40 +no options COMPAT_LINUX + +no file-system EXT2FS +no file-system LFS +no file-system NTFS +no file-system FDESC +no file-system KERNFS +no file-system NULLFS +no file-system OVERLAY +no file-system PUFFS +no file-system PROCFS +no file-system UMAPFS +no file-system UNION +no file-system CODA +no file-system TMPFS + +no options QUOTA +no options QUOTA2 +no options NFSSERVER + +no options NETATALK +no options PPP_FILTER + +no options MIIVERBOSE +no options SCSIVERBOSE + +no ch* at scsibus? +no ss* at scsibus? +no ses* at scsibus? +no uk* at scsibus? + +no ppbus* +no lpt* + +no pseudo-device ccd +no pseudo-device fss +no pseudo-device ipfilter +no pseudo-device bridge +no pseudo-device accf_data +no pseudo-device accf_http +no pseudo-device sequencer +no pseudo-device putter +no pseudo-device vcoda Index: src/sys/arch/sgimips/stand/boot/Makefile diff -u src/sys/arch/sgimips/stand/boot/Makefile:1.19 src/sys/arch/sgimips/stand/boot/Makefile:1.19.30.1 --- src/sys/arch/sgimips/stand/boot/Makefile:1.19 Sat Feb 26 16:26:58 2011 +++ src/sys/arch/sgimips/stand/boot/Makefile Tue Oct 30 19:02:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2011/02/26 16:26:58 matt
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Tue Oct 30 16:41:53 UTC 2018 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c src/sys/arch/arm/altera: cycv_platform.c src/sys/arch/arm/broadcom: bcm283x_platform.c src/sys/arch/arm/cavium: thunderx_platform.c src/sys/arch/arm/fdt: arm_fdtvar.h src/sys/arch/arm/nvidia: tegra_platform.c src/sys/arch/arm/rockchip: rk_platform.c src/sys/arch/arm/samsung: exynos_platform.c src/sys/arch/arm/sunxi: sunxi_platform.c src/sys/arch/arm/ti: ti_platform.c src/sys/arch/arm/vexpress: vexpress_platform.c src/sys/arch/arm/virt: virt_platform.c src/sys/arch/evbarm/fdt: fdt_machdep.c Log Message: Retire fdt_putchar and ap_early_put_char in favour of uartputc. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/acpi/acpi_platform.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/altera/cycv_platform.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/broadcom/bcm283x_platform.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cavium/thunderx_platform.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/fdt/arm_fdtvar.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/nvidia/tegra_platform.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/rockchip/rk_platform.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/samsung/exynos_platform.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/sunxi/sunxi_platform.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ti/ti_platform.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/vexpress/vexpress_platform.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/virt/virt_platform.c cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbarm/fdt/fdt_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/arm/acpi/acpi_platform.c diff -u src/sys/arch/arm/acpi/acpi_platform.c:1.5 src/sys/arch/arm/acpi/acpi_platform.c:1.6 --- src/sys/arch/arm/acpi/acpi_platform.c:1.5 Sun Oct 28 10:21:42 2018 +++ src/sys/arch/arm/acpi/acpi_platform.c Tue Oct 30 16:41:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_platform.c,v 1.5 2018/10/28 10:21:42 jmcneill Exp $ */ +/* $NetBSD: acpi_platform.c,v 1.6 2018/10/30 16:41:51 skrll Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include "opt_efi.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.5 2018/10/28 10:21:42 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.6 2018/10/30 16:41:51 skrll Exp $"); #include #include @@ -214,11 +214,6 @@ acpi_platform_init_attach_args(struct fd } static void -acpi_platform_early_putchar(char c) -{ -} - -static void acpi_platform_device_register(device_t self, void *aux) { } @@ -245,7 +240,6 @@ static const struct arm_platform acpi_pl .ap_bootstrap = acpi_platform_bootstrap, .ap_startup = acpi_platform_startup, .ap_init_attach_args = acpi_platform_init_attach_args, - .ap_early_putchar = acpi_platform_early_putchar, .ap_device_register = acpi_platform_device_register, .ap_reset = acpi_platform_reset, .ap_delay = gtmr_delay, Index: src/sys/arch/arm/altera/cycv_platform.c diff -u src/sys/arch/arm/altera/cycv_platform.c:1.5 src/sys/arch/arm/altera/cycv_platform.c:1.6 --- src/sys/arch/arm/altera/cycv_platform.c:1.5 Sun Oct 28 14:58:20 2018 +++ src/sys/arch/arm/altera/cycv_platform.c Tue Oct 30 16:41:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cycv_platform.c,v 1.5 2018/10/28 14:58:20 aymeric Exp $ */ +/* $NetBSD: cycv_platform.c,v 1.6 2018/10/30 16:41:52 skrll Exp $ */ /* This file is in the public domain. */ @@ -6,7 +6,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.5 2018/10/28 14:58:20 aymeric Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.6 2018/10/30 16:41:52 skrll Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -30,7 +30,20 @@ __KERNEL_RCSID(0, "$NetBSD: cycv_platfor #include #include -static void cycv_platform_early_putchar(char); +void cycv_platform_early_putchar(char); + +void +cycv_platform_early_putchar(char c) { +#ifdef CONSADDR +#define CONSADDR_VA (CONSADDR - CYCV_PERIPHERAL_BASE + CYCV_PERIPHERAL_VBASE) + volatile uint32_t *uartaddr = (volatile uint32_t *) CONSADDR_VA; + + while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0) + ; + + uartaddr[com_data] = htole32(c); +#endif +} static const struct pmap_devmap * cycv_platform_devmap(void) { @@ -100,19 +113,6 @@ cycv_platform_init_attach_args(struct fd } static void -cycv_platform_early_putchar(char c) { -#ifdef CONSADDR -#define CONSADDR_VA (CONSADDR - CYCV_PERIPHERAL_BASE + CYCV_PERIPHERAL_VBASE) - volatile uint32_t *uartaddr = (volatile uint32_t *) CONSADDR_VA; - - while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0) - ; - - uartaddr[com_data] = htole32(c); -#endif -} - -static void cycv_platform_device_register(device_t dev, void *aux) { prop_dictionary_t dict = device_properti
CVS commit: src/sys/compat
Module Name:src Committed By: riastradh Date: Tue Oct 30 14:43:39 UTC 2018 Modified Files: src/sys/compat/common: kern_time_30.c src/sys/compat/netbsd32: netbsd32_time.c Log Message: Paranoia: zero COMPAT_30 ntptimeval and 32-bit ntptimeval too. These structs don't have padding but safer to keep the code structured the same way between the various ntp_gettimes in case anyone makes more copypasta of it for future updates. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/kern_time_30.c cvs rdiff -u -r1.49 -r1.50 src/sys/compat/netbsd32/netbsd32_time.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/compat/common/kern_time_30.c diff -u src/sys/compat/common/kern_time_30.c:1.5 src/sys/compat/common/kern_time_30.c:1.6 --- src/sys/compat/common/kern_time_30.c:1.5 Thu Nov 3 03:37:06 2016 +++ src/sys/compat/common/kern_time_30.c Tue Oct 30 14:43:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time_30.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $ */ +/* $NetBSD: kern_time_30.c,v 1.6 2018/10/30 14:43:38 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time_30.c,v 1.5 2016/11/03 03:37:06 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time_30.c,v 1.6 2018/10/30 14:43:38 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_ntp.h" @@ -68,6 +68,7 @@ compat_30_sys_ntp_gettime(struct lwp *l, if (SCARG(uap, ntvp)) { ntp_gettime(&ntv); + memset(&ntv30, 0, sizeof(ntv30)); TIMESPEC_TO_TIMEVAL(&tv, &ntv.time); timeval_to_timeval50(&tv, &ntv30.time); ntv30.maxerror = ntv.maxerror; Index: src/sys/compat/netbsd32/netbsd32_time.c diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.49 src/sys/compat/netbsd32/netbsd32_time.c:1.50 --- src/sys/compat/netbsd32/netbsd32_time.c:1.49 Sun Feb 26 10:26:19 2017 +++ src/sys/compat/netbsd32/netbsd32_time.c Tue Oct 30 14:43:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $ */ +/* $NetBSD: netbsd32_time.c,v 1.50 2018/10/30 14:43:38 riastradh Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.50 2018/10/30 14:43:38 riastradh Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -66,6 +66,7 @@ netbsd32___ntp_gettime50(struct lwp *l, if (SCARG_P32(uap, ntvp)) { ntp_gettime(&ntv); + memset(&ntv32, 0, sizeof(ntv32)); ntv32.time.tv_sec = ntv.time.tv_sec; ntv32.time.tv_nsec = ntv.time.tv_nsec; ntv32.maxerror = (netbsd32_long)ntv.maxerror; @@ -96,6 +97,7 @@ compat_50_netbsd32_ntp_gettime(struct lw if (SCARG_P32(uap, ntvp)) { ntp_gettime(&ntv); + memset(&ntv32, 0, sizeof(ntv32)); ntv32.time.tv_sec = (int32_t)ntv.time.tv_sec; ntv32.time.tv_nsec = ntv.time.tv_nsec; ntv32.maxerror = (netbsd32_long)ntv.maxerror; @@ -126,6 +128,7 @@ compat_30_netbsd32_ntp_gettime(struct lw if (SCARG_P32(uap, ntvp)) { ntp_gettime(&ntv); + memset(&ntv32, 0, sizeof(ntv32)); ntv32.time.tv_sec = ntv.time.tv_sec; ntv32.time.tv_usec = ntv.time.tv_nsec / 1000; ntv32.maxerror = (netbsd32_long)ntv.maxerror;
CVS commit: src/sys/compat/common
Module Name:src Committed By: riastradh Date: Tue Oct 30 14:35:16 UTC 2018 Modified Files: src/sys/compat/common: kern_time_50.c Log Message: Zero ntptimeval50 too to prevent 4-byte kernel stack disclosure. >From Thomas Barabosch of Fraunhofer FKIE. XXX pullup-7, pullup-8 (along with rev. 1.60 of kern_ntptime.c) To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/compat/common/kern_time_50.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/compat/common/kern_time_50.c diff -u src/sys/compat/common/kern_time_50.c:1.31 src/sys/compat/common/kern_time_50.c:1.32 --- src/sys/compat/common/kern_time_50.c:1.31 Fri Mar 11 18:32:29 2016 +++ src/sys/compat/common/kern_time_50.c Tue Oct 30 14:35:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time_50.c,v 1.31 2016/03/11 18:32:29 christos Exp $ */ +/* $NetBSD: kern_time_50.c,v 1.32 2018/10/30 14:35:16 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.31 2016/03/11 18:32:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.32 2018/10/30 14:35:16 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_aio.h" @@ -526,6 +526,7 @@ compat_50_sys___ntp_gettime30(struct lwp if (SCARG(uap, ntvp)) { ntp_gettime(&ntv); + memset(&ntv50, 0, sizeof(ntv50)); timespec_to_timespec50(&ntv.time, &ntv50.time); ntv50.maxerror = ntv.maxerror; ntv50.esterror = ntv.esterror;
CVS commit: [netbsd-7] src/usr.bin/systat
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:54:25 UTC 2018 Modified Files: src/usr.bin/systat [netbsd-7]: main.c Log Message: Pull up the following revisions(s) (requested by mrg in ticket #1639): usr.bin/systat/main.c: revision 1.52 via patch Add missing 'b' to the list of options. Alpha-sort the option handling. To generate a diff of this commit: cvs rdiff -u -r1.48.2.1 -r1.48.2.2 src/usr.bin/systat/main.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/systat/main.c diff -u src/usr.bin/systat/main.c:1.48.2.1 src/usr.bin/systat/main.c:1.48.2.2 --- src/usr.bin/systat/main.c:1.48.2.1 Mon Sep 4 06:04:06 2017 +++ src/usr.bin/systat/main.c Tue Oct 30 10:54:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.48.2.1 2017/09/04 06:04:06 snj Exp $ */ +/* $NetBSD: main.c,v 1.48.2.2 2018/10/30 10:54:25 sborrill Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: main.c,v 1.48.2.1 2017/09/04 06:04:06 snj Exp $"); +__RCSID("$NetBSD: main.c,v 1.48.2.2 2018/10/30 10:54:25 sborrill Exp $"); #endif /* not lint */ #include @@ -102,7 +102,7 @@ main(int argc, char **argv) egid = getegid(); (void)setegid(getgid()); - while ((ch = getopt(argc, argv, "M:N:nw:t:")) != -1) + while ((ch = getopt(argc, argv, "M:N:bnw:t:")) != -1) switch(ch) { case 'M': memf = optarg; @@ -110,19 +110,19 @@ main(int argc, char **argv) case 'N': nlistf = optarg; break; + case 'b': + bflag = !bflag; + break; case 'n': nflag = !nflag; break; - case 'w': - if ((naptime = atoi(optarg)) <= 0) -errx(1, "interval <= 0."); - break; case 't': if ((turns = atoi(optarg)) <= 0) errx(1, "turns <= 0."); break; - case 'b': - bflag = !bflag; + case 'w': + if ((naptime = strtod(optarg, NULL)) <= 0) +errx(1, "interval <= 0."); break; case '?': default:
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:54:41 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1639 To generate a diff of this commit: cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.9 src/doc/CHANGES-7.3:1.1.2.10 --- src/doc/CHANGES-7.3:1.1.2.9 Tue Oct 30 10:17:52 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 10:54:41 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.9 2018/10/30 10:17:52 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.10 2018/10/30 10:54:41 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -106,3 +106,9 @@ sys/arch/pmax/pmax/dec_3min.c 1.74 Addresses PR port-pmax/53611 [tsutsui, #1641] +usr.bin/systat/main.c1.52 via patch + + Add missing 'b' to the list of options. + Alpha-sort the option handling. + [mrg, ticket #1639] +
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Tue Oct 30 10:38:11 UTC 2018 Modified Files: src/sys/arch/arm/cortex: gtmr.c Log Message: Disable diagnostic assertions around timer jitter on Allwinner A64. It seems the instability of CNTVCT can cause issues with the compare value, and rather than applying a heavy workaround just skip the panics. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/cortex/gtmr.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/cortex/gtmr.c diff -u src/sys/arch/arm/cortex/gtmr.c:1.36 src/sys/arch/arm/cortex/gtmr.c:1.37 --- src/sys/arch/arm/cortex/gtmr.c:1.36 Sun Sep 30 10:34:38 2018 +++ src/sys/arch/arm/cortex/gtmr.c Tue Oct 30 10:38:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gtmr.c,v 1.36 2018/09/30 10:34:38 skrll Exp $ */ +/* $NetBSD: gtmr.c,v 1.37 2018/10/30 10:38:11 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.36 2018/09/30 10:34:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.37 2018/10/30 10:38:11 jmcneill Exp $"); #include #include @@ -272,11 +272,14 @@ gtmr_intr(void *arg) uint64_t delta = now - ci->ci_lastintr; #ifdef DIAGNOSTIC - const uint64_t then = gtmr_cntv_cval_read(); - struct gtmr_percpu * const pc = percpu_getref(sc->sc_percpu); - KASSERTMSG(then <= now, "%"PRId64, now - then); - KASSERTMSG(then + pc->pc_delta >= ci->ci_lastintr + sc->sc_autoinc, - "%"PRId64, then + pc->pc_delta - ci->ci_lastintr - sc->sc_autoinc); + struct gtmr_percpu *pc = NULL; + if (!ISSET(sc->sc_flags, GTMR_FLAG_SUN50I_A64_UNSTABLE_TIMER)) { + const uint64_t then = gtmr_cntv_cval_read(); + pc = percpu_getref(sc->sc_percpu); + KASSERTMSG(then <= now, "%"PRId64, now - then); + KASSERTMSG(then + pc->pc_delta >= ci->ci_lastintr + sc->sc_autoinc, + "%"PRId64, then + pc->pc_delta - ci->ci_lastintr - sc->sc_autoinc); + } #endif KASSERTMSG(delta > sc->sc_autoinc / 100, @@ -298,9 +301,11 @@ gtmr_intr(void *arg) ci->ci_lastintr = now; #ifdef DIAGNOSTIC - KASSERT(delta == (uint32_t) delta); - pc->pc_delta = delta; - percpu_putref(sc->sc_percpu); + if (!ISSET(sc->sc_flags, GTMR_FLAG_SUN50I_A64_UNSTABLE_TIMER)) { + KASSERT(delta == (uint32_t) delta); + pc->pc_delta = delta; + percpu_putref(sc->sc_percpu); + } #endif hardclock(cf);
CVS commit: [netbsd-7] src/sys/arch/pmax/pmax
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:17:23 UTC 2018 Modified Files: src/sys/arch/pmax/pmax [netbsd-7]: dec_3min.c Log Message: Pull up the following revisions(s) (requested by tsutsui in ticket #1641): sys/arch/pmax/pmax/dec_3min.c: revision 1.74 Fix hangup after framebuffers are attached on 3MIN. Addresses PR port-pmax/53611 To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.73.4.1 src/sys/arch/pmax/pmax/dec_3min.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/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.73 src/sys/arch/pmax/pmax/dec_3min.c:1.73.4.1 --- src/sys/arch/pmax/pmax/dec_3min.c:1.73 Mon Mar 24 19:31:40 2014 +++ src/sys/arch/pmax/pmax/dec_3min.c Tue Oct 30 10:17:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $ */ +/* $NetBSD: dec_3min.c,v 1.73.4.1 2018/10/30 10:17:23 sborrill Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.73.4.1 2018/10/30 10:17:23 sborrill Exp $"); #include #include @@ -292,12 +292,7 @@ dec_3min_intr_establish(device_t dev, vo case SYS_DEV_OPT0: case SYS_DEV_OPT1: case SYS_DEV_OPT2: - /* it's an option slot */ - { - int s = splhigh(); - s |= mask; - splx(s); - } + /* it's an option slot and handled via MIPS_INT_MASK_[012] */ break; default: /* it's a baseboard device going via the IOASIC */
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:17:52 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1641 To generate a diff of this commit: cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.8 src/doc/CHANGES-7.3:1.1.2.9 --- src/doc/CHANGES-7.3:1.1.2.8 Tue Oct 30 10:14:55 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 10:17:52 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.8 2018/10/30 10:14:55 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.9 2018/10/30 10:17:52 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -100,3 +100,9 @@ usr.sbin/sysinst/arch/sgimips/md.c 1.5- Make sure to install a bootloader even on upgrade installation. [tsutsui, #1640] +sys/arch/pmax/pmax/dec_3min.c 1.74 + + Fix hangup after framebuffers are attached on 3MIN. + Addresses PR port-pmax/53611 + [tsutsui, #1641] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:14:55 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1640 To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.7 src/doc/CHANGES-7.3:1.1.2.8 --- src/doc/CHANGES-7.3:1.1.2.7 Tue Oct 30 10:07:52 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 10:14:55 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.7 2018/10/30 10:07:52 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.8 2018/10/30 10:14:55 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -93,3 +93,10 @@ usr.bin/find/function.c1.77 form part of what is allowed in ARG_MAX. [mrg, ticket #1642] +usr.sbin/sysinst/arch/sgimips/md.c 1.5-1.6 + + PR port-sgimips/53583: fetch kernel name always before using it. + Make the struct utsname local to avoid future similar issues. + Make sure to install a bootloader even on upgrade installation. + [tsutsui, #1640] +
CVS commit: [netbsd-7] src/usr.sbin/sysinst/arch/sgimips
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:14:21 UTC 2018 Modified Files: src/usr.sbin/sysinst/arch/sgimips [netbsd-7]: md.c Log Message: Pull up the following revisions(s) (requested by tsutsui in ticket #1640): usr.sbin/sysinst/arch/sgimips/md.c: revision 1.5-1.6 PR port-sgimips/53583: fetch kernel name always before using it. Make the struct utsname local to avoid future similar issues. Make sure to install a bootloader even on upgrade installation. To generate a diff of this commit: cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/usr.sbin/sysinst/arch/sgimips/md.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/sysinst/arch/sgimips/md.c diff -u src/usr.sbin/sysinst/arch/sgimips/md.c:1.2.4.2 src/usr.sbin/sysinst/arch/sgimips/md.c:1.2.4.3 --- src/usr.sbin/sysinst/arch/sgimips/md.c:1.2.4.2 Wed Mar 21 11:42:17 2018 +++ src/usr.sbin/sysinst/arch/sgimips/md.c Tue Oct 30 10:14:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.2.4.2 2018/03/21 11:42:17 martin Exp $ */ +/* $NetBSD: md.c,v 1.2.4.3 2018/10/30 10:14:21 sborrill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -51,7 +51,6 @@ #include "msg_defs.h" #include "menu_defs.h" -struct utsname instsys; void md_init(void) @@ -61,13 +60,15 @@ md_init(void) void md_init_set_status(int flags) { + struct utsname instsys; + (void)flags; /* * Get the name of the Install Kernel we are running under and * enable the installation of the corresponding GENERIC kernel. */ -uname(&instsys); + uname(&instsys); if (strstr(instsys.version, "(INSTALL32_IP3x")) set_kernel_set(SET_KERNEL_2); else if (strstr(instsys.version, "(INSTALL32_IP2x")) @@ -156,7 +157,10 @@ md_pre_disklabel(void) int md_post_disklabel(void) { -if (strstr(instsys.version, "(INSTALL32_IP3x")) + struct utsname instsys; + uname(&instsys); + + if (strstr(instsys.version, "(INSTALL32_IP3x")) return run_program(RUN_DISPLAY, "%s %s", "/usr/mdec/sgivol -f -w boot /usr/mdec/ip3xboot", pm->diskdev); @@ -194,9 +198,12 @@ md_post_extract(void) void md_cleanup_install(void) { + struct utsname instsys; + #ifndef DEBUG enable_rc_conf(); #endif + uname(&instsys); if (strstr(instsys.version, "(GENERIC32_IP12")) run_program(0, "/usr/mdec/sgivol -f -w netbsd %s %s", @@ -213,7 +220,7 @@ md_pre_update(void) int md_update(void) { - md_post_newfs(); + md_post_disklabel(); return 1; }
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:07:52 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1642 To generate a diff of this commit: cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.6 src/doc/CHANGES-7.3:1.1.2.7 --- src/doc/CHANGES-7.3:1.1.2.6 Tue Oct 30 09:57:05 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 10:07:52 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.6 2018/10/30 09:57:05 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.7 2018/10/30 10:07:52 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -85,3 +85,11 @@ sys/dev/hpc/hpckbd.c1.33-1.35 Fix kernel crash on hpcmips when console is attached. [rin, ticket #1638] +usr.bin/find/function.c1.77 + + When calculating the length of the args that can be + appended in a "find -exec something {} +" + usage, remember to allow for the arg pointers, which + form part of what is allowed in ARG_MAX. + [mrg, ticket #1642] +
CVS commit: [netbsd-7] src/usr.bin/find
Module Name:src Committed By: sborrill Date: Tue Oct 30 10:07:08 UTC 2018 Modified Files: src/usr.bin/find [netbsd-7]: function.c Log Message: Pull up the following revisions(s) (requested by mrg in ticket #1642): usr.bin/find/function.c:revision 1.77 When calculating the length of the args that can be appended in a "find -exec something {} +" usage, remember to allow for the arg pointers, which form part of what is allowed in ARG_MAX. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.72.6.1 src/usr.bin/find/function.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/find/function.c diff -u src/usr.bin/find/function.c:1.72 src/usr.bin/find/function.c:1.72.6.1 --- src/usr.bin/find/function.c:1.72 Sat May 4 06:29:32 2013 +++ src/usr.bin/find/function.c Tue Oct 30 10:07:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: function.c,v 1.72 2013/05/04 06:29:32 uebayasi Exp $ */ +/* $NetBSD: function.c,v 1.72.6.1 2018/10/30 10:07:08 sborrill Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: function.c,v 1.72 2013/05/04 06:29:32 uebayasi Exp $"); +__RCSID("$NetBSD: function.c,v 1.72.6.1 2018/10/30 10:07:08 sborrill Exp $"); #endif #endif /* not lint */ @@ -669,7 +669,9 @@ c_exec(char ***argvp, int isok) size_t c, bufsize; cnt = ap - *argvp - 1; /* units are words */ - new->ep_maxargs = 5000; + new->ep_maxargs = ARG_MAX / (sizeof (char *) + 16); + if (new->ep_maxargs > 5000) + new->ep_maxargs = 5000; new->e_argv = emalloc((cnt + new->ep_maxargs) * sizeof(*new->e_argv)); @@ -690,7 +692,9 @@ c_exec(char ***argvp, int isok) errx(1, "Arguments too long"); new->e_argv[cnt] = *argv; } - bufsize = MAXARG - c; + if (c + new->ep_maxargs * sizeof (char *) >= MAXARG) + errx(1, "Arguments too long"); + bufsize = MAXARG - c - new->ep_maxargs * sizeof (char *); /* * Allocate, and then initialize current, base, and
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 09:57:05 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1638 To generate a diff of this commit: cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.5 src/doc/CHANGES-7.3:1.1.2.6 --- src/doc/CHANGES-7.3:1.1.2.5 Tue Oct 30 08:36:19 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 09:57:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.5 2018/10/30 08:36:19 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.6 2018/10/30 09:57:05 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -80,3 +80,8 @@ sys/dev/pci/if_wm.c1.589 INTx interrupt (Xen dom0 or pre netbsd-8). [msaitoh, ticket #1647] +sys/dev/hpc/hpckbd.c1.33-1.35 + + Fix kernel crash on hpcmips when console is attached. + [rin, ticket #1638] +
CVS commit: [netbsd-7] src/sys/dev/hpc
Module Name:src Committed By: sborrill Date: Tue Oct 30 09:56:41 UTC 2018 Modified Files: src/sys/dev/hpc [netbsd-7]: hpckbd.c Log Message: Pull up the following revisions(s) (requested by rin in ticket #1638): sys/dev/hpc/hpckbd.c: revision 1.33-1.35 Fix kernel crash on hpcmips when console is attached. To generate a diff of this commit: cvs rdiff -u -r1.30.12.2 -r1.30.12.3 src/sys/dev/hpc/hpckbd.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/hpc/hpckbd.c diff -u src/sys/dev/hpc/hpckbd.c:1.30.12.2 src/sys/dev/hpc/hpckbd.c:1.30.12.3 --- src/sys/dev/hpc/hpckbd.c:1.30.12.2 Wed Aug 9 06:48:57 2017 +++ src/sys/dev/hpc/hpckbd.c Tue Oct 30 09:56:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hpckbd.c,v 1.30.12.2 2017/08/09 06:48:57 snj Exp $ */ +/* $NetBSD: hpckbd.c,v 1.30.12.3 2018/10/30 09:56:41 sborrill Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.30.12.2 2017/08/09 06:48:57 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.30.12.3 2018/10/30 09:56:41 sborrill Exp $"); #include #include @@ -261,10 +261,11 @@ hpckbd_getevent(struct hpckbd_core* hc, } -#ifdef hpcsh +#if defined(hpcsh) || defined(hpcmips) /* - * XXX: Use the old wrong code for now as hpcsh attaches console very - * early and it's convenient to be able to do early DDB on wscons. + * XXX: Use the old wrong code for now as hpcsh and hpcmips attach + * console very early when malloc(9) is not yet available. It is + * convenient to be able to do early DDB on wscons. */ void hpckbd_keymap_setup(struct hpckbd_core *hc, @@ -278,8 +279,9 @@ hpckbd_keymap_setup(struct hpckbd_core * * XXX The way this is done is really wrong. The __UNCONST() * is a hint as to what is wrong. This actually ends up modifying * initialized data which is marked "const". - * The reason we get away with it here is that on sh3 kernel - * is directly mapped. + * + * The reason we get away with it here is that on sh3 and mips + * the kernel is directly mapped. */ desc = (struct wscons_keydesc *)__UNCONST(hpckbd_keymapdata.keydesc); for (i = 0; desc[i].name != 0; i++) {
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 09:32:48 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1074 To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.41 src/doc/CHANGES-8.1:1.1.2.42 --- src/doc/CHANGES-8.1:1.1.2.41 Tue Oct 30 09:26:05 2018 +++ src/doc/CHANGES-8.1 Tue Oct 30 09:32:48 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.41 2018/10/30 09:26:05 sborrill Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.42 2018/10/30 09:32:48 sborrill Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1499,3 +1499,16 @@ sys/dev/pci/if_wm.c1.589 INTx interrupt (Xen dom0 or pre netbsd-8). [msaitoh, ticket #1075] +sys/dev/pci/pci_subr.c1.204-1.206 +sys/dev/pci/pcireg.h1.141-1.142 + + Root Complex Event Collector Bus Number Association ECN. + - If capability version is 2 (or greater), decode RCEC + Associated Bus Numbers register. + - Don't print TPH requester's ST Table Size if the ST table + location field is not PCI_TPH_REQ_STTBLLOC_TPHREQ because + the size field is only applicable for + PCI_TPH_REQ_STTBLLOC_TPHREQ case. + - Add comment. + [msaitoh, ticket #1074] +
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: sborrill Date: Tue Oct 30 09:32:32 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h Log Message: Pull up the following revisions(s) (requested by msaitoh in ticket #1074): sys/dev/pci/pci_subr.c: revision 1.204-1.206 sys/dev/pci/pcireg.h: revision 1.141-1.142 Root Complex Event Collector Bus Number Association ECN. - If capability version is 2 (or greater), decode RCEC Associated Bus Numbers register. - Don't print TPH requester's ST Table Size if the ST table location field is not PCI_TPH_REQ_STTBLLOC_TPHREQ because the size field is only applicable for PCI_TPH_REQ_STTBLLOC_TPHREQ case. - Add comment. To generate a diff of this commit: cvs rdiff -u -r1.183.2.7 -r1.183.2.8 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.130.2.6 -r1.130.2.7 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.183.2.7 src/sys/dev/pci/pci_subr.c:1.183.2.8 --- src/sys/dev/pci/pci_subr.c:1.183.2.7 Sun Sep 23 17:40:37 2018 +++ src/sys/dev/pci/pci_subr.c Tue Oct 30 09:32:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.183.2.7 2018/09/23 17:40:37 martin Exp $ */ +/* $NetBSD: pci_subr.c,v 1.183.2.8 2018/10/30 09:32:32 sborrill Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.7 2018/09/23 17:40:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.8 2018/10/30 09:32:32 sborrill Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -3061,6 +3061,18 @@ pci_conf_print_rcec_assoc_cap(const pcir reg = regs[o2i(extcapoff + PCI_RCEC_ASSOC_ASSOCBITMAP)]; printf("Association Bitmap for Root Complex Integrated Devices:" " 0x%08x\n", reg); + + if (PCI_EXTCAPLIST_VERSION(regs[o2i(extcapoff)]) >= 2) { + reg = regs[o2i(extcapoff + PCI_RCEC_ASSOC_ASSOCBUSNUM)]; + printf("RCEC Associated Bus Numbers register: 0x%08x\n", + reg); + printf(" RCEC Next Bus: %u\n", + (unsigned int)__SHIFTOUT(reg, + PCI_RCEC_ASSOCBUSNUM_RCECNEXT)); + printf(" RCEC Last Bus: %u\n", + (unsigned int)__SHIFTOUT(reg, + PCI_RCEC_ASSOCBUSNUM_RCECLAST)); + } } /* XXX pci_conf_print_mfvc_cap */ @@ -3526,7 +3538,7 @@ static void pci_conf_print_tph_req_cap(const pcireg_t *regs, int extcapoff) { pcireg_t reg; - int size, i, j; + int size = 0, i, j; uint8_t sttbloc; printf("\n TPH Requester Extended Capability\n"); @@ -3540,8 +3552,10 @@ pci_conf_print_tph_req_cap(const pcireg_ sttbloc = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLLOC); printf(" ST Table Location: %s\n", pci_conf_print_tph_req_cap_sttabloc(sttbloc)); - size = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLSIZ) + 1; - printf(" ST Table Size: %d\n", size); + if (sttbloc == PCI_TPH_REQ_STTBLLOC_TPHREQ) { + size = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLSIZ) + 1; + printf(" ST Table Size: %d\n", size); + } reg = regs[o2i(extcapoff + PCI_TPH_REQ_CTL)]; printf("TPH Requester Control register: 0x%08x\n", reg); @@ -4700,19 +4714,19 @@ pci_conf_print( /* device-dependent header */ printf(" Device-dependent header:\n"); pci_conf_print_regs(regs, endoff, PCI_CONF_SIZE); - printf("\n"); #ifdef _KERNEL + printf("\n"); if (printfn) (*printfn)(pc, tag, regs); else printf("Don't know how to pretty-print device-dependent header.\n"); - printf("\n"); #endif /* _KERNEL */ if (regs[o2i(PCI_EXTCAPLIST_BASE)] == 0x || regs[o2i(PCI_EXTCAPLIST_BASE)] == 0) return; + printf("\n"); #ifdef _KERNEL pci_conf_print_extcaplist(pc, tag, regs); #else Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.130.2.6 src/sys/dev/pci/pcireg.h:1.130.2.7 --- src/sys/dev/pci/pcireg.h:1.130.2.6 Sun Sep 23 17:40:37 2018 +++ src/sys/dev/pci/pcireg.h Tue Oct 30 09:32:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.130.2.6 2018/09/23 17:40:37 martin Exp $ */ +/* $NetBSD: pcireg.h,v 1.130.2.7 2018/10/30 09:32:32 sborrill Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -1186,8 +1186,8 @@ struct pci_msix_table_entry { uint32_t pci_msix_vector_control; }; #define PCI_MSIX_VECTCTL_MASK __BIT(0) -#define PCI_MSIX_VECTCTL_STLO __BITS(23, 16) -#define PCI_MSIX_VECTCTL_STUP __BITS(31, 24) +#define PCI_MSIX_VECTCTL_STLO __BITS(23, 16) /* ST lower */ +#define PCI_MSIX_VECTCTL_STUP __BITS(31, 24) /* ST upper */ /* Max number of MSI-X vectors. See PCI-SIG specification. */ #define PCI_MSIX_MAX_VECTORS 2048 @@ -1699,7 +1699,10 @@ struct pci_rom { * Extended capability ID: 0x0007 * Root Complex Event Collector Association */ -#define PCI_RCEC_ASSOC_ASSOCBITMAP 0x04 +#define PCI_RCEC_ASSOC_ASSOCBITMAP 0x04 /* Association Bitmap */ +#define PCI_RCEC_ASSOC_ASSOCBUSNUM 0x08 /* Associcated Bus Number */ +#def
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 09:26:05 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1075 To generate a diff of this commit: cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.40 src/doc/CHANGES-8.1:1.1.2.41 --- src/doc/CHANGES-8.1:1.1.2.40 Fri Oct 26 15:14:46 2018 +++ src/doc/CHANGES-8.1 Tue Oct 30 09:26:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.40 2018/10/26 15:14:46 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.41 2018/10/30 09:26:05 sborrill Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1493,4 +1493,9 @@ tools/Makefile.gnuhost(apply patch) standards, and this version of gcc has not been adapted. [maya, ticket #1070] +sys/dev/pci/if_wm.c1.589 + + Fix KASSERT to prevent panic on CNP(Intel 300 series + I219) with + INTx interrupt (Xen dom0 or pre netbsd-8). + [msaitoh, ticket #1075]
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: sborrill Date: Tue Oct 30 09:25:13 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: if_wm.c Log Message: Pull up the following revisions(s) (requested by msaitoh in ticket #1075): sys/dev/pci/if_wm.c:revision 1.589 Fix KASSERT to prevent panic on CNP (Intel 300 series + I219) with INTx interrupt (Xen dom0 or pre netbsd-8) To generate a diff of this commit: cvs rdiff -u -r1.508.4.23 -r1.508.4.24 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.508.4.23 src/sys/dev/pci/if_wm.c:1.508.4.24 --- src/sys/dev/pci/if_wm.c:1.508.4.23 Sun Sep 23 17:39:02 2018 +++ src/sys/dev/pci/if_wm.c Tue Oct 30 09:25:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.508.4.23 2018/09/23 17:39:02 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.508.4.24 2018/10/30 09:25:13 sborrill Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.23 2018/09/23 17:39:02 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.24 2018/10/30 09:25:13 sborrill Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -14789,7 +14789,8 @@ wm_legacy_irq_quirk_spt(struct wm_softc DPRINTF(WM_DEBUG_INIT, ("%s: %s called\n", device_xname(sc->sc_dev), __func__)); - KASSERT(sc->sc_type == WM_T_PCH_SPT); + KASSERT((sc->sc_type == WM_T_PCH_SPT) + || (sc->sc_type == WM_T_PCH_CNP)); reg = CSR_READ(sc, WMREG_FEXTNVM7); reg |= FEXTNVM7_SIDE_CLK_UNGATE;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: martin Date: Tue Oct 30 09:06:07 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: mk.generic Log Message: When BOARDTYPE is not set, use MACHINE_ARCH for the image name. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/mk.generic 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/mk.generic diff -u src/sys/arch/evbarm/conf/mk.generic:1.4 src/sys/arch/evbarm/conf/mk.generic:1.5 --- src/sys/arch/evbarm/conf/mk.generic:1.4 Tue Oct 30 08:59:09 2018 +++ src/sys/arch/evbarm/conf/mk.generic Tue Oct 30 09:06:07 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mk.generic,v 1.4 2018/10/30 08:59:09 skrll Exp $ +# $NetBSD: mk.generic,v 1.5 2018/10/30 09:06:07 martin Exp $ .include "$S/arch/arm/nvidia/tegra_xusb-fw.mk" @@ -13,7 +13,7 @@ _OSRELEASE!= ${HOST_SH} $S/conf/osrelea MKUBOOTIMAGEARGS= -A arm -T kernel_noload -O linux MKUBOOTIMAGEARGS+= -e 0 -MKUBOOTIMAGEARGS+= -n "NetBSD/${BOARDTYPE?${BOARDTYPE} :}${_OSRELEASE}" +MKUBOOTIMAGEARGS+= -n "NetBSD/${BOARDTYPE:U${MACHINE_ARCH}} ${_OSRELEASE}" MKUBOOTIMAGEARGS_NONE= ${MKUBOOTIMAGEARGS} -C none MKUBOOTIMAGEARGS_GZ= ${MKUBOOTIMAGEARGS} -C gz
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Tue Oct 30 09:05:51 UTC 2018 Modified Files: src/sys/arch/arm/arm: disassem.c Log Message: Allow setend be decode To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/arm/arm/disassem.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/disassem.c diff -u src/sys/arch/arm/arm/disassem.c:1.39 src/sys/arch/arm/arm/disassem.c:1.40 --- src/sys/arch/arm/arm/disassem.c:1.39 Sat Jun 3 11:51:59 2017 +++ src/sys/arch/arm/arm/disassem.c Tue Oct 30 09:05:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: disassem.c,v 1.39 2017/06/03 11:51:59 skrll Exp $ */ +/* $NetBSD: disassem.c,v 1.40 2018/10/30 09:05:51 skrll Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe. @@ -49,7 +49,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.39 2017/06/03 11:51:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.40 2018/10/30 09:05:51 skrll Exp $"); #include @@ -134,7 +134,7 @@ static const struct arm32_insn arm32_i[] * miscellaneous instructions */ { 0xfff10020, 0xf100, "cps", "C!c" }, -{ 0xfff100f0, 0xf101, "setend\tle", "" }, +{ 0xfff102f0, 0xf101, "setend\tle", "" }, { 0xfff102f0, 0xf1010200, "setend\tbe", "" }, /* pli */ /* pld */
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Tue Oct 30 08:59:09 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: mk.generic Log Message: Don't forget EXTRA_LINKFLAGS+= --be8 for BE kernels To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/mk.generic 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/mk.generic diff -u src/sys/arch/evbarm/conf/mk.generic:1.3 src/sys/arch/evbarm/conf/mk.generic:1.4 --- src/sys/arch/evbarm/conf/mk.generic:1.3 Mon Oct 29 13:53:23 2018 +++ src/sys/arch/evbarm/conf/mk.generic Tue Oct 30 08:59:09 2018 @@ -1,7 +1,11 @@ -# $NetBSD: mk.generic,v 1.3 2018/10/29 13:53:23 martin Exp $ +# $NetBSD: mk.generic,v 1.4 2018/10/30 08:59:09 skrll Exp $ .include "$S/arch/arm/nvidia/tegra_xusb-fw.mk" +.if !empty(MACHINE_ARCH:M*eb) +EXTRA_LINKFLAGS+= --be8 +.endif + SYSTEM_FIRST_OBJ= armv6_start.o SYSTEM_FIRST_SFILE= ${ARM}/arm/armv6_start.S
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Tue Oct 30 08:36:19 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1647 To generate a diff of this commit: cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.4 src/doc/CHANGES-7.3:1.1.2.5 --- src/doc/CHANGES-7.3:1.1.2.4 Mon Oct 15 08:05:43 2018 +++ src/doc/CHANGES-7.3 Tue Oct 30 08:36:19 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.4 2018/10/15 08:05:43 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.5 2018/10/30 08:36:19 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -74,3 +74,9 @@ sbin/gpt/gpt.c 1.76 Should fix PR 53668. [mlelstv, ticket #1643] +sys/dev/pci/if_wm.c1.589 + + Fix KASSERT to prevent panic on CNP(Intel 300 series + I219) with + INTx interrupt (Xen dom0 or pre netbsd-8). + [msaitoh, ticket #1647] +
CVS commit: [netbsd-7] src/sys/dev/pci
Module Name:src Committed By: sborrill Date: Tue Oct 30 08:35:56 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-7]: if_wm.c Log Message: Pull up the following revisions(s) (requested by msaitoh in ticket #1647): sys/dev/pci/if_wm.c:revision 1.589 Fix KASSERT to prevent panic on CNP (Intel 300 series + I219) with INTx interrupt (Xen dom0 or pre netbsd-8) To generate a diff of this commit: cvs rdiff -u -r1.289.2.15 -r1.289.2.16 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.289.2.15 src/sys/dev/pci/if_wm.c:1.289.2.16 --- src/sys/dev/pci/if_wm.c:1.289.2.15 Sat Aug 11 13:34:20 2018 +++ src/sys/dev/pci/if_wm.c Tue Oct 30 08:35:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.289.2.15 2018/08/11 13:34:20 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.289.2.16 2018/10/30 08:35:56 sborrill Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.15 2018/08/11 13:34:20 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.16 2018/10/30 08:35:56 sborrill Exp $"); #include #include @@ -12523,7 +12523,8 @@ wm_legacy_irq_quirk_spt(struct wm_softc DPRINTF(WM_DEBUG_INIT, ("%s: %s called\n", device_xname(sc->sc_dev), __func__)); - KASSERT(sc->sc_type == WM_T_PCH_SPT); + KASSERT((sc->sc_type == WM_T_PCH_SPT) + || (sc->sc_type == WM_T_PCH_CNP)); reg = CSR_READ(sc, WMREG_FEXTNVM7); reg |= FEXTNVM7_SIDE_CLK_UNGATE;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Tue Oct 30 07:51:09 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC Log Message: Merge SUNXI completely into GENERIC To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.10 src/sys/arch/evbarm/conf/GENERIC:1.11 --- src/sys/arch/evbarm/conf/GENERIC:1.10 Tue Oct 30 06:55:07 2018 +++ src/sys/arch/evbarm/conf/GENERIC Tue Oct 30 07:51:09 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.10 2018/10/30 06:55:07 skrll Exp $ +# $NetBSD: GENERIC,v 1.11 2018/10/30 07:51:09 skrll Exp $ # # GENERIC ARM (aarch32) kernel # @@ -87,6 +87,7 @@ makeoptions DTS=" sun7i-a20-lamobo-r1.dts sun7i-a20-m3.dts sun7i-a20-mk808c.dts + sun7i-a20-olimex-som-evb-emmc.dts sun7i-a20-olimex-som-evb.dts sun7i-a20-olimex-som204-evb-emmc.dts sun7i-a20-olimex-som204-evb.dts @@ -107,10 +108,14 @@ makeoptions DTS=" sun8i-a83t-cubietruck-plus.dts sun8i-a83t-tbs-a711.dts + sun8i-h2-plus-bananapi-m2-zero.dts + sun8i-h2-plus-libretech-all-h3-cc.dts + sun8i-h2-plus-orangepi-r1.dts sun8i-h2-plus-orangepi-zero.dts sun8i-h3-bananapi-m2-plus.dts sun8i-h3-beelink-x2.dts + sun8i-h3-libretech-all-h3-cc.dts sun8i-h3-nanopi-m1.dts sun8i-h3-nanopi-m1-plus.dts sun8i-h3-nanopi-neo.dts @@ -126,10 +131,22 @@ makeoptions DTS=" sun9i-a80-cubieboard4.dts sun9i-a80-optimus.dts + sun50i-a64-bananapi-m64.dts + sun50i-a64-nanopi-a64.dts + sun50i-a64-olinuxino.dts + sun50i-a64-orangepi-win.dts + sun50i-a64-pine64-plus.dts + sun50i-a64-pine64.dts + sun50i-a64-pinebook.dts + sun50i-a64-sopine-baseboard.dts + sun50i-a64-teres-i.dts + + sun50i-h5-libretech-all-h3-cc.dts sun50i-h5-nanopi-neo-plus2.dts sun50i-h5-nanopi-neo2.dts sun50i-h5-orangepi-pc2.dts sun50i-h5-orangepi-prime.dts + sun50i-h5-orangepi-zero-plus.dts sun50i-h5-orangepi-zero-plus2.dts tegra124-apalis-eval.dts @@ -142,10 +159,12 @@ makeoptions DTS=" " options CPU_CORTEXA7 -options CPU_CORTEXA9 options CPU_CORTEXA8 +options CPU_CORTEXA9 options CPU_CORTEXA15 +options CPU_CORTEXA53 + # Can't add SOC_BCM2835 until interrupt and register issues sorted out #options SOC_BCM2835 options SOC_BCM2836 @@ -294,6 +313,13 @@ tegrafuse* at fdt? pass 4 # NVIDIA Tegr # Power management controller tegrapmc* at fdt? pass 4 # NVIDIA Tegra PMC +# Performance monitors +armpmu* at fdt? +pseudo-device tprof + +# Power state coordination interface +psci* at fdt? + # Clock and Reset controller bcmcprman* at fdt? pass 1 # Broadcom BCM283x Clock Manager bcmaux* at fdt? pass 1 # Broadcom BCM283x Aux Periph Clocks @@ -308,8 +334,12 @@ gpio* at gpiobus? # MPIO / Pinmux tegrapinmux* at fdt? # NVIDIA Tegra MPIO -# PWM timer +# PWM controller expwm* at fdt? pass 4 # PWM +sunxipwm* at fdt? pass 3 # Allwinner PWM + +# Backlight +pwmbacklight* at fdt? # PWM Backlight controls # Fan pwmfan* at fdt? # PWM Fan controls @@ -326,7 +356,8 @@ ppb* at pci? dev ? function ? pci* at ppb? # Ethernet -emac* at fdt? # Allwinner Gigabit Ethernet (EMAC) +awge* at fdt? # Allwinner Gigabit Ethernet (GMAC) +emac* at fdt? # Allwinner Fast/Gigabit Ethernet (EMAC) smsh* at fdt? # SMSC LAN9118 # PCI Ethernet @@ -377,12 +408,26 @@ tegrai2c* at fdt? pass 4 # NVIDIA Tegra iic* at i2cbus? # I2C devices -titemp* at iic? -seeprom* at iic? as3722pmic* at iic? as3722reg* at as3722pmic? +axp20x* at iic? # AXP209 Power Management IC +axp20xreg* at axp20x? +axp22x* at iic? # AXP221 Power Management IC +axppmic* at iic? # X-Powers AXP Power Management IC +axpreg* at axppmic? max77620pmic* at iic? +pcf8563rtc* at iic? # PCF8563 RTC +seeprom* at iic? # AT24Cxx Serial EEPROM +sy8106a* at iic? # Silergy SY81061 regulator +tcakp* at iic? # TI TCA8418 Keypad Scan IC tcagpio* at iic? +titemp* at iic? +wskbd* at tcakp? console ? + +# CAN bus +options CAN # Controller Area Network protocol +pseudo-device canloop # CAN loopback interface +sunxican* at fdt? # A10/A20 CAN controller # SPI sun6ispi* at fdt? @@ -394,6 +439,9 @@ bcmrng* at fdt? # Broadcom BCM283x RN # Security ID EFUSE sunxisid* at fdt? pass 4 # SID +# Low res ADC +sunxilradc* at fdt? + # RTC #exyortc* at fdt? # RTC plrtc* at fdt? # ARM PrimeCell RTC @@ -408,16 +456,16 @@ vchiq0 at fdt? vcaudio0 at vchiq0 # Audio -a64acodec* at fdt? # A64 audio codec (analog part) +a64acodec* at fdt? # Allwinner A64 audio codec (analog part) aaci* at fdt? # ARM PrimeCell AACI ausoc* at fdt? # Simple SoC audio card +h3codec* at fdt? # Allwinner H3 audio codec (analog part) hdaudio* at fdt? # Intel HDA hdafg* at hdaudiobus? options HDAUDIOVERBOSE options HDAUDIO_32BI