CVS commit: src
Module Name:src Committed By: rin Date: Sun Jan 28 01:09:58 UTC 2018 Modified Files: src/distrib/zaurus/ramdisk: Makefile list src/sys/arch/zaurus/conf: INSTALL Log Message: Shrink ramdisk to fit INSTALL kernel within 5MB: - drop shutdown - replace disklabel, fsck_ffs, and newfs with stripped-down versions To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/distrib/zaurus/ramdisk/Makefile cvs rdiff -u -r1.20 -r1.21 src/distrib/zaurus/ramdisk/list cvs rdiff -u -r1.34 -r1.35 src/sys/arch/zaurus/conf/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/zaurus/ramdisk/Makefile diff -u src/distrib/zaurus/ramdisk/Makefile:1.22 src/distrib/zaurus/ramdisk/Makefile:1.23 --- src/distrib/zaurus/ramdisk/Makefile:1.22 Wed Feb 8 20:11:18 2017 +++ src/distrib/zaurus/ramdisk/Makefile Sun Jan 28 01:09:57 2018 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.22 2017/02/08 20:11:18 rin Exp $ +# $NetBSD: Makefile,v 1.23 2018/01/28 01:09:57 rin Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" IMAGE= ramdisk.fs -IMAGESIZE= 2176k +IMAGESIZE= 2048k MAKEFS_FLAGS+= -f 14 WARNS= 1 Index: src/distrib/zaurus/ramdisk/list diff -u src/distrib/zaurus/ramdisk/list:1.20 src/distrib/zaurus/ramdisk/list:1.21 --- src/distrib/zaurus/ramdisk/list:1.20 Wed Jun 26 15:53:48 2013 +++ src/distrib/zaurus/ramdisk/list Sun Jan 28 01:09:57 2018 @@ -1,4 +1,4 @@ -# $NetBSD: list,v 1.20 2013/06/26 15:53:48 christos Exp $ +# $NetBSD: list,v 1.21 2018/01/28 01:09:57 rin Exp $ # external/bsd/less/bin has to be first, otherwise the ramdisk.mk generation fails SRCDIRS external/bsd/less/bin bin sbin usr.bin usr.sbin @@ -42,7 +42,7 @@ PROG sbin/reboot sbin/halt PROG sbin/restore sbin/rrestore PROG sbin/route #PROG sbin/scsictl -PROG sbin/shutdown +#PROG sbin/shutdown #PROG sbin/slattach PROG sbin/swapctl PROG sbin/umount @@ -58,9 +58,12 @@ PROG usr/sbin/chroot # init invokes the shell as -sh ARGVLN sh -sh +SPECIAL disklabel srcdir distrib/utils/x_disklabel SPECIAL ed srcdir distrib/utils/x_ed +SPECIAL fsck_ffs srcdir distrib/utils/x_fsck_ffs SPECIAL gzip srcdir distrib/utils/x_gzip SPECIAL ifconfig srcdir distrib/utils/x_ifconfig +SPECIAL newfs srcdir distrib/utils/x_newfs SPECIAL ping srcdir distrib/utils/x_ping SPECIAL route srcdir distrib/utils/x_route Index: src/sys/arch/zaurus/conf/INSTALL diff -u src/sys/arch/zaurus/conf/INSTALL:1.34 src/sys/arch/zaurus/conf/INSTALL:1.35 --- src/sys/arch/zaurus/conf/INSTALL:1.34 Wed Dec 20 08:10:13 2017 +++ src/sys/arch/zaurus/conf/INSTALL Sun Jan 28 01:09:58 2018 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.34 2017/12/20 08:10:13 rin Exp $ +# $NetBSD: INSTALL,v 1.35 2018/01/28 01:09:58 rin Exp $ # # INSTALL config file (GENERIC with memory disk root) # @@ -9,7 +9,7 @@ include "arch/zaurus/conf/GENERIC" options MEMORY_DISK_HOOKS # enable root ramdisk options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=4352 # size of memory disk, in blocks +options MEMORY_DISK_ROOT_SIZE=4096 # size of memory disk, in blocks options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode # for reduce kernel size.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jan 27 23:59:18 UTC 2018 Modified Files: src/share/mk: bsd.own.mk Log Message: explain how to allow coverity to use sysroot To generate a diff of this commit: cvs rdiff -u -r1.1028 -r1.1029 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1028 src/share/mk/bsd.own.mk:1.1029 --- src/share/mk/bsd.own.mk:1.1028 Wed Jan 24 04:04:42 2018 +++ src/share/mk/bsd.own.mk Sat Jan 27 18:59:17 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1028 2018/01/24 09:04:42 skrll Exp $ +# $NetBSD: bsd.own.mk,v 1.1029 2018/01/27 23:59:17 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -312,15 +312,17 @@ TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_ # DESTDIR?= -# Coverity does not like --sysroot +# Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc. +# because it confuses Coverity. Still we need to cov-configure specially +# for each specific sysroot argument. .if !defined(HOSTPROG) && !defined(HOSTLIB) . if ${DESTDIR} != "" -. if !defined(COVERITY_TOP_CONFIG) +. if empty(CPPFLAGS:M*--sysroot=*) CPPFLAGS+= --sysroot=${DESTDIR} . endif LDFLAGS+= --sysroot=${DESTDIR} . else -. if !defined(COVERITY_TOP_CONFIG) +. if empty(CPPFLAGS:M*--sysroot=*) CPPFLAGS+= --sysroot=/ . endif LDFLAGS+= --sysroot=/
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Sat Jan 27 23:07:36 UTC 2018 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/m68k/m68k: pmap_motorola.c src/sys/arch/powerpc/oea: pmap.c src/sys/arch/sparc64/sparc64: pmap.c Log Message: apply the change from arch/x86/x86/pmap.c rev. 1.266 commitid vZRjvmxG7YTHLOfA: In pmap_enter_ma(), only try to allocate pves if we might need them, and even if that fails, only fail the operation if we later discover that we really do need them. If we are replacing an existing mapping, reuse the pv structure where possible. This implements the requirement that pmap_enter(PMAP_CANFAIL) must not fail when replacing an existing mapping with the first mapping of a new page, which is an unintended consequence of the changes from the rmind-uvmplock branch in 2011. The problem arises when pmap_enter(PMAP_CANFAIL) is used to replace an existing pmap mapping with a mapping of a different page (eg. to resolve a copy-on-write). If that fails and leaves the old pmap entry in place, then UVM won't hold the right locks when it eventually retries. This entanglement of the UVM and pmap locking was done in rmind-uvmplock in order to improve performance, but it also means that the UVM state and pmap state need to be kept in sync more than they did before. It would be possible to handle this in the UVM code instead of in the pmap code, but these pmap changes improve the handling of low memory situations in general, and handling this in UVM would be clunky, so this seemed like the better way to go. This somewhat indirectly fixes PR 52706 on the remaining platforms where this problem existed. To generate a diff of this commit: cvs rdiff -u -r1.261 -r1.262 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.69 -r1.70 src/sys/arch/m68k/m68k/pmap_motorola.c cvs rdiff -u -r1.94 -r1.95 src/sys/arch/powerpc/oea/pmap.c cvs rdiff -u -r1.307 -r1.308 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.261 src/sys/arch/alpha/alpha/pmap.c:1.262 --- src/sys/arch/alpha/alpha/pmap.c:1.261 Fri Dec 23 07:15:27 2016 +++ src/sys/arch/alpha/alpha/pmap.c Sat Jan 27 23:07:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.261 2016/12/23 07:15:27 cherry Exp $ */ +/* $NetBSD: pmap.c,v 1.262 2018/01/27 23:07:36 chs Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc. @@ -140,7 +140,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.261 2016/12/23 07:15:27 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.262 2018/01/27 23:07:36 chs Exp $"); #include #include @@ -439,7 +439,8 @@ static struct pool_cache pmap_tlb_shootd * Internal routines */ static void alpha_protection_init(void); -static bool pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, bool, long); +static bool pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, bool, long, +pv_entry_t *); static void pmap_changebit(struct vm_page *, pt_entry_t, pt_entry_t, long); /* @@ -466,8 +467,9 @@ static int pmap_l1pt_ctor(void *, void * * PV table management functions. */ static int pmap_pv_enter(pmap_t, struct vm_page *, vaddr_t, pt_entry_t *, - bool); -static void pmap_pv_remove(pmap_t, struct vm_page *, vaddr_t, bool); + bool, pv_entry_t); +static void pmap_pv_remove(pmap_t, struct vm_page *, vaddr_t, bool, + pv_entry_t *); static void *pmap_pv_page_alloc(struct pool *, int); static void pmap_pv_page_free(struct pool *, void *); @@ -1266,7 +1268,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va sva); #endif needisync |= pmap_remove_mapping(pmap, sva, -l3pte, true, cpu_id); +l3pte, true, cpu_id, NULL); } sva += PAGE_SIZE; } @@ -1343,7 +1345,7 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va pmap_remove_mapping( pmap, sva, l3pte, true, - cpu_id); + cpu_id, NULL); } /* @@ -1450,7 +1452,7 @@ pmap_page_protect(struct vm_page *pg, vm panic("pmap_page_protect: bad mapping"); #endif if (pmap_remove_mapping(pmap, pv->pv_va, pv->pv_pte, - false, cpu_id) == true) { + false, cpu_id, NULL)) { if (pmap == pmap_kernel()) needkisync |= true; else @@ -1558,6 +1560,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd { struct vm_page *pg; /* if != NULL, managed page */ pt_entry_t *pte, npte, opte; + pv_entry_t opv = NULL; paddr_t opa; bool tflush = true; bool hadasm = false; /* XXX gcc -Wuninitialized */ @@ -1750,14 +1753,15 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd */ pmap_physpage_addref(pte); } - needisync |= pmap_remove_mapping(pmap, va, pte, true, cpu_id); + needisync |= pmap_remove_mapping(pmap, va, pte, true, cpu_id, ); validate_enterpv:
CVS commit: src/sys/arch/i386/stand/lib
Module Name:src Committed By: pgoyette Date: Sat Jan 27 22:25:23 UTC 2018 Modified Files: src/sys/arch/i386/stand/lib: bootinfo.h Log Message: Recent changes have increased the number of "things" the bootloader needs to deal with. Increase the table size so we don't overflow. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/i386/stand/lib/bootinfo.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/i386/stand/lib/bootinfo.h diff -u src/sys/arch/i386/stand/lib/bootinfo.h:1.11 src/sys/arch/i386/stand/lib/bootinfo.h:1.12 --- src/sys/arch/i386/stand/lib/bootinfo.h:1.11 Sun Jun 5 14:13:57 2016 +++ src/sys/arch/i386/stand/lib/bootinfo.h Sat Jan 27 22:25:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.11 2016/06/05 14:13:57 maxv Exp $ */ +/* $NetBSD: bootinfo.h,v 1.12 2018/01/27 22:25:23 pgoyette Exp $ */ /* * Copyright (c) 1997 @@ -35,7 +35,7 @@ struct bootinfo { extern struct bootinfo *bootinfo; -#define BTINFO_MAX 32 +#define BTINFO_MAX 64 #define BI_ALLOC(max) (bootinfo = alloc(sizeof(struct bootinfo) \ + ((max) - 1) * sizeof(uint32_t))) \
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: pgoyette Date: Sat Jan 27 21:46:54 UTC 2018 Modified Files: src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0 Log Message: Update amdzentemp(4) attachment info. Also for ALL, remove duplicate entry for amdtemp(4). To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.483 -r1.484 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.146 -r1.147 src/sys/arch/amd64/conf/XEN3_DOM0 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/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.79 src/sys/arch/amd64/conf/ALL:1.80 --- src/sys/arch/amd64/conf/ALL:1.79 Thu Jan 25 01:21:40 2018 +++ src/sys/arch/amd64/conf/ALL Sat Jan 27 21:46:54 2018 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.79 2018/01/25 01:21:40 christos Exp $ +# $NetBSD: ALL,v 1.80 2018/01/27 21:46:54 pgoyette Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.79 $" +#ident "ALL-$Revision: 1.80 $" maxusers 64 # estimated number of users @@ -423,13 +423,6 @@ options PCIBIOS_SHARP_MM20_FIXUP # this # on anything else. #options PCIINTR_DEBUG # super-verbose PCI interrupt fixup -# Temperatures -amdnb_misc* at pci? # AMD NB Misc Configuration -amdtemp* at amdnb_misc? # AMD CPU Temperature sensors - -amdsmn* at pci?# AMD SMN Configuration -amdzentemp* at amdsmn? # AMD Ryzen Family 17h CPU temp sensors - # PCI bridges rdcpcib* at pci? dev ? function ? # RDC Vortex86/PMX-1000 PCI-ISA w/ pchb* at pci? dev ? function ? # PCI-Host bridges @@ -589,6 +582,10 @@ lpt2 at isa? port 0x3bc # Hardware monitors +# Temperatures +amdsmn* at pci?# AMD SMN Configuration +amdzentemp* at amdsmnbus? # AMD Ryzen Family 17h CPU temp sensors + amdnb_misc* at pci? # AMD NB Misc Configuration amdtemp* at amdnb_misc? # AMD CPU Temperature sensors Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.483 src/sys/arch/amd64/conf/GENERIC:1.484 --- src/sys/arch/amd64/conf/GENERIC:1.483 Fri Jan 26 14:41:22 2018 +++ src/sys/arch/amd64/conf/GENERIC Sat Jan 27 21:46:54 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.483 2018/01/26 14:41:22 maxv Exp $ +# $NetBSD: GENERIC,v 1.484 2018/01/27 21:46:54 pgoyette Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.483 $" +#ident "GENERIC-$Revision: 1.484 $" maxusers 64 # estimated number of users @@ -476,7 +476,7 @@ amdnb_misc* at pci? # AMD NB Misc Conf amdtemp* at amdnb_misc? # AMD CPU Temperature sensors amdsmn* at pci?# AMD SMN Configuration -amdzentemp* at amdsmn? # AMD Ryzen Family 17h CPU temp sensors +amdzentemp* at amdsmnbus? # AMD Ryzen Family 17h CPU temp sensors # Winbond LPC Super I/O #wbsio* at isa? port 0x2e Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.146 src/sys/arch/amd64/conf/XEN3_DOM0:1.147 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.146 Thu Jan 25 01:21:40 2018 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Sat Jan 27 21:46:54 2018 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.146 2018/01/25 01:21:40 christos Exp $ +# $NetBSD: XEN3_DOM0,v 1.147 2018/01/27 21:46:54 pgoyette Exp $ include "arch/amd64/conf/std.xen" @@ -10,7 +10,7 @@ options INCLUDE_CONFIG_FILE # embed con #options UVMHIST_PRINT #options SYSCALL_DEBUG -#ident "XEN3_DOM0-$Revision: 1.146 $" +#ident "XEN3_DOM0-$Revision: 1.147 $" maxusers 32 # estimated number of users @@ -299,7 +299,7 @@ amdnb_misc* at pci? # AMD NB Misc Conf amdtemp* at amdnb_misc? # AMD CPU Temperature sensors amdsmn* at pci?# AMD SMN Configuration -amdzentemp* at amdsmn? # AMD Ryzen Family 17h CPU temp sensors +amdzentemp* at amdsmnbus? # AMD Ryzen Family 17h CPU temp sensors # AMD 768 and 8111 power/ACPI controllers amdpm* at pci? dev ? function ? # RNG and SMBus 1.0 interface
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Sat Jan 27 21:41:50 UTC 2018 Modified Files: src/share/man/man4: amdtemp.4 Log Message: Update attachment info - amdtemp(4) attaches to amdnb_miscbus attribute To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/amdtemp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/amdtemp.4 diff -u src/share/man/man4/amdtemp.4:1.10 src/share/man/man4/amdtemp.4:1.11 --- src/share/man/man4/amdtemp.4:1.10 Thu Jan 25 18:56:17 2018 +++ src/share/man/man4/amdtemp.4 Sat Jan 27 21:41:50 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: amdtemp.4,v 1.10 2018/01/25 18:56:17 uwe Exp $ +.\" $NetBSD: amdtemp.4,v 1.11 2018/01/27 21:41:50 pgoyette Exp $ .\"- .\" Copyright (c) 2008 Christoph Egger .\" All rights reserved. @@ -26,14 +26,14 @@ .\" .\" $FreeBSD: src/share/man/man4/coretemp.4,v 1.4 2007/10/15 20:00:19 netchild Exp $ .\" -.Dd March 2, 2012 +.Dd January 28, 2018 .Dt AMDTEMP 4 .Os .Sh NAME .Nm amdtemp .Nd AMD CPU on-die digital thermal sensor .Sh SYNOPSIS -.Cd "amdtemp* at pchb?" +.Cd "amdtemp* at amdnb_miscbus?" .Sh DESCRIPTION The .Nm
CVS commit: src/share/man/man4/man4.x86
Module Name:src Committed By: pgoyette Date: Sat Jan 27 21:39:06 UTC 2018 Modified Files: src/share/man/man4/man4.x86: amdzentemp.4 Log Message: Update attachment details for amdzentemp - it attaches to amdsmnbus? now. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/man4.x86/amdzentemp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.x86/amdzentemp.4 diff -u src/share/man/man4/man4.x86/amdzentemp.4:1.5 src/share/man/man4/man4.x86/amdzentemp.4:1.6 --- src/share/man/man4/man4.x86/amdzentemp.4:1.5 Thu Jan 25 10:48:27 2018 +++ src/share/man/man4/man4.x86/amdzentemp.4 Sat Jan 27 21:39:06 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: amdzentemp.4,v 1.5 2018/01/25 10:48:27 uwe Exp $ +.\" $NetBSD: amdzentemp.4,v 1.6 2018/01/27 21:39:06 pgoyette Exp $ .\"- .\" Copyright (c) 2008 Christoph Egger .\" All rights reserved. @@ -26,14 +26,14 @@ .\" .\" $FreeBSD: src/share/man/man4/coretemp.4,v 1.4 2007/10/15 20:00:19 netchild Exp $ .\" -.Dd January 24, 2018 +.Dd January 28, 2018 .Dt AMDZENTEMP 4 x86 .Os .Sh NAME .Nm amdzentemp .Nd AMD Zen CPU family on-die digital thermal sensor .Sh SYNOPSIS -.Cd "amdzentemp* at amdsmn?" +.Cd "amdzentemp* at amdsmnbus?" .Sh DESCRIPTION The .Nm
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: kardel Date: Sat Jan 27 21:24:30 UTC 2018 Modified Files: src/sys/arch/x86/pci: amdsmn.c Log Message: rescan amdsmnbus instead of amdsmn (fixes panic) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/pci/amdsmn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/amdsmn.c diff -u src/sys/arch/x86/pci/amdsmn.c:1.2 src/sys/arch/x86/pci/amdsmn.c:1.3 --- src/sys/arch/x86/pci/amdsmn.c:1.2 Thu Jan 25 23:37:33 2018 +++ src/sys/arch/x86/pci/amdsmn.c Sat Jan 27 21:24:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: amdsmn.c,v 1.2 2018/01/25 23:37:33 pgoyette Exp $ */ +/* $NetBSD: amdsmn.c,v 1.3 2018/01/27 21:24:30 kardel Exp $ */ /*- * Copyright (c) 2017 Conrad Meyer@@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.2 2018/01/25 23:37:33 pgoyette Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.3 2018/01/27 21:24:30 kardel Exp $ "); /* * Driver for the AMD Family 17h CPU System Management Network. @@ -101,7 +101,7 @@ amdsmn_attach(device_t parent, device_t sc->pc = pa->pa_pc; sc->pcitag = pa->pa_tag; aprint_normal(": AMD Family 17h System Management Network\n"); - amdsmn_rescan(self, "amdsmn", ); + amdsmn_rescan(self, "amdsmnbus", ); } static int
CVS commit: src/bin/date
Module Name:src Committed By: wiz Date: Sat Jan 27 18:59:38 UTC 2018 Modified Files: src/bin/date: date.1 Log Message: Remove trailing whitespace and Tn macro. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/bin/date/date.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/date/date.1 diff -u src/bin/date/date.1:1.46 src/bin/date/date.1:1.47 --- src/bin/date/date.1:1.46 Thu Jan 25 18:07:17 2018 +++ src/bin/date/date.1 Sat Jan 27 18:59:38 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: date.1,v 1.46 2018/01/25 18:07:17 christos Exp $ +.\" $NetBSD: date.1,v 1.47 2018/01/27 18:59:38 wiz Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -98,9 +98,7 @@ Print out the date and time that is .Ar seconds from the Epoch. .It Fl u -Display or set the date in -.Tn UTC -(universal) time. +Display or set the date in UTC (universal) time. .El .Pp An operand with a leading plus @@ -185,7 +183,7 @@ A record of date resets and time changes A record of the user setting the time. .El .Pp -If +If .Pa /usr/share/zoneinfo/GMT is absent, UTC leap seconds are loaded from .Pa /usr/share/zoneinfo/posixrules .
CVS commit: src/sys/arch/i386
Module Name:src Committed By: maxv Date: Sat Jan 27 18:48:59 UTC 2018 Modified Files: src/sys/arch/i386/i386: vector.S src/sys/arch/i386/include: frameasm.h Log Message: Declare INTR_RECURSE_HWFRAME, same as amd64. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/i386/i386/vector.S cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/include/frameasm.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/i386/i386/vector.S diff -u src/sys/arch/i386/i386/vector.S:1.73 src/sys/arch/i386/i386/vector.S:1.74 --- src/sys/arch/i386/i386/vector.S:1.73 Fri Aug 18 14:52:19 2017 +++ src/sys/arch/i386/i386/vector.S Sat Jan 27 18:48:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.73 2017/08/18 14:52:19 maxv Exp $ */ +/* $NetBSD: vector.S,v 1.74 2018/01/27 18:48:59 maxv Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.73 2017/08/18 14:52:19 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.74 2018/01/27 18:48:59 maxv Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -149,9 +149,7 @@ dtrace_invop_calltrap_addr: * General purpose IPI handler. */ IDTVEC(recurse_lapic_ipi) - pushfl - pushl %cs - pushl %esi + INTR_RECURSE_HWFRAME pushl $0 pushl $T_ASTFLT INTRENTRY @@ -276,9 +274,7 @@ IDTVEC_END(x2apic_intrddbipi) * Interrupt from the local APIC timer. */ IDTVEC(recurse_lapic_ltimer) - pushfl - pushl %cs - pushl %esi + INTR_RECURSE_HWFRAME pushl $0 pushl $T_ASTFLT INTRENTRY @@ -335,9 +331,7 @@ IDTVEC_END(resume_lapic_ltimer) #define INTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \ IDTVEC(recurse_ ## name ## num) ;\ - pushfl;\ - pushl %cs ;\ - pushl %esi ;\ + INTR_RECURSE_HWFRAME ;\ subl $4,%esp ;\ pushl $T_ASTFLT /* trap # for doing ASTs */ ;\ INTRENTRY ;\ @@ -898,9 +892,7 @@ END(x2apic_level_stubs) #define XENINTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \ IDTVEC(recurse_ ## name ## num) ;\ - pushfl;\ - pushl %cs ;\ - pushl %esi ;\ + INTR_RECURSE_HWFRAME ;\ subl $4,%esp ;\ pushl $T_ASTFLT /* trap # for doing ASTs */ ;\ INTRENTRY ;\ Index: src/sys/arch/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.24 src/sys/arch/i386/include/frameasm.h:1.25 --- src/sys/arch/i386/include/frameasm.h:1.24 Sat Jan 27 09:33:25 2018 +++ src/sys/arch/i386/include/frameasm.h Sat Jan 27 18:48:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.24 2018/01/27 09:33:25 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.25 2018/01/27 18:48:59 maxv Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -76,6 +76,11 @@ #define INTRFASTEXIT \ jmp intrfastexit +#define INTR_RECURSE_HWFRAME \ + pushfl; \ + pushl %cs ; \ + pushl %esi ; + #define CHECK_DEFERRED_SWITCH \ cmpl $0, CPUVAR(WANT_PMAPLOAD)
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: maxv Date: Sat Jan 27 18:44:19 UTC 2018 Modified Files: src/sys/arch/i386/i386: spl.S Log Message: style To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/i386/i386/spl.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/spl.S diff -u src/sys/arch/i386/i386/spl.S:1.41 src/sys/arch/i386/i386/spl.S:1.42 --- src/sys/arch/i386/i386/spl.S:1.41 Sat Aug 12 07:07:53 2017 +++ src/sys/arch/i386/i386/spl.S Sat Jan 27 18:44:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.41 2017/08/12 07:07:53 maxv Exp $ */ +/* $NetBSD: spl.S,v 1.42 2018/01/27 18:44:19 maxv Exp $ */ /* * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.41 2017/08/12 07:07:53 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.42 2018/01/27 18:44:19 maxv Exp $"); #include "opt_ddb.h" #include "opt_spldebug.h" @@ -61,7 +61,7 @@ ENTRY(splraise) pushl %eax pushl %edx call _C_LABEL(spldebug_raise) - addl $4, %esp + addl $4,%esp popl %eax popl %ebp #endif /* SPLDEBUG */ @@ -77,23 +77,23 @@ END(splraise) */ ENTRY(spllower) #ifdef SPLDEBUG - movl 4(%esp), %ecx + movl 4(%esp),%ecx pushl %ebp movl %esp,%ebp pushl %ecx call _C_LABEL(spldebug_lower) - addl $4, %esp + addl $4,%esp popl %ebp #endif /* SPLDEBUG */ - movl 4(%esp), %ecx - cmpl CPUVAR(ILEVEL), %ecx + movl 4(%esp),%ecx + cmpl CPUVAR(ILEVEL),%ecx jae 1f - movl CPUVAR(IUNMASK)(,%ecx,4), %edx + movl CPUVAR(IUNMASK)(,%ecx,4),%edx pushf cli - testl CPUVAR(IPENDING), %edx + testl CPUVAR(IPENDING),%edx jnz 2f - movl %ecx, CPUVAR(ILEVEL) + movl %ecx,CPUVAR(ILEVEL) popf 1: ret @@ -114,7 +114,7 @@ END(spllower) * * For cmpxchg8b, edx/ecx are the high words and eax/ebx the low. * - * edx : eax = old level / old ipending + * edx : eax = old level / old ipending * ecx : ebx = new level / old ipending */ ENTRY(cx8_spllower) @@ -147,7 +147,7 @@ END(cx8_spllower) /* * void Xspllower(int s); - * + * * Process pending interrupts. * * Important registers: @@ -173,11 +173,13 @@ IDTVEC(spllower) pushl %esi pushl %edi movl 8(%ebp),%ebx - movl $.Lspllower_resume,%esi # address to resume loop at + movl $.Lspllower_resume,%esi /* address to resume loop at */ 1: -# because of the way Xen interrupts works *%esi will in fact be called -# from Xdoreti via iret. So we have to always disable interrupts here -# for Xen + /* + * Because of the way Xen interrupts work *%esi will in fact be called + * from Xdoreti via iret. So we have to always disable interrupts here + * for Xen. + */ #ifndef XEN CLI(%eax) #endif @@ -193,14 +195,14 @@ IDTVEC(spllower) jnz .Lspllower_panic #else movlCPUVAR(VCPU),%eax - movb EVTCHN_UPCALL_MASK(%eax), %al - andb %al, %al + movb EVTCHN_UPCALL_MASK(%eax),%al + andb %al,%al jz .Lspllower_panic #endif /* XEN */ #endif /* defined(DEBUG) */ - movl %ebx,%eax # get cpl + movl %ebx,%eax /* get cpl */ movl CPUVAR(IUNMASK)(,%eax,4),%eax - andl CPUVAR(IPENDING),%eax # any non-masked bits left? + andl CPUVAR(IPENDING),%eax /* any non-masked bits left? */ jz 2f bsrl %eax,%eax btrl %eax,CPUVAR(IPENDING) @@ -217,7 +219,7 @@ IDTVEC(spllower) 4: #else STI(%eax) -#endif /* XEN */ +#endif popl %edi popl %esi popl %ebx @@ -228,7 +230,7 @@ IDTVEC(spllower) pushl $1f call _C_LABEL(panic) 1: .asciz "SPLLOWER: INTERRUPT ENABLED" -#endif /* defined(DEBUG) */ +#endif IDTVEC_END(spllower) /* @@ -244,10 +246,10 @@ IDTVEC_END(spllower) IDTVEC(doreti) #ifndef XEN IDEPTH_DECR - popl %ebx # get previous priority + popl %ebx /* get previous priority */ #endif .Ldoreti_resume_stic: - movl $.Ldoreti_resume,%esi # address to resume loop at + movl $.Ldoreti_resume,%esi /* address to resume loop at */ .Ldoreti_resume: #if defined(DEBUG) #ifndef XEN @@ -256,9 +258,9 @@ IDTVEC(doreti) testl $PSL_I,%eax jnz .Ldoreti_panic #else - movlCPUVAR(VCPU),%eax - movb EVTCHN_UPCALL_MASK(%eax), %al - andb %al, %al + movl CPUVAR(VCPU),%eax + movb EVTCHN_UPCALL_MASK(%eax),%al + andb %al,%al jz .Ldoreti_panic #endif /* XEN */ #endif /* defined(DEBUG) */ @@ -266,14 +268,14 @@ IDTVEC(doreti) movl CPUVAR(IUNMASK)(,%eax,4),%eax andl CPUVAR(IPENDING),%eax jz 2f - bsrl%eax,%eax # slow, but not worth optimizing - btrl%eax,CPUVAR(IPENDING) + bsrl %eax,%eax /* slow, but not worth optimizing */ + btrl %eax,CPUVAR(IPENDING) movl CPUVAR(ISOURCES)(,%eax, 4),%eax jmp *IS_RESUME(%eax) 2: /* Check for ASTs on exit to user mode. */ movl %ebx,CPUVAR(ILEVEL) 5: - testb $CHK_UPL,TF_CS(%esp) + testb $CHK_UPL,TF_CS(%esp) jnz doreti_checkast jmp 6f .type _C_LABEL(doreti_checkast), @function @@ -299,12 +301,12 @@ END(doreti_checkast) STIC(%eax) jz 4f call _C_LABEL(stipending) - testl %eax,%eax - jz 4f
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: maxv Date: Sat Jan 27 18:27:08 UTC 2018 Modified Files: src/sys/arch/amd64/include: frameasm.h Log Message: Put the default %cs value in INTR_RECURSE_HWFRAME. Pushing an immediate costs less than reading the %cs register and pushing its value. This value is not allowed to be != GSEL(GCODE_SEL,SEL_KPL) in all cases. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/include/frameasm.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/include/frameasm.h diff -u src/sys/arch/amd64/include/frameasm.h:1.33 src/sys/arch/amd64/include/frameasm.h:1.34 --- src/sys/arch/amd64/include/frameasm.h:1.33 Sat Jan 27 18:17:57 2018 +++ src/sys/arch/amd64/include/frameasm.h Sat Jan 27 18:27:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.33 2018/01/27 18:17:57 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.34 2018/01/27 18:27:08 maxv Exp $ */ #ifndef _AMD64_MACHINE_FRAMEASM_H #define _AMD64_MACHINE_FRAMEASM_H @@ -168,8 +168,7 @@ usertrap; \ pushq %r11 ; \ pushq %r10 ; \ pushfq; \ - movl %cs,%r11d ; \ - pushq %r11 ; \ + pushq $GSEL(GCODE_SEL,SEL_KPL); \ /* XEN: We must fixup CS, as even kernel mode runs at CPL 3 */ \ XEN_ONLY2(andb $0xfc,(%rsp);) \ pushq %r13 ;
CVS commit: src/sys/arch/amd64
Module Name:src Committed By: maxv Date: Sat Jan 27 18:17:57 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: vector.S src/sys/arch/amd64/include: frameasm.h Log Message: Declare and use INTR_RECURSE_ENTRY, an optimized version of INTRENTRY. When processing deferred interrupts, we are always entering the new handler in kernel mode, so there is no point performing the userland checks. Saves several instructions. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amd64/amd64/vector.S cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amd64/include/frameasm.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/vector.S diff -u src/sys/arch/amd64/amd64/vector.S:1.56 src/sys/arch/amd64/amd64/vector.S:1.57 --- src/sys/arch/amd64/amd64/vector.S:1.56 Sun Jan 21 11:21:40 2018 +++ src/sys/arch/amd64/amd64/vector.S Sat Jan 27 18:17:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.56 2018/01/21 11:21:40 maxv Exp $ */ +/* $NetBSD: vector.S,v 1.57 2018/01/27 18:17:57 maxv Exp $ */ /* * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -113,7 +113,7 @@ IDTVEC(recurse_lapic_ipi) INTR_RECURSE_HWFRAME pushq $0 pushq $T_ASTFLT - INTRENTRY + INTR_RECURSE_ENTRY jmp 1f IDTVEC_END(recurse_lapic_ipi) NENTRY(handle_x2apic_ipi) @@ -213,7 +213,7 @@ IDTVEC(recurse_lapic_ltimer) INTR_RECURSE_HWFRAME pushq $0 pushq $T_ASTFLT - INTRENTRY + INTR_RECURSE_ENTRY jmp 1f IDTVEC_END(recurse_lapic_ltimer) NENTRY(handle_x2apic_ltimer) @@ -316,7 +316,7 @@ IDTVEC(recurse_ ## name ## num) ;\ INTR_RECURSE_HWFRAME ;\ subq $8,%rsp ;\ pushq $T_ASTFLT /* trap # for doing ASTs */ ;\ - INTRENTRY ;\ + INTR_RECURSE_ENTRY ;\ jmp 1f ;\ IDTVEC_END(recurse_ ## name ## num) ;\ IDTVEC(resume_ ## name ## num) \ @@ -881,7 +881,7 @@ IDTVEC(recurse_ ## name ## num) ;\ INTR_RECURSE_HWFRAME ;\ subq $8,%rsp ;\ pushq $T_ASTFLT /* trap # for doing ASTs */ ;\ - INTRENTRY ;\ + INTR_RECURSE_ENTRY ;\ IDTVEC(resume_ ## name ## num) \ movq $IREENT_MAGIC,TF_ERR(%rsp);\ movl %ebx,%r13d ;\ Index: src/sys/arch/amd64/include/frameasm.h diff -u src/sys/arch/amd64/include/frameasm.h:1.32 src/sys/arch/amd64/include/frameasm.h:1.33 --- src/sys/arch/amd64/include/frameasm.h:1.32 Sat Jan 27 08:12:27 2018 +++ src/sys/arch/amd64/include/frameasm.h Sat Jan 27 18:17:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.32 2018/01/27 08:12:27 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.33 2018/01/27 18:17:57 maxv Exp $ */ #ifndef _AMD64_MACHINE_FRAMEASM_H #define _AMD64_MACHINE_FRAMEASM_H @@ -174,6 +174,11 @@ usertrap; \ XEN_ONLY2(andb $0xfc,(%rsp);) \ pushq %r13 ; +#define INTR_RECURSE_ENTRY \ + subq $TF_REGSIZE,%rsp ; \ + INTR_SAVE_GPRS ; \ + cld + #define CHECK_DEFERRED_SWITCH \ cmpl $0, CPUVAR(WANT_PMAPLOAD)
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maxv Date: Sat Jan 27 17:54:13 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Use testb, faster. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/arch/amd64/amd64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.149 src/sys/arch/amd64/amd64/locore.S:1.150 --- src/sys/arch/amd64/amd64/locore.S:1.149 Mon Jan 22 08:14:09 2018 +++ src/sys/arch/amd64/amd64/locore.S Sat Jan 27 17:54:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.149 2018/01/22 08:14:09 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.150 2018/01/27 17:54:13 maxv Exp $ */ /* * Copyright-o-rama! @@ -1522,7 +1522,7 @@ LABEL(intrfastexit) NOT_XEN(cli;) SVS_LEAVE INTR_RESTORE_GPRS - testw $SEL_UPL,TF_CS(%rsp) /* interrupted %cs */ + testb $SEL_UPL,TF_CS(%rsp) /* interrupted %cs */ jz .Lkexit cmpw $LSEL(LUCODE_SEL, SEL_UPL),TF_CS(%rsp) je .Luexit64
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: sevan Date: Sat Jan 27 16:21:47 UTC 2018 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: Fix issue with audio being downpitched, thanks to "it seems that snapper_init should be called before audio_attach_mi, as snapper init is setting the rate to 44100 after the hardware format has been configured by audio_attach_mi. audio_attach_mi should be the last thing called during an attach of an audio device so the audio device is ready to be configured when audio_attach_mi is called." Resolves PR port-macppc/52949 To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.41 src/sys/arch/macppc/dev/snapper.c:1.42 --- src/sys/arch/macppc/dev/snapper.c:1.41 Fri Mar 31 08:38:13 2017 +++ src/sys/arch/macppc/dev/snapper.c Sat Jan 27 16:21:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.41 2017/03/31 08:38:13 msaitoh Exp $ */ +/* $NetBSD: snapper.c,v 1.42 2018/01/27 16:21:47 sevan Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.41 2017/03/31 08:38:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.42 2018/01/27 16:21:47 sevan Exp $"); #include #include @@ -839,10 +839,10 @@ snapper_defer(device_t dev) break; } - audio_attach_mi(_hw_if, sc, sc->sc_dev); - /* ki2c_setmode(sc->sc_i2c, I2C_STDSUBMODE); */ snapper_init(sc, sc->sc_node); + + audio_attach_mi(_hw_if, sc, sc->sc_dev); } static int
CVS commit: src/doc
Module Name:src Committed By: maxv Date: Sat Jan 27 15:31:10 UTC 2018 Modified Files: src/doc: CHANGES Log Message: SMAP on i386. To generate a diff of this commit: cvs rdiff -u -r1.2351 -r1.2352 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2351 src/doc/CHANGES:1.2352 --- src/doc/CHANGES:1.2351 Thu Jan 25 22:49:32 2018 +++ src/doc/CHANGES Sat Jan 27 15:31:10 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2351 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2352 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -105,3 +105,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: raid(4): Add support for 32-bit on 64-bit kernel. [mrg 20180117] zoneinfo: Import tzdata2018c (skipping 2018a & 2018b). [kre 20180124] libc: Update to tzcode2018c. [christos 20180125] + i386: Add support for SMAP. [maxv 20180128]
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Jan 27 14:17:46 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_platform.c Log Message: Apply RTL8211E "no-tx-delay" workaround to NanoPi NEO Plus2 boards as well. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/sunxi/sunxi_platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_platform.c diff -u src/sys/arch/arm/sunxi/sunxi_platform.c:1.18 src/sys/arch/arm/sunxi/sunxi_platform.c:1.19 --- src/sys/arch/arm/sunxi/sunxi_platform.c:1.18 Sat Dec 23 12:50:55 2017 +++ src/sys/arch/arm/sunxi/sunxi_platform.c Sat Jan 27 14:17:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_platform.c,v 1.18 2017/12/23 12:50:55 jmcneill Exp $ */ +/* $NetBSD: sunxi_platform.c,v 1.19 2018/01/27 14:17:45 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -31,7 +31,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.18 2017/12/23 12:50:55 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.19 2018/01/27 14:17:45 jmcneill Exp $"); #include #include @@ -140,8 +140,12 @@ sunxi_platform_device_register(device_t prop_dictionary_t prop = device_properties(self); if (device_is_a(self, "rgephy")) { - /* Pine64+ gigabit ethernet workaround */ - const char * compat[] = { "pine64,pine64-plus", NULL }; + /* Pine64+ and NanoPi NEO Plus2 gigabit ethernet workaround */ + const char * compat[] = { + "pine64,pine64-plus", + "friendlyarm,nanopi-neo-plus2", + NULL + }; if (of_match_compatible(OF_finddevice("/"), compat)) { prop_dictionary_set_bool(prop, "no-rx-delay", true); }
CVS commit: src/sys/arch
Module Name:src Committed By: flxd Date: Sat Jan 27 10:07:41 UTC 2018 Modified Files: src/sys/arch/evbppc/mpc85xx: machdep.c src/sys/arch/powerpc/booke: trap.c Log Message: Fix more printf format strings for mfspr() (hi mrg). To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/evbppc/mpc85xx/machdep.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/booke/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.42 src/sys/arch/evbppc/mpc85xx/machdep.c:1.43 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.42 Thu Dec 22 14:47:57 2016 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Sat Jan 27 10:07:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.42 2016/12/22 14:47:57 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.43 2018/01/27 10:07:41 flxd Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -1245,8 +1245,8 @@ initppc(vaddr_t startkernel, vaddr_t end /* * */ - printf(" hid0=%#lx/%#lx", hid0, mfspr(SPR_HID0)); - printf(" hid1=%#lx", mfspr(SPR_HID1)); + printf(" hid0=%#lx/%#jx", hid0, (uintmax_t)mfspr(SPR_HID0)); + printf(" hid1=%#jx", (uintmax_t)mfspr(SPR_HID1)); printf(" pordevsr=%#x", cpu_read_4(GLOBAL_BASE + PORDEVSR)); printf(" devdisr=%#x", cpu_read_4(GLOBAL_BASE + DEVDISR)); Index: src/sys/arch/powerpc/booke/trap.c diff -u src/sys/arch/powerpc/booke/trap.c:1.26 src/sys/arch/powerpc/booke/trap.c:1.27 --- src/sys/arch/powerpc/booke/trap.c:1.26 Thu Jul 31 12:11:37 2014 +++ src/sys/arch/powerpc/booke/trap.c Sat Jan 27 10:07:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.26 2014/07/31 12:11:37 joerg Exp $ */ +/* $NetBSD: trap.c,v 1.27 2018/01/27 10:07:41 flxd Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.26 2014/07/31 12:11:37 joerg Exp $"); +__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.27 2018/01/27 10:07:41 flxd Exp $"); #include #include @@ -734,9 +734,10 @@ trap(enum ppc_booke_exceptions trap_code if ((VM_MAX_ADDRESS & 0x8000) == 0 && usertrap && (tf->tf_fixreg[1] & 0x8000)) { - printf("%s(entry): pid %d.%d (%s): %s invalid sp %#lx (sprg1=%#lx)\n", - __func__, p->p_pid, l->l_lid, p->p_comm, - trap_names[trap_code], tf->tf_fixreg[1], mfspr(SPR_SPRG1)); + printf("%s(entry): pid %d.%d (%s): %s invalid sp %#lx " + "(sprg1=%#jx)\n", __func__, p->p_pid, l->l_lid, p->p_comm, + trap_names[trap_code], tf->tf_fixreg[1], + (uintmax_t)mfspr(SPR_SPRG1)); dump_trapframe(tf, NULL); Debugger(); }
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Sat Jan 27 09:33:25 UTC 2018 Modified Files: src/sys/arch/i386/i386: copy.S trap.c src/sys/arch/i386/include: frameasm.h src/sys/arch/x86/x86: cpu.c patch.c Log Message: Add SMAP support for i386. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/i386/i386/copy.S cvs rdiff -u -r1.291 -r1.292 src/sys/arch/i386/i386/trap.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/i386/include/frameasm.h cvs rdiff -u -r1.146 -r1.147 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x86/x86/patch.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/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.26 src/sys/arch/i386/i386/copy.S:1.27 --- src/sys/arch/i386/i386/copy.S:1.26 Sat Jan 27 07:45:57 2018 +++ src/sys/arch/i386/i386/copy.S Sat Jan 27 09:33:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.26 2018/01/27 07:45:57 maxv Exp $ */ +/* $NetBSD: copy.S,v 1.27 2018/01/27 09:33:25 maxv Exp $ */ /* * Copyright (c) 1998, 2000, 2004, 2008 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.26 2018/01/27 07:45:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.27 2018/01/27 09:33:25 maxv Exp $"); #include "assym.h" @@ -234,6 +234,7 @@ ENTRY(copyout) cmpl $VM_MAXUSER_ADDRESS,%edx ja _C_LABEL(copy_efault) + SMAP_DISABLE .Lcopyout_start: movl %eax,%ecx shrl $2,%ecx @@ -245,6 +246,7 @@ ENTRY(copyout) rep movsb .Lcopyout_end: + SMAP_ENABLE popl %edi popl %esi @@ -272,6 +274,7 @@ ENTRY(copyin) cmpl $VM_MAXUSER_ADDRESS,%edx ja _C_LABEL(copy_efault) + SMAP_DISABLE .Lcopyin_start: movl %eax,%ecx shrl $2,%ecx @@ -283,6 +286,7 @@ ENTRY(copyin) rep movsb .Lcopyin_end: + SMAP_ENABLE popl %edi popl %esi @@ -311,6 +315,7 @@ NENTRY(kcopy_fault) END(kcopy_fault) NENTRY(copy_fault) + SMAP_ENABLE popl %edi popl %esi ret @@ -350,6 +355,7 @@ ENTRY(copyoutstr) movl %eax,20(%esp) 1: incl %edx + SMAP_DISABLE .Lcopyoutstr_start: 1: decl %edx jz 2f @@ -358,6 +364,7 @@ ENTRY(copyoutstr) testb %al,%al jnz 1b .Lcopyoutstr_end: + SMAP_ENABLE /* Success -- 0 byte reached. */ decl %edx @@ -365,6 +372,7 @@ ENTRY(copyoutstr) jmp copystr_return 2: /* edx is zero -- return EFAULT or ENAMETOOLONG. */ + SMAP_ENABLE cmpl $VM_MAXUSER_ADDRESS,%edi jae _C_LABEL(copystr_efault) movl $ENAMETOOLONG,%eax @@ -400,6 +408,7 @@ ENTRY(copyinstr) movl %eax,20(%esp) 1: incl %edx + SMAP_DISABLE .Lcopyinstr_start: 1: decl %edx jz 2f @@ -408,6 +417,7 @@ ENTRY(copyinstr) testb %al,%al jnz 1b .Lcopyinstr_end: + SMAP_ENABLE /* Success -- 0 byte reached. */ decl %edx @@ -415,6 +425,7 @@ ENTRY(copyinstr) jmp copystr_return 2: /* edx is zero -- return EFAULT or ENAMETOOLONG. */ + SMAP_ENABLE cmpl $VM_MAXUSER_ADDRESS,%esi jae _C_LABEL(copystr_efault) movl $ENAMETOOLONG,%eax @@ -428,6 +439,7 @@ NENTRY(copystr_efault) END(copystr_efault) NENTRY(copystr_fault) + SMAP_ENABLE copystr_return: /* Set *lencopied and return %eax. */ movl 20(%esp),%ecx @@ -499,7 +511,9 @@ ENTRY(fuword) GET_CURPCB(%ecx) movl $_C_LABEL(fusufault),PCB_ONFAULT(%ecx) + SMAP_DISABLE movl (%edx),%eax + SMAP_ENABLE movl $0,PCB_ONFAULT(%ecx) ret @@ -522,7 +536,9 @@ ENTRY(fuswintr) movl L_PCB(%ecx),%ecx movl $_C_LABEL(fusubail),PCB_ONFAULT(%ecx) + SMAP_DISABLE movzwl (%edx),%eax + SMAP_ENABLE movl $0,PCB_ONFAULT(%ecx) ret @@ -541,7 +557,9 @@ ENTRY(fubyte) GET_CURPCB(%ecx) movl $_C_LABEL(fusufault),PCB_ONFAULT(%ecx) + SMAP_DISABLE movzbl (%edx),%eax + SMAP_ENABLE movl $0,PCB_ONFAULT(%ecx) ret @@ -552,6 +570,7 @@ END(fubyte) * Handle faults from [fs]u*(). Clean up and return -1. */ NENTRY(fusufault) + SMAP_ENABLE movl $0,PCB_ONFAULT(%ecx) movl $-1,%eax ret @@ -563,6 +582,7 @@ END(fusufault) * than trying to page fault. */ NENTRY(fusubail) + SMAP_ENABLE movl $0,PCB_ONFAULT(%ecx) movl $-1,%eax ret @@ -593,7 +613,9 @@ ENTRY(suswintr) movl $_C_LABEL(fusubail),PCB_ONFAULT(%ecx) movl 8(%esp),%eax + SMAP_DISABLE movw %ax,(%edx) + SMAP_ENABLE xorl %eax,%eax movl %eax,PCB_ONFAULT(%ecx) @@ -614,7 +636,9 @@ ENTRY(subyte) movl $_C_LABEL(fusufault),PCB_ONFAULT(%ecx) movb 8(%esp),%al + SMAP_DISABLE movb %al,(%edx) + SMAP_ENABLE xorl %eax,%eax movl %eax,PCB_ONFAULT(%ecx) @@ -636,11 +660,13 @@ ENTRY(ucas_32) cmpl $VM_MAXUSER_ADDRESS-4,%edx ja _C_LABEL(ucas_efault) + SMAP_DISABLE .Lucas32_start: /* Perform the CAS */ lock cmpxchgl %ecx,(%edx) .Lucas32_end: + SMAP_ENABLE /* * Note: %eax is "old" value. @@ -659,6 +685,7 @@ NENTRY(ucas_efault) END(ucas_efault) NENTRY(ucas_fault) + SMAP_ENABLE ret END(ucas_fault) @@ -693,6 +720,7 @@ ENTRY(x86_copyargs) cmpl $VM_MAXUSER_ADDRESS,%eax ja
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Sat Jan 27 08:12:27 UTC 2018 Modified Files: src/sys/arch/amd64/include: frameasm.h src/sys/arch/i386/include: frameasm.h Log Message: Remove DO_DEFERRED_SWITCH and DO_DEFERRED_SWITCH_RETRY, unused. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/include/frameasm.h cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/include/frameasm.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/include/frameasm.h diff -u src/sys/arch/amd64/include/frameasm.h:1.31 src/sys/arch/amd64/include/frameasm.h:1.32 --- src/sys/arch/amd64/include/frameasm.h:1.31 Sun Jan 21 11:21:40 2018 +++ src/sys/arch/amd64/include/frameasm.h Sat Jan 27 08:12:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.31 2018/01/21 11:21:40 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.32 2018/01/27 08:12:27 maxv Exp $ */ #ifndef _AMD64_MACHINE_FRAMEASM_H #define _AMD64_MACHINE_FRAMEASM_H @@ -174,12 +174,6 @@ usertrap; \ XEN_ONLY2(andb $0xfc,(%rsp);) \ pushq %r13 ; -#define DO_DEFERRED_SWITCH \ - cmpl $0, CPUVAR(WANT_PMAPLOAD) ; \ - jz 1f ; \ - call _C_LABEL(do_pmap_load) ; \ -1: - #define CHECK_DEFERRED_SWITCH \ cmpl $0, CPUVAR(WANT_PMAPLOAD) Index: src/sys/arch/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.22 src/sys/arch/i386/include/frameasm.h:1.23 --- src/sys/arch/i386/include/frameasm.h:1.22 Sat Jan 27 08:05:14 2018 +++ src/sys/arch/i386/include/frameasm.h Sat Jan 27 08:12:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.22 2018/01/27 08:05:14 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.23 2018/01/27 08:12:27 maxv Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -67,20 +67,6 @@ #define INTRFASTEXIT \ jmp intrfastexit -#define DO_DEFERRED_SWITCH \ - cmpl $0, CPUVAR(WANT_PMAPLOAD) ; \ - jz 1f ; \ - call _C_LABEL(pmap_load) ; \ - 1: - -#define DO_DEFERRED_SWITCH_RETRY \ - 1: ; \ - cmpl $0, CPUVAR(WANT_PMAPLOAD) ; \ - jz 1f ; \ - call _C_LABEL(pmap_load) ; \ - jmp 1b ; \ - 1: - #define CHECK_DEFERRED_SWITCH \ cmpl $0, CPUVAR(WANT_PMAPLOAD)
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sat Jan 27 08:05:14 UTC 2018 Modified Files: src/sys/arch/i386/include: frameasm.h Log Message: Use .pushsection (like amd64), and align INTRENTRY. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/include/frameasm.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/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.21 src/sys/arch/i386/include/frameasm.h:1.22 --- src/sys/arch/i386/include/frameasm.h:1.21 Sun Jan 7 13:43:24 2018 +++ src/sys/arch/i386/include/frameasm.h Sat Jan 27 08:05:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.21 2018/01/07 13:43:24 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.22 2018/01/27 08:05:14 maxv Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -34,34 +34,34 @@ #define HOTPATCH(name, size) \ 123: ; \ - .section .rodata.hotpatch, "a" ; \ + .pushsection .rodata.hotpatch, "a" ; \ .byte name ; \ .byte size ; \ .long 123b ; \ - .previous + .popsection /* * These are used on interrupt or trap entry or exit. */ #define INTRENTRY \ subl $TF_PUSHSIZE,%esp ; \ - movw %gs,TF_GS(%esp) ; \ - movw %fs,TF_FS(%esp) ; \ + movw %gs,TF_GS(%esp) ; \ + movw %fs,TF_FS(%esp) ; \ movl %eax,TF_EAX(%esp) ; \ - movw %es,TF_ES(%esp) ; \ - movw %ds,TF_DS(%esp) ; \ + movw %es,TF_ES(%esp) ; \ + movw %ds,TF_DS(%esp) ; \ movl $GSEL(GDATA_SEL, SEL_KPL),%eax ; \ movl %edi,TF_EDI(%esp) ; \ movl %esi,TF_ESI(%esp) ; \ - movw %ax,%ds ; \ + movw %ax,%ds ; \ movl %ebp,TF_EBP(%esp) ; \ - movw %ax,%es ; \ + movw %ax,%es ; \ movl %ebx,TF_EBX(%esp) ; \ - movw %ax,%gs ; \ + movw %ax,%gs ; \ movl %edx,TF_EDX(%esp) ; \ movl $GSEL(GCPU_SEL, SEL_KPL),%eax ; \ movl %ecx,TF_ECX(%esp) ; \ - movl %eax,%fs ; \ + movl %eax,%fs ; \ cld #define INTRFASTEXIT \