CVS commit: src/lib/libcurses

2020-07-13 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jul 14 04:39:39 UTC 2020

Modified Files:
src/lib/libcurses: newwin.c

Log Message:
newwin - fix crash with negative ncols.

When support for negative nrows/ncols was added, one s/ncols/maxx/ was
missed so we ended up passing negative (i.e. huge unsigned) length
when hashing the line contents.

Reported by Naman Jain in PR lib/55484


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libcurses/newwin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/newwin.c
diff -u src/lib/libcurses/newwin.c:1.57 src/lib/libcurses/newwin.c:1.58
--- src/lib/libcurses/newwin.c:1.57	Sun Jun  9 07:40:14 2019
+++ src/lib/libcurses/newwin.c	Tue Jul 14 04:39:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: newwin.c,v 1.57 2019/06/09 07:40:14 blymn Exp $	*/
+/*	$NetBSD: newwin.c,v 1.58 2020/07/14 04:39:39 uwe Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)newwin.c	8.3 (Berkeley) 7/27/94";
 #else
-__RCSID("$NetBSD: newwin.c,v 1.57 2019/06/09 07:40:14 blymn Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.58 2020/07/14 04:39:39 uwe Exp $");
 #endif
 #endif/* not lint */
 
@@ -174,7 +174,7 @@ __newwin(SCREEN *screen, int nlines, int
 #endif /* HAVE_WCHAR */
 		}
 		lp->hash = __hash((char *)(void *)lp->line,
-  (size_t)(ncols * __LDATASIZE));
+  (size_t)(maxx * __LDATASIZE));
 	}
 	return (win);
 }



CVS commit: src/sys/arch/amd64/conf

2020-07-13 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Jul 14 01:05:07 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
Enable PCPU_IDT option by default


To generate a diff of this commit:
cvs rdiff -u -r1.571 -r1.572 src/sys/arch/amd64/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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.571 src/sys/arch/amd64/conf/GENERIC:1.572
--- src/sys/arch/amd64/conf/GENERIC:1.571	Wed Jun 24 03:38:54 2020
+++ src/sys/arch/amd64/conf/GENERIC	Tue Jul 14 01:05:06 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.571 2020/06/24 03:38:54 thorpej Exp $
+# $NetBSD: GENERIC,v 1.572 2020/07/14 01:05:06 yamaguchi 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.571 $"
+#ident		"GENERIC-$Revision: 1.572 $"
 
 maxusers	64		# estimated number of users
 
@@ -76,6 +76,7 @@ options 	SYSCTL_INCLUDE_DESCR	# Include 
 # CPU-related options
 #options 	USER_LDT	# User-settable LDT, used by Wine
 options 	SVS		# Separate Virtual Space
+options 	PCPU_IDT	# Per CPU IDTs
 
 # GCC Spectre variant 2 migitation
 makeoptions	SPECTRE_V2_GCC_MITIGATION=1



CVS commit: src/usr.bin/sys_info

2020-07-13 Thread Jeremy C. Reed
Module Name:src
Committed By:   reed
Date:   Tue Jul 14 01:01:05 UTC 2020

Modified Files:
src/usr.bin/sys_info: sys_info.sh

Log Message:
show the verbose commands for bozohttpd and calendar too

And bump the version.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/sys_info/sys_info.sh

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/sys_info/sys_info.sh
diff -u src/usr.bin/sys_info/sys_info.sh:1.17 src/usr.bin/sys_info/sys_info.sh:1.18
--- src/usr.bin/sys_info/sys_info.sh:1.17	Thu Sep 28 18:08:04 2017
+++ src/usr.bin/sys_info/sys_info.sh	Tue Jul 14 01:01:05 2020
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: sys_info.sh,v 1.17 2017/09/28 18:08:04 agc Exp $
+# $NetBSD: sys_info.sh,v 1.18 2020/07/14 01:01:05 reed Exp $
 
 # Copyright (c) 2016 Alistair Crooks 
 # All rights reserved.
@@ -26,7 +26,7 @@
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-SYS_INFO_VERSION=20170928
+SYS_INFO_VERSION=20200714
 
 PATH=$(sysctl -n user.cs_path)
 export PATH
@@ -110,7 +110,7 @@ getversion() {
 		run "named -v | awk '{ gsub(\"-\", \"\", \$2); gsub(\"P\", \"pl\", \$2); print tolower(\$1) \"-\" \$2 }'"
 		$all || return 0 ;&
 	bozohttpd|httpd)
-		v=$(run "${destdir}/usr/libexec/httpd -G" 2>/dev/null)
+		v=$(run "${destdir}/usr/libexec/httpd -G")
 		case "${v}" in
 		"")
 			run  "strings -a ${destdir}/usr/libexec/httpd | awk -F/ '\$1 == \"bozohttpd\" && NF == 2 { print \$1 \"-\" \$2; exit }'"
@@ -124,7 +124,7 @@ getversion() {
 		run  "bzip2 --help 2>&1 | awk '{ sub(\",\", \"\", \$7); print \"bzip2-\" \$7; exit }'"
 		$all || return 0 ;&
 	calendar)
-		v=$(run "calendar -v" 2>/dev/null || true)
+		v=$(run "calendar -v" || true)
 		case "${v}" in
 		"")	printf '%s\n' "calendar-20150701" ;;
 		*)	printf '%s\n' "${v}" ;;



CVS commit: src/sys

2020-07-13 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Tue Jul 14 00:45:53 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: db_interface.c machdep.c
src/sys/arch/amd64/conf: ALL
src/sys/arch/amd64/include: segments.h
src/sys/arch/i386/conf: ALL
src/sys/arch/i386/i386: db_interface.c machdep.c trap.c
src/sys/arch/i386/include: segments.h
src/sys/arch/x86/conf: files.x86
src/sys/arch/x86/include: cpu.h cpuvar.h pmap.h
src/sys/arch/x86/x86: cpu.c hyperv.c idt.c intr.c lapic.c pmap.c svs.c
src/sys/arch/xen/x86: cpu.c
src/sys/arch/xen/xen: hypervisor.c
src/sys/dev/hyperv: vmbusvar.h
src/sys/dev/nvmm/x86: nvmm_x86_vmx.c

Log Message:
Introduce per-cpu IDTs

This is realized by following modifications:
- Add IDT pages and its allocation maps for each cpu in "struct cpu_info"
- Load per-cpu IDTs at cpu_init_idt(struct cpu_info*)
- Copy the IDT entries for cpu0 to other CPUs at attach
   - These are, for example, exceptions, db, system calls, etc.

And, added a kernel option named PCPU_IDT to enable the feature.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/amd64/amd64/db_interface.c
cvs rdiff -u -r1.355 -r1.356 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.155 -r1.156 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amd64/include/segments.h
cvs rdiff -u -r1.493 -r1.494 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/i386/i386/db_interface.c
cvs rdiff -u -r1.830 -r1.831 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.303 -r1.304 src/sys/arch/i386/i386/trap.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/i386/include/segments.h
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/x86/conf/files.x86
cvs rdiff -u -r1.126 -r1.127 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/include/cpuvar.h
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.194 -r1.195 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/x86/hyperv.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/x86/idt.c
cvs rdiff -u -r1.151 -r1.152 src/sys/arch/x86/x86/intr.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/x86/x86/lapic.c
cvs rdiff -u -r1.399 -r1.400 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x86/x86/svs.c
cvs rdiff -u -r1.138 -r1.139 src/sys/arch/xen/x86/cpu.c
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/xen/xen/hypervisor.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/hyperv/vmbusvar.h
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/db_interface.c
diff -u src/sys/arch/amd64/amd64/db_interface.c:1.37 src/sys/arch/amd64/amd64/db_interface.c:1.38
--- src/sys/arch/amd64/amd64/db_interface.c:1.37	Sat Feb 29 15:00:28 2020
+++ src/sys/arch/amd64/amd64/db_interface.c	Tue Jul 14 00:45:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.37 2020/02/29 15:00:28 christos Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.38 2020/07/14 00:45:52 yamaguchi Exp $	*/
 
 /*
  * Mach Operating System
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.37 2020/02/29 15:00:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.38 2020/07/14 00:45:52 yamaguchi Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -111,12 +111,14 @@ db_machine_init(void)
 
 #ifdef MULTIPROCESSOR
 #ifndef XENPV
+	struct idt_vec *iv = &(cpu_info_primary.ci_idtvec);
 	vector *handler = _ddbipi;
+	idt_descriptor_t *idt = iv->iv_idt;
 #if NLAPIC > 0
 	if (lapic_is_x2apic())
 		handler = _x2apic_ddbipi;
 #endif
-	ddb_vec = idt_vec_alloc(0xf0, 0xff);
+	ddb_vec = idt_vec_alloc(iv, 0xf0, 0xff);
 	set_idtgate([ddb_vec], handler, 1, SDT_SYS386IGT, SEL_KPL,
 	GSEL(GCODE_SEL, SEL_KPL));
 #else

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.355 src/sys/arch/amd64/amd64/machdep.c:1.356
--- src/sys/arch/amd64/amd64/machdep.c:1.355	Sun May 10 06:30:57 2020
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Jul 14 00:45:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.355 2020/05/10 06:30:57 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.356 2020/07/14 00:45:52 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.355 2020/05/10 06:30:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.356 2020/07/14 00:45:52 yamaguchi Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -1392,11 +1392,15 @@ char *ldtstore;
 char *gdtstore;
 
 void
-setgate(struct gate_descriptor *gd, void *func, int ist, int type, int dpl, int sel)
+setgate(struct gate_descriptor *gd, void *func,
+int ist, int type, int dpl, int sel)
 {
+	vaddr_t vaddr;
+
+	vaddr = ((vaddr_t)gd) & 

CVS commit: src/share/dict

2020-07-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jul 13 23:56:42 UTC 2020

Modified Files:
src/share/dict: web2

Log Message:
+corvid

This file already has "covid" somehow, and while that's fine now my
best guess is that it was originally an OCR blooper for "corvid",
which is missing.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/share/dict/web2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/dict/web2
diff -u src/share/dict/web2:1.52 src/share/dict/web2:1.53
--- src/share/dict/web2:1.52	Sun Jul 15 06:40:39 2018
+++ src/share/dict/web2	Mon Jul 13 23:56:41 2020
@@ -43571,6 +43571,7 @@ coruscation
 corver
 corvette
 corvetto
+corvid
 Corvidae
 corviform
 corvillosum



CVS commit: src/sys/arch/xen/xen

2020-07-13 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Mon Jul 13 21:21:57 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
change xbd_unmap_align() to get the bp via argument rathen than
req_bp, to avoid using req_bp after it's been set to NULL by the
time xbd_unmap_align() is called in xbd_handler(); this fixes
regression caused by previous fix

also make sure xbd_unmap_align() works correctly even when using the
linked request pair for I/O (ie. for Dom0 not supporting indirect
segments), regardless of the order the paired requests finish


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/xen/xen/xbd_xenbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.128 src/sys/arch/xen/xen/xbd_xenbus.c:1.129
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.128	Mon Jun 29 21:45:50 2020
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Mon Jul 13 21:21:56 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbd_xenbus.c,v 1.128 2020/06/29 21:45:50 jdolecek Exp $  */
+/*  $NetBSD: xbd_xenbus.c,v 1.129 2020/07/13 21:21:56 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.128 2020/06/29 21:45:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.129 2020/07/13 21:21:56 jdolecek Exp $");
 
 #include "opt_xen.h"
 
@@ -157,7 +157,7 @@ struct xbd_xenbus_softc {
 	SLIST_HEAD(,xbd_indirect) sc_indirect_head;
 
 	vmem_addr_t sc_unalign_buffer;
-	struct xbd_req *sc_unalign_used;
+	void *sc_unalign_used;
 
 	int sc_backend_status; /* our status with backend */
 #define BLKIF_STATE_DISCONNECTED 0
@@ -206,7 +206,8 @@ static void xbd_diskstart_submit(struct 
 static void xbd_diskstart_submit_indirect(struct xbd_xenbus_softc *,
 	struct xbd_req *, struct buf *bp);
 static int  xbd_map_align(struct xbd_xenbus_softc *, struct xbd_req *);
-static void xbd_unmap_align(struct xbd_xenbus_softc *, struct xbd_req *, bool);
+static void xbd_unmap_align(struct xbd_xenbus_softc *, struct xbd_req *,
+	struct buf *);
 
 static void xbdminphys(struct buf *);
 
@@ -887,7 +888,7 @@ again:
 		bus_dmamap_unload(sc->sc_xbusd->xbusd_dmat, xbdreq->req_dmamap);
 
 		if (__predict_false(bp->b_data != xbdreq->req_data))
-			xbd_unmap_align(sc, xbdreq, true);
+			xbd_unmap_align(sc, xbdreq, bp);
 		xbdreq->req_data = NULL;
 
 		dk_done(>sc_dksc, bp);
@@ -1187,7 +1188,7 @@ xbd_diskstart(device_t self, struct buf 
 		printf("%s: %s: bus_dmamap_load failed\n",
 		device_xname(sc->sc_dksc.sc_dev), __func__);
 		if (__predict_false(bp->b_data != xbdreq->req_data))
-			xbd_unmap_align(sc, xbdreq, false);
+			xbd_unmap_align(sc, xbdreq, NULL);
 		error = EINVAL;
 		goto out;
 	}
@@ -1213,7 +1214,7 @@ xbd_diskstart(device_t self, struct buf 
 			bus_dmamap_unload(sc->sc_xbusd->xbusd_dmat,
 			xbdreq->req_dmamap);
 			if (__predict_false(bp->b_data != xbdreq->req_data))
-xbd_unmap_align(sc, xbdreq, false);
+xbd_unmap_align(sc, xbdreq, NULL);
 			error = EAGAIN;
 			goto out;
 		}
@@ -1243,7 +1244,7 @@ xbd_diskstart(device_t self, struct buf 
 		xbdreq->req_parent_done = false;
 		xbdreq2->req_parent = xbdreq;
 		xbdreq2->req_bp = bp;
-		xbdreq2->req_data = NULL;
+		xbdreq2->req_data = xbdreq->req_data;
 		xbd_diskstart_submit(sc, xbdreq2->req_id,
 		bp, XBD_MAX_CHUNK, xbdreq->req_dmamap,
 		xbdreq->req_gntref);
@@ -1379,7 +1380,7 @@ xbd_map_align(struct xbd_xenbus_softc *s
 		sc->sc_cnt_unalign_busy.ev_count++;
 		return EAGAIN;
 	}
-	sc->sc_unalign_used = req;
+	sc->sc_unalign_used = req->req_bp;
 
 	KASSERT(req->req_bp->b_bcount <= MAXPHYS);
 	req->req_data = (void *)sc->sc_unalign_buffer;
@@ -1390,11 +1391,11 @@ xbd_map_align(struct xbd_xenbus_softc *s
 }
 
 static void
-xbd_unmap_align(struct xbd_xenbus_softc *sc, struct xbd_req *req, bool sync)
+xbd_unmap_align(struct xbd_xenbus_softc *sc, struct xbd_req *req,
+struct buf *bp)
 {
-	KASSERT(sc->sc_unalign_used == req);
-	if (sync && req->req_bp->b_flags & B_READ)
-		memcpy(req->req_bp->b_data, req->req_data,
-		req->req_bp->b_bcount);
+	KASSERT(!bp || sc->sc_unalign_used == bp);
+	if (bp && bp->b_flags & B_READ)
+		memcpy(bp->b_data, req->req_data, bp->b_bcount);
 	sc->sc_unalign_used = NULL;
 }



CVS commit: src/sys/arch

2020-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 13 16:54:03 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: fpu.c
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Use pcu_save_all_on_cpu, not pcu_save.

We don't care what curlwp is here; we care whose state is in the fpu
registers.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/fpu.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/arm/vfp/vfp_init.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/fpu.c
diff -u src/sys/arch/aarch64/aarch64/fpu.c:1.6 src/sys/arch/aarch64/aarch64/fpu.c:1.7
--- src/sys/arch/aarch64/aarch64/fpu.c:1.6	Mon Jul 13 16:52:23 2020
+++ src/sys/arch/aarch64/aarch64/fpu.c	Mon Jul 13 16:54:03 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.6 2020/07/13 16:52:23 riastradh Exp $ */
+/* $NetBSD: fpu.c,v 1.7 2020/07/13 16:54:03 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.6 2020/07/13 16:52:23 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.7 2020/07/13 16:54:03 riastradh Exp $");
 
 #include 
 #include 
@@ -179,7 +179,6 @@ fpu_state_release(lwp_t *l)
 void
 fpu_kern_enter(void)
 {
-	struct lwp *l = curlwp;
 	struct cpu_info *ci;
 	int s;
 
@@ -196,14 +195,8 @@ fpu_kern_enter(void)
 	KASSERT(ci->ci_kfpu_spl == -1);
 	ci->ci_kfpu_spl = s;
 
-	/*
-	 * If we are in a softint and have a pinned lwp, the fpu state
-	 * is that of the pinned lwp, so save it there.
-	 */
-	if ((l->l_pflag & LP_INTR) && (l->l_switchto != NULL))
-		l = l->l_switchto;
-	if (fpu_used_p(l))
-		fpu_save(l);
+	/* Save any fpu state on the current CPU.  */
+	pcu_save_all_on_cpu();
 
 	/*
 	 * Enable the fpu, and wait until it is enabled before

Index: src/sys/arch/arm/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.67 src/sys/arch/arm/vfp/vfp_init.c:1.68
--- src/sys/arch/arm/vfp/vfp_init.c:1.67	Mon Jul 13 16:53:06 2020
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Jul 13 16:54:03 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.67 2020/07/13 16:53:06 riastradh Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.68 2020/07/13 16:54:03 riastradh Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -32,7 +32,7 @@
 #include "opt_cputypes.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfp_init.c,v 1.67 2020/07/13 16:53:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfp_init.c,v 1.68 2020/07/13 16:54:03 riastradh Exp $");
 
 #include 
 #include 
@@ -668,7 +668,6 @@ vfp_setcontext(struct lwp *l, const mcon
 void
 fpu_kern_enter(void)
 {
-	struct lwp *l = curlwp;
 	struct cpu_info *ci;
 	uint32_t fpexc;
 	int s;
@@ -686,14 +685,8 @@ fpu_kern_enter(void)
 	KASSERT(ci->ci_kfpu_spl == -1);
 	ci->ci_kfpu_spl = s;
 
-	/*
-	 * If we are in a softint and have a pinned lwp, the fpu state
-	 * is that of the pinned lwp, so save it there.
-	 */
-	if ((l->l_pflag & LP_INTR) && (l->l_switchto != NULL))
-		l = l->l_switchto;
-	if (vfp_used_p(l))
-		vfp_savecontext(l);
+	/* Save any fpu state on the current CPU.  */
+	pcu_save_all_on_cpu();
 
 	/* Enable the fpu.  */
 	fpexc = armreg_fpexc_read();



CVS commit: src/sys/arch/arm/vfp

2020-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 13 16:53:06 UTC 2020

Modified Files:
src/sys/arch/arm/vfp: vfp_init.c

Log Message:
Limit arm32 fpu_kern_enter/leave to IPL_VM or below.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/arm/vfp/vfp_init.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/vfp/vfp_init.c
diff -u src/sys/arch/arm/vfp/vfp_init.c:1.66 src/sys/arch/arm/vfp/vfp_init.c:1.67
--- src/sys/arch/arm/vfp/vfp_init.c:1.66	Mon Jun 29 23:56:31 2020
+++ src/sys/arch/arm/vfp/vfp_init.c	Mon Jul 13 16:53:06 2020
@@ -1,4 +1,4 @@
-/*  $NetBSD: vfp_init.c,v 1.66 2020/06/29 23:56:31 riastradh Exp $ */
+/*  $NetBSD: vfp_init.c,v 1.67 2020/07/13 16:53:06 riastradh Exp $ */
 
 /*
  * Copyright (c) 2008 ARM Ltd
@@ -32,7 +32,7 @@
 #include "opt_cputypes.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfp_init.c,v 1.66 2020/06/29 23:56:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfp_init.c,v 1.67 2020/07/13 16:53:06 riastradh Exp $");
 
 #include 
 #include 
@@ -674,14 +674,15 @@ fpu_kern_enter(void)
 	int s;
 
 	/*
-	 * Block all interrupts.  We must block preemption since -- if
-	 * this is a user thread -- there is nowhere to save the kernel
-	 * fpu state, and if we want this to be usable in interrupts,
-	 * we can't let interrupts interfere with the fpu state in use
-	 * since there's nowhere for them to save it.
+	 * Block interrupts up to IPL_VM.  We must block preemption
+	 * since -- if this is a user thread -- there is nowhere to
+	 * save the kernel fpu state, and if we want this to be usable
+	 * in interrupts, we can't let interrupts interfere with the
+	 * fpu state in use since there's nowhere for them to save it.
 	 */
-	s = splhigh();
+	s = splvm();
 	ci = curcpu();
+	KASSERTMSG(ci->ci_cpl <= IPL_VM, "cpl=%d", ci->ci_cpl);
 	KASSERT(ci->ci_kfpu_spl == -1);
 	ci->ci_kfpu_spl = s;
 
@@ -709,7 +710,7 @@ fpu_kern_leave(void)
 	int s;
 	uint32_t fpexc;
 
-	KASSERT(ci->ci_cpl == IPL_HIGH);
+	KASSERT(ci->ci_cpl == IPL_VM);
 	KASSERT(ci->ci_kfpu_spl != -1);
 
 	/*



CVS commit: src/sys/arch/x86/x86

2020-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 13 16:51:51 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Limit x86 fpu_kern_enter/leave to IPL_VM or below.

There are no users of crypto at IPL_SCHED or IPL_HIGH as far as I
know, and although we generally limit the amount of time spent in any
one crypto operation -- e.g., cgd is usually limited to processing
512 or 4096 bytes at a time -- it's better not to block IPL_SCHED and
IPL_HIGH interrupts at all.  This should make ddb a little more
accessible during crypto-heavy workloads.

This means the aes_* API cannot be used at IPL_SCHED or IPL_HIGH; the
same will go for any new crypto subsystems, like the ChaCha and
Poly1305 ones I'm drafting.  It might be better to prohibit them
altogether in hard interrupt context, but right now cprng_fast and
cprng_strong are both technically allowed at IPL_VM and are sometimes
used there (e.g., for opencrypto CBC IV generation).

KASSERT the ilevel to detect violation of this constraint in case I'm
wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/fpu.c
diff -u src/sys/arch/x86/x86/fpu.c:1.67 src/sys/arch/x86/x86/fpu.c:1.68
--- src/sys/arch/x86/x86/fpu.c:1.67	Mon Jul  6 18:30:48 2020
+++ src/sys/arch/x86/x86/fpu.c	Mon Jul 13 16:51:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.67 2020/07/06 18:30:48 riastradh Exp $	*/
+/*	$NetBSD: fpu.c,v 1.68 2020/07/13 16:51:51 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc.  All
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.67 2020/07/06 18:30:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.68 2020/07/13 16:51:51 riastradh Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -370,11 +370,14 @@ fpu_lwp_abandon(struct lwp *l)
 /*
  * fpu_kern_enter()
  *
- *	Begin using the FPU.  Raises to splhigh, disabling all
+ *	Begin using the FPU.  Raises to splvm, disabling most
  *	interrupts and rendering the thread non-preemptible; caller
  *	should not use this for long periods of time, and must call
  *	fpu_kern_leave() afterward.  Non-recursive -- you cannot call
  *	fpu_kern_enter() again without calling fpu_kern_leave() first.
+ *
+ *	Must be used only at IPL_VM or below -- never in IPL_SCHED or
+ *	IPL_HIGH interrupt handlers.
  */
 void
 fpu_kern_enter(void)
@@ -383,9 +386,10 @@ fpu_kern_enter(void)
 	struct cpu_info *ci;
 	int s;
 
-	s = splhigh();
+	s = splvm();
 
 	ci = curcpu();
+	KASSERTMSG(ci->ci_ilevel <= IPL_VM, "ilevel=%d", ci->ci_ilevel);
 	KASSERT(ci->ci_kfpu_spl == -1);
 	ci->ci_kfpu_spl = s;
 
@@ -423,7 +427,7 @@ fpu_kern_leave(void)
 	struct cpu_info *ci = curcpu();
 	int s;
 
-	KASSERT(ci->ci_ilevel == IPL_HIGH);
+	KASSERT(ci->ci_ilevel == IPL_VM);
 	KASSERT(ci->ci_kfpu_spl != -1);
 
 	/*



CVS commit: src/sys/arch/aarch64/aarch64

2020-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 13 16:52:23 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: fpu.c

Log Message:
Limit aarch64 fpu_kern_enter/leave to IPL_VM or below.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/fpu.c
diff -u src/sys/arch/aarch64/aarch64/fpu.c:1.5 src/sys/arch/aarch64/aarch64/fpu.c:1.6
--- src/sys/arch/aarch64/aarch64/fpu.c:1.5	Mon Jun 29 23:53:12 2020
+++ src/sys/arch/aarch64/aarch64/fpu.c	Mon Jul 13 16:52:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.5 2020/06/29 23:53:12 riastradh Exp $ */
+/* $NetBSD: fpu.c,v 1.6 2020/07/13 16:52:23 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.5 2020/06/29 23:53:12 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: fpu.c,v 1.6 2020/07/13 16:52:23 riastradh Exp $");
 
 #include 
 #include 
@@ -184,14 +184,15 @@ fpu_kern_enter(void)
 	int s;
 
 	/*
-	 * Block all interrupts.  We must block preemption since -- if
-	 * this is a user thread -- there is nowhere to save the kernel
-	 * fpu state, and if we want this to be usable in interrupts,
-	 * we can't let interrupts interfere with the fpu state in use
-	 * since there's nowhere for them to save it.
+	 * Block interrupts up to IPL_VM.  We must block preemption
+	 * since -- if this is a user thread -- there is nowhere to
+	 * save the kernel fpu state, and if we want this to be usable
+	 * in interrupts, we can't let interrupts interfere with the
+	 * fpu state in use since there's nowhere for them to save it.
 	 */
-	s = splhigh();
+	s = splvm();
 	ci = curcpu();
+	KASSERTMSG(ci->ci_cpl <= IPL_VM, "cpl=%d", ci->ci_cpl);
 	KASSERT(ci->ci_kfpu_spl == -1);
 	ci->ci_kfpu_spl = s;
 
@@ -219,7 +220,7 @@ fpu_kern_leave(void)
 	struct cpu_info *ci = curcpu();
 	int s;
 
-	KASSERT(ci->ci_cpl == IPL_HIGH);
+	KASSERT(ci->ci_cpl == IPL_VM);
 	KASSERT(ci->ci_kfpu_spl != -1);
 
 	/*



CVS commit: src/share/man/man7

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 15:05:05 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Xref rfc6056(7).


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 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/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.147 src/share/man/man7/sysctl.7:1.148
--- src/share/man/man7/sysctl.7:1.147	Sat Jun 13 20:18:00 2020
+++ src/share/man/man7/sysctl.7	Mon Jul 13 15:05:05 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.147 2020/06/13 20:18:00 ad Exp $
+.\"	$NetBSD: sysctl.7,v 1.148 2020/07/13 15:05:05 jruoho 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 November 14, 2019
+.Dd July 13, 2020
 .Dt SYSCTL 7
 .Os
 .Sh NAME
@@ -1542,7 +1542,9 @@ The available RFC 6056 port randomizatio
 A bitmask of ports that will not be used during anonymous or privileged
 port selection.
 .It Li ip.anonportalgo.selected
-The currently selected RFC 6056 port randomization algorithm.
+The currently selected RFC 6056 port randomization algorithm; see
+.Xr rfc6056 7
+for details.
 .It Li ip.anonportmax
 The highest port number to use for TCP and UDP ephemeral port allocation.
 This cannot be set to less than 1024 or greater than 65535, and must
@@ -1859,7 +1861,9 @@ The available RFC 6056 port randomizatio
 A bitmask of ports that will not be used during anonymous or privileged
 port selection.
 .It Li ip6.anonportalgo.selected
-The currently selected RFC 6056 port randomization algorithm.
+The currently selected RFC 6056 port randomization algorithm; see
+.Xr rfc6056 7
+for details.
 .It Li ip6.anonportmax
 The highest port number to use for TCP and UDP ephemeral port allocation.
 This cannot be set to less than 1024 or greater than 65535, and must



CVS commit: [netbsd-8] src/doc

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:37:41 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1570 - #1573


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/CHANGES-8.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-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.18 src/doc/CHANGES-8.3:1.1.2.19
--- src/doc/CHANGES-8.3:1.1.2.18	Tue Jul  7 19:58:25 2020
+++ src/doc/CHANGES-8.3	Mon Jul 13 14:37:41 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.18 2020/07/07 19:58:25 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.19 2020/07/13 14:37:41 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -259,3 +259,24 @@ external/bsd/nvi/dist/vi/v_txt.c		1.7
 	PR bin/55468: fix crash due to out-of-bounds access with Ctrl-W.
 	[rin, ticket #1569]
 
+external/bsd/dhcpcd/dist/hooks/01-test		(apply patch)
+
+	Fix dhcpcd test not to require /usr.
+	[roy, ticket #1570]
+
+sys/dev/scsipi/scsiconf.c			1.288
+
+	Continue scanning a SCSI bus when a LUN is reported not present.
+	[kim, ticket #1571]
+
+sys/dev/pci/vioscsi.c1.22
+
+	Fix off-by-one SCSI target reporting.
+	[kim, ticket #1572]
+
+sys/dev/usb/ualea.c1.12
+
+	Set up the USB xfer for every transfer, not just once in the attach
+	function.
+	[simonb, ticket #1573]
+



CVS commit: [netbsd-8] src/sys/dev/usb

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:35:29 UTC 2020

Modified Files:
src/sys/dev/usb [netbsd-8]: ualea.c

Log Message:
Pull up following revision(s) (requested by simonb in ticket #1573):

sys/dev/usb/ualea.c: revision 1.12

Set up the USB xfer for every transfer, not just once in the attach
function.  Caught by DIAGNOSTIC on a similar driver.  Thanks to mrg@
for USB xfer clue and martin@ for testing.


To generate a diff of this commit:
cvs rdiff -u -r1.6.8.1 -r1.6.8.2 src/sys/dev/usb/ualea.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ualea.c
diff -u src/sys/dev/usb/ualea.c:1.6.8.1 src/sys/dev/usb/ualea.c:1.6.8.2
--- src/sys/dev/usb/ualea.c:1.6.8.1	Wed Jan 31 18:01:54 2018
+++ src/sys/dev/usb/ualea.c	Mon Jul 13 14:35:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ualea.c,v 1.6.8.1 2018/01/31 18:01:54 martin Exp $	*/
+/*	$NetBSD: ualea.c,v 1.6.8.2 2020/07/13 14:35:29 martin Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.6.8.1 2018/01/31 18:01:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.6.8.2 2020/07/13 14:35:29 martin Exp $");
 
 #include 
 #include 
@@ -144,11 +144,6 @@ ualea_attach(device_t parent, device_t s
 		return;
 	}
 
-	/* Setup the xfer to call ualea_xfer_done with sc.  */
-	usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
-	sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
-	ualea_xfer_done);
-
 	/* Success!  We are ready to run.  */
 	mutex_enter(>sc_lock);
 	sc->sc_attached = true;
@@ -197,6 +192,11 @@ ualea_xfer(struct ualea_softc *sc)
 	if (sc->sc_needed == 0)
 		return;
 
+	/* Setup the xfer to call ualea_xfer_done with sc.  */
+	usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
+	sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
+	ualea_xfer_done);
+
 	/* Issue xfer or complain if we can't.  */
 	/*
 	 * XXX Does USBD_NORMAL_COMPLETION (= 0) make sense here?  The



CVS commit: [netbsd-9] src/doc

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:34:30 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #998 - #1003


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.75 -r1.1.2.76 src/doc/CHANGES-9.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-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.75 src/doc/CHANGES-9.1:1.1.2.76
--- src/doc/CHANGES-9.1:1.1.2.75	Sun Jul 12 11:44:35 2020
+++ src/doc/CHANGES-9.1	Mon Jul 13 14:34:30 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.75 2020/07/12 11:44:35 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.76 2020/07/13 14:34:30 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -3323,3 +3323,55 @@ sys/dev/pci/ixgbe/ixgbe_osdep.h			1.26
 	- Whitespace fix.
 	- Fix typos.
 	[msaitoh, ticket #997]
+
+sys/arch/x86/include/specialreg.h		1.162-1.168
+
+	- AMD CPUID Fn8000_000a %edx bit 20 is "SPEC_CTRL".
+	- Add some bit definitions of AMD's CPUID Fn8000_001f Encrypted Memory
+	  features.
+	- Add AMD INVLPGB/TLBSYNC hypervisor enable in VMCB and TLBSYNC intercept bit.
+	- Add AMD MSR_DE_CFG's bit 1 as DE_CFG_LFENCE_SERIALIZE.
+	- Add some definitions for Intel:
+	  - Add CPUID leaf 6 %eax bit 19 for HW_FEEDBACK* and IA32_PACKAGE_TERM* MSRs.
+	  - Add CPUID leaf 7 %ecx bit 31 for Protection Keys.
+	  - Add definition of Load only TLB and Store only TLB.
+	  - Add IF_PSCHANGE_MC_NO bit of IA32_ARCH_CAPABILITIES
+	  - Fix HWP_IGNIDL.
+	- Add CPUID 7 %edx bit 9 "SRBDS_CTRL"
+	- Modify comment. Style and fix typo.
+	[msaitoh, ticket #998]
+
+external/bsd/dhcpcd/dist/hooks/01-test		(apply patch)
+
+	Fix dhcpcd test not to require /usr.
+	[roy, ticket #999]
+
+sys/dev/scsipi/scsiconf.c			1.288
+
+	Continue scanning a SCSI bus when a LUN is reported not present.
+	[kim, ticket #1000]
+
+sys/dev/pci/vioscsi.c1.22
+
+	Fix off-by-one SCSI target reporting.
+	[kim, ticket #1001]
+
+etc/wscons.conf	1.20,1.21
+sbin/wsconsctl/wsconsctl.8			1.30
+share/man/man4/pckbd.41.23,1.25
+share/man/man4/wskbd.41.18,1.19
+sys/dev/hid/hidkbdmap.c1.4-1.10
+sys/dev/pckbport/wskbdmap_mfii.c		1.28-1.33
+sys/dev/wscons/wsksymdef.h			1.68-1.73
+
+	Adds keyboard layouts for Brazilian Portugese, Canadian French,
+	Estonian, Icelandic, and Latin American Spanish to wscons, and
+	make the documentation of supported layouts less redundant. 
+	[nia, ticket #1002]
+
+sys/dev/usb/ualea.c1.12
+
+	Set up the USB xfer for every transfer, not just once in the attach
+	function.
+	[simonb, ticket #1003]
+



CVS commit: [netbsd-9] src/sys/dev/usb

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:32:20 UTC 2020

Modified Files:
src/sys/dev/usb [netbsd-9]: ualea.c

Log Message:
Pull up following revision(s) (requested by simonb in ticket #1003):

sys/dev/usb/ualea.c: revision 1.12

Set up the USB xfer for every transfer, not just once in the attach
function.  Caught by DIAGNOSTIC on a similar driver.  Thanks to mrg@
for USB xfer clue and martin@ for testing.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/dev/usb/ualea.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ualea.c
diff -u src/sys/dev/usb/ualea.c:1.9 src/sys/dev/usb/ualea.c:1.9.10.1
--- src/sys/dev/usb/ualea.c:1.9	Sun Jan 21 13:57:12 2018
+++ src/sys/dev/usb/ualea.c	Mon Jul 13 14:32:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ualea.c,v 1.9 2018/01/21 13:57:12 skrll Exp $	*/
+/*	$NetBSD: ualea.c,v 1.9.10.1 2020/07/13 14:32:20 martin Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.9 2018/01/21 13:57:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.9.10.1 2020/07/13 14:32:20 martin Exp $");
 
 #include 
 #include 
@@ -144,11 +144,6 @@ ualea_attach(device_t parent, device_t s
 		return;
 	}
 
-	/* Setup the xfer to call ualea_xfer_done with sc.  */
-	usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
-	sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
-	ualea_xfer_done);
-
 	/* Success!  We are ready to run.  */
 	mutex_enter(>sc_lock);
 	sc->sc_attached = true;
@@ -197,6 +192,11 @@ ualea_xfer(struct ualea_softc *sc)
 	if (sc->sc_needed == 0)
 		return;
 
+	/* Setup the xfer to call ualea_xfer_done with sc.  */
+	usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
+	sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
+	ualea_xfer_done);
+
 	/* Issue xfer or complain if we can't.  */
 	/*
 	 * XXX Does USBD_NORMAL_COMPLETION (= 0) make sense here?  The



CVS commit: [netbsd-9] src

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:22:47 UTC 2020

Modified Files:
src/etc [netbsd-9]: wscons.conf
src/sbin/wsconsctl [netbsd-9]: wsconsctl.8
src/share/man/man4 [netbsd-9]: pckbd.4 wskbd.4
src/sys/dev/hid [netbsd-9]: hidkbdmap.c
src/sys/dev/pckbport [netbsd-9]: wskbdmap_mfii.c
src/sys/dev/wscons [netbsd-9]: wsksymdef.h

Log Message:
Pull up following revision(s) (requested by nia in ticket #1002):

sys/dev/wscons/wsksymdef.h: revision 1.68
sys/dev/wscons/wsksymdef.h: revision 1.69
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.28
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.29
sys/dev/hid/hidkbdmap.c: revision 1.10
share/man/man4/pckbd.4: revision 1.23
share/man/man4/wskbd.4: revision 1.18
share/man/man4/wskbd.4: revision 1.19
share/man/man4/pckbd.4: revision 1.25
sys/dev/wscons/wsksymdef.h: revision 1.70
sys/dev/wscons/wsksymdef.h: revision 1.71
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.30
sys/dev/wscons/wsksymdef.h: revision 1.72
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.31
sys/dev/wscons/wsksymdef.h: revision 1.73
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.32
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.33
sys/dev/hid/hidkbdmap.c: revision 1.4
sbin/wsconsctl/wsconsctl.8: revision 1.30
sys/dev/hid/hidkbdmap.c: revision 1.5
etc/wscons.conf: revision 1.20
sys/dev/hid/hidkbdmap.c: revision 1.6
etc/wscons.conf: revision 1.21
sys/dev/hid/hidkbdmap.c: revision 1.7
sys/dev/hid/hidkbdmap.c: revision 1.8
sys/dev/hid/hidkbdmap.c: revision 1.9

Add support for the Brazilian keyboard layout to pckbd and ukbd.

This is significantly different from the European Portugese layout,
and was pieced together from Wikipedia, X11 layout files, and to
some extent with trial and error.

Thanks to lun-4 for helping test this.

PR kern/44570
Update lists of keyboard layouts to add Turkish and Brazilian

Bring br.nodead closer to X11

Add Estonian layout as a variation of Swedish for ukbd and pckbd

Add KB_TR for uhid keyboards (it was PS/2 only, this seems wrong)

Add Icelandic keyboard layout to ukbd/pckbd.

Add keyboard layout for Latin American Spanish to ukbd/pckbd

Canadian French keyboard layout for ukbd/pckbd

Clarify that KB_TR is the "Q" layout - there's two standards for Turkish.

Move description of keyboard layouts to wskbd.4, add newer layouts

Previously, the best reference was pckbd.4. This does not make much
sense to read if you are on, say, an evbarm device with only USB.
wsconsctl.8 contained a vaguer description of supported language names,
which isn't very useful because you can't pass full language names
to the command. Point readers to wskbd.4 instead.

Note in the wskbd.4 page that while all layouts are generally supported
by pckbd(4) and ukbd(4), older keyboard interfaces might only support
a subset.

wskbd.4: Add KB_LA

Point readers at wskbd.4


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.46.1 src/etc/wscons.conf
cvs rdiff -u -r1.28 -r1.28.42.1 src/sbin/wsconsctl/wsconsctl.8
cvs rdiff -u -r1.21.44.1 -r1.21.44.2 src/share/man/man4/pckbd.4
cvs rdiff -u -r1.16 -r1.16.34.1 src/share/man/man4/wskbd.4
cvs rdiff -u -r1.1.10.1 -r1.1.10.2 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.26.10.1 -r1.26.10.2 src/sys/dev/pckbport/wskbdmap_mfii.c
cvs rdiff -u -r1.67 -r1.67.10.1 src/sys/dev/wscons/wsksymdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/wscons.conf
diff -u src/etc/wscons.conf:1.19 src/etc/wscons.conf:1.19.46.1
--- src/etc/wscons.conf:1.19	Fri Jul 22 19:06:23 2011
+++ src/etc/wscons.conf	Mon Jul 13 14:22:47 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: wscons.conf,v 1.19 2011/07/22 19:06:23 christos Exp $
+#	$NetBSD: wscons.conf,v 1.19.46.1 2020/07/13 14:22:47 martin Exp $
 #
 # workstation console configuration
 
@@ -33,10 +33,8 @@ screen	4	-	-
 #keyboard	auto
 
 # Select a kernel builtin keyboard map by uncommenting the following line and
-# altering the country code to your requirements
-# (choose from user, us, uk, be, cz, dk, nl, fi, fr, de, gr, hu, it, jp, no,
-# pl, pt, ru, es, sv, sf, sg, ua)
-# See wsconsctl(8), pckbd(4), ukbd(4) etc. for more details.
+# altering the country code to your requirements.
+# See wskbd(4) for a full list of supported options.
 #encoding sv
 #encoding us.swapctrlcaps
 

Index: src/sbin/wsconsctl/wsconsctl.8
diff -u src/sbin/wsconsctl/wsconsctl.8:1.28 src/sbin/wsconsctl/wsconsctl.8:1.28.42.1
--- src/sbin/wsconsctl/wsconsctl.8:1.28	Tue Feb 14 11:05:32 2012
+++ src/sbin/wsconsctl/wsconsctl.8	Mon Jul 13 14:22:47 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsconsctl.8,v 1.28 2012/02/14 11:05:32 wiz Exp $
+.\" $NetBSD: wsconsctl.8,v 1.28.42.1 2020/07/13 14:22:47 martin Exp $
 .\"
 .\" 

CVS commit: [netbsd-8] src/sys/dev/pci

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:13:12 UTC 2020

Modified Files:
src/sys/dev/pci [netbsd-8]: vioscsi.c

Log Message:
Pull up following revision(s) (requested by kim in ticket #1572):

sys/dev/pci/vioscsi.c: revision 1.22

Fix off-by-one SCSI target reporting

Use max_target as the controller ID instead of zero, so that the device
located at SCSI ID zero (e.g. a disk) is not obscured through not being
probed by scsi_probe_bus() (which skips the controller ID).

Copy the target requested onto the wire without decrementing it by one.

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.1 -r1.19.2.2 src/sys/dev/pci/vioscsi.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/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.19.2.1 src/sys/dev/pci/vioscsi.c:1.19.2.2
--- src/sys/dev/pci/vioscsi.c:1.19.2.1	Mon Jul 15 08:23:23 2019
+++ src/sys/dev/pci/vioscsi.c	Mon Jul 13 14:13:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vioscsi.c,v 1.19.2.1 2019/07/15 08:23:23 martin Exp $	*/
+/*	$NetBSD: vioscsi.c,v 1.19.2.2 2020/07/13 14:13:12 martin Exp $	*/
 /*	$OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.19.2.1 2019/07/15 08:23:23 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.19.2.2 2020/07/13 14:13:12 martin Exp $");
 
 #include 
 #include 
@@ -198,7 +198,7 @@ vioscsi_attach(device_t parent, device_t
 	chan->chan_channel = 0;
 	chan->chan_ntargets = MIN(max_target, 16);	/* cap reasonably */
 	chan->chan_nluns = MIN(max_lun, 1024);		/* cap reasonably */
-	chan->chan_id = 0;
+	chan->chan_id = max_target;
 	chan->chan_flags = SCSIPI_CHAN_NOSETTLE;
 
 	config_found(self, >sc_channel, scsiprint);
@@ -322,7 +322,7 @@ vioscsi_scsipi_request(struct scsipi_cha
 	}
 
 	req->lun[0] = 1;
-	req->lun[1] = periph->periph_target - 1;
+	req->lun[1] = periph->periph_target;
 	req->lun[2] = 0x40 | ((periph->periph_lun >> 8) & 0x3F);
 	req->lun[3] = periph->periph_lun & 0xFF;
 	memset(req->lun + 4, 0, 4);



CVS commit: src/share/man/man4

2020-07-13 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Mon Jul 13 14:11:17 UTC 2020

Modified Files:
src/share/man/man4: wskbd.4

Log Message:
Try to improve markup, PostScript output.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/man/man4/wskbd.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/wskbd.4
diff -u src/share/man/man4/wskbd.4:1.21 src/share/man/man4/wskbd.4:1.22
--- src/share/man/man4/wskbd.4:1.21	Mon Jul 13 11:59:37 2020
+++ src/share/man/man4/wskbd.4	Mon Jul 13 14:11:16 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wskbd.4,v 1.21 2020/07/13 11:59:37 nia Exp $
+.\" $NetBSD: wskbd.4,v 1.22 2020/07/13 14:11:16 uwe Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -47,6 +47,9 @@
 (keyboard of misc hpcmips handheld devices)
 .Cd "wskbd* at btkbd? console ? mux 1"
 (Bluetooth keyboard)
+.Pp
+.In dev/wscons/wsconsio.h
+.In dev/wscons/wsksymdef.h
 .Sh DESCRIPTION
 The
 .Nm
@@ -63,7 +66,7 @@ The common keyboard support consists of:
 .It
 Mapping from keycodes (defined by the specific keyboard driver) to
 keysyms (hardware independent, defined in
-.Pa /usr/include/dev/wscons/wsksymdef.h ) .
+.In dev/wscons/wsksymdef.h ) .
 .It
 Handling of
 .Dq compose
@@ -76,9 +79,9 @@ key is pressed or a
 character is used.
 .It
 Certain translations, like turning an
-.Dq ALT
+.Tn ALT
 modifier into an
-.Dq ESC
+.Tn ESC
 prefix.
 .It
 Automatic key repetition
@@ -97,16 +100,16 @@ The
 driver provides a number of ioctl functions to control key maps
 and other parameters.
 These functions are accessible though the associated
-.Dq wsdisplay
+.Xr wsdisplay 4
 device as well.
 A complete list is in
-.Pa /usr/include/dev/wscons/wsconsio.h .
+.In dev/wscons/wsconsio.h .
 The
 .Xr wsconsctl 8
 utility allows to access key maps and other variables.
 .Pp
 The
-.Em console
+.Cd console
 locator in the configuration line refers to the device's use as input
 part of the operating system console.
 A device specification containing a positive value here will only
@@ -122,81 +125,99 @@ However, generally, all encodings are su
 .Xr pckbd 4
 and
 .Xr ukbd 4 .
-.Bl -column " us.colemak" " KB_US|KB_COLEMAK" "language"
+.Bl -column ".Li us.colemak" ".Dv KB_US|KB_COLEMAK"
 .It Sy "wsconsctl" Ta Sy "define" Ta Sy "language"
-.It Li user Ta KB_USER Ta User-defined
-.It Li us Ta KB_US Ta English/US keyboard mapping (default)
-.It Li uk Ta KB_UK Ta English/UK keyboard mapping
-.It Li be Ta KB_BE Ta Belgian
-.It Li br Ta KB_BR Ta Brazilian with
+.It Li user Ta Dv KB_USER Ta User-defined
+.It Li us Ta Dv KB_US Ta English/US keyboard mapping (default)
+.It Li uk Ta Dv KB_UK Ta English/UK keyboard mapping
+.It Li be Ta Dv KB_BE Ta Belgian
+.It Li br Ta Dv KB_BR Ta Brazilian with
 .Dq dead accents
-.It Li cf Ta KB_CF Ta Canadian French
-.It Li cz Ta KB_CZ Ta Czech (QWERTY)
-.It Li dk Ta KB_DK Ta Danish with
+.It Li cf Ta Dv KB_CF Ta Canadian French
+.It Li cz Ta Dv KB_CZ Ta Czech (QWERTY)
+.It Li dk Ta Dv KB_DK Ta Danish with
 .Dq dead accents
-.It Li nl Ta KB_NL Ta Dutch
-.It Li ee Ta KB_EE Ta Estonian with
+.It Li nl Ta Dv KB_NL Ta Dutch
+.It Li ee Ta Dv KB_EE Ta Estonian with
 .Dq dead accents
-.It Li fi Ta KB_FI Ta Finnish
-.It Li fr Ta KB_FR Ta French
-.It Li de Ta KB_DE Ta German with
+.It Li fi Ta Dv KB_FI Ta Finnish
+.It Li fr Ta Dv KB_FR Ta French
+.It Li de Ta Dv KB_DE Ta German with
 .Dq dead accents
-.It Li gr Ta KB_GR Ta Greek
-.It Li hu Ta KB_HU Ta Hungarian
-.It Li is Ta KB_IS Ta Icelandic with
+.It Li gr Ta Dv KB_GR Ta Greek
+.It Li hu Ta Dv KB_HU Ta Hungarian
+.It Li is Ta Dv KB_IS Ta Icelandic with
 .Dq dead accents
-.It Li it Ta KB_IT Ta Italian
-.It Li jp Ta KB_JP Ta Japanese
-.It Li la Ta KB_LA Ta Latin American Spanish
-.It Li no Ta KB_NO Ta Norwegian with
+.It Li it Ta Dv KB_IT Ta Italian
+.It Li jp Ta Dv KB_JP Ta Japanese
+.It Li la Ta Dv KB_LA Ta Latin American Spanish
+.It Li no Ta Dv KB_NO Ta Norwegian with
 .Dq dead accents
-.It Li pl Ta KB_PL Ta Polish
-.It Li pt Ta KB_PT Ta Portuguese
-.It Li ru Ta KB_RU Ta Russian
-.It Li es Ta KB_ES Ta Spanish
-.It Li sv Ta KB_SV Ta Swedish with
+.It Li pl Ta Dv KB_PL Ta Polish
+.It Li pt Ta Dv KB_PT Ta Portuguese
+.It Li ru Ta Dv KB_RU Ta Russian
+.It Li es Ta Dv KB_ES Ta Spanish
+.It Li sv Ta Dv KB_SV Ta Swedish with
 .Dq dead accents
-.It Li sf Ta KB_SF Ta Swiss French
-.It Li sg Ta KB_SG Ta Swiss German
-.It Li tr Ta KB_TR Ta Turkish (QWERTY) with
+.It Li sf Ta Dv KB_SF Ta Swiss French
+.It Li sg Ta Dv KB_SG Ta Swiss German
+.It Li tr Ta Dv KB_TR Ta Turkish (QWERTY) with
 .Dq dead accents
-.It Li ua Ta KB_UA Ta Ukrainian
-.It Li \ Ta "KB_US|KB_DECLK" Ta English/US mapping for Tn DEC
-.It Ta Ta LK400-style keyboards with PC keyboard
-.It Ta Ta interface (e.g., LK461)
-.It Li us.dvorak Ta "KB_US|KB_DVORAK" Ta English/US keyboard with
-.It Ta Ta Do Dvorak Dc layout
-.It Li us.colemak Ta "KB_US|KB_COLEMAK" Ta 

CVS commit: [netbsd-9] src/sys/dev/pci

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:11:55 UTC 2020

Modified Files:
src/sys/dev/pci [netbsd-9]: vioscsi.c

Log Message:
Pull up following revision(s) (requested by kim in ticket #1001):

sys/dev/pci/vioscsi.c: revision 1.22

Fix off-by-one SCSI target reporting

Use max_target as the controller ID instead of zero, so that the device
located at SCSI ID zero (e.g. a disk) is not obscured through not being
probed by scsi_probe_bus() (which skips the controller ID).

Copy the target requested onto the wire without decrementing it by one.

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.4.1 src/sys/dev/pci/vioscsi.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/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.21 src/sys/dev/pci/vioscsi.c:1.21.4.1
--- src/sys/dev/pci/vioscsi.c:1.21	Sat Apr 13 06:17:33 2019
+++ src/sys/dev/pci/vioscsi.c	Mon Jul 13 14:11:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vioscsi.c,v 1.21 2019/04/13 06:17:33 maxv Exp $	*/
+/*	$NetBSD: vioscsi.c,v 1.21.4.1 2020/07/13 14:11:55 martin Exp $	*/
 /*	$OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.21 2019/04/13 06:17:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.21.4.1 2020/07/13 14:11:55 martin Exp $");
 
 #include 
 #include 
@@ -194,7 +194,7 @@ vioscsi_attach(device_t parent, device_t
 	chan->chan_channel = 0;
 	chan->chan_ntargets = MIN(max_target, 16);	/* cap reasonably */
 	chan->chan_nluns = MIN(max_lun, 1024);		/* cap reasonably */
-	chan->chan_id = 0;
+	chan->chan_id = max_target;
 	chan->chan_flags = SCSIPI_CHAN_NOSETTLE;
 
 	config_found(self, >sc_channel, scsiprint);
@@ -318,7 +318,7 @@ vioscsi_scsipi_request(struct scsipi_cha
 	}
 
 	req->lun[0] = 1;
-	req->lun[1] = periph->periph_target - 1;
+	req->lun[1] = periph->periph_target;
 	req->lun[2] = 0x40 | ((periph->periph_lun >> 8) & 0x3F);
 	req->lun[3] = periph->periph_lun & 0xFF;
 	memset(req->lun + 4, 0, 4);



CVS commit: [netbsd-8] src/sys/dev/scsipi

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:10:25 UTC 2020

Modified Files:
src/sys/dev/scsipi [netbsd-8]: scsiconf.c

Log Message:
Pull up following revision(s) (requested by kim in ticket #1571):

sys/dev/scsipi/scsiconf.c: revision 1.288

Continue scanning a SCSI bus when a LUN is reported not present

This fixes disk attachment under Qemu when there is no disk on LUN 0 on
a SCSI bus but there is a disk on LUN 1. The inquiry for LUN 0 returns
SID_QUAL_LU_NOTPRESENT & T_NODEVICE.  Quirks are only checked if neither
one of those are set, so cannot use a quirk entry.

Use case 1: Proxmox 6 configures each disk on its own bus when using
the "Virtio SCSI single" SCSI controller. However, while the "scsi0"
disk is on LUN 0, the "scsi1" disk is on LUN 1.

Use case 2: A Linode boot profile with multiple disks results in
the first disk ("sda") on LUN 1, while the second disk ("sdb") is
on LUN 0, each on their own bus.


To generate a diff of this commit:
cvs rdiff -u -r1.279.6.1 -r1.279.6.2 src/sys/dev/scsipi/scsiconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.279.6.1 src/sys/dev/scsipi/scsiconf.c:1.279.6.2
--- src/sys/dev/scsipi/scsiconf.c:1.279.6.1	Wed Jun 21 18:18:55 2017
+++ src/sys/dev/scsipi/scsiconf.c	Mon Jul 13 14:10:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.279.6.1 2017/06/21 18:18:55 snj Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.279.6.2 2020/07/13 14:10:25 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.279.6.1 2017/06/21 18:18:55 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.279.6.2 2020/07/13 14:10:25 martin Exp $");
 
 #include 
 #include 
@@ -869,6 +869,8 @@ scsi_probe_device(struct scsibus_softc *
 		break;
 
 	case SID_QUAL_LU_NOTPRESENT:
+		docontinue = 1;
+		/* FALLTHROUGH */
 	case SID_QUAL_reserved:
 	case SID_QUAL_LU_NOT_SUPP:
 		goto bad;



CVS commit: [netbsd-9] src/sys/dev/scsipi

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 14:09:10 UTC 2020

Modified Files:
src/sys/dev/scsipi [netbsd-9]: scsiconf.c

Log Message:
Pull up following revision(s) (requested by kim in ticket #1000):

sys/dev/scsipi/scsiconf.c: revision 1.288

Continue scanning a SCSI bus when a LUN is reported not present

This fixes disk attachment under Qemu when there is no disk on LUN 0 on
a SCSI bus but there is a disk on LUN 1. The inquiry for LUN 0 returns
SID_QUAL_LU_NOTPRESENT & T_NODEVICE.  Quirks are only checked if neither
one of those are set, so cannot use a quirk entry.

Use case 1: Proxmox 6 configures each disk on its own bus when using
the "Virtio SCSI single" SCSI controller. However, while the "scsi0"
disk is on LUN 0, the "scsi1" disk is on LUN 1.

Use case 2: A Linode boot profile with multiple disks results in
the first disk ("sda") on LUN 1, while the second disk ("sdb") is
on LUN 0, each on their own bus.


To generate a diff of this commit:
cvs rdiff -u -r1.284.4.1 -r1.284.4.2 src/sys/dev/scsipi/scsiconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.284.4.1 src/sys/dev/scsipi/scsiconf.c:1.284.4.2
--- src/sys/dev/scsipi/scsiconf.c:1.284.4.1	Mon May  4 13:50:07 2020
+++ src/sys/dev/scsipi/scsiconf.c	Mon Jul 13 14:09:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.284.4.1 2020/05/04 13:50:07 martin Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.284.4.2 2020/07/13 14:09:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.284.4.1 2020/05/04 13:50:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.284.4.2 2020/07/13 14:09:10 martin Exp $");
 
 #include 
 #include 
@@ -887,6 +887,8 @@ scsi_probe_device(struct scsibus_softc *
 		break;
 
 	case SID_QUAL_LU_NOTPRESENT:
+		docontinue = 1;
+		/* FALLTHROUGH */
 	case SID_QUAL_reserved:
 	case SID_QUAL_LU_NOT_SUPP:
 		goto bad;



CVS commit: [netbsd-8] src/external/bsd/dhcpcd/dist/hooks

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 13:58:31 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/hooks [netbsd-8]: 01-test

Log Message:
Apply patch, requested by roy in ticket #1570:

external/bsd/dhcpcd/dist/hooks/01-test  (apply patch)

Fix dhcpcd test not to require /usr by syncing with the 01-test hook with
-current (which uses a newer dhcpcd version).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \
src/external/bsd/dhcpcd/dist/hooks/01-test

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/dhcpcd/dist/hooks/01-test
diff -u src/external/bsd/dhcpcd/dist/hooks/01-test:1.1.1.1.8.1 src/external/bsd/dhcpcd/dist/hooks/01-test:1.1.1.1.8.2
--- src/external/bsd/dhcpcd/dist/hooks/01-test:1.1.1.1.8.1	Sat Jan 13 21:35:30 2018
+++ src/external/bsd/dhcpcd/dist/hooks/01-test	Mon Jul 13 13:58:31 2020
@@ -1,9 +1,37 @@
 # Echo the interface flags, reason and message options
 
 if [ "$reason" = "TEST" ]; then
-	set | grep \
-	"^\(interface\|pid\|reason\|protocol\|profile\|skip_hooks\)=" | sort
-	set | grep "^if\(carrier\|flags\|mtu\|wireless\|ssid\)=" | sort
-	set | grep "^\(new_\|old_\|nd[0-9]*_\)" | sort
+	# General variables at the top
+	set | while read line; do
+		case "$line" in
+		interface=*|pid=*|reason=*|protocol=*|profile=*|skip_hooks=*)
+			echo "$line";;
+		esac
+	done
+	# Interface flags
+	set | while read line; do
+		case "$line" in
+		ifcarrier=*|ifflags=*|ifmetric=*|ifmtu=*|ifwireless=*|ifssid=*)
+			echo "$line";;
+		esac
+	done
+	# Old lease
+	set | while read line; do
+		case "$line" in
+		old_*) echo "$line";;
+		esac
+	done
+	# New lease
+	set | while read line; do
+		case "$line" in
+		new_*) echo "$line";;
+		esac
+	done
+	# Router Advertisements
+	set | while read line; do
+		case "$line" in
+		nd[0-9]*_*) echo "$line";;
+		esac
+	done
 	exit 0
 fi



CVS commit: [netbsd-9] src/external/bsd/dhcpcd/dist/hooks

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 13:55:41 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/hooks [netbsd-9]: 01-test

Log Message:
Apply patch, requested by roy in ticket #999:

external/bsd/dhcpcd/dist/hooks/01-test  (apply patch)

Fix dhcpcd test not to require /usr by syncing with the 01-test hook with
-current (which uses a newer dhcpcd version).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.8.1 \
src/external/bsd/dhcpcd/dist/hooks/01-test

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/dhcpcd/dist/hooks/01-test
diff -u src/external/bsd/dhcpcd/dist/hooks/01-test:1.1.1.2 src/external/bsd/dhcpcd/dist/hooks/01-test:1.1.1.2.8.1
--- src/external/bsd/dhcpcd/dist/hooks/01-test:1.1.1.2	Wed Dec  6 10:33:30 2017
+++ src/external/bsd/dhcpcd/dist/hooks/01-test	Mon Jul 13 13:55:41 2020
@@ -1,9 +1,37 @@
 # Echo the interface flags, reason and message options
 
 if [ "$reason" = "TEST" ]; then
-	set | grep \
-	"^\(interface\|pid\|reason\|protocol\|profile\|skip_hooks\)=" | sort
-	set | grep "^if\(carrier\|flags\|mtu\|wireless\|ssid\)=" | sort
-	set | grep "^\(new_\|old_\|nd[0-9]*_\)" | sort
+	# General variables at the top
+	set | while read line; do
+		case "$line" in
+		interface=*|pid=*|reason=*|protocol=*|profile=*|skip_hooks=*)
+			echo "$line";;
+		esac
+	done
+	# Interface flags
+	set | while read line; do
+		case "$line" in
+		ifcarrier=*|ifflags=*|ifmetric=*|ifmtu=*|ifwireless=*|ifssid=*)
+			echo "$line";;
+		esac
+	done
+	# Old lease
+	set | while read line; do
+		case "$line" in
+		old_*) echo "$line";;
+		esac
+	done
+	# New lease
+	set | while read line; do
+		case "$line" in
+		new_*) echo "$line";;
+		esac
+	done
+	# Router Advertisements
+	set | while read line; do
+		case "$line" in
+		nd[0-9]*_*) echo "$line";;
+		esac
+	done
 	exit 0
 fi



CVS commit: src/sys/dev/usb

2020-07-13 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jul 13 13:53:04 UTC 2020

Modified Files:
src/sys/dev/usb: ualea.c

Log Message:
Set up the USB xfer for every transfer, not just once in the attach
function.  Caught by DIAGNOSTIC on a similar driver.  Thanks to phone@
for USB xfer clue and martin@ for testing.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/ualea.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ualea.c
diff -u src/sys/dev/usb/ualea.c:1.11 src/sys/dev/usb/ualea.c:1.12
--- src/sys/dev/usb/ualea.c:1.11	Thu Apr 30 03:40:53 2020
+++ src/sys/dev/usb/ualea.c	Mon Jul 13 13:53:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ualea.c,v 1.11 2020/04/30 03:40:53 riastradh Exp $	*/
+/*	$NetBSD: ualea.c,v 1.12 2020/07/13 13:53:04 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.11 2020/04/30 03:40:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.12 2020/07/13 13:53:04 simonb Exp $");
 
 #include 
 #include 
@@ -139,11 +139,6 @@ ualea_attach(device_t parent, device_t s
 		return;
 	}
 
-	/* Setup the xfer to call ualea_xfer_done with sc.  */
-	usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
-	sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
-	ualea_xfer_done);
-
 	/* Success!  We are ready to run.  */
 	sc->sc_attached = true;
 	rndsource_setcb(>sc_rnd, ualea_get, sc);
@@ -188,6 +183,11 @@ ualea_xfer(struct ualea_softc *sc)
 	if (sc->sc_needed == 0)
 		return;
 
+	/* Setup the xfer to call ualea_xfer_done with sc.  */
+	usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
+	sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
+	ualea_xfer_done);
+
 	/* Issue xfer or complain if we can't.  */
 	status = usbd_transfer(sc->sc_xfer);
 	KASSERT(status != USBD_NORMAL_COMPLETION); /* asynchronous xfer */



CVS commit: src/share/man/man7

2020-07-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jul 13 13:42:51 UTC 2020

Modified Files:
src/share/man/man7: module.7

Log Message:
Imnprove previous.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man7/module.7

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/man7/module.7
diff -u src/share/man/man7/module.7:1.8 src/share/man/man7/module.7:1.9
--- src/share/man/man7/module.7:1.8	Mon Jul 13 12:44:04 2020
+++ src/share/man/man7/module.7	Mon Jul 13 13:42:51 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: module.7,v 1.8 2020/07/13 12:44:04 jruoho Exp $
+.\" $NetBSD: module.7,v 1.9 2020/07/13 13:42:51 pgoyette Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -131,7 +131,7 @@ make install
 .Pp
 Alternatively, the
 .Dq build.sh
-tool can be used to build only the modules:
+tool can be used to build and install only the modules:
 .Bd -literal -offset indent
 cd /usr/src
 \&./build.sh -O /usr/obj -T /usr/tools modules



CVS commit: [netbsd-9] src/sys/arch/x86/include

2020-07-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jul 13 13:33:29 UTC 2020

Modified Files:
src/sys/arch/x86/include [netbsd-9]: specialreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #998):

sys/arch/x86/include/specialreg.h: revision 1.162
sys/arch/x86/include/specialreg.h: revision 1.164
sys/arch/x86/include/specialreg.h: revision 1.165
sys/arch/x86/include/specialreg.h: revision 1.166
sys/arch/x86/include/specialreg.h: revision 1.167
sys/arch/x86/include/specialreg.h: revision 1.168

- AMD CPUID Fn8000_000a %edx bit 20 is "SPEC_CTRL".
- Add some bit definitions of AMD's CPUID Fn8000_001f Encrypted Memory
   features.
- Add AMD INVLPGB/TLBSYNC hypervisor enable in VMCB and TLBSYNC intercept bit.
- Modify comment.
Add AMD MSR_DE_CFG's bit 1 as DE_CFG_LFENCE_SERIALIZE.
This bit makes lfence instruction serializing.
Add some definitions from the latest Intel SDM plus small fix:
  - Add CPUID leaf 6 %eax bit 19 for HW_FEEDBACK* and IA32_PACKAGE_TERM* MSRs.
  - Add CPUID leaf 7 %ecx bit 31 for Protection Keys.
  - Add definition of Load only TLB and Store only TLB.
  - Add IF_PSCHANGE_MC_NO bit of IA32_ARCH_CAPABILITIES
  - Fix HWP_IGNIDL.
  Add SRBDS_CTRL bit.
style and fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.150.2.6 -r1.150.2.7 src/sys/arch/x86/include/specialreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.150.2.6 src/sys/arch/x86/include/specialreg.h:1.150.2.7
--- src/sys/arch/x86/include/specialreg.h:1.150.2.6	Tue Apr 14 17:15:02 2020
+++ src/sys/arch/x86/include/specialreg.h	Mon Jul 13 13:33:29 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: specialreg.h,v 1.150.2.6 2020/04/14 17:15:02 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.150.2.7 2020/07/13 13:33:29 martin Exp $	*/
 
 /*
- * Copyright (c) 2014-2019 The NetBSD Foundation, Inc.
+ * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -294,10 +294,10 @@
 		? 0 : (CPUID_TO_EXTMODEL(cpuid) << 4)))
 
 /* CPUID Fn0001 %ebx */
-#define	CPUID_BRAND_INDEX	__BITS(7,0)
-#define	CPUID_CLFLUSH_SIZE	__BITS(15,8)
-#define	CPUID_HTT_CORES		__BITS(23,16)
-#define	CPUID_LOCAL_APIC_ID	__BITS(31,24)
+#define CPUID_BRAND_INDEX	__BITS(7,0)
+#define CPUID_CLFLUSH_SIZE	__BITS(15,8)
+#define CPUID_HTT_CORES		__BITS(23,16)
+#define CPUID_LOCAL_APIC_ID	__BITS(31,24)
 
 /*
  * Intel Deterministic Cache Parameter Leaf
@@ -367,6 +367,7 @@
 #define CPUID_DSPM_HWP_PECI   __BIT(16)	/* HWP PECI override */
 #define CPUID_DSPM_HWP_FLEX   __BIT(17)	/* Flexible HWP */
 #define CPUID_DSPM_HWP_FAST   __BIT(18)	/* Fast access for IA32_HWP_REQUEST */
+#define CPUID_DSPM_HW_FEEDBACK __BIT(19) /* HW_FEEDBACK*, IA32_PACKAGE_TERM* */
 #define CPUID_DSPM_HWP_IGNIDL __BIT(20)	/* Ignore Idle Logical Processor HWP */
 
 #define CPUID_DSPM_FLAGS	"\20" \
@@ -374,8 +375,8 @@
 	"\5" "PLN"	"\6" "ECMD"	"\7" "PTM"	"\10" "HWP"	\
 	"\11" "HWP_NOTIFY" "\12" "HWP_ACTWIN" "\13" "HWP_EPP" "\14" "HWP_PLR" \
 			"\16" "HDC"	"\17" "TBM3"	"\20" "HWP_CAP" \
-	"\21" "HWP_PECI" "\22" "HWP_FLEX" "\23" "HWP_FAST"		\
-	"25" "HWP_IGNIDL"
+	"\21" "HWP_PECI" "\22" "HWP_FLEX" "\23" "HWP_FAST" "\24HW_FEEDBACK"   \
+	"\25" "HWP_IGNIDL"
 
 /*
  * Intel/AMD Digital Thermal Sensor and
@@ -388,7 +389,7 @@
 
 /*
  * Intel/AMD Structured Extended Feature leaf Fn_0007
- * %eax == 0: Subleaf 0
+ * %ecx == 0: Subleaf 0
  *	%eax: The Maximum input value for supported subleaf.
  *	%ebx: Feature bits.
  *	%ecx: Feature bits.
@@ -460,6 +461,7 @@
 #define CPUID_SEF_MOVDIRI	__BIT(27) /* MOVDIRI instruction */
 #define CPUID_SEF_MOVDIR64B	__BIT(28) /* MOVDIR64B instruction */
 #define CPUID_SEF_SGXLC		__BIT(30) /* SGX Launch Configuration */
+#define CPUID_SEF_PKS		__BIT(31) /* Protection Keys */
 
 #define CPUID_SEF_FLAGS1	"\177\20" \
 	"b\0PREFETCHWT1\0" "b\1AVX512_VBMI\0" "b\2UMIP\0" "b\3PKU\0"	\
@@ -469,13 +471,14 @@
 	"f\21\5MAWAU\0"			\
 	"b\26RDPID\0"			\
 			"b\31CLDEMOTE\0"		"b\33MOVDIRI\0"	\
-	"b\34MOVDIR64B\0"		"b\36SGXLC\0"
+	"b\34MOVDIR64B\0"		"b\36SGXLC\0"	"b\37PKS\0"
 
 /* %edx */
 #define CPUID_SEF_AVX512_4VNNIW	__BIT(2)
 #define CPUID_SEF_AVX512_4FMAPS	__BIT(3)
 #define CPUID_SEF_FSREP_MOV	__BIT(4)  /* Fast Short REP MOV */
 #define CPUID_SEF_AVX512_VP2INTERSECT __BIT(8)
+#define CPUID_SEF_SRBDS_CTRL	__BIT(9)  /* IA32_MCU_OPT_CTRL */
 #define CPUID_SEF_MD_CLEAR	__BIT(10)
 #define CPUID_SEF_TSX_FORCE_ABORT __BIT(13) /* MSR_TSX_FORCE_ABORT bit 0 */
 #define CPUID_SEF_SERIALIZE	__BIT(14)
@@ -492,7 +495,7 @@
 #define CPUID_SEF_FLAGS2	"\20" \
 "\3" "AVX512_4VNNIW" "\4" "AVX512_4FMAPS" \
 	"\5" "FSREP_MOV"		\
-	"\11" "VP2INTERSECT"	"\13" "MD_CLEAR"			\
+	"\11VP2INTERSECT" "\12SRBDS_CTRL" "\13MD_CLEAR"			\
 			

CVS commit: src

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 13:16:08 UTC 2020

Modified Files:
src/sys/kern: kern_cpu.c
src/tests/usr.sbin/cpuctl: t_cpuctl.sh

Log Message:
Do not allow disabling interrupts on the primary CPU. Fixes PR kern/45117.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/kern/kern_cpu.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.sbin/cpuctl/t_cpuctl.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.91 src/sys/kern/kern_cpu.c:1.92
--- src/sys/kern/kern_cpu.c:1.91	Thu May 28 20:29:18 2020
+++ src/sys/kern/kern_cpu.c	Mon Jul 13 13:16:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.91 2020/05/28 20:29:18 ad Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.92 2020/07/13 13:16:07 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.91 2020/05/28 20:29:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.92 2020/07/13 13:16:07 jruoho Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_cpu_ucode.h"
@@ -212,7 +212,9 @@ cpuctl_ioctl(dev_t dev, u_long cmd, void
 			error = ESRCH;
 			break;
 		}
-		cpu_setintr(ci, cs->cs_intr);
+		error = cpu_setintr(ci, cs->cs_intr);
+		if (error)
+			break;
 		error = cpu_setstate(ci, cs->cs_online);
 		break;
 
@@ -490,6 +492,8 @@ cpu_setintr(struct cpu_info *ci, bool in
 			return 0;
 		func = (xcfunc_t)cpu_xc_intr;
 	} else {
+		if (CPU_IS_PRIMARY(ci))
+			return EINVAL;
 		if ((spc->spc_flags & SPCF_NOINTR) != 0)
 			return 0;
 		/*

Index: src/tests/usr.sbin/cpuctl/t_cpuctl.sh
diff -u src/tests/usr.sbin/cpuctl/t_cpuctl.sh:1.3 src/tests/usr.sbin/cpuctl/t_cpuctl.sh:1.4
--- src/tests/usr.sbin/cpuctl/t_cpuctl.sh:1.3	Thu Jun 25 15:43:26 2020
+++ src/tests/usr.sbin/cpuctl/t_cpuctl.sh	Mon Jul 13 13:16:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_cpuctl.sh,v 1.3 2020/06/25 15:43:26 jruoho Exp $
+# $NetBSD: t_cpuctl.sh,v 1.4 2020/07/13 13:16:07 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,9 +37,6 @@ setcpu() {
 		atf_pass
 	fi
 
-	# Skip the boot processor. Disabling interrupts
-	# on it will hang the system (PR kern/45117).
-	#
 	while [ $ncpu -gt 1 ]; do
 
 		cpuid=$(expr $ncpu - 1)
@@ -51,6 +48,15 @@ setcpu() {
 
 		ncpu=$(expr $ncpu - 1)
 	done
+
+	# Additional check that interrupts cannot be
+	# disabled for the primary CPU (PR kern/45117).
+	#
+	cpuctl nointr 0 >/dev/null 2>&1
+
+	if [ $? -eq 0 ]; then
+		$2 $3
+	fi
 }
 
 clean() {



CVS commit: src/sys/arch/mips/mips

2020-07-13 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jul 13 12:56:58 UTC 2020

Modified Files:
src/sys/arch/mips/mips: db_interface.c

Log Message:
Make sure declaration of db_mach_reset_cmd() is available always, not
just #ifdef OCTEON.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/mips/mips/db_interface.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/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.84 src/sys/arch/mips/mips/db_interface.c:1.85
--- src/sys/arch/mips/mips/db_interface.c:1.84	Mon Jul 13 05:20:45 2020
+++ src/sys/arch/mips/mips/db_interface.c	Mon Jul 13 12:56:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.84 2020/07/13 05:20:45 simonb Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.85 2020/07/13 12:56:58 simonb Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.84 2020/07/13 05:20:45 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.85 2020/07/13 12:56:58 simonb Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_cputype.h"	/* which mips CPUs do we support? */
@@ -766,6 +766,7 @@ db_mach_nmi_cmd(db_expr_t addr, bool hav
 	mips3_sd(MIPS_PHYS_TO_XKPHYS_UNCACHED(CIU_NMI), __BIT(ci->ci_cpuid));
 }
 #endif
+#endif
 
 static void
 db_mach_reset_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
@@ -780,7 +781,6 @@ db_mach_reset_cmd(db_expr_t addr, bool h
 	cpu_reset_address();
 }
 
-#endif
 const struct db_command db_machine_command_table[] = {
 #ifdef MULTIPROCESSOR
 	{ DDB_ADD_CMD("cpu",	db_mach_cpu_cmd,	0,



CVS commit: src/share/man/man7

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 12:44:04 UTC 2020

Modified Files:
src/share/man/man7: module.7

Log Message:
Complete the example.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man7/module.7

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/man7/module.7
diff -u src/share/man/man7/module.7:1.7 src/share/man/man7/module.7:1.8
--- src/share/man/man7/module.7:1.7	Thu Aug 31 08:36:32 2017
+++ src/share/man/man7/module.7	Mon Jul 13 12:44:04 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: module.7,v 1.7 2017/08/31 08:36:32 wiz Exp $
+.\" $NetBSD: module.7,v 1.8 2020/07/13 12:44:04 jruoho Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 31, 2017
+.Dd July 13, 2020
 .Dt MODULE 7
 .Os
 .Sh NAME
@@ -131,10 +131,11 @@ make install
 .Pp
 Alternatively, the
 .Dq build.sh
-tool can be used to build only the modules.
+tool can be used to build only the modules:
 .Bd -literal -offset indent
 cd /usr/src
 \&./build.sh -O /usr/obj -T /usr/tools modules
+\&./build.sh -O /usr/obj -T /usr/tools installmodules=/
 .Ed
 .Sh SEE ALSO
 .Xr modctl 2 ,



CVS commit: src/share/man/man4

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 11:59:37 UTC 2020

Modified Files:
src/share/man/man4: wskbd.4

Log Message:
obviously wrong country code


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/wskbd.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/wskbd.4
diff -u src/share/man/man4/wskbd.4:1.20 src/share/man/man4/wskbd.4:1.21
--- src/share/man/man4/wskbd.4:1.20	Mon Jul 13 11:24:27 2020
+++ src/share/man/man4/wskbd.4	Mon Jul 13 11:59:37 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wskbd.4,v 1.20 2020/07/13 11:24:27 wiz Exp $
+.\" $NetBSD: wskbd.4,v 1.21 2020/07/13 11:59:37 nia Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -135,7 +135,7 @@ and
 .It Li dk Ta KB_DK Ta Danish with
 .Dq dead accents
 .It Li nl Ta KB_NL Ta Dutch
-.It Li ee Ta KB_DK Ta Estonian with
+.It Li ee Ta KB_EE Ta Estonian with
 .Dq dead accents
 .It Li fi Ta KB_FI Ta Finnish
 .It Li fr Ta KB_FR Ta French



CVS commit: src/doc

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 11:26:50 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
doc/CHANGES: More keyboard layouts


To generate a diff of this commit:
cvs rdiff -u -r1.2710 -r1.2711 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.2710 src/doc/CHANGES:1.2711
--- src/doc/CHANGES:1.2710	Sun Jul 12 02:09:51 2020
+++ src/doc/CHANGES	Mon Jul 13 11:26:50 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2710 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2711 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -243,5 +243,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	dhcpcd: Import version 9.1.4 [roy 20200703]
 	x86: Xen kernels now use the same kernel modules as native kernels.
 		[chs 20200704]
-	wskbd(4): Added Brazilian keyboard layout (KB_BR) to pckbd(4) and
-		ukbd(4). [nia 20200712]
+	wskbd(4): Added keyboard layouts for Brazilian Portugese,
+		Canadian French, Estonian, Icelandic, and Latin American
+		Spanish to pckbd(4) and ukbd(4). [nia 20200713]



CVS commit: src/share/man/man4

2020-07-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul 13 11:24:27 UTC 2020

Modified Files:
src/share/man/man4: wskbd.4

Log Message:
Whitespace/macro usage fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man4/wskbd.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/wskbd.4
diff -u src/share/man/man4/wskbd.4:1.19 src/share/man/man4/wskbd.4:1.20
--- src/share/man/man4/wskbd.4:1.19	Mon Jul 13 11:15:48 2020
+++ src/share/man/man4/wskbd.4	Mon Jul 13 11:24:27 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wskbd.4,v 1.19 2020/07/13 11:15:48 nia Exp $
+.\" $NetBSD: wskbd.4,v 1.20 2020/07/13 11:24:27 wiz Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -118,8 +118,9 @@ wskbd device instance.
 The following encodings are supported.
 Device drivers for legacy keyboard interfaces may only support a subset
 of these.
-However, generally, all encodings are supported by 
-.Xr pckbd 4 and
+However, generally, all encodings are supported by
+.Xr pckbd 4
+and
 .Xr ukbd 4 .
 .Bl -column " us.colemak" " KB_US|KB_COLEMAK" "language"
 .It Sy "wsconsctl" Ta Sy "define" Ta Sy "language"



CVS commit: src/usr.bin/ftp

2020-07-13 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Mon Jul 13 11:17:14 UTC 2020

Modified Files:
src/usr.bin/ftp: ftp.1

Log Message:
ftp(1): consistency tweaks


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/usr.bin/ftp/ftp.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/ftp.1
diff -u src/usr.bin/ftp/ftp.1:1.136 src/usr.bin/ftp/ftp.1:1.137
--- src/usr.bin/ftp/ftp.1:1.136	Mon Jul  3 21:34:57 2017
+++ src/usr.bin/ftp/ftp.1	Mon Jul 13 11:17:14 2020
@@ -1,6 +1,6 @@
-.\" 	$NetBSD: ftp.1,v 1.136 2017/07/03 21:34:57 wiz Exp $
+.\" 	$NetBSD: ftp.1,v 1.137 2020/07/13 11:17:14 lukem Exp $
 .\"
-.\" Copyright (c) 1996-2015 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -57,7 +57,7 @@
 .\"
 .\"	@(#)ftp.1	8.3 (Berkeley) 10/9/94
 .\"
-.Dd April 24, 2015
+.Dd July 13, 2020
 .Dt FTP 1
 .Os
 .Sh NAME
@@ -84,7 +84,7 @@
 .Xc
 .Oc
 .Ek
-.Op Fl x Ar xferbufsize
+.Op Fl x Ar xfersize
 .Bk -words
 .\" [[user@]host [port]]
 .Oo
@@ -142,7 +142,7 @@
 .Op Ar \&.\&.\&.
 .Nm
 .Bk -words
-.Fl u Ar URL Ar file
+.Fl u Ar url Ar file
 .Ek
 .Op Ar \&.\&.\&.
 .Sh DESCRIPTION
@@ -284,11 +284,11 @@ bytes/second.
 Refer to
 .Ic rate
 for more information.
-.It Fl u Ar URL file Op \&.\&.\&.
+.It Fl u Ar url file Op \&.\&.\&.
 Upload files on the command line to
-.Ar URL
+.Ar url
 where
-.Ar URL
+.Ar url
 is one of the ftp URL types as supported by auto-fetch
 (with an optional target filename for single file uploads), and
 .Ar file
@@ -312,9 +312,9 @@ Forces
 .Nm
 to show all responses from the remote server, as well
 as report on data transfer statistics.
-.It Fl x Ar xferbufsize
+.It Fl x Ar xfersize
 Set the size of the socket send and receive buffers to
-.Ar xferbufsize .
+.Ar xfersize .
 Refer to
 .Ic xferbuf
 for more information.



CVS commit: src/etc

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 11:17:54 UTC 2020

Modified Files:
src/etc: wscons.conf

Log Message:
Point readers at wskbd.4


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/etc/wscons.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/wscons.conf
diff -u src/etc/wscons.conf:1.20 src/etc/wscons.conf:1.21
--- src/etc/wscons.conf:1.20	Sun Jul 12 01:36:32 2020
+++ src/etc/wscons.conf	Mon Jul 13 11:17:54 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: wscons.conf,v 1.20 2020/07/12 01:36:32 nia Exp $
+#	$NetBSD: wscons.conf,v 1.21 2020/07/13 11:17:54 nia Exp $
 #
 # workstation console configuration
 
@@ -33,10 +33,8 @@ screen	4	-	-
 #keyboard	auto
 
 # Select a kernel builtin keyboard map by uncommenting the following line and
-# altering the country code to your requirements
-# (choose from user, us, uk, be, br, cz, dk, nl, fi, fr, de, gr, hu, it, jp,
-# no, pl, pt, ru, es, sv, sf, sg, tr, ua)
-# See wsconsctl(8), pckbd(4), ukbd(4) etc. for more details.
+# altering the country code to your requirements.
+# See wskbd(4) for a full list of supported options.
 #encoding sv
 #encoding us.swapctrlcaps
 



CVS commit: src/share/man/man4

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 11:15:49 UTC 2020

Modified Files:
src/share/man/man4: wskbd.4

Log Message:
wskbd.4: Add KB_LA


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/wskbd.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/wskbd.4
diff -u src/share/man/man4/wskbd.4:1.18 src/share/man/man4/wskbd.4:1.19
--- src/share/man/man4/wskbd.4:1.18	Mon Jul 13 11:14:12 2020
+++ src/share/man/man4/wskbd.4	Mon Jul 13 11:15:48 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wskbd.4,v 1.18 2020/07/13 11:14:12 nia Exp $
+.\" $NetBSD: wskbd.4,v 1.19 2020/07/13 11:15:48 nia Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -146,6 +146,7 @@ However, generally, all encodings are su
 .Dq dead accents
 .It Li it Ta KB_IT Ta Italian
 .It Li jp Ta KB_JP Ta Japanese
+.It Li la Ta KB_LA Ta Latin American Spanish
 .It Li no Ta KB_NO Ta Norwegian with
 .Dq dead accents
 .It Li pl Ta KB_PL Ta Polish



CVS commit: src

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 11:14:12 UTC 2020

Modified Files:
src/sbin/wsconsctl: wsconsctl.8
src/share/man/man4: pckbd.4 wskbd.4

Log Message:
Move description of keyboard layouts to wskbd.4, add newer layouts

Previously, the best reference was pckbd.4. This does not make much
sense to read if you are on, say, an evbarm device with only USB.

wsconsctl.8 contained a vaguer description of supported language names,
which isn't very useful because you can't pass full language names
to the command. Point readers to wskbd.4 instead.

Note in the wskbd.4 page that while all layouts are generally supported
by pckbd(4) and ukbd(4), older keyboard interfaces might only support
a subset.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sbin/wsconsctl/wsconsctl.8
cvs rdiff -u -r1.24 -r1.25 src/share/man/man4/pckbd.4
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/wskbd.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/wsconsctl/wsconsctl.8
diff -u src/sbin/wsconsctl/wsconsctl.8:1.29 src/sbin/wsconsctl/wsconsctl.8:1.30
--- src/sbin/wsconsctl/wsconsctl.8:1.29	Sun Jul 12 03:37:06 2020
+++ src/sbin/wsconsctl/wsconsctl.8	Mon Jul 13 11:14:12 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsconsctl.8,v 1.29 2020/07/12 03:37:06 nia Exp $
+.\" $NetBSD: wsconsctl.8,v 1.30 2020/07/13 11:14:12 nia Exp $
 .\"
 .\" Copyright (c) 1998, 2004 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 July 12, 2020
+.Dd July 13, 2020
 .Dt WSCONSCTL 8
 .Os
 .Sh NAME
@@ -114,13 +114,6 @@ file.
 There are also definitions relating to video control and cursor
 control, which are not applicable to all display types, and to text
 emulation and graphics (mapped) modes.
-.Pp
-In addition to British, US, and US-Dvorak keyboard encodings,
-support currently exists for the following languages: Belgian,
-Brazilian, Danish, Finnish, French, German, Greek, Hungarian,
-Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish,
-Swedish, Swiss, Turkish, and Ukrainian.
-Additionally, a user-defined encoding is supported.
 .Sh FILES
 .Bl -tag -width /dev/wsmouse
 .It Pa /dev/wskbd
@@ -138,6 +131,8 @@ and its functionality.
 .Dl wsconsctl -w encoding=uk
 .Pp
 Set a UK keyboard encoding.
+For a full list of supported keyboard encodings, see
+.Xr wskbd 4 .
 .Pp
 .Dl wsconsctl -w map+="keysym Caps_Lock = Control_L"
 .Pp
@@ -201,8 +196,8 @@ and
 .Dv Cmd_ScrollSlowUp
 defined in your keyboard map.
 .Sh SEE ALSO
-.Xr pckbd 4 ,
 .Xr wscons 4 ,
+.Xr wskbd 4 ,
 .Xr wscons.conf 5 ,
 .Xr wsconscfg 8 ,
 .Xr wsfontload 8

Index: src/share/man/man4/pckbd.4
diff -u src/share/man/man4/pckbd.4:1.24 src/share/man/man4/pckbd.4:1.25
--- src/share/man/man4/pckbd.4:1.24	Mon Jul 13 08:59:34 2020
+++ src/share/man/man4/pckbd.4	Mon Jul 13 11:14:12 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: pckbd.4,v 1.24 2020/07/13 08:59:34 wiz Exp $
+.\" $NetBSD: pckbd.4,v 1.25 2020/07/13 11:14:12 nia Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 12, 2020
+.Dd July 13, 2020
 .Dt PCKBD 4
 .Os
 .Sh NAME
@@ -56,87 +56,6 @@ at compile time or with the utility
 at runtime.
 Other mappings can be used if the whole keymap is replaced by means of
 .Xr wsconsctl 8 .
-The builtin mappings are at this time:
-.Bl -column " KB_US|KB_COLEMAK" "wsconsctl" "language"
-.It Sy "option" Ta Sy "wsconsctl" Ta Sy "language"
-.It Li KB_US Ta us Ta English/US keyboard mapping (default)
-.It Li KB_UK Ta uk Ta English/UK keyboard mapping
-.It Li KB_BE Ta be Ta Belgian
-.It Li KB_BR Ta br Ta Brazilian with
-.Dq dead accents
-.It Li KB_CZ Ta cz Ta Czech (QWERTY)
-.It Li KB_DK Ta dk Ta Danish with
-.Dq dead accents
-.It Li KB_NL Ta nl Ta Dutch
-.It Li KB_FI Ta fi Ta Finnish
-.It Li KB_FR Ta fr Ta French
-.It Li KB_DE Ta de Ta German with
-.Dq dead accents
-.It Li KB_GR Ta gr Ta Greek
-.It Li KB_HU Ta hu Ta Hungarian
-.It Li KB_IT Ta it Ta Italian
-.It Li KB_JP Ta jp Ta Japanese
-.It Li KB_NO Ta no Ta Norwegian with
-.Dq dead accents
-.It Li KB_PL Ta pl Ta Polish
-.It Li KB_PT Ta pt Ta Portuguese
-.It Li KB_RU Ta ru Ta Russian
-.It Li KB_ES Ta es Ta Spanish
-.It Li KB_SV Ta sv Ta Swedish with
-.Dq dead accents
-.It Li KB_SF Ta sf Ta Swiss French
-.It Li KB_SG Ta sg Ta Swiss German
-.It Li KB_TR Ta tr Ta Turkish with
-.Dq dead accents
-.It Li KB_UA Ta ua Ta Ukrainian
-.It Li "KB_US|KB_DECLK" Ta \ Ta English/US mapping for Tn DEC
-.It Ta Ta LK400-style keyboards with PC keyboard
-.It Ta Ta interface (e.g., LK461)
-.It Li "KB_US|KB_DVORAK" Ta us.dvorak Ta English/US keyboard with
-.It Ta Ta Do Dvorak Dc layout
-.It Li "KB_US|KB_COLEMAK" Ta us.colemak Ta English/US 

CVS commit: src/sys/uvm

2020-07-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 13 10:46:10 UTC 2020

Modified Files:
src/sys/uvm: uvm_physseg.c

Log Message:
paddr_t can't be printed by "%lx" in some platforms.

fix the eg, i386 build.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/uvm/uvm_physseg.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/uvm/uvm_physseg.c
diff -u src/sys/uvm/uvm_physseg.c:1.15 src/sys/uvm/uvm_physseg.c:1.16
--- src/sys/uvm/uvm_physseg.c:1.15	Mon Jul 13 05:52:50 2020
+++ src/sys/uvm/uvm_physseg.c	Mon Jul 13 10:46:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_physseg.c,v 1.15 2020/07/13 05:52:50 mrg Exp $ */
+/* $NetBSD: uvm_physseg.c,v 1.16 2020/07/13 10:46:10 mrg Exp $ */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -1209,7 +1209,8 @@ uvm_page_physload(paddr_t start, paddr_t
 	if (free_list >= VM_NFREELIST || free_list < VM_FREELIST_DEFAULT)
 		panic("uvm_page_physload: bad free list %d", free_list);
 	if (start >= end)
-		panic("uvm_page_physload: start[%lx] >= en[%lx]d", start, end);
+		panic("uvm_page_physload: start[%llx] >= en[%llx]d",
+		(unsigned long long)start, (unsigned long long)end);
 
 	if (uvm_physseg_plug(start, end - start, ) == false) {
 		panic("uvm_physseg_plug() failed at boot.");



CVS commit: src/libexec/httpd/small

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 10:35:17 UTC 2020

Modified Files:
src/libexec/httpd/small: Makefile

Log Message:
Add -DNO_BLOCKLIST_SUPPORT also to small/Makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/libexec/httpd/small/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/small/Makefile
diff -u src/libexec/httpd/small/Makefile:1.3 src/libexec/httpd/small/Makefile:1.4
--- src/libexec/httpd/small/Makefile:1.3	Thu Jul 17 06:24:57 2014
+++ src/libexec/httpd/small/Makefile	Mon Jul 13 10:35:17 2020
@@ -9,7 +9,7 @@ LEAN_IFDEF_FLAGS=	-UDEBUG -DNO_USER_SUPP
 			-DNO_CGIBIN_SUPPORT -DNO_DIRINDEX_SUPPORT \
 			-DNO_DAEMON_MODE -DNO_DYNAMIC_CONTENT \
 			-DNO_SSL_SUPPORT -UDO_HTPASSWD \
-			-DNO_LUA_SUPPORT
+			-DNO_LUA_SUPPORT -DNO_BLOCKLIST_SUPPORT
 
 CFLAGS=	-I$(.CURDIR)/.. ${LEAN_IFDEF_FLAGS}
 



CVS commit: src/sys/dev/wscons

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 09:50:12 UTC 2020

Modified Files:
src/sys/dev/wscons: wsksymdef.h

Log Message:
Clarify that KB_TR is the "Q" layout - there's two standards for Turkish.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/wscons/wsksymdef.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/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.72 src/sys/dev/wscons/wsksymdef.h:1.73
--- src/sys/dev/wscons/wsksymdef.h:1.72	Mon Jul 13 09:44:48 2020
+++ src/sys/dev/wscons/wsksymdef.h	Mon Jul 13 09:50:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.72 2020/07/13 09:44:48 nia Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.73 2020/07/13 09:50:12 nia Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -678,7 +678,7 @@ action(KB_ES,	0,	0x0b00,	"es",	,	"Spanis
 action(KB_SV,	0,	0x0900,	"sv",	,	"Swedish")		\
 action(KB_SF,	0,	0x1000,	"sf",	,	"Swiss French")		\
 action(KB_SG,	0,	0x0f00,	"sg",	,	"Swiss German")		\
-action(KB_TR,	0,	0x1700,	"tr",	,	"Turkish")		\
+action(KB_TR,	0,	0x1700,	"tr",	,	"Turkish (Q-Layout)")	\
 action(KB_UA,	0,	0x1200,	"ua",	,	"Ukrainian")	
 #define KB_NONE 0x
 



CVS commit: src/sys/dev

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 09:44:48 UTC 2020

Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c
src/sys/dev/wscons: wsksymdef.h

Log Message:
Canadian French keyboard layout for ukbd/pckbd


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pckbport/wskbdmap_mfii.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/wscons/wsksymdef.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/hid/hidkbdmap.c
diff -u src/sys/dev/hid/hidkbdmap.c:1.9 src/sys/dev/hid/hidkbdmap.c:1.10
--- src/sys/dev/hid/hidkbdmap.c:1.9	Mon Jul 13 08:45:12 2020
+++ src/sys/dev/hid/hidkbdmap.c	Mon Jul 13 09:44:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidkbdmap.c,v 1.9 2020/07/13 08:45:12 nia Exp $	*/
+/*	$NetBSD: hidkbdmap.c,v 1.10 2020/07/13 09:44:48 nia Exp $	*/
 
 /*
  * Copyright (c) 1999,2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.9 2020/07/13 08:45:12 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.10 2020/07/13 09:44:48 nia Exp $");
 
 #include 
 #include 
@@ -770,6 +770,38 @@ static const keysym_t hidkbd_keydesc_la[
 KC(230), KS_Mode_switch,	KS_Multi_key,
 };
 
+static const keysym_t hidkbd_keydesc_cf[] = {
+/*  pos  normal		shifted			altgr		shift-altgr */
+KC(16),  KS_m,		KS_M,			KS_mu,
+KC(18),  KS_o,		KS_O,			KS_section,
+KC(19),  KS_p,		KS_P,			KS_paragraph,
+KC(30),  KS_1,		KS_exclam,		KS_plusminus,
+KC(31),  KS_2,		KS_quotedbl,		KS_at,
+KC(32),  KS_3,		KS_slash,		KS_sterling,
+KC(33),  KS_4,		KS_dollar,		KS_cent,
+KC(34),  KS_5,		KS_percent,		KS_currency,
+KC(35),  KS_6,		KS_question,		KS_notsign,
+KC(36),  KS_7,		KS_ampersand,		KS_brokenbar,
+KC(37),  KS_8,		KS_asterisk,		KS_twosuperior,
+KC(38),  KS_9,		KS_parenleft,		KS_threesuperior,
+KC(39),  KS_0,		KS_parenright,		KS_onequarter,
+KC(44),  KS_space,		KS_space,		KS_nobreakspace,
+KC(45),  KS_minus,		KS_underscore,		KS_onehalf,
+KC(46),  KS_equal,		KS_plus,		KS_threequarters,
+KC(47),  KS_dead_circumflex,KS_dead_circumflex,	KS_bracketleft,
+KC(48),  KS_dead_cedilla,	KS_dead_diaeresis,	KS_bracketright,
+KC(49),  KS_less,		KS_greater,		KS_braceright,
+KC(50),  KS_less,		KS_greater,		KS_braceright,
+KC(51),  KS_semicolon,	KS_colon,		KS_asciitilde,
+KC(52),  KS_dead_grave,	KS_dead_grave,		KS_braceleft,
+KC(53),  KS_numbersign,	KS_bar,			KS_backslash,
+KC(54),  KS_comma,		KS_apostrophe,		KS_macron,
+KC(55),  KS_period,		KS_period,		KS_hyphen,
+KC(56),  KS_eacute,		KS_Eacute,		KS_dead_acute,
+KC(100), KS_guillemotleft,	KS_guillemotright,	KS_degree,
+KC(230), KS_Mode_switch,	KS_Multi_key,
+};
+
 #define KBD_MAP(name, base, map) \
 			{ name, base, sizeof(map)/sizeof(keysym_t), map }
 
@@ -811,6 +843,7 @@ const struct wscons_keydesc hidkbd_keyde
 	KBD_MAP(KB_TR,			KB_US,	hidkbd_keydesc_tr),
 	KBD_MAP(KB_TR | KB_NODEAD,	KB_TR,	hidkbd_keydesc_tr_nodead),
 	KBD_MAP(KB_LA,			KB_US,	hidkbd_keydesc_la),
+	KBD_MAP(KB_CF,			KB_US,	hidkbd_keydesc_cf),
 	KBD_MAP(KB_HU,			KB_US,	hidkbd_keydesc_hu),
 	{0, 0, 0, 0}
 };

Index: src/sys/dev/pckbport/wskbdmap_mfii.c
diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.32 src/sys/dev/pckbport/wskbdmap_mfii.c:1.33
--- src/sys/dev/pckbport/wskbdmap_mfii.c:1.32	Mon Jul 13 08:45:12 2020
+++ src/sys/dev/pckbport/wskbdmap_mfii.c	Mon Jul 13 09:44:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdmap_mfii.c,v 1.32 2020/07/13 08:45:12 nia Exp $	*/
+/*	$NetBSD: wskbdmap_mfii.c,v 1.33 2020/07/13 09:44:48 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.32 2020/07/13 08:45:12 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.33 2020/07/13 09:44:48 nia Exp $");
 
 #include "opt_wskbdmap.h"
 #include 
@@ -938,6 +938,37 @@ static const keysym_t pckbd_keydesc_la[]
 KC(86),  KS_less,		KS_greater,
 KC(184), KS_Mode_switch,	KS_Multi_key,
 };
+
+static const keysym_t pckbd_keydesc_cf[] = {
+/*  pos  normal		shifted			altgr		shift-altgr */
+KC(2),   KS_1,		KS_exclam,		KS_plusminus,
+KC(3),   KS_2,		KS_quotedbl,		KS_at,
+KC(4),   KS_3,		KS_slash,		KS_sterling,
+KC(5),   KS_4,		KS_dollar,		KS_cent,
+KC(6),   KS_5,		KS_percent,		KS_currency,
+KC(7),   KS_6,		KS_question,		KS_notsign,
+KC(8),   KS_7,		KS_ampersand,		KS_brokenbar,
+KC(9),   KS_8,		KS_asterisk,		KS_twosuperior,
+KC(10),  KS_9,		KS_parenleft,		KS_threesuperior,
+KC(11),  KS_0,		KS_parenright,		KS_onequarter,
+KC(12),  KS_minus,		KS_underscore,		KS_onehalf,
+KC(13),  KS_equal,		KS_plus,		KS_threequarters,
+KC(24),  KS_o,		KS_O,			KS_section,
+KC(25),  KS_p,		KS_P,			KS_paragraph,
+

CVS commit: src/libexec/httpd

2020-07-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul 13 09:41:18 UTC 2020

Modified Files:
src/libexec/httpd: bozohttpd.8

Log Message:
Use Nx.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/libexec/httpd/bozohttpd.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.82 src/libexec/httpd/bozohttpd.8:1.83
--- src/libexec/httpd/bozohttpd.8:1.82	Mon Jul 13 09:38:57 2020
+++ src/libexec/httpd/bozohttpd.8	Mon Jul 13 09:41:18 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bozohttpd.8,v 1.82 2020/07/13 09:38:57 jruoho Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.83 2020/07/13 09:41:18 wiz Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -455,7 +455,8 @@ on the compiler command line to enable t
 It may require linking with the crypt library, using
 .Dq -lcrypt .
 .Ss BLOCKLIST SUPPORT
-On NetBSD,
+On
+.Nx ,
 .Nm
 supports
 .Xr blocklistd 8



CVS commit: src/libexec/httpd

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 09:38:57 UTC 2020

Modified Files:
src/libexec/httpd: Makefile.boot bozohttpd.8 bozohttpd.c

Log Message:
Do not report status code 500 to blocklistd(8)  Add -DNO_BLOCKLIST_SUPPORT
to Makefile.boot.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/libexec/httpd/Makefile.boot
cvs rdiff -u -r1.81 -r1.82 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.116 -r1.117 src/libexec/httpd/bozohttpd.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/httpd/Makefile.boot
diff -u src/libexec/httpd/Makefile.boot:1.7 src/libexec/httpd/Makefile.boot:1.8
--- src/libexec/httpd/Makefile.boot:1.7	Wed Oct 30 07:28:13 2019
+++ src/libexec/httpd/Makefile.boot	Mon Jul 13 09:38:57 2020
@@ -6,7 +6,7 @@
 CC=	cc
 OPT=	-O
 LARGE_CFLAGS=	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-LOCAL_CFLAGS=	-DNO_LUA_SUPPORT -D_GNU_SOURCE
+LOCAL_CFLAGS=	-DNO_LUA_SUPPORT -DNO_BLOCKLIST_SUPPORT -D_GNU_SOURCE
 CFLAGS=	$(OPT) $(LARGE_CFLAGS) $(LOCAL_CFLAGS)
 
 GROFF=	groff -Tascii

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.81 src/libexec/httpd/bozohttpd.8:1.82
--- src/libexec/httpd/bozohttpd.8:1.81	Sat Jul 11 08:10:52 2020
+++ src/libexec/httpd/bozohttpd.8	Mon Jul 13 09:38:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bozohttpd.8,v 1.81 2020/07/11 08:10:52 jruoho Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.82 2020/07/13 09:38:57 jruoho Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -466,16 +466,14 @@ compilation option.
 .Pp
 Upon occurrence,
 .Nm
-reports three HTTP status codes to
+reports two HTTP status codes to
 .Xr blocklistd 8
 as failures:
 .Em 401
-(``Unauthorized'') ,
-.Em 403
-(``Forbidden'') ,
+(``Unauthorized'')
 and
-.Em 500
-(``Internal Server Error'') .
+.Em 403
+(``Forbidden'') .
 Of these,
 .Em 401
 is the one received upon authorization failure with the

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.116 src/libexec/httpd/bozohttpd.c:1.117
--- src/libexec/httpd/bozohttpd.c:1.116	Sat Jul 11 08:10:52 2020
+++ src/libexec/httpd/bozohttpd.c	Mon Jul 13 09:38:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.116 2020/07/11 08:10:52 jruoho Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.117 2020/07/13 09:38:57 jruoho Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -2297,8 +2297,7 @@ bozo_http_error(bozohttpd_t *httpd, int 
 		pfilter_notify(BLOCKLIST_AUTH_FAIL, code);
 		break;
 
-	case 403: /* FALLTHROUGH */
-	case 500:
+	case 403:
 		pfilter_notify(BLOCKLIST_ABUSIVE_BEHAVIOR, code);
 		break;
 	}



CVS commit: src

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 09:10:35 UTC 2020

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man5: Makefile
Added Files:
src/share/man/man5: changelist.5 pkgpath.conf.5

Log Message:
Add stub manual pages for /etc/changelist and /etc/pkgpath.conf.
Fixes PR bin/55477.


To generate a diff of this commit:
cvs rdiff -u -r1.1694 -r1.1695 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.72 -r1.73 src/share/man/man5/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man5/changelist.5 \
src/share/man/man5/pkgpath.conf.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1694 src/distrib/sets/lists/man/mi:1.1695
--- src/distrib/sets/lists/man/mi:1.1694	Tue Jun 23 21:34:44 2020
+++ src/distrib/sets/lists/man/mi	Mon Jul 13 09:10:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1694 2020/06/23 21:34:44 rin Exp $
+# $NetBSD: mi,v 1.1695 2020/07/13 09:10:34 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2127,6 +2127,7 @@
 ./usr/share/man/cat5/capfile.0			man-sys-catman		.cat
 ./usr/share/man/cat5/ccd.conf.0			man-sysutil-catman	.cat
 ./usr/share/man/cat5/cdb.0			man-sys-catman		.cat
+./usr/share/man/cat5/changelist.0		man-sys-catman		.cat
 ./usr/share/man/cat5/cidr_table.0		man-postfix-catman	postfix,.cat
 ./usr/share/man/cat5/core.0			man-sys-catman		.cat
 ./usr/share/man/cat5/crontab.0			man-cron-catman		.cat
@@ -2257,6 +2258,7 @@
 ./usr/share/man/cat5/pim6sd.conf.0		man-obsolete		obsolete
 ./usr/share/man/cat5/pkg_install.conf.0		man-pkgutil-catman	.cat
 ./usr/share/man/cat5/pkg_summary.0		man-pkgutil-catman	.cat
+./usr/share/man/cat5/pkgpath.conf.0		man-sys-catman		.cat
 ./usr/share/man/cat5/postconf.0			man-postfix-catman	postfix,.cat
 ./usr/share/man/cat5/postfix-wrapper.0		man-postfix-catman	postfix,.cat
 ./usr/share/man/cat5/primes.0			man-obsolete		obsolete
@@ -5252,6 +5254,7 @@
 ./usr/share/man/html5/capfile.html		man-sys-htmlman		html
 ./usr/share/man/html5/ccd.conf.html		man-sysutil-htmlman	html
 ./usr/share/man/html5/cdb.html			man-sys-htmlman		html
+./usr/share/man/html5/changelist.html		man-sys-htmlman		html
 ./usr/share/man/html5/cidr_table.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html5/core.html			man-sys-htmlman		html
 ./usr/share/man/html5/crontab.html		man-cron-htmlman	html
@@ -5371,6 +5374,7 @@
 ./usr/share/man/html5/phones.html		man-sys-man		html
 ./usr/share/man/html5/pkg_install.conf.html	man-pkgutil-htmlman	html
 ./usr/share/man/html5/pkg_summary.html		man-pkgutil-htmlman	html
+./usr/share/man/html5/pkgpath.conf.html		man-sys-man		html
 ./usr/share/man/html5/postconf.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html5/postfix-wrapper.html	man-postfix-htmlman	postfix,html
 ./usr/share/man/html5/printcap.html		man-lpr-htmlman		html
@@ -8311,6 +8315,7 @@
 ./usr/share/man/man5/capfile.5			man-sys-man		.man
 ./usr/share/man/man5/ccd.conf.5			man-sysutil-man		.man
 ./usr/share/man/man5/cdb.5			man-sys-man		.man
+./usr/share/man/man5/changelist.5		man-sys-man		postfix,.man
 ./usr/share/man/man5/cidr_table.5		man-postfix-man		postfix,.man
 ./usr/share/man/man5/core.5			man-sys-man		.man
 ./usr/share/man/man5/crontab.5			man-cron-man		.man
@@ -8441,6 +8446,7 @@
 ./usr/share/man/man5/pim6sd.conf.5		man-obsolete		obsolete
 ./usr/share/man/man5/pkg_install.conf.5		man-pkgutil-man		.man
 ./usr/share/man/man5/pkg_summary.5		man-pkgutil-man		.man
+./usr/share/man/man5/pkgpath.conf.5		man-sys-man		.man
 ./usr/share/man/man5/postconf.5			man-postfix-man		postfix,.man
 ./usr/share/man/man5/postfix-wrapper.5		man-postfix-man		postfix,.man
 ./usr/share/man/man5/primes.5			man-obsolete		obsolete

Index: src/share/man/man5/Makefile
diff -u src/share/man/man5/Makefile:1.72 src/share/man/man5/Makefile:1.73
--- src/share/man/man5/Makefile:1.72	Tue Jan  9 03:31:12 2018
+++ src/share/man/man5/Makefile	Mon Jul 13 09:10:35 2020
@@ -1,24 +1,24 @@
-#	$NetBSD: Makefile,v 1.72 2018/01/09 03:31:12 christos Exp $
+#	$NetBSD: Makefile,v 1.73 2020/07/13 09:10:35 jruoho Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 # missing: dump.5 plot.5
 
 MAN=	a.out.5 acct.5 ar.5 autofs.5 boot.cfg.5 \
-	capfile.5 core.5 daily.5 disktab.5 elf.5 \
+	capfile.5 changelist.5 core.5 daily.5 disktab.5 elf.5 \
 	ethers.5 floppytab.5 forward.5 \
 	fs.5 fstab.5 genassym.cf.5 gpio.conf.5 group.5 hesiod.conf.5 \
 	hosts.5 hosts.equiv.5 ifaliases.5 ifconfig.if.5 intro.5 \
 	ipsec.conf.5 ld.so.conf.5 link.5 locale.alias.5 \
 	locate.conf.5 login.conf.5 mixerctl.conf.5 modules.conf.5 mk.conf.5 \
 	monthly.5 motd.5 netconfig.5 netgroup.5 networks.5 nologin.5 \
-	nsswitch.conf.5 passwd.5 passwd.conf.5 phones.5 \
+	nsswitch.conf.5 passwd.5 passwd.conf.5 phones.5 pkgpath.conf.5 \
 	printcap.5 protocols.5 ranlib.5 rc.conf.5 remote.5 \
 	resolv.conf.5 route.conf.5 

CVS commit: src/sys/arch/mips

2020-07-13 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jul 13 09:00:40 UTC 2020

Modified Files:
src/sys/arch/mips/include: cpuregs.h
src/sys/arch/mips/mips: trap.c

Log Message:
Remove a magic number.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/mips/include/cpuregs.h
cvs rdiff -u -r1.254 -r1.255 src/sys/arch/mips/mips/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/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.99 src/sys/arch/mips/include/cpuregs.h:1.100
--- src/sys/arch/mips/include/cpuregs.h:1.99	Sun May 24 07:15:24 2020
+++ src/sys/arch/mips/include/cpuregs.h	Mon Jul 13 09:00:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.99 2020/05/24 07:15:24 simonb Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.100 2020/07/13 09:00:40 simonb Exp $	*/
 
 /*
  * Copyright (c) 2009 Miodrag Vallat.
@@ -188,6 +188,9 @@
  */
 #define	MIPS_CR_BR_DELAY	0x8000
 #define	MIPS_CR_COP_ERR		0x3000
+#define	 MIPS_CR_COP_ERR_CU1	  1
+#define	 MIPS_CR_COP_ERR_CU2	  2
+#define	 MIPS_CR_COP_ERR_CU3	  3
 #define	MIPS1_CR_EXC_CODE	0x003C	/* four bits */
 #define	MIPS3_CR_EXC_CODE	0x007C	/* five bits */
 #define	MIPS_CR_IP		0xFF00

Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.254 src/sys/arch/mips/mips/trap.c:1.255
--- src/sys/arch/mips/mips/trap.c:1.254	Thu Jun 25 08:00:49 2020
+++ src/sys/arch/mips/mips/trap.c	Mon Jul 13 09:00:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.254 2020/06/25 08:00:49 simonb Exp $	*/
+/*	$NetBSD: trap.c,v 1.255 2020/07/13 09:00:40 simonb Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.254 2020/06/25 08:00:49 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.255 2020/07/13 09:00:40 simonb Exp $");
 
 #include "opt_cputype.h"	/* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -600,7 +600,7 @@ trap(uint32_t status, uint32_t cause, va
 	case T_RES_INST+T_USER:
 	case T_COP_UNUSABLE+T_USER:
 #if !defined(FPEMUL) && !defined(NOFPU)
-		if ((cause & MIPS_CR_COP_ERR) == 0x1000) {
+		if (__SHIFTOUT(cause, MIPS_CR_COP_ERR) == MIPS_CR_COP_ERR_CU1) {
 			fpu_load();  	/* load FPA */
 		} else
 #endif



CVS commit: src/share/man/man4

2020-07-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul 13 08:59:34 UTC 2020

Modified Files:
src/share/man/man4: pckbd.4

Log Message:
Fix xref.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/pckbd.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/pckbd.4
diff -u src/share/man/man4/pckbd.4:1.23 src/share/man/man4/pckbd.4:1.24
--- src/share/man/man4/pckbd.4:1.23	Sun Jul 12 01:36:32 2020
+++ src/share/man/man4/pckbd.4	Mon Jul 13 08:59:34 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: pckbd.4,v 1.23 2020/07/12 01:36:32 nia Exp $
+.\" $NetBSD: pckbd.4,v 1.24 2020/07/13 08:59:34 wiz Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -146,7 +146,7 @@ to the
 .Xr pcppi 4
 driver allows the use of the standard ISA speaker for this purpose.
 On acorn32,
-.Xr vidcaudio 4
+.Xr acorn32/vidcaudio 4
 performs this function.
 .Sh EXAMPLES
 To set a German keyboard layout without



CVS commit: src/share/man/man4

2020-07-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jul 13 08:58:48 UTC 2020

Modified Files:
src/share/man/man4: ddb.4

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/share/man/man4/ddb.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/ddb.4
diff -u src/share/man/man4/ddb.4:1.191 src/share/man/man4/ddb.4:1.192
--- src/share/man/man4/ddb.4:1.191	Mon Jul 13 05:20:45 2020
+++ src/share/man/man4/ddb.4	Mon Jul 13 08:58:48 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ddb.4,v 1.191 2020/07/13 05:20:45 simonb Exp $
+.\"	$NetBSD: ddb.4,v 1.192 2020/07/13 08:58:48 wiz Exp $
 .\"
 .\" Copyright (c) 1997 - 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1094,7 +1094,8 @@ Dump CP0 (coprocessor 0) register values
 .It Ic kvtop
 Print the physical address for a given kernel virtual address.
 .It Ic reset
-Reset the system.  Not implemented for many CPUs and/or systems.
+Reset the system.
+Not implemented for many CPUs and/or systems.
 .It Ic tlb
 Print out the Translation Lookaside Buffer (TLB).
 Only works in



CVS commit: src/sys/dev

2020-07-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Mon Jul 13 08:45:12 UTC 2020

Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c
src/sys/dev/wscons: wsksymdef.h

Log Message:
Add keyboard layout for Latin American Spanish to ukbd/pckbd


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pckbport/wskbdmap_mfii.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/wscons/wsksymdef.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/hid/hidkbdmap.c
diff -u src/sys/dev/hid/hidkbdmap.c:1.8 src/sys/dev/hid/hidkbdmap.c:1.9
--- src/sys/dev/hid/hidkbdmap.c:1.8	Sun Jul 12 14:31:49 2020
+++ src/sys/dev/hid/hidkbdmap.c	Mon Jul 13 08:45:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidkbdmap.c,v 1.8 2020/07/12 14:31:49 nia Exp $	*/
+/*	$NetBSD: hidkbdmap.c,v 1.9 2020/07/13 08:45:12 nia Exp $	*/
 
 /*
  * Copyright (c) 1999,2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.8 2020/07/12 14:31:49 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.9 2020/07/13 08:45:12 nia Exp $");
 
 #include 
 #include 
@@ -743,6 +743,33 @@ static const keysym_t hidkbd_keydesc_is_
 KC(52),  KS_acute,	KS_diaeresis,	KS_asciicircum,
 };
 
+static const keysym_t hidkbd_keydesc_la[] = {
+/*  pos  normal		shifted			altgr			shift-altgr */
+KC(20),  KS_q,		KS_Q,			KS_at,
+KC(30),  KS_1,		KS_exclam,		KS_bar,
+KC(31),  KS_2,		KS_quotedbl,		KS_at,
+KC(32),  KS_3,		KS_numbersign,		KS_periodcentered,
+KC(35),  KS_6,		KS_ampersand,		KS_notsign,
+KC(36),  KS_7,		KS_slash,
+KC(37),  KS_8,		KS_parenleft,
+KC(38),  KS_9,		KS_parenright,
+KC(39),  KS_0,		KS_equal,
+KC(45),  KS_apostrophe,	KS_question,		KS_backslash,
+KC(46),  KS_questiondown,	KS_exclamdown,		KS_dead_cedilla,	KS_dead_ogonek,
+KC(47),  KS_dead_acute,	KS_dead_diaeresis,	KS_dead_diaeresis,	KS_dead_abovering,
+KC(48),  KS_plus,		KS_asterisk,		KS_asciitilde,
+KC(49),  KS_braceright,	KS_bracketright,	KS_dead_grave,
+KC(50),  KS_braceright,	KS_bracketright,	KS_dead_grave,
+KC(51),  KS_ntilde,		KS_Ntilde,		KS_asciitilde,
+KC(52),  KS_braceleft,	KS_bracketleft,		KS_dead_circumflex,
+KC(53),  KS_bar,		KS_degree,		KS_notsign,
+KC(54),  KS_comma,		KS_semicolon,
+KC(55),  KS_period,		KS_colon,
+KC(56),  KS_minus,		KS_underscore,
+KC(100), KS_less,		KS_greater,
+KC(230), KS_Mode_switch,	KS_Multi_key,
+};
+
 #define KBD_MAP(name, base, map) \
 			{ name, base, sizeof(map)/sizeof(keysym_t), map }
 
@@ -783,6 +810,7 @@ const struct wscons_keydesc hidkbd_keyde
 	KBD_MAP(KB_SF | KB_NODEAD,	KB_SF,	hidkbd_keydesc_sg_nodead),
 	KBD_MAP(KB_TR,			KB_US,	hidkbd_keydesc_tr),
 	KBD_MAP(KB_TR | KB_NODEAD,	KB_TR,	hidkbd_keydesc_tr_nodead),
+	KBD_MAP(KB_LA,			KB_US,	hidkbd_keydesc_la),
 	KBD_MAP(KB_HU,			KB_US,	hidkbd_keydesc_hu),
 	{0, 0, 0, 0}
 };

Index: src/sys/dev/pckbport/wskbdmap_mfii.c
diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.31 src/sys/dev/pckbport/wskbdmap_mfii.c:1.32
--- src/sys/dev/pckbport/wskbdmap_mfii.c:1.31	Sun Jul 12 14:31:49 2020
+++ src/sys/dev/pckbport/wskbdmap_mfii.c	Mon Jul 13 08:45:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdmap_mfii.c,v 1.31 2020/07/12 14:31:49 nia Exp $	*/
+/*	$NetBSD: wskbdmap_mfii.c,v 1.32 2020/07/13 08:45:12 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.31 2020/07/12 14:31:49 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.32 2020/07/13 08:45:12 nia Exp $");
 
 #include "opt_wskbdmap.h"
 #include 
@@ -912,6 +912,32 @@ static const keysym_t pckbd_keydesc_is_n
 /*  pos  normal		shifted		altgr		shift-altgr */
 KC(40),  KS_acute,		KS_diaeresis,	KS_asciicircum,
 };
+
+static const keysym_t pckbd_keydesc_la[] = {
+/*  pos  normal		shifted			altgr			shift-altgr */
+KC(2),   KS_1,		KS_exclam,		KS_bar,
+KC(3),   KS_2,		KS_quotedbl,		KS_at,
+KC(4),   KS_3,		KS_numbersign,		KS_periodcentered,
+KC(7),   KS_6,		KS_ampersand,		KS_notsign,
+KC(8),   KS_7,		KS_slash,
+KC(9),   KS_8,		KS_parenleft,
+KC(10),  KS_9,		KS_parenright,
+KC(11),  KS_0,		KS_equal,
+KC(12),  KS_apostrophe,	KS_question,		KS_backslash,
+KC(13),  KS_questiondown,	KS_exclamdown,		KS_dead_cedilla,	KS_dead_ogonek,
+KC(16),  KS_q,		KS_Q,			KS_at,
+KC(26),  KS_dead_acute,	KS_dead_diaeresis,	KS_dead_diaeresis,	KS_dead_abovering,
+KC(27),  KS_plus,		KS_asterisk,		KS_asciitilde,
+KC(39),  KS_ntilde,		KS_Ntilde,		KS_asciitilde,
+KC(40),  KS_braceleft,	KS_bracketleft,		KS_dead_circumflex,
+KC(41),  KS_bar,		KS_degree,		KS_notsign,
+KC(43),  KS_braceright,	KS_bracketright,	KS_dead_grave,
+KC(51),  KS_comma,		KS_semicolon,
+KC(52),  

CVS commit: src/share/man/man7

2020-07-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul 13 07:26:27 UTC 2020

Modified Files:
src/share/man/man7: release.7

Log Message:
Add the missing rescue(8) and tests(7) sets.  XXX: this manual is somewhat
broken due to the differences in the archival formats used.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man7/release.7

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/man7/release.7
diff -u src/share/man/man7/release.7:1.38 src/share/man/man7/release.7:1.39
--- src/share/man/man7/release.7:1.38	Wed Jul 26 15:32:09 2017
+++ src/share/man/man7/release.7	Mon Jul 13 07:26:27 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: release.7,v 1.38 2017/07/26 15:32:09 leot Exp $
+.\"	$NetBSD: release.7,v 1.39 2020/07/13 07:26:27 jruoho Exp $
 .\"
 .\" Copyright (c) 1997, 2000, 2005 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 July 26, 2017
+.Dd July 13, 2020
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -305,6 +305,16 @@ the typesettable document set, and vario
 configuration files.
 .It Sy modules.tgz
 This set includes all the kernel modules.
+.It Sy rescue.tgz
+This set contains the
+.Xr rescue 8
+utilities.
+.It Sy tests.tgz
+This set includes the
+.Xr tests 7
+for
+.Xr atf 7 ,
+the automated test framework used by NetBSD.
 .It Sy text.tgz
 This set includes the
 .Nx



CVS commit: src/share/mk

2020-07-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 13 07:22:51 UTC 2020

Modified Files:
src/share/mk: bsd.README

Log Message:
MKLLVMRT is automatically enabled on x86 and arm64, not mesa18+.


To generate a diff of this commit:
cvs rdiff -u -r1.409 -r1.410 src/share/mk/bsd.README

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.409 src/share/mk/bsd.README:1.410
--- src/share/mk/bsd.README:1.409	Thu Jul  2 10:22:28 2020
+++ src/share/mk/bsd.README	Mon Jul 13 07:22:51 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.409 2020/07/02 10:22:28 jmcneill Exp $
+#	$NetBSD: bsd.README,v 1.410 2020/07/13 07:22:51 mrg Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -342,7 +342,7 @@ MKLLVMRT	If "yes", build the LLVM PIC li
 		various Mesa backend and the native JIT of the target
 		architecture, if supported.  (Radeon R300 and newer,
 		LLVMPIPE for most.)
-		Default: no, enabled automatically with HAVE_MESA_VER=18.
+		Default: no, enabled automatically with X11 on x86 and aarch64.
 
 MKLVM		If "no", don't build or install the logical volume manager
 		and device mapper tools and libraries