CVS commit: src/sys/dev/fdt

2020-05-19 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Wed May 20 05:24:35 UTC 2020

Modified Files:
src/sys/dev/fdt: pwm_backlight.c

Log Message:
Modified debug message.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/fdt/pwm_backlight.c

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

Modified files:

Index: src/sys/dev/fdt/pwm_backlight.c
diff -u src/sys/dev/fdt/pwm_backlight.c:1.7 src/sys/dev/fdt/pwm_backlight.c:1.8
--- src/sys/dev/fdt/pwm_backlight.c:1.7	Wed Jan 22 07:29:23 2020
+++ src/sys/dev/fdt/pwm_backlight.c	Wed May 20 05:24:35 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pwm_backlight.c,v 1.7 2020/01/22 07:29:23 mrg Exp $ */
+/* $NetBSD: pwm_backlight.c,v 1.8 2020/05/20 05:24:35 hkenken Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pwm_backlight.c,v 1.7 2020/01/22 07:29:23 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pwm_backlight.c,v 1.8 2020/05/20 05:24:35 hkenken Exp $");
 
 #include 
 #include 
@@ -146,7 +146,9 @@ pwm_backlight_set(struct pwm_backlight_s
 	if (index >= sc->sc_nlevels)
 		return;
 
-	aprint_debug_dev(sc->sc_dev, "set duty cycle to %u%%\n", sc->sc_levels[index]);
+	KASSERT(sc->sc_levels[sc->sc_nlevels - 1] != 0);
+	aprint_debug_dev(sc->sc_dev, "set duty cycle to %u%%\n",
+	(100 * sc->sc_levels[index]) / sc->sc_levels[sc->sc_nlevels - 1]);
 
 	pwm_disable(sc->sc_pwm);
 	pwm_get_config(sc->sc_pwm, );



CVS commit: src/sys/arch

2020-05-19 Thread Kenichi Hashimoto
Module Name:src
Committed By:   hkenken
Date:   Wed May 20 05:10:42 UTC 2020

Modified Files:
src/sys/arch/arm/imx: files.imx51 imx51_pwm.c imxpwm.c imxpwmreg.h
imxpwmvar.h
src/sys/arch/evbarm/netwalker: netwalker_backlight.c

Log Message:
Use kernel API of PWM subsystems for i.MX PWM driver.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/imx/files.imx51
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx51_pwm.c \
src/sys/arch/arm/imx/imxpwm.c src/sys/arch/arm/imx/imxpwmreg.h \
src/sys/arch/arm/imx/imxpwmvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/netwalker/netwalker_backlight.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/imx/files.imx51
diff -u src/sys/arch/arm/imx/files.imx51:1.20 src/sys/arch/arm/imx/files.imx51:1.21
--- src/sys/arch/arm/imx/files.imx51:1.20	Sat Oct 12 06:46:13 2019
+++ src/sys/arch/arm/imx/files.imx51	Wed May 20 05:10:42 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx51,v 1.20 2019/10/12 06:46:13 skrll Exp $
+#	$NetBSD: files.imx51,v 1.21 2020/05/20 05:10:42 hkenken Exp $
 #
 # Configuration info for the Freescale i.MX5x
 #
@@ -137,6 +137,6 @@ defparam opt_imxspi.hIMXSPI_DEBUG
 # file	arch/arm/imx/imx51_i2s.c		imxi2s needs-flag
 
 # PWM controller
-device	imxpwm
+device	imxpwm: pwm
 file	arch/arm/imx/imxpwm.c			imxpwm
 file	arch/arm/imx/imx51_pwm.c		imxpwm

Index: src/sys/arch/arm/imx/imx51_pwm.c
diff -u src/sys/arch/arm/imx/imx51_pwm.c:1.1 src/sys/arch/arm/imx/imx51_pwm.c:1.2
--- src/sys/arch/arm/imx/imx51_pwm.c:1.1	Tue May  6 11:22:53 2014
+++ src/sys/arch/arm/imx/imx51_pwm.c	Wed May 20 05:10:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx51_pwm.c,v 1.1 2014/05/06 11:22:53 hkenken Exp $	*/
+/*	$NetBSD: imx51_pwm.c,v 1.2 2020/05/20 05:10:42 hkenken Exp $	*/
 
 /*-
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx51_pwm.c,v 1.1 2014/05/06 11:22:53 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx51_pwm.c,v 1.2 2020/05/20 05:10:42 hkenken Exp $");
 
 #include "locators.h"
 #include "opt_imx.h"
@@ -62,10 +62,16 @@ imxpwm_attach(struct imxpwm_softc *sc, v
 
 	if (aa->aa_size == AXICF_SIZE_DEFAULT)
 		aa->aa_size = PWM_SIZE;
+
 	sc->sc_iot = aa->aa_iot;
 	sc->sc_intr = aa->aa_irq;
 	sc->sc_freq = imx51_get_clock(IMX51CLK_IPG_CLK_ROOT);
+
 	if (bus_space_map(aa->aa_iot, aa->aa_addr, aa->aa_size, 0, >sc_ioh))
 		panic("%s: couldn't map", device_xname(sc->sc_dev));
+
+	sc->sc_ih = intr_establish(sc->sc_intr, IPL_BIO, IST_LEVEL,
+	imxpwm_intr, sc);
+
 	imxpwm_attach_common(sc);
 }
Index: src/sys/arch/arm/imx/imxpwm.c
diff -u src/sys/arch/arm/imx/imxpwm.c:1.1 src/sys/arch/arm/imx/imxpwm.c:1.2
--- src/sys/arch/arm/imx/imxpwm.c:1.1	Tue May  6 11:22:53 2014
+++ src/sys/arch/arm/imx/imxpwm.c	Wed May 20 05:10:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxpwm.c,v 1.1 2014/05/06 11:22:53 hkenken Exp $	*/
+/*	$NetBSD: imxpwm.c,v 1.2 2020/05/20 05:10:42 hkenken Exp $	*/
 
 /*
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -27,88 +27,155 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imxpwm.c,v 1.1 2014/05/06 11:22:53 hkenken Exp $");
-
-#include "opt_imx.h"
-#include "locators.h"
+__KERNEL_RCSID(0, "$NetBSD: imxpwm.c,v 1.2 2020/05/20 05:10:42 hkenken Exp $");
 
 #include 
 #include 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
-static inline uint32_t
-imxpwm_read(struct imxpwm_softc *sc, bus_size_t o)
-{
-	return bus_space_read_4(sc->sc_iot, sc->sc_ioh, o);
-}
+#include 
 
-static inline void
-imxpwm_write(struct imxpwm_softc *sc, bus_size_t o, uint32_t v)
-{
-	bus_space_write_4(sc->sc_iot, sc->sc_ioh, o, v);
-}
+#define	PWM_READ(sc, reg)		\
+	bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg))
+#define	PWM_WRITE(sc, reg, val)		\
+	bus_space_write_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (val))
 
-static int
+int
 imxpwm_intr(void *arg)
 {
 	struct imxpwm_softc *sc = arg;
-	uint32_t sts = imxpwm_read(sc, PWM_SR);
 
-	imxpwm_write(sc, PWM_SR, sts);
+	uint32_t sts = PWM_READ(sc, PWM_SR);
 
-	if ((sts & SR_ROV) && (sc->sc_handler != NULL))
-		sc->sc_handler(sc->sc_cookie);
+	if (sts & PWM_SR_ROV) {
+		if (sc->sc_handler != NULL)
+			sc->sc_handler(sc->sc_cookie);
+	}
+
+	PWM_WRITE(sc, PWM_SR, sts);
 
 	return 1;
 }
 
-void
-imxpwm_attach_common(struct imxpwm_softc *sc)
+static int
+imxpwm_enable(pwm_tag_t pwm, bool enable)
 {
-	uint32_t reg;
-	int div;
+	struct imxpwm_softc * const sc = device_private(pwm->pwm_dev);
+	uint32_t cr, ocr;
 
-	if (sc->sc_handler != NULL) {
-		sc->sc_ih = intr_establish(sc->sc_intr, IPL_BIO, IST_LEVEL,
-		imxpwm_intr, sc);
+	ocr = cr = PWM_READ(sc, PWM_CR);
+	if (enable)
+		cr |= PWM_CR_EN;
+	else
+		cr &= ~PWM_CR_EN;
 
-		reg = IR_RIE;
-		imxpwm_write(sc, PWM_IR, reg);
-	}
+	if (cr != ocr)
+		PWM_WRITE(sc, PWM_CR, cr);
 
-	if (sc->sc_hz <= 0)
-		sc->sc_hz = 

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

2020-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 20 02:23:35 UTC 2020

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

Log Message:
 Temporary back to lapic_initclocks() from lapci_reset() to avoid compile
error.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/x86/x86/lapic.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/lapic.c
diff -u src/sys/arch/x86/x86/lapic.c:1.79 src/sys/arch/x86/x86/lapic.c:1.80
--- src/sys/arch/x86/x86/lapic.c:1.79	Tue May 19 21:39:11 2020
+++ src/sys/arch/x86/x86/lapic.c	Wed May 20 02:23:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: lapic.c,v 1.79 2020/05/19 21:39:11 ad Exp $	*/
+/*	$NetBSD: lapic.c,v 1.80 2020/05/20 02:23:35 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2008, 2020 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.79 2020/05/19 21:39:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.80 2020/05/20 02:23:35 msaitoh Exp $");
 
 #include "acpica.h"
 #include "ioapic.h"
@@ -746,7 +746,7 @@ lapic_delay(unsigned int usec)
 	while (deltat > 0) {
 		xtick = lapic_gettick();
 		if (lapic_broken_periodic && xtick == 0 && otick == 0) {
-			lapic_reset();
+			lapic_initclocks();
 			xtick = lapic_gettick();
 			if (xtick == 0)
 panic("lapic timer stopped ticking");



CVS commit: src/sys

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 22:22:15 UTC 2020

Modified Files:
src/sys/fs/tmpfs: tmpfs_vnops.c
src/sys/uvm: uvm_aobj.c uvm_bio.c uvm_object.c uvm_pager.h uvm_vnode.c

Log Message:
PR kern/32166: pgo_get protocol is ambiguous
Also problems with tmpfs+nfs noted by hannken@.

Don't pass PGO_ALLPAGES to pgo_get, and ignore PGO_DONTCARE in the
!PGO_LOCKED case.  In uao_get() have uvm_pagealloc() take care of page
zeroing and release busy pages on error.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/fs/tmpfs/tmpfs_vnops.c
cvs rdiff -u -r1.141 -r1.142 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.113 -r1.114 src/sys/uvm/uvm_bio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/uvm/uvm_object.c
cvs rdiff -u -r1.48 -r1.49 src/sys/uvm/uvm_pager.h
cvs rdiff -u -r1.112 -r1.113 src/sys/uvm/uvm_vnode.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/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.140 src/sys/fs/tmpfs/tmpfs_vnops.c:1.141
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.140	Sun May 17 19:43:31 2020
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Tue May 19 22:22:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.140 2020/05/17 19:43:31 ad Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.141 2020/05/19 22:22:15 ad Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007, 2020 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.140 2020/05/17 19:43:31 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.141 2020/05/19 22:22:15 ad Exp $");
 
 #include 
 #include 
@@ -1234,20 +1234,10 @@ tmpfs_getpages(void *v)
 		tmpfs_update_lazily(vp, tflags);
 	}
 
-	/*
-	 * Invoke the pager.
-	 *
-	 * Clean the array of pages before.  XXX: PR/32166
-	 * Note that vnode lock is shared with underlying UVM object.
-	 */
-	if ((flags & PGO_LOCKED) == 0 && pgs) {
-		memset(pgs, 0, sizeof(struct vm_pages *) * npages);
-	}
+	/* Invoke the pager.  The vnode vmobjlock is shared with the UAO. */
 	KASSERT(vp->v_uobj.vmobjlock == uobj->vmobjlock);
-
 	error = (*uobj->pgops->pgo_get)(uobj, offset, pgs, , centeridx,
 	access_type, advice, flags);
-
 #if defined(DEBUG)
 	if (!error && pgs) {
 		KASSERT(pgs[centeridx] != NULL);

Index: src/sys/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.141 src/sys/uvm/uvm_aobj.c:1.142
--- src/sys/uvm/uvm_aobj.c:1.141	Sun May 17 19:38:17 2020
+++ src/sys/uvm/uvm_aobj.c	Tue May 19 22:22:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.141 2020/05/17 19:38:17 ad Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.142 2020/05/19 22:22:15 ad Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.141 2020/05/17 19:38:17 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.142 2020/05/19 22:22:15 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -786,14 +786,12 @@ uao_put(struct uvm_object *uobj, voff_t 
  * 2: page is zero-fill-> allocate a new page and zero it.
  * 3: page is swapped out  -> fetch the page from swap.
  *
- * cases 1 and 2 can be handled with PGO_LOCKED, case 3 cannot.
- * so, if the "center" page hits case 3 (or any page, with PGO_ALLPAGES),
- * then we will need to return EBUSY.
+ * case 1 can be handled with PGO_LOCKED, cases 2 and 3 cannot.
+ * so, if the "center" page hits case 2/3 then we will need to return EBUSY.
  *
  * => prefer map unlocked (not required)
  * => object must be locked!  we will _unlock_ it before starting any I/O.
- * => flags: PGO_ALLPAGES: get all of the pages
- *   PGO_LOCKED: fault data structures are locked
+ * => flags: PGO_LOCKED: fault data structures are locked
  * => NOTE: offset is the offset of pps[0], _NOT_ pps[centeridx]
  * => NOTE: caller must check for released pages!!
  */
@@ -805,7 +803,6 @@ uao_get(struct uvm_object *uobj, voff_t 
 	voff_t current_offset;
 	struct vm_page *ptmp = NULL;	/* Quell compiler warning */
 	int lcv, gotpages, maxpages, swslot, pageidx;
-	bool done;
 	UVMHIST_FUNC("uao_get"); UVMHIST_CALLED(pdhist);
 
 	UVMHIST_LOG(pdhist, "aobj=%#jx offset=%jd, flags=%jd",
@@ -841,7 +838,6 @@ uao_get(struct uvm_object *uobj, voff_t 
  		 */
 
 		uvm_page_array_init();
-		done = true;	/* be optimistic */
 		gotpages = 0;	/* # of pages we got so far */
 		for (lcv = 0; lcv < maxpages; lcv++) {
 			ptmp = uvm_page_array_fill_and_peek(, uobj,
@@ -880,16 +876,9 @@ uao_get(struct uvm_object *uobj, voff_t 
 		 * to unlock and do some waiting or I/O.
  		 */
 
-		if ((flags & PGO_ALLPAGES) != 0) {
-			for (int i = 0; i < maxpages; i++) {
-done &= (pps[i] != NULL);
-			}
-		} else {
-			done = (pps[centeridx] != NULL);
-		}
 		UVMHIST_LOG(pdhist, "<- done (done=%jd)", done, 0,0,0);
 		*npagesp = gotpages;
-		return done ? 0 : EBUSY;
+		return pps[centeridx] != NULL ? 0 : EBUSY;
 	}
 
 	/*
@@ -905,17 +894,6 @@ 

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

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:56:52 UTC 2020

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

Log Message:
Ignore x86_delay, for xen


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/x86/x86/tsc.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/tsc.c
diff -u src/sys/arch/x86/x86/tsc.c:1.45 src/sys/arch/x86/x86/tsc.c:1.46
--- src/sys/arch/x86/x86/tsc.c:1.45	Tue May 19 21:43:36 2020
+++ src/sys/arch/x86/x86/tsc.c	Tue May 19 21:56:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: tsc.c,v 1.45 2020/05/19 21:43:36 ad Exp $	*/
+/*	$NetBSD: tsc.c,v 1.46 2020/05/19 21:56:51 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.45 2020/05/19 21:43:36 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.46 2020/05/19 21:56:51 ad Exp $");
 
 #include 
 #include 
@@ -175,7 +175,6 @@ tsc_tc_init(void)
 		invariant = false;
 	} else if (vm_guest == VM_GUEST_NO) {
 		delay_func = tsc_delay;
-		x86_delay = tsc_delay;
 	}
 
 	if (tsc_freq != 0) {



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

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:57:25 UTC 2020

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

Log Message:
Remove duplicate def of tsc_get_timecount().


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/xen/xen/xen_machdep.c

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

Modified files:

Index: src/sys/arch/xen/xen/xen_machdep.c
diff -u src/sys/arch/xen/xen/xen_machdep.c:1.24 src/sys/arch/xen/xen/xen_machdep.c:1.25
--- src/sys/arch/xen/xen/xen_machdep.c:1.24	Sat May  2 16:44:36 2020
+++ src/sys/arch/xen/xen/xen_machdep.c	Tue May 19 21:57:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_machdep.c,v 1.24 2020/05/02 16:44:36 bouyer Exp $	*/
+/*	$NetBSD: xen_machdep.c,v 1.25 2020/05/19 21:57:25 ad Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.24 2020/05/02 16:44:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.25 2020/05/19 21:57:25 ad Exp $");
 
 #include "opt_xen.h"
 
@@ -227,13 +227,6 @@ static void xen_suspend_domain(void);
 static void xen_prepare_suspend(void);
 static void xen_prepare_resume(void);
 
-u_int
-tsc_get_timecount(struct timecounter *tc)
-{
-
-	panic("xen: tsc_get_timecount");
-}
-
 /*
  * this function sets up the machdep.xen.suspend sysctl(7) that
  * controls domain suspend/save.



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

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:54:10 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: cpufunc.S

Log Message:
xen needs the TSC funcs too


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amd64/amd64/cpufunc.S

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

Modified files:

Index: src/sys/arch/amd64/amd64/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.53 src/sys/arch/amd64/amd64/cpufunc.S:1.54
--- src/sys/arch/amd64/amd64/cpufunc.S:1.53	Tue May 19 21:40:55 2020
+++ src/sys/arch/amd64/amd64/cpufunc.S	Tue May 19 21:54:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.S,v 1.53 2020/05/19 21:40:55 ad Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.54 2020/05/19 21:54:10 ad Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -167,25 +167,6 @@ END(x86_write_flags)
 
 STRONG_ALIAS(x86_write_psl,x86_write_flags)
 
-ENTRY(tsc_get_timecount)
-	movq	CPUVAR(CURLWP), %rcx
-1:
-	movq	L_NCSW(%rcx), %rdi
-	rdtsc
-	shlq	$32, %rdx
-	orq	%rdx, %rax
-	addq	CPUVAR(CC_SKEW), %rax
-	cmpq	%rdi, L_NCSW(%rcx)
-	jne	2f
-	KMSAN_INIT_RET(4)
-	ret
-2:
-	jmp	1b
-END(tsc_get_timecount)
-
-STRONG_ALIAS(cpu_counter, tsc_get_timecount)
-STRONG_ALIAS(cpu_counter32, tsc_get_timecount)
-
 /*
  * %rdi = name
  * %rsi = sel
@@ -225,6 +206,25 @@ ENTRY(x86_hotpatch)
 END(x86_hotpatch)
 #endif /* !XENPV */
 
+ENTRY(tsc_get_timecount)
+	movq	CPUVAR(CURLWP), %rcx
+1:
+	movq	L_NCSW(%rcx), %rdi
+	rdtsc
+	shlq	$32, %rdx
+	orq	%rdx, %rax
+	addq	CPUVAR(CC_SKEW), %rax
+	cmpq	%rdi, L_NCSW(%rcx)
+	jne	2f
+	KMSAN_INIT_RET(4)
+	ret
+2:
+	jmp	1b
+END(tsc_get_timecount)
+
+STRONG_ALIAS(cpu_counter, tsc_get_timecount)
+STRONG_ALIAS(cpu_counter32, tsc_get_timecount)
+
 ENTRY(rdmsr_safe)
 	movq	CPUVAR(CURLWP), %r8
 	movq	L_PCB(%r8), %r8



CVS commit: src/sys/uvm

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:52:04 UTC 2020

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

Log Message:
uvm_loanuobjpages():

- vmobjlock is shared between tmpfs vnodes and UAOs now
- split into two routines, to simplify
- fix error recovery


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/uvm/uvm_loan.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_loan.c
diff -u src/sys/uvm/uvm_loan.c:1.101 src/sys/uvm/uvm_loan.c:1.102
--- src/sys/uvm/uvm_loan.c:1.101	Sun May 17 19:38:17 2020
+++ src/sys/uvm/uvm_loan.c	Tue May 19 21:52:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_loan.c,v 1.101 2020/05/17 19:38:17 ad Exp $	*/
+/*	$NetBSD: uvm_loan.c,v 1.102 2020/05/19 21:52:04 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.101 2020/05/17 19:38:17 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.102 2020/05/19 21:52:04 ad Exp $");
 
 #include 
 #include 
@@ -505,101 +505,81 @@ uvm_loanpage(struct vm_page **pgpp, int 
 #define	UVM_LOAN_GET_CHUNK	16
 
 /*
- * uvm_loanuobjpages: loan pages from a uobj out (O->K)
- *
- * => uobj shouldn't be locked.  (we'll lock it)
- * => fail with EBUSY if we meet a wired page.
+ * uvm_loanuobjchunk: helper for uvm_loanuobjpages()
  */
-int
-uvm_loanuobjpages(struct uvm_object *uobj, voff_t pgoff, int orignpages,
-struct vm_page **origpgpp)
+static int
+uvm_loanuobjchunk(struct uvm_object *uobj, voff_t pgoff, int orignpages,
+struct vm_page **pgpp)
 {
-	int ndone; /* # of pages loaned out */
-	struct vm_page **pgpp;
-	int error;
-	int i;
-	krwlock_t *slock;
-
-	pgpp = origpgpp;
-	for (ndone = 0; ndone < orignpages; ) {
-		int npages;
-		/* npendloan: # of pages busied but not loand out yet. */
-		int npendloan = 0xdead; /* XXX gcc */
-reget:
-		npages = MIN(UVM_LOAN_GET_CHUNK, orignpages - ndone);
-		rw_enter(uobj->vmobjlock, RW_WRITER);
-		error = (*uobj->pgops->pgo_get)(uobj,
-		pgoff + (ndone << PAGE_SHIFT), pgpp, , 0,
-		VM_PROT_READ, 0, PGO_SYNCIO);
-		if (error == EAGAIN) {
-			kpause("loanuopg", false, hz/2, NULL);
-			continue;
-		}
-		if (error)
-			goto fail;
-
-		KASSERT(npages > 0);
+	int error, npages;
 
-		/* loan and unbusy pages */
-		slock = NULL;
-		for (i = 0; i < npages; i++) {
-			krwlock_t *nextslock; /* slock for next page */
-			struct vm_page *pg = *pgpp;
-
-			/* XXX assuming that the page is owned by uobj */
-			KASSERT(pg->uobject != NULL);
-			nextslock = pg->uobject->vmobjlock;
-
-			if (slock != nextslock) {
-if (slock) {
-	KASSERT(npendloan > 0);
-	error = uvm_loanpage(pgpp - npendloan,
-	npendloan, true);
-	rw_exit(slock);
-	if (error)
-		goto fail;
-	ndone += npendloan;
-	KASSERT(origpgpp + ndone == pgpp);
-}
-slock = nextslock;
-npendloan = 0;
-rw_enter(slock, RW_WRITER);
-			}
+	rw_enter(uobj->vmobjlock, RW_WRITER);
+ reget:
+ 	npages = orignpages;
+	error = (*uobj->pgops->pgo_get)(uobj, pgoff, pgpp, , 0,
+	VM_PROT_READ, 0, PGO_SYNCIO);
+	switch (error) {
+	case 0:
+		KASSERT(npages == orignpages);
 
-			if ((pg->flags & PG_RELEASED) != 0) {
+		/* check for released pages */
+		rw_enter(uobj->vmobjlock, RW_WRITER);
+		for (int i = 0; i < npages; i++) {
+			KASSERT(pgpp[i]->uobject->vmobjlock == uobj->vmobjlock);
+			if ((pgpp[i]->flags & PG_RELEASED) != 0) {
 /*
  * release pages and try again.
  */
-rw_exit(slock);
-for (; i < npages; i++) {
-	pg = pgpp[i];
-	slock = pg->uobject->vmobjlock;
-
-	rw_enter(slock, RW_WRITER);
-	uvm_page_unbusy(, 1);
-	rw_exit(slock);
-}
+uvm_page_unbusy(pgpp, npages);
 goto reget;
 			}
+		}
 
-			npendloan++;
-			pgpp++;
-			KASSERT(origpgpp + ndone + npendloan == pgpp);
-		}
-		KASSERT(slock != NULL);
-		KASSERT(npendloan > 0);
-		error = uvm_loanpage(pgpp - npendloan, npendloan, true);
-		rw_exit(slock);
-		if (error)
-			goto fail;
-		ndone += npendloan;
-		KASSERT(origpgpp + ndone == pgpp);
+		/* loan out pages.  they will be unbusied whatever happens. */
+		error = uvm_loanpage(pgpp, npages, true);
+		rw_exit(uobj->vmobjlock);
+		return error;
+
+	case EAGAIN:
+		kpause("loanuopg", false, hz/2, NULL);
+		rw_enter(uobj->vmobjlock, RW_WRITER);
+		goto reget;
+
+	default:
+		if (npages > 0) {
+			rw_enter(uobj->vmobjlock, RW_WRITER);
+			uvm_page_unbusy(pgpp, npages);
+			rw_exit(uobj->vmobjlock);
+		}
+		return error;
 	}
+}
 
-	return 0;
+/*
+ * uvm_loanuobjpages: loan pages from a uobj out (O->K)
+ *
+ * => uobj shouldn't be locked.  (we'll lock it)
+ * => fail with EBUSY if we meet a wired page.
+ */
+int
+uvm_loanuobjpages(struct uvm_object *uobj, voff_t pgoff, int npages,
+struct vm_page **pgpp)
+{
+	int ndone, error, chunk;
 
-fail:
-	uvm_unloan(origpgpp, ndone, UVM_LOAN_TOPAGE);
+	

CVS commit: src/sys/uvm

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:45:35 UTC 2020

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

Log Message:
Drop & re-acquire vmobjlock less often.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/uvm/uvm_readahead.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_readahead.c
diff -u src/sys/uvm/uvm_readahead.c:1.12 src/sys/uvm/uvm_readahead.c:1.13
--- src/sys/uvm/uvm_readahead.c:1.12	Sun Mar  8 18:40:29 2020
+++ src/sys/uvm/uvm_readahead.c	Tue May 19 21:45:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_readahead.c,v 1.12 2020/03/08 18:40:29 ad Exp $	*/
+/*	$NetBSD: uvm_readahead.c,v 1.13 2020/05/19 21:45:35 ad Exp $	*/
 
 /*-
  * Copyright (c)2003, 2005, 2009 YAMAMOTO Takashi,
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_readahead.c,v 1.12 2020/03/08 18:40:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_readahead.c,v 1.13 2020/05/19 21:45:35 ad Exp $");
 
 #include 
 #include 
@@ -126,6 +126,8 @@ ra_startio(struct uvm_object *uobj, off_
 	DPRINTF(("%s: uobj=%p, off=%" PRIu64 ", endoff=%" PRIu64 "\n",
 	__func__, uobj, off, endoff));
 
+	KASSERT(rw_write_held(uobj->vmobjlock));
+
 	/*
 	 * Don't issue read-ahead if the last page of the range is already cached.
 	 * The assumption is that since the access is sequential, the intermediate
@@ -133,9 +135,7 @@ ra_startio(struct uvm_object *uobj, off_
 	 * too. This speeds up I/O using cache, since it avoids lookups and temporary
 	 * allocations done by full pgo_get.
 	 */
-	rw_enter(uobj->vmobjlock, RW_READER);
 	struct vm_page *pg = uvm_pagelookup(uobj, trunc_page(endoff - 1));
-	rw_exit(uobj->vmobjlock);
 	if (pg != NULL) {
 		DPRINTF(("%s:  off=%" PRIu64 ", sz=%zu already cached\n",
 		__func__, off, sz));
@@ -162,9 +162,9 @@ ra_startio(struct uvm_object *uobj, off_
 		 * use UVM_ADV_RANDOM to avoid recursion.
 		 */
 
-		rw_enter(uobj->vmobjlock, RW_WRITER);
 		error = (*uobj->pgops->pgo_get)(uobj, off, NULL,
 		, 0, VM_PROT_READ, UVM_ADV_RANDOM, PGO_NOTIMESTAMP);
+		rw_enter(uobj->vmobjlock, RW_WRITER);
 		DPRINTF(("%s:  off=%" PRIu64 ", bytelen=%zu -> %d\n",
 		__func__, off, bytelen, error));
 		if (error != 0 && error != EBUSY) {
@@ -332,9 +332,7 @@ do_readahead:
 		if (rasize >= RA_MINSIZE) {
 			off_t next;
 
-			rw_exit(uobj->vmobjlock);
 			next = ra_startio(uobj, raoff, rasize);
-			rw_enter(uobj->vmobjlock, RW_WRITER);
 			ra->ra_next = next;
 		}
 	}
@@ -362,6 +360,8 @@ uvm_readahead(struct uvm_object *uobj, o
 	if (size > RA_WINSIZE_MAX) {
 		size = RA_WINSIZE_MAX;
 	}
+	rw_enter(uobj->vmobjlock, RW_WRITER);
 	ra_startio(uobj, off, size);
+	rw_exit(uobj->vmobjlock);
 	return 0;
 }



CVS commit: src/sys/uvm

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:45:57 UTC 2020

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

Log Message:
Don't try to do readahead on tmpfs.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/uvm/uvm_vnode.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_vnode.c
diff -u src/sys/uvm/uvm_vnode.c:1.111 src/sys/uvm/uvm_vnode.c:1.112
--- src/sys/uvm/uvm_vnode.c:1.111	Sun Mar 22 18:32:42 2020
+++ src/sys/uvm/uvm_vnode.c	Tue May 19 21:45:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_vnode.c,v 1.111 2020/03/22 18:32:42 ad Exp $	*/
+/*	$NetBSD: uvm_vnode.c,v 1.112 2020/05/19 21:45:57 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.111 2020/03/22 18:32:42 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.112 2020/05/19 21:45:57 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -182,7 +182,7 @@ uvn_get(struct uvm_object *uobj, voff_t 
 	0, 0);
 
 	if (vp->v_type == VREG && (access_type & VM_PROT_WRITE) == 0
-	&& (flags & PGO_LOCKED) == 0) {
+	&& (flags & PGO_LOCKED) == 0 && vp->v_tag != VT_TMPFS) {
 		uvn_alloc_ractx(uobj);
 		uvm_ra_request(vp->v_ractx, advice, uobj, offset,
 		*npagesp << PAGE_SHIFT);



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

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:43:36 UTC 2020

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

Log Message:
If the the TSC timecounter is good then use the TSC for DELAY() too.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/x86/tsc.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/tsc.c
diff -u src/sys/arch/x86/x86/tsc.c:1.44 src/sys/arch/x86/x86/tsc.c:1.45
--- src/sys/arch/x86/x86/tsc.c:1.44	Fri May  8 22:01:55 2020
+++ src/sys/arch/x86/x86/tsc.c	Tue May 19 21:43:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: tsc.c,v 1.44 2020/05/08 22:01:55 ad Exp $	*/
+/*	$NetBSD: tsc.c,v 1.45 2020/05/19 21:43:36 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.44 2020/05/08 22:01:55 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.45 2020/05/19 21:43:36 ad Exp $");
 
 #include 
 #include 
@@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.44
 
 u_int	tsc_get_timecount(struct timecounter *);
 
+static void	tsc_delay(unsigned int);
+
 uint64_t	tsc_freq; /* exported for sysctl */
 static int64_t	tsc_drift_max = 1000;	/* max cycles */
 static int64_t	tsc_drift_observed;
@@ -145,9 +147,11 @@ tsc_is_invariant(void)
 }
 
 /*
- * Initialize timecounter(9) of TSC.
- * This function is called after all secondary processors were up and
- * calculated the drift.
+ * Initialize timecounter(9) and DELAY() function of TSC.
+ *
+ * This function is called after all secondary processors were brought up
+ * and drift has been measured, and after any other potential delay funcs
+ * have been installed (e.g. lapic_delay()).
  */
 void
 tsc_tc_init(void)
@@ -169,6 +173,9 @@ tsc_tc_init(void)
 		(long long)tsc_drift_observed);
 		tsc_timecounter.tc_quality = -100;
 		invariant = false;
+	} else if (vm_guest == VM_GUEST_NO) {
+		delay_func = tsc_delay;
+		x86_delay = tsc_delay;
 	}
 
 	if (tsc_freq != 0) {
@@ -324,3 +331,16 @@ cpu_hascounter(void)
 
 	return cpu_feature[0] & CPUID_TSC;
 }
+
+static void
+tsc_delay(unsigned int us)
+{
+	uint64_t start, delta;
+
+	start = cpu_counter();
+	delta = (uint64_t)us * cpu_frequency(_info_primary) / 100;
+
+	while ((cpu_counter() - start) < delta) {
+		x86_pause();
+	}
+}



CVS commit: src/sys/arch

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:40:55 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: cpufunc.S
src/sys/arch/i386/i386: cpufunc.S i386func.S

Log Message:
Make cpu_counter(), cpu_counter32() and tsc_get_timecount() into a single
preemption-safe routine.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/i386/i386/cpufunc.S
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/i386/i386func.S

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

Modified files:

Index: src/sys/arch/amd64/amd64/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.52 src/sys/arch/amd64/amd64/cpufunc.S:1.53
--- src/sys/arch/amd64/amd64/cpufunc.S:1.52	Fri May  8 21:58:03 2020
+++ src/sys/arch/amd64/amd64/cpufunc.S	Tue May 19 21:40:55 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: cpufunc.S,v 1.52 2020/05/08 21:58:03 ad Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.53 2020/05/19 21:40:55 ad Exp $	*/
 
 /*
- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -172,7 +172,9 @@ ENTRY(tsc_get_timecount)
 1:
 	movq	L_NCSW(%rcx), %rdi
 	rdtsc
-	addl	CPUVAR(CC_SKEW), %eax
+	shlq	$32, %rdx
+	orq	%rdx, %rax
+	addq	CPUVAR(CC_SKEW), %rax
 	cmpq	%rdi, L_NCSW(%rcx)
 	jne	2f
 	KMSAN_INIT_RET(4)
@@ -181,6 +183,9 @@ ENTRY(tsc_get_timecount)
 	jmp	1b
 END(tsc_get_timecount)
 
+STRONG_ALIAS(cpu_counter, tsc_get_timecount)
+STRONG_ALIAS(cpu_counter32, tsc_get_timecount)
+
 /*
  * %rdi = name
  * %rsi = sel
@@ -252,23 +257,6 @@ ENTRY(msr_onfault)
 	ret
 END(msr_onfault)
 
-ENTRY(cpu_counter)
-	xorl	%eax, %eax
-	rdtsc
-	shlq	$32, %rdx
-	orq	%rdx, %rax
-	addq	CPUVAR(CC_SKEW), %rax
-	KMSAN_INIT_RET(8)
-	ret
-END(cpu_counter)
-
-ENTRY(cpu_counter32)
-	rdtsc
-	addl	CPUVAR(CC_SKEW), %eax
-	KMSAN_INIT_RET(4)
-	ret
-END(cpu_counter32)
-
 ENTRY(breakpoint)
 	pushq	%rbp
 	movq	%rsp, %rbp

Index: src/sys/arch/i386/i386/cpufunc.S
diff -u src/sys/arch/i386/i386/cpufunc.S:1.40 src/sys/arch/i386/i386/cpufunc.S:1.41
--- src/sys/arch/i386/i386/cpufunc.S:1.40	Sat May  2 17:14:01 2020
+++ src/sys/arch/i386/i386/cpufunc.S	Tue May 19 21:40:55 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: cpufunc.S,v 1.40 2020/05/02 17:14:01 bouyer Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.41 2020/05/19 21:40:55 ad Exp $	*/
 
 /*-
- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2007, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -38,7 +38,7 @@
 #include 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.40 2020/05/02 17:14:01 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.S,v 1.41 2020/05/19 21:40:55 ad Exp $");
 
 #include "opt_xen.h"
 
@@ -163,18 +163,24 @@ ENTRY(msr_onfault)
 	ret
 END(msr_onfault)
 
-ENTRY(cpu_counter)
+ENTRY(tsc_get_timecount)
+	movl	CPUVAR(CURLWP), %ecx
+1:
+	pushl	L_NCSW(%ecx)
 	rdtsc
 	addl	CPUVAR(CC_SKEW), %eax
 	adcl	CPUVAR(CC_SKEW+4), %edx
+	popl	%edx
+	cmpl	%edx, L_NCSW(%ecx)
+	jne	2f
 	ret
-END(cpu_counter)
-
-ENTRY(cpu_counter32)
-	rdtsc
-	addl	CPUVAR(CC_SKEW), %eax
+2:
+	jmp	1b
 	ret
-END(cpu_counter32)
+END(tsc_get_timecount)
+
+STRONG_ALIAS(cpu_counter, tsc_get_timecount)
+STRONG_ALIAS(cpu_counter32, tsc_get_timecount)
 
 ENTRY(breakpoint)
 	pushl	%ebp

Index: src/sys/arch/i386/i386/i386func.S
diff -u src/sys/arch/i386/i386/i386func.S:1.21 src/sys/arch/i386/i386/i386func.S:1.22
--- src/sys/arch/i386/i386/i386func.S:1.21	Sat May  4 07:20:22 2019
+++ src/sys/arch/i386/i386/i386func.S	Tue May 19 21:40:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386func.S,v 1.21 2019/05/04 07:20:22 maxv Exp $	*/
+/*	$NetBSD: i386func.S,v 1.22 2020/05/19 21:40:55 ad Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i386func.S,v 1.21 2019/05/04 07:20:22 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i386func.S,v 1.22 2020/05/19 21:40:55 ad Exp $");
 
 #include 
 #include 
@@ -137,17 +137,3 @@ ENTRY(lgdt)
 	movl	%eax, %fs
 	jmp	_C_LABEL(x86_flush)
 END(lgdt)
-
-ENTRY(tsc_get_timecount)
-	movl	CPUVAR(CURLWP), %ecx
-1:
-	pushl	L_NCSW(%ecx)
-	rdtsc
-	addl	CPUVAR(CC_SKEW), %eax
-	popl	%edx
-	cmpl	%edx, L_NCSW(%ecx)
-	jne	2f
-	ret
-2:
-	jmp	1b
-END(tsc_get_timecount)



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

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:39:11 UTC 2020

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

Log Message:
lapic_delay() disable preemption since the state is very CPU dependent.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/x86/x86/lapic.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/lapic.c
diff -u src/sys/arch/x86/x86/lapic.c:1.78 src/sys/arch/x86/x86/lapic.c:1.79
--- src/sys/arch/x86/x86/lapic.c:1.78	Sat May  2 16:44:36 2020
+++ src/sys/arch/x86/x86/lapic.c	Tue May 19 21:39:11 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: lapic.c,v 1.78 2020/05/02 16:44:36 bouyer Exp $	*/
+/*	$NetBSD: lapic.c,v 1.79 2020/05/19 21:39:11 ad Exp $	*/
 
 /*-
- * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2000, 2008, 2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.78 2020/05/02 16:44:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.79 2020/05/19 21:39:11 ad Exp $");
 
 #include "acpica.h"
 #include "ioapic.h"
@@ -727,12 +727,17 @@ static void
 lapic_delay(unsigned int usec)
 {
 	int32_t xtick, otick;
-	int64_t deltat;		/* XXX may want to be 64bit */
+	int64_t deltat;
 
+	/* XXX Bad to disable preemption, but it's tied to the cpu. */
+	kpreempt_disable();
 	otick = lapic_gettick();
 
-	if (usec <= 0)
+	if (usec <= 0) {
+		kpreempt_enable();
 		return;
+	}
+
 	if (usec <= 25)
 		deltat = lapic_delaytab[usec];
 	else
@@ -741,7 +746,7 @@ lapic_delay(unsigned int usec)
 	while (deltat > 0) {
 		xtick = lapic_gettick();
 		if (lapic_broken_periodic && xtick == 0 && otick == 0) {
-			lapic_initclocks();
+			lapic_reset();
 			xtick = lapic_gettick();
 			if (xtick == 0)
 panic("lapic timer stopped ticking");
@@ -754,6 +759,7 @@ lapic_delay(unsigned int usec)
 
 		x86_pause();
 	}
+	kpreempt_enable();
 }
 
 /*



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

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:14:20 UTC 2020

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

Log Message:
Comment


To generate a diff of this commit:
cvs rdiff -u -r1.392 -r1.393 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.392 src/sys/arch/x86/x86/pmap.c:1.393
--- src/sys/arch/x86/x86/pmap.c:1.392	Fri May 15 22:22:44 2020
+++ src/sys/arch/x86/x86/pmap.c	Tue May 19 21:14:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.392 2020/05/15 22:22:44 ad Exp $	*/
+/*	$NetBSD: pmap.c,v 1.393 2020/05/19 21:14:20 ad Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.392 2020/05/15 22:22:44 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.393 2020/05/19 21:14:20 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -3025,8 +3025,7 @@ pmap_zap_ptp(struct pmap *pmap, struct v
 
 	/*
 	 * Start at the lowest entered VA, and scan until there are no more
-	 * PTEs in the PTPs.  The goal is to disconnect PV entries and patch
-	 * up the pmap's stats.  No PTEs will be modified.
+	 * PTEs in the PTPs.
 	 */
 	tree = _PAGE_TO_PP(ptp)->pp_rb;
 	pve = RB_TREE_MIN(tree);



CVS commit: src/sys/uvm

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 20:46:39 UTC 2020

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

Log Message:
UVM_PAGE_TRKOWN: print the LID too


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/sys/uvm/uvm_page.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_page.c
diff -u src/sys/uvm/uvm_page.c:1.236 src/sys/uvm/uvm_page.c:1.237
--- src/sys/uvm/uvm_page.c:1.236	Sun May 17 17:12:28 2020
+++ src/sys/uvm/uvm_page.c	Tue May 19 20:46:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.236 2020/05/17 17:12:28 ad Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.237 2020/05/19 20:46:39 ad Exp $	*/
 
 /*-
  * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.236 2020/05/17 17:12:28 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.237 2020/05/19 20:46:39 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvm.h"
@@ -1766,8 +1766,8 @@ uvm_page_own(struct vm_page *pg, const c
 		KASSERT((pg->flags & PG_BUSY) != 0);
 		if (pg->owner_tag) {
 			printf("uvm_page_own: page %p already owned "
-			"by proc %d [%s]\n", pg,
-			pg->owner, pg->owner_tag);
+			"by proc %d.%d [%s]\n", pg,
+			pg->owner, pg->lowner, pg->owner_tag);
 			panic("uvm_page_own");
 		}
 		pg->owner = curproc->p_pid;
@@ -2215,8 +2215,8 @@ uvm_page_printit(struct vm_page *pg, boo
 	(*pr)("  pa=0x%lx\n", (long)VM_PAGE_TO_PHYS(pg));
 #if defined(UVM_PAGE_TRKOWN)
 	if (pg->flags & PG_BUSY)
-		(*pr)("  owning process = %d, tag=%s\n",
-		pg->owner, pg->owner_tag);
+		(*pr)("  owning process = %d.%d, tag=%s\n",
+		pg->owner, pg->lowner, pg->owner_tag);
 	else
 		(*pr)("  page not busy, no owner\n");
 #else



CVS commit: src/external/bsd/tmux/dist

2020-05-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue May 19 20:00:03 UTC 2020

Modified Files:
src/external/bsd/tmux/dist: tmux.1

Log Message:
Use fixed date in man page. For MKREPRO build.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/tmux/dist/tmux.1

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/tmux/dist/tmux.1
diff -u src/external/bsd/tmux/dist/tmux.1:1.11 src/external/bsd/tmux/dist/tmux.1:1.12
--- src/external/bsd/tmux/dist/tmux.1:1.11	Mon Jan  6 21:03:23 2020
+++ src/external/bsd/tmux/dist/tmux.1	Tue May 19 20:00:03 2020
@@ -14,7 +14,7 @@
 .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate$
+.Dd January 6, 2020
 .Dt TMUX 1
 .Os
 .Sh NAME



CVS commit: src/distrib/sets/lists/comp

2020-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 19 19:15:06 UTC 2020

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
put back extattr.3


To generate a diff of this commit:
cvs rdiff -u -r1.2328 -r1.2329 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2328 src/distrib/sets/lists/comp/mi:1.2329
--- src/distrib/sets/lists/comp/mi:1.2328	Sat May 16 15:05:05 2020
+++ src/distrib/sets/lists/comp/mi	Tue May 19 15:15:06 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2328 2020/05/16 19:05:05 christos Exp $
+#	$NetBSD: mi,v 1.2329 2020/05/19 19:15:06 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -7051,7 +7051,7 @@
 ./usr/share/man/cat3/explicit_memset.0		comp-c-catman		.cat
 ./usr/share/man/cat3/expm1.0			comp-c-catman		.cat
 ./usr/share/man/cat3/expm1f.0			comp-c-catman		.cat
-./usr/share/man/cat3/extattr.0			comp-obsolete		obsolete
+./usr/share/man/cat3/extattr.0			comp-c-catman		.cat
 ./usr/share/man/cat3/extattr_copy_fd.0		comp-c-catman		.cat
 ./usr/share/man/cat3/extattr_copy_file.0	comp-c-catman		.cat
 ./usr/share/man/cat3/extattr_copy_link.0	comp-c-catman		.cat
@@ -15171,7 +15171,7 @@
 ./usr/share/man/html3/explicit_memset.html	comp-c-htmlman		html
 ./usr/share/man/html3/expm1.html		comp-c-htmlman		html
 ./usr/share/man/html3/expm1f.html		comp-c-htmlman		html
-./usr/share/man/html3/extattr.html		comp-obsolete		obsolete
+./usr/share/man/html3/extattr.html		comp-c-htmlman		html
 ./usr/share/man/html3/extattr_copy_fd.html	comp-c-htmlman		html
 ./usr/share/man/html3/extattr_copy_file.html	comp-c-htmlman		html
 ./usr/share/man/html3/extattr_copy_link.html	comp-c-htmlman		html
@@ -23227,7 +23227,7 @@
 ./usr/share/man/man3/explicit_memset.3		comp-c-man		.man
 ./usr/share/man/man3/expm1.3			comp-c-man		.man
 ./usr/share/man/man3/expm1f.3			comp-c-man		.man
-./usr/share/man/man3/extattr.3			comp-obsolete		obsolete
+./usr/share/man/man3/extattr.3			comp-c-man		.man
 ./usr/share/man/man3/extattr_copy_fd.3		comp-c-man		.man
 ./usr/share/man/man3/extattr_copy_file.3	comp-c-man		.man
 ./usr/share/man/man3/extattr_copy_link.3	comp-c-man		.man



CVS commit: src/sys/dev/usb

2020-05-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue May 19 19:09:43 UTC 2020

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

Log Message:
ohci(4): always use usb_syncmem() when reading from HCCA


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/dev/usb/ohci.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/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.306 src/sys/dev/usb/ohci.c:1.307
--- src/sys/dev/usb/ohci.c:1.306	Tue May 19 18:57:26 2020
+++ src/sys/dev/usb/ohci.c	Tue May 19 19:09:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.306 2020/05/19 18:57:26 jakllsch Exp $	*/
+/*	$NetBSD: ohci.c,v 1.307 2020/05/19 19:09:43 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.306 2020/05/19 18:57:26 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.307 2020/05/19 19:09:43 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1228,6 +1228,11 @@ ohci_dumpregs(ohci_softc_t *sc)
 	DPRINTF("   port1=0x%08jx port2=0x%08jx",
 		 OREAD4(sc, OHCI_RH_PORT_STATUS(1)),
 		 OREAD4(sc, OHCI_RH_PORT_STATUS(2)), 0, 0);
+	usb_syncmem(>sc_hccadma,
+	offsetof(struct ohci_hcca, hcca_frame_number),
+	sizeof(sc->sc_hcca->hcca_frame_number) +
+	sizeof(sc->sc_hcca->hcca_done_head),
+	BUS_DMASYNC_POSTREAD);
 	DPRINTF(" HCCA: frame_number=0x%04jx done_head=0x%08jx",
 		 O32TOH(sc->sc_hcca->hcca_frame_number),
 		 O32TOH(sc->sc_hcca->hcca_done_head), 0, 0);
@@ -3469,6 +3474,10 @@ ohci_device_isoc_enter(struct usbd_xfer 
 
 	if (isoc->next == -1) {
 		/* Not in use yet, schedule it a few frames ahead. */
+		usb_syncmem(>sc_hccadma,
+		offsetof(struct ohci_hcca, hcca_frame_number),
+		sizeof(sc->sc_hcca->hcca_frame_number),
+		BUS_DMASYNC_POSTREAD);
 		isoc->next = O32TOH(sc->sc_hcca->hcca_frame_number) + 5;
 		DPRINTFN(2,"start next=%jd", isoc->next, 0, 0, 0);
 	}
@@ -3558,6 +3567,10 @@ ohci_device_isoc_enter(struct usbd_xfer 
 
 #ifdef OHCI_DEBUG
 	if (ohcidebug >= 5) {
+		usb_syncmem(>sc_hccadma,
+		offsetof(struct ohci_hcca, hcca_frame_number),
+		sizeof(sc->sc_hcca->hcca_frame_number),
+		BUS_DMASYNC_POSTREAD);
 		DPRINTF("frame=%jd", O32TOH(sc->sc_hcca->hcca_frame_number),
 		0, 0, 0);
 		ohci_dump_itds(sc, xfer->ux_hcpriv);



CVS commit: src/sys/dev/usb

2020-05-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue May 19 18:57:26 UTC 2020

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

Log Message:
ohci_device_isoc_done(): use ux_length rather than ux_bufsize

For consistency.  Nick may have missed this in previous because I'd
unexpectedly adjusted it.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/dev/usb/ohci.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/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.305 src/sys/dev/usb/ohci.c:1.306
--- src/sys/dev/usb/ohci.c:1.305	Fri May 15 06:23:54 2020
+++ src/sys/dev/usb/ohci.c	Tue May 19 18:57:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.305 2020/05/15 06:23:54 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.306 2020/05/19 18:57:26 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.305 2020/05/15 06:23:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.306 2020/05/19 18:57:26 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -3643,7 +3643,7 @@ ohci_device_isoc_done(struct usbd_xfer *
 
 	DPRINTFN(10, "xfer=%#jx, actlen=%jd", (uintptr_t)xfer, xfer->ux_actlen,
 	0, 0);
-	usb_syncmem(>ux_dmabuf, 0, xfer->ux_bufsize,
+	usb_syncmem(>ux_dmabuf, 0, xfer->ux_length,
 	isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
 }
 



CVS commit: src/sys/dev/usb

2020-05-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue May 19 18:32:35 UTC 2020

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

Log Message:
Use usbd_destroy_xfer() in usbd_request_async() instead of usbd_free_xfer().

The only user of usbd_request_async() & co. does a usbd_create_xfer(), so use
the correct deconstructor.


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/dev/usb/usbdi.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/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.201 src/sys/dev/usb/usbdi.c:1.202
--- src/sys/dev/usb/usbdi.c:1.201	Fri May 15 06:15:42 2020
+++ src/sys/dev/usb/usbdi.c	Tue May 19 18:32:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.201 2020/05/15 06:15:42 skrll Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.202 2020/05/19 18:32:35 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.201 2020/05/15 06:15:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.202 2020/05/19 18:32:35 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1243,7 +1243,7 @@ usbd_do_request_len(struct usbd_device *
 static void
 usbd_request_async_cb(struct usbd_xfer *xfer, void *priv, usbd_status status)
 {
-	usbd_free_xfer(xfer);
+	usbd_destroy_xfer(xfer);
 }
 
 /*
@@ -1264,7 +1264,7 @@ usbd_request_async(struct usbd_device *d
 	callback);
 	err = usbd_transfer(xfer);
 	if (err != USBD_IN_PROGRESS) {
-		usbd_free_xfer(xfer);
+		usbd_destroy_xfer(xfer);
 		return (err);
 	}
 	return (USBD_NORMAL_COMPLETION);



CVS commit: src/sys/dev/usb

2020-05-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue May 19 18:18:33 UTC 2020

Modified Files:
src/sys/dev/usb: xhcivar.h

Log Message:
Remove definition of unused struct xhci_endpoint.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/usb/xhcivar.h

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

Modified files:

Index: src/sys/dev/usb/xhcivar.h
diff -u src/sys/dev/usb/xhcivar.h:1.13 src/sys/dev/usb/xhcivar.h:1.14
--- src/sys/dev/usb/xhcivar.h:1.13	Thu Apr  2 11:52:41 2020
+++ src/sys/dev/usb/xhcivar.h	Tue May 19 18:18:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhcivar.h,v 1.13 2020/04/02 11:52:41 skrll Exp $	*/
+/*	$NetBSD: xhcivar.h,v 1.14 2020/05/19 18:18:33 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -64,10 +64,6 @@ struct xhci_ring {
 	bool is_halted;
 };
 
-struct xhci_endpoint {
-	struct xhci_ring xe_tr;		/* transfer ring */
-};
-
 struct xhci_slot {
 	usb_dma_t xs_dc_dma;		/* device context page */
 	usb_dma_t xs_ic_dma;		/* input context page */



CVS commit: [netbsd-9] src/doc

2020-05-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May 19 17:40:20 UTC 2020

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

Log Message:
Tickets #917 and #918


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.59 -r1.1.2.60 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.59 src/doc/CHANGES-9.1:1.1.2.60
--- src/doc/CHANGES-9.1:1.1.2.59	Mon May 18 19:07:35 2020
+++ src/doc/CHANGES-9.1	Tue May 19 17:40:20 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.59 2020/05/18 19:07:35 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.60 2020/05/19 17:40:20 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -2647,3 +2647,17 @@ sys/kern/kern_time.c1.204
 	kern_time: fix info leak.
 	[maxv, ticket #916]
 
+sys/kern/vnode_if.c1.112
+sys/kern/vnode_if.src1.80
+
+	Avoid a vfs deadlock when the backing store goes away
+	(e.g. by removing a USB drive).
+	[hannken, ticket #917]
+
+sys/arch/mips/cavium/dev/octeon_rnm.c		1.3-1.6 + patch
+sys/arch/mips/cavium/dev/octeon_rnmreg.h	1.2,1.3
+sys/arch/mips/cavium/octeonvar.h		1.7
+
+	Rework octeon_rnm(4) random number generator driver.
+	[simonb, ticket #918]
+



CVS commit: [netbsd-9] src/sys/arch/mips/cavium/dev

2020-05-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May 19 17:39:04 UTC 2020

Modified Files:
src/sys/arch/mips/cavium/dev [netbsd-9]: octeon_rnm.c

Log Message:
Apply patch, requested by simonb in ticket #918:

the updated octeon_rnm(4) driver fails a bogus randomness
test in the netbsd-9 rnd(9) driver for RND_TYPE_RNG type devices so
uses the RND_TYPE_UNKNOWN type.  This approach is used by other drivers
on the netbsd-9 branch.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 src/sys/arch/mips/cavium/dev/octeon_rnm.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/cavium/dev/octeon_rnm.c
diff -u src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.2.4.1 src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.2.4.2
--- src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.2.4.1	Tue May 19 17:35:50 2020
+++ src/sys/arch/mips/cavium/dev/octeon_rnm.c	Tue May 19 17:39:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_rnm.c,v 1.2.4.1 2020/05/19 17:35:50 martin Exp $	*/
+/*	$NetBSD: octeon_rnm.c,v 1.2.4.2 2020/05/19 17:39:04 martin Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -99,7 +99,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_rnm.c,v 1.2.4.1 2020/05/19 17:35:50 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_rnm.c,v 1.2.4.2 2020/05/19 17:39:04 martin Exp $");
 
 #include 
 #include 
@@ -214,7 +214,7 @@ octeon_rnm_attach(device_t parent, devic
 
 	/* Attach the rndsource.  */
 	rndsource_setcb(>sc_rndsrc, octeon_rnm_rng, sc);
-	rnd_attach_source(>sc_rndsrc, device_xname(self), RND_TYPE_RNG,
+	rnd_attach_source(>sc_rndsrc, device_xname(self), RND_TYPE_UNKNOWN,
 	RND_FLAG_DEFAULT | RND_FLAG_HASCB);
 }
 



CVS commit: [netbsd-9] src/sys/arch/mips/cavium

2020-05-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May 19 17:35:51 UTC 2020

Modified Files:
src/sys/arch/mips/cavium [netbsd-9]: octeonvar.h
src/sys/arch/mips/cavium/dev [netbsd-9]: octeon_rnm.c octeon_rnmreg.h

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

sys/arch/mips/cavium/dev/octeon_rnm.c: revision 1.3
sys/arch/mips/cavium/dev/octeon_rnm.c: revision 1.4
sys/arch/mips/cavium/dev/octeon_rnm.c: revision 1.5
sys/arch/mips/cavium/dev/octeon_rnm.c: revision 1.6 (+ patch)
sys/arch/mips/cavium/dev/octeon_rnmreg.h: revision 1.2
sys/arch/mips/cavium/dev/octeon_rnmreg.h: revision 1.3
sys/arch/mips/cavium/octeonvar.h: revision 1.7

Add a few more bits.
XXX convert to __BITS.
--
If bus_space_map fails, just don't attach the driver instead of panicing.
Check RNG built in self test, don't attach if that fails too.
--
Oceton RNG/RNM driver modernisation to fit new entropy world order by
riastradh@, with some tweaks to get working in RNG mode.
XXX TODO: work out how to get raw entropy mode working.
--
Rework octeon_rnm(4) random number generator driver.
- Do a little on-line self-test for fun.
- Draw raw samples from the ring oscillators.
- Draw substantially more samples:
  =3D> early RO samples seem to have considerably lower entropy
  =3D> consecutive RO samples are not independent
- Make sure to use rnd_add_data_sync in the callback.
  =3D> not technically needed in HEAD, but would be needed for pullup
--
Adjust entropy estimate for the Octeon.
We are hedging in serial and in parallel, and more conservative than
the Linux driver from Cavium seems to be, so although I don't know
exactly what the thermal jitter of the device is, this seems like a
reasonable compromise.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.6.1 src/sys/arch/mips/cavium/octeonvar.h
cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/arch/mips/cavium/dev/octeon_rnm.c
cvs rdiff -u -r1.1 -r1.1.26.1 src/sys/arch/mips/cavium/dev/octeon_rnmreg.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/mips/cavium/octeonvar.h
diff -u src/sys/arch/mips/cavium/octeonvar.h:1.6 src/sys/arch/mips/cavium/octeonvar.h:1.6.6.1
--- src/sys/arch/mips/cavium/octeonvar.h:1.6	Thu Apr 19 21:50:06 2018
+++ src/sys/arch/mips/cavium/octeonvar.h	Tue May 19 17:35:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeonvar.h,v 1.6 2018/04/19 21:50:06 christos Exp $	*/
+/*	$NetBSD: octeonvar.h,v 1.6.6.1 2020/05/19 17:35:51 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -163,8 +163,11 @@ struct octeon_cvmseg_map {
 		uint64_t	csm_ether_xxx_3;
 	} csm_ether[4/* XXX */];
 
-	/* 20-32 */
+	/* 20-31 */
 	uint64_t	xxx_20_32[32 - 20];
+
+	/* 32-63 */
+	uint64_t	csm_rnm[32];
 } __packed;
 #define	OCTEON_CVMSEG_OFFSET(entry) \
 	offsetof(struct octeon_cvmseg_map, entry)

Index: src/sys/arch/mips/cavium/dev/octeon_rnm.c
diff -u src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.2 src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.2.4.1
--- src/sys/arch/mips/cavium/dev/octeon_rnm.c:1.2	Tue Jan  8 19:41:09 2019
+++ src/sys/arch/mips/cavium/dev/octeon_rnm.c	Tue May 19 17:35:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_rnm.c,v 1.2 2019/01/08 19:41:09 jdolecek Exp $	*/
+/*	$NetBSD: octeon_rnm.c,v 1.2.4.1 2020/05/19 17:35:50 martin Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -26,15 +26,86 @@
  * SUCH DAMAGE.
  */
 
+/*
+ * Cavium Octeon Random Number Generator / Random Number Memory `RNM'
+ *
+ *	The RNM unit consists of:
+ *
+ *	1. 128 ring oscillators
+ *	2. an LFSR/SHA-1 conditioner
+ *	3. a 512-byte FIFO
+ *
+ *	When the unit is enabled, there are three modes of operation:
+ *
+ *	(a) deterministic: the ring oscillators are disabled and the
+ *	LFSR/SHA-1 conditioner operates on fixed inputs to give
+ *	reproducible results for testing,
+ *
+ *	(b) conditioned entropy: the ring oscillators are enabled and
+ *	samples from them are fed through the LFSR/SHA-1
+ *	conditioner before being put into the FIFO, and
+ *
+ *	(c) raw entropy: the ring oscillators are enabled, and a group
+ *	of eight of them selected at any one time is sampled and
+ *	fed into the FIFO.
+ *
+ *	Details:
+ *
+ *	- The FIFO is refilled whenever we read out of it, either with
+ *	  a load address or an IOBDMA operation.
+ *
+ *	- The conditioner takes 81 cycles to produce a 64-bit block of
+ *	  output in the FIFO whether in deterministic or conditioned
+ *	  entropy mode, each block consisting of the first 64 bits of a
+ *	  SHA-1 hash.
+ *
+ *	- A group of eight ring oscillators take 8 cycles to produce a
+ *	  64-bit block of output in the FIFO in raw entropy mode, each
+ *	  block consisting of eight consecutive samples from each RO in
+ *	  parallel.
+ *
+ *	The first sample of each RO always seems to be zero.  Further,
+ *	consecutive 

CVS commit: [netbsd-9] src/sys/kern

2020-05-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May 19 16:24:38 UTC 2020

Modified Files:
src/sys/kern [netbsd-9]: vnode_if.c vnode_if.src

Log Message:
Pull up following revision(s) (requested by hannken in ticket #917):

sys/kern/vnode_if.src: revision 1.80
sys/kern/vnode_if.c: revision 1.112

VOP_STRATEGY() may still deadlock with devices.

Change FSTRANS from LAZY to NO.

Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.107.10.1 -r1.107.10.2 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.77.10.1 -r1.77.10.2 src/sys/kern/vnode_if.src

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/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.107.10.1 src/sys/kern/vnode_if.c:1.107.10.2
--- src/sys/kern/vnode_if.c:1.107.10.1	Tue Oct 15 18:13:55 2019
+++ src/sys/kern/vnode_if.c	Tue May 19 16:24:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode_if.c,v 1.107.10.1 2019/10/15 18:13:55 martin Exp $	*/
+/*	$NetBSD: vnode_if.c,v 1.107.10.2 2020/05/19 16:24:38 martin Exp $	*/
 
 /*
  * Warning: DO NOT EDIT! This file is automatically generated!
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.107.10.1 2019/10/15 18:13:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.107.10.2 2020/05/19 16:24:38 martin Exp $");
 
 #include 
 #include 
@@ -1380,11 +1380,11 @@ VOP_STRATEGY(struct vnode *vp,
 	a.a_desc = VDESC(vop_strategy);
 	a.a_vp = vp;
 	a.a_bp = bp;
-	error = vop_pre(vp, , , FST_LAZY);
+	error = vop_pre(vp, , , FST_NO);
 	if (error)
 		return error;
 	error = (VCALL(vp, VOFFSET(vop_strategy), ));
-	vop_post(vp, mp, mpsafe, FST_LAZY);
+	vop_post(vp, mp, mpsafe, FST_NO);
 	return error;
 }
 

Index: src/sys/kern/vnode_if.src
diff -u src/sys/kern/vnode_if.src:1.77.10.1 src/sys/kern/vnode_if.src:1.77.10.2
--- src/sys/kern/vnode_if.src:1.77.10.1	Tue Oct 15 18:12:25 2019
+++ src/sys/kern/vnode_if.src	Tue May 19 16:24:38 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: vnode_if.src,v 1.77.10.1 2019/10/15 18:12:25 martin Exp $
+#	$NetBSD: vnode_if.src,v 1.77.10.2 2020/05/19 16:24:38 martin Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -436,7 +436,7 @@ vop_bmap {
 #% strategy   vp  = = =
 #
 vop_strategy {
-	FSTRANS=LAZY
+	FSTRANS=NO
 	IN struct vnode *vp;
 	IN struct buf *bp;
 };



CVS commit: src/doc

2020-05-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue May 19 11:40:46 UTC 2020

Modified Files:
src/doc: 3RDPARTY

Log Message:
postfix-3.5.2 out.


To generate a diff of this commit:
cvs rdiff -u -r1.1715 -r1.1716 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1715 src/doc/3RDPARTY:1.1716
--- src/doc/3RDPARTY:1.1715	Sat Apr 25 12:18:48 2020
+++ src/doc/3RDPARTY	Tue May 19 11:40:46 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1715 2020/04/25 12:18:48 kre Exp $
+#	$NetBSD: 3RDPARTY,v 1.1716 2020/05/19 11:40:46 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1197,11 +1197,11 @@ now to do a new import.
 
 Package:	Postfix
 Version:	3.5.0
-Current Vers:	3.5.1
+Current Vers:	3.5.2
 Maintainer:	Wietse Venema 
 Archive Site:
 Home Page:	http://www.postfix.org/
-Date: 		2020-04-21
+Date: 		2020-05-19
 Mailing List:	postfix-us...@postfix.org
 Responsible:	christos
 License:	IBM Public License. See also src/external/ibm-public/postfix/dist.



CVS commit: src/usr.bin/calendar/calendars

2020-05-19 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue May 19 11:07:10 UTC 2020

Modified Files:
src/usr.bin/calendar/calendars: calendar.computer

Log Message:
Add RISC-V's birthday
https://riscv.org/2020/05/happy-10th-birthday-risc-v/


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/calendar/calendars/calendar.computer

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/calendar/calendars/calendar.computer
diff -u src/usr.bin/calendar/calendars/calendar.computer:1.13 src/usr.bin/calendar/calendars/calendar.computer:1.14
--- src/usr.bin/calendar/calendars/calendar.computer:1.13	Thu Apr 30 12:13:39 2020
+++ src/usr.bin/calendar/calendars/calendar.computer	Tue May 19 11:07:10 2020
@@ -38,6 +38,7 @@
 05/01	First BASIC program run at Dartmouth, 1964
 05/06	EDSAC demonstrated, 1949
 05/16	First report on SNOBOL distributed (within BTL), 1963
+05/18	RISC-V project born, 2010
 05/21	DEC announces PDP-8, 1965
 05/22	Ethernet first described, 1973
 05/27	First joint meeting of U.S. and European ALGOL definition cte., 1958



CVS commit: src/sys/arch

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 09:26:44 UTC 2020

Modified Files:
src/sys/arch/evbarm/conf: NAPPI_MD ZAO425_MD
src/sys/arch/evbmips/conf: ADM5120 ADM5120-NB ADM5120-USB RB153
src/sys/arch/x68k/conf: INSTALL

Log Message:
Fix outdated or misleading comments for MEMORY_DISK_ROOT_SIZE.
No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/NAPPI_MD \
src/sys/arch/evbarm/conf/ZAO425_MD
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbmips/conf/ADM5120 \
src/sys/arch/evbmips/conf/ADM5120-USB
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbmips/conf/ADM5120-NB
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbmips/conf/RB153
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/x68k/conf/INSTALL

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

Modified files:

Index: src/sys/arch/evbarm/conf/NAPPI_MD
diff -u src/sys/arch/evbarm/conf/NAPPI_MD:1.3 src/sys/arch/evbarm/conf/NAPPI_MD:1.4
--- src/sys/arch/evbarm/conf/NAPPI_MD:1.3	Tue Nov 23 11:13:56 2010
+++ src/sys/arch/evbarm/conf/NAPPI_MD	Tue May 19 09:26:44 2020
@@ -1,4 +1,4 @@
-#   $NetBSD: NAPPI_MD,v 1.3 2010/11/23 11:13:56 hannken Exp $
+#   $NetBSD: NAPPI_MD,v 1.4 2020/05/19 09:26:44 rin Exp $
 #
 #	NAPPI -- Netwise APlication Platform Board Kernel
 #
@@ -10,7 +10,7 @@ include "arch/evbarm/conf/NAPPI"
 # Enable the hooks used for initializing the ram-disk.
 options		MEMORY_DISK_HOOKS
 options		MEMORY_DISK_IS_ROOT		# Force root on ram-disk
-options		MEMORY_DISK_ROOT_SIZE=8192	# 2 Megabytes
+options		MEMORY_DISK_ROOT_SIZE=8192	# size of memory disk, in blocks
 options		MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # disk/mass storage pseudo-devices
Index: src/sys/arch/evbarm/conf/ZAO425_MD
diff -u src/sys/arch/evbarm/conf/ZAO425_MD:1.3 src/sys/arch/evbarm/conf/ZAO425_MD:1.4
--- src/sys/arch/evbarm/conf/ZAO425_MD:1.3	Tue Nov 23 11:13:57 2010
+++ src/sys/arch/evbarm/conf/ZAO425_MD	Tue May 19 09:26:44 2020
@@ -1,4 +1,4 @@
-#   $NetBSD: ZAO425_MD,v 1.3 2010/11/23 11:13:57 hannken Exp $
+#   $NetBSD: ZAO425_MD,v 1.4 2020/05/19 09:26:44 rin Exp $
 #
 #	ZAO425_MD config file
 #
@@ -8,7 +8,7 @@ include "arch/evbarm/conf/ZAO425"
 # Enable the hooks used for initializing the ram-disk.
 options		MEMORY_DISK_HOOKS
 options		MEMORY_DISK_IS_ROOT		# Force root on ram-disk
-options		MEMORY_DISK_ROOT_SIZE=8192	# 2 Megabytes
+options		MEMORY_DISK_ROOT_SIZE=8192	# size of memory disk, in blocks
 options		MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # disk/mass storage pseudo-devices

Index: src/sys/arch/evbmips/conf/ADM5120
diff -u src/sys/arch/evbmips/conf/ADM5120:1.29 src/sys/arch/evbmips/conf/ADM5120:1.30
--- src/sys/arch/evbmips/conf/ADM5120:1.29	Sun Jan 19 01:25:05 2020
+++ src/sys/arch/evbmips/conf/ADM5120	Tue May 19 09:26:44 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: ADM5120,v 1.29 2020/01/19 01:25:05 thorpej Exp $
+#	$NetBSD: ADM5120,v 1.30 2020/05/19 09:26:44 rin Exp $
 #
 # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
 # DBAu1000 and DBAu1500 evaluation boards.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.29 $"
+#ident 		"GENERIC-$Revision: 1.30 $"
 
 maxusers	32
 
@@ -36,7 +36,7 @@ makeoptions	COPY_SYMTAB=1	# size for emb
 
 #options 	MEMORY_DISK_HOOKS
 #options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
-#options 	MEMORY_DISK_ROOT_SIZE=16384	# 2 Megabytes
+#options 	MEMORY_DISK_ROOT_SIZE=16384	# size of memory disk, in blocks
 
 # Compatibility options
 include "conf/compat_netbsd50.config"
Index: src/sys/arch/evbmips/conf/ADM5120-USB
diff -u src/sys/arch/evbmips/conf/ADM5120-USB:1.29 src/sys/arch/evbmips/conf/ADM5120-USB:1.30
--- src/sys/arch/evbmips/conf/ADM5120-USB:1.29	Sun Jan 19 01:25:05 2020
+++ src/sys/arch/evbmips/conf/ADM5120-USB	Tue May 19 09:26:44 2020
@@ -1,11 +1,11 @@
-#	$NetBSD: ADM5120-USB,v 1.29 2020/01/19 01:25:05 thorpej Exp $
+#	$NetBSD: ADM5120-USB,v 1.30 2020/05/19 09:26:44 rin Exp $
 #
 # Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
 # DBAu1000 and DBAu1500 evaluation boards.
 
 include 	"arch/evbmips/conf/std.adm5120"
 
-#ident 		"GENERIC-$Revision: 1.29 $"
+#ident 		"GENERIC-$Revision: 1.30 $"
 
 maxusers	32
 
@@ -33,9 +33,9 @@ makeoptions 	DEBUG="-g"	# compile full s
 makeoptions 	CPUFLAGS="-march=4kc"	# compile full symbol table
 makeoptions	COPY_SYMTAB=1	# size for embedded symbol table
 
-#options		MEMORY_DISK_HOOKS
-#options MEMORY_DISK_IS_ROOT # Force root on ram-disk
-#options MEMORY_DISK_ROOT_SIZE=16384  # 2 Megabytes
+#options 	MEMORY_DISK_HOOKS
+#options 	MEMORY_DISK_IS_ROOT		# Force root on ram-disk
+#options 	MEMORY_DISK_ROOT_SIZE=16384	# size of memory disk, in blocks
 
 # Compatibility options
 #include 	"conf/compat_netbsd10.config"

Index: src/sys/arch/evbmips/conf/ADM5120-NB
diff -u src/sys/arch/evbmips/conf/ADM5120-NB:1.27 

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

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 09:17:45 UTC 2020

Modified Files:
src/sys/arch/evbarm/conf: TWINTAIL

Log Message:
Fix comment; MEMORY_DISK_SIZE --> MEMORY_DISK_ROOT_SIZE


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/evbarm/conf/TWINTAIL

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

Modified files:

Index: src/sys/arch/evbarm/conf/TWINTAIL
diff -u src/sys/arch/evbarm/conf/TWINTAIL:1.80 src/sys/arch/evbarm/conf/TWINTAIL:1.81
--- src/sys/arch/evbarm/conf/TWINTAIL:1.80	Sat May 16 13:46:11 2020
+++ src/sys/arch/evbarm/conf/TWINTAIL	Tue May 19 09:17:45 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: TWINTAIL,v 1.80 2020/05/16 13:46:11 maya Exp $
+#	$NetBSD: TWINTAIL,v 1.81 2020/05/19 09:17:45 rin Exp $
 #
 #	TWINTAIL -- Genetec corp. G4255EB-X002 Evaluation Board Kernel
 #
@@ -89,11 +89,11 @@ options 	COMPAT_NETBSD32	# allow running
 
 # Device options
 
-#options 	MEMORY_DISK_HOOKS	# boottime setup of ramdisk
-#options 	MEMORY_DISK_SIZE=3072	# Size in blocks
+#options 	MEMORY_DISK_HOOKS		# boottime setup of ramdisk
+#options 	MEMORY_DISK_ROOT_SIZE=3072	# Size in blocks
 #options 	MEMORY_DISK_DYNAMIC
-#options 	MINIROOTSIZE=1000	# Size in blocks
-#options 	MEMORY_DISK_IS_ROOT	# use memory disk as root
+#options 	MINIROOTSIZE=1000		# Size in blocks
+#options 	MEMORY_DISK_IS_ROOT		# use memory disk as root
 
 # Miscellaneous kernel options
 options 	KTRACE		# system call tracing, a la ktrace(1)



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

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 09:14:52 UTC 2020

Modified Files:
src/sys/arch/luna68k/conf: INSTALL

Log Message:
Oops, fix comment in the previous for accuracy.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/luna68k/conf/INSTALL

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

Modified files:

Index: src/sys/arch/luna68k/conf/INSTALL
diff -u src/sys/arch/luna68k/conf/INSTALL:1.28 src/sys/arch/luna68k/conf/INSTALL:1.29
--- src/sys/arch/luna68k/conf/INSTALL:1.28	Tue May 19 09:02:48 2020
+++ src/sys/arch/luna68k/conf/INSTALL	Tue May 19 09:14:52 2020
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.28 2020/05/19 09:02:48 rin Exp $
+# $NetBSD: INSTALL,v 1.29 2020/05/19 09:14:52 rin Exp $
 #
 # config for installation ramdisk kernel
 # 
@@ -15,7 +15,7 @@ options 	FPSP	# on m68040 to emulate som
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# Force root on ram-disk
 options 	MEMORY_DISK_SERVER=0		# no userspace md(4) support
-options 	MEMORY_DISK_ROOT_SIZE=4000	# 2.00 Megabytes
+options 	MEMORY_DISK_ROOT_SIZE=4000	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # Standard system options



CVS commit: src

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 09:02:48 UTC 2020

Modified Files:
src/distrib/luna68k/ramdisk: Makefile
src/sys/arch/luna68k/conf: INSTALL

Log Message:
Bump ramdisk size to 2MB.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/luna68k/ramdisk/Makefile
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/luna68k/conf/INSTALL

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

Modified files:

Index: src/distrib/luna68k/ramdisk/Makefile
diff -u src/distrib/luna68k/ramdisk/Makefile:1.5 src/distrib/luna68k/ramdisk/Makefile:1.6
--- src/distrib/luna68k/ramdisk/Makefile:1.5	Tue Jan 24 18:04:03 2017
+++ src/distrib/luna68k/ramdisk/Makefile	Tue May 19 09:02:48 2020
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.5 2017/01/24 18:04:03 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2020/05/19 09:02:48 rin Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	1900k
+IMAGESIZE=	2000k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1

Index: src/sys/arch/luna68k/conf/INSTALL
diff -u src/sys/arch/luna68k/conf/INSTALL:1.27 src/sys/arch/luna68k/conf/INSTALL:1.28
--- src/sys/arch/luna68k/conf/INSTALL:1.27	Fri Apr 26 22:46:03 2019
+++ src/sys/arch/luna68k/conf/INSTALL	Tue May 19 09:02:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.27 2019/04/26 22:46:03 sevan Exp $
+# $NetBSD: INSTALL,v 1.28 2020/05/19 09:02:48 rin Exp $
 #
 # config for installation ramdisk kernel
 # 
@@ -15,7 +15,7 @@ options 	FPSP	# on m68040 to emulate som
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# Force root on ram-disk
 options 	MEMORY_DISK_SERVER=0		# no userspace md(4) support
-options 	MEMORY_DISK_ROOT_SIZE=3800	# 1.90 Megabytes
+options 	MEMORY_DISK_ROOT_SIZE=4000	# 2.00 Megabytes
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # Standard system options



CVS commit: src/share/mk

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 08:59:36 UTC 2020

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

Log Message:
Fix dtblist; our echo(1) does not interpret \t.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/mk/bsd.dtb.mk

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

Modified files:

Index: src/share/mk/bsd.dtb.mk
diff -u src/share/mk/bsd.dtb.mk:1.1 src/share/mk/bsd.dtb.mk:1.2
--- src/share/mk/bsd.dtb.mk:1.1	Mon May 18 21:19:35 2020
+++ src/share/mk/bsd.dtb.mk	Tue May 19 08:59:36 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.dtb.mk,v 1.1 2020/05/18 21:19:35 jmcneill Exp $
+#	$NetBSD: bsd.dtb.mk,v 1.2 2020/05/19 08:59:36 rin Exp $
 
 .include 
 .include 
@@ -74,10 +74,12 @@ dtbinstall:	dtb
 
 dtblist:
 .if defined(DTSSUBDIR)
-	@echo ".${DTBINSTDIR}\t\tdtb-base-boot\tdtb"
+	@echo ".${DTBINSTDIR}\t\tdtb-base-boot\tdtb" | \
+	${TOOL_SED} 's/\\t/	/g'
 .endif
 .for _dtb in ${DTB}
-	@echo ".${DTBINSTDIR}/${_dtb}\t\tdtb-base-boot\tdtb"
+	@echo ".${DTBINSTDIR}/${_dtb}\t\tdtb-base-boot\tdtb" | \
+	${TOOL_SED} 's/\\t/	/g'
 .endfor
 
 clean:  .PHONY



CVS commit: src/sys/arch/amiga/dev

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 08:43:30 UTC 2020

Modified Files:
src/sys/arch/amiga/dev: clock.c

Log Message:
Round amiga_clk_interval to the nearest integer, in order to emulate
100 Hz clock better by that running at PAL frequency (709379 Hz).

No functional changes for systems running at NTSC freq (715909 Hz).


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amiga/dev/clock.c

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

Modified files:

Index: src/sys/arch/amiga/dev/clock.c
diff -u src/sys/arch/amiga/dev/clock.c:1.55 src/sys/arch/amiga/dev/clock.c:1.56
--- src/sys/arch/amiga/dev/clock.c:1.55	Thu Nov 12 12:19:49 2015
+++ src/sys/arch/amiga/dev/clock.c	Tue May 19 08:43:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.55 2015/11/12 12:19:49 phx Exp $ */
+/*	$NetBSD: clock.c,v 1.56 2020/05/19 08:43:30 rin Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.55 2015/11/12 12:19:49 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.56 2020/05/19 08:43:30 rin Exp $");
 
 #include 
 #include 
@@ -147,7 +147,10 @@ clockattach(device_t parent, device_t se
 		clockchip = "CIA B";
 	}
 
+	/* round nearest to mitigate clock drift for PAL */
 	amiga_clk_interval = chipfreq / hz;
+	if (chipfreq % hz >= hz / 2)
+		amiga_clk_interval++;
 
 	if (self != NULL) {	/* real autoconfig? */
 		printf(": %s system hz %d hardware hz %d\n", clockchip, hz,



CVS commit: src/sys/dev/ic

2020-05-19 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue May 19 08:21:30 UTC 2020

Modified Files:
src/sys/dev/ic: wdc.c

Log Message:
in wdctimeout() ignore timeout if not actually waiting for IRQ, to avoid
processing xfer which is not quite setup

in wdcintr() actually write the error message on invocation when
not waiting for IRQ even without ATADEBUG option, as usually that
is a driver bug; might revisit this if this ends up too noisy for
PCI-IDE which seems to ignore WDCTL_IDS and hence trigger irq even
for polled commands


To generate a diff of this commit:
cvs rdiff -u -r1.299 -r1.300 src/sys/dev/ic/wdc.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/ic/wdc.c
diff -u src/sys/dev/ic/wdc.c:1.299 src/sys/dev/ic/wdc.c:1.300
--- src/sys/dev/ic/wdc.c:1.299	Mon Apr 13 10:49:34 2020
+++ src/sys/dev/ic/wdc.c	Tue May 19 08:21:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc.c,v 1.299 2020/04/13 10:49:34 jdolecek Exp $ */
+/*	$NetBSD: wdc.c,v 1.300 2020/05/19 08:21:29 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.299 2020/04/13 10:49:34 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.300 2020/05/19 08:21:29 jdolecek Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -888,7 +888,7 @@ wdcintr(void *arg)
 	}
 
 	if ((chp->ch_flags & ATACH_IRQ_WAIT) == 0) {
-		ATADEBUG_PRINT(("wdcintr: irq not expected\n"), DEBUG_INTR);
+		__wdcerror(chp, "irq not expected");
 		goto ignore;
 	}
 
@@ -1346,6 +1346,11 @@ wdctimeout(void *arg)
 
 	callout_ack(>c_timo_callout);
 
+	if ((chp->ch_flags & ATACH_IRQ_WAIT) == 0) {
+		__wdcerror(chp, "timeout not expected without pending irq");
+		goto out;
+	}
+
 	xfer = ata_queue_get_active_xfer(chp);
 	KASSERT(xfer != NULL);
 



CVS commit: src/sys/dev

2020-05-19 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue May 19 08:08:51 UTC 2020

Modified Files:
src/sys/dev/ata: ata_wdc.c
src/sys/dev/ic: mvsata.c

Log Message:
only start the timeout machinery once the I/O is completely setup
and successful, particularly after PIO write is finished

fixes crashes in case the setup is so slow that timeout is triggered
e.g. while still waiting in wdc_wait_for_unbusy() or shortly after, without
drive actually having chance to complete the I/O, as seen in some
configuration under QEMU by Paul Ripke


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/dev/ata/ata_wdc.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/mvsata.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/ata/ata_wdc.c
diff -u src/sys/dev/ata/ata_wdc.c:1.116 src/sys/dev/ata/ata_wdc.c:1.117
--- src/sys/dev/ata/ata_wdc.c:1.116	Fri May 15 16:58:28 2020
+++ src/sys/dev/ata/ata_wdc.c	Tue May 19 08:08:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_wdc.c,v 1.116 2020/05/15 16:58:28 jdolecek Exp $	*/
+/*	$NetBSD: ata_wdc.c,v 1.117 2020/05/19 08:08:51 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.116 2020/05/15 16:58:28 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.117 2020/05/19 08:08:51 jdolecek Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -478,10 +478,6 @@ _wdc_ata_bio_start(struct ata_channel *c
 (*wdc->dma_start)(wdc->dma_arg,
 chp->ch_channel, xfer->c_drive);
 			chp->ch_flags |= ATACH_DMA_WAIT;
-			/* start timeout machinery */
-			if ((xfer->c_flags & C_POLL) == 0)
-callout_reset(>c_timo_callout,
-ATA_DELAY / 1000 * hz, wdctimeout, chp);
 			/* wait for irq */
 			goto intr;
 		} /* else not DMA */
@@ -549,10 +545,6 @@ _wdc_ata_bio_start(struct ata_channel *c
 			(drvp->lp->d_type == DKTYPE_ST506) ?
 			drvp->lp->d_precompcyl / 4 : 0);
 		}
-		/* start timeout machinery */
-		if ((xfer->c_flags & C_POLL) == 0)
-			callout_reset(>c_timo_callout,
-			ATA_DELAY / 1000 * hz, wdctimeout, chp);
 	} else if (ata_bio->nblks > 1) {
 		/* The number of blocks in the last stretch may be smaller. */
 		nblks = xfer->c_bcount / drvp->lp->d_secsize;
@@ -598,7 +590,10 @@ _wdc_ata_bio_start(struct ata_channel *c
 intr:
 #endif
 	/* Wait for IRQ (either real or polled) */
-	if ((ata_bio->flags & ATA_POLL) == 0) {
+	if ((xfer->c_flags & C_POLL) == 0) {
+		/* start timeout machinery */
+		callout_reset(>c_timo_callout,
+		ATA_DELAY / 1000 * hz, wdctimeout, chp);
 		chp->ch_flags |= ATACH_IRQ_WAIT;
 		return ATASTART_STARTED;
 	} else {

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.56 src/sys/dev/ic/mvsata.c:1.57
--- src/sys/dev/ic/mvsata.c:1.56	Mon Apr 13 10:49:34 2020
+++ src/sys/dev/ic/mvsata.c	Tue May 19 08:08:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.56 2020/04/13 10:49:34 jdolecek Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.57 2020/05/19 08:08:51 jdolecek Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.56 2020/04/13 10:49:34 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.57 2020/05/19 08:08:51 jdolecek Exp $");
 
 #include "opt_mvsata.h"
 
@@ -1108,10 +1108,6 @@ mvsata_bio_start(struct ata_channel *chp
 return ATASTART_ABORT;
 			}
 			chp->ch_flags |= ATACH_DMA_WAIT;
-			/* start timeout machinery */
-			if ((xfer->c_flags & C_POLL) == 0)
-callout_reset(>c_timo_callout,
-mstohz(ATA_DELAY), ata_timeout, chp);
 			/* wait for irq */
 			goto intr;
 		} /* else not DMA */
@@ -1192,11 +1188,6 @@ do_pio:
 			head, sect, nblks,
 			(drvp->lp->d_type == DKTYPE_ST506) ?
 			drvp->lp->d_precompcyl / 4 : 0);
-
-		/* start timeout machinery */
-		if ((xfer->c_flags & C_POLL) == 0)
-			callout_reset(>c_timo_callout,
-			mstohz(ATA_DELAY), wdctimeout, chp);
 	} else if (ata_bio->nblks > 1) {
 		/* The number of blocks in the last stretch may be smaller. */
 		nblks = xfer->c_bcount / drvp->lp->d_secsize;
@@ -1238,9 +1229,12 @@ intr:
 		xfer->c_flags, mvport->port_edmamode_curr, nodma); 
 
 	/* Wait for IRQ (either real or polled) */
-	if ((ata_bio->flags & ATA_POLL) != 0)
+	if ((ata_bio->flags & ATA_POLL) != 0) {
+		/* start timeout machinery */
+		callout_reset(>c_timo_callout,
+		mstohz(ATA_DELAY), wdctimeout, chp);
 		return ATASTART_POLL;
-	else
+	} else
 		return ATASTART_STARTED;
 
 timeout:
@@ -2116,11 +2110,6 @@ ready:
 		MVSATA_WDC_WRITE_1(mvport, SRB_CAS, WDCTL_4BIT);
 		delay(10); /* some drives need a little delay here */
 	}
-	/* start timeout machinery */
-	if ((sc_xfer->xs_control & XS_CTL_POLL) == 0)
-		callout_reset(>c_timo_callout, mstohz(sc_xfer->timeout),
-		wdctimeout, chp);
-
 	MVSATA_WDC_WRITE_1(mvport, SRB_H, WDSD_IBM);
 	if 

CVS commit: src/share/mk

2020-05-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 19 08:07:44 UTC 2020

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

Log Message:
Try to fix fallout from addition of dtb.tgz; MKDTB was added to both
_MKVARS.yes and _MKVARS.no. Remove it from the former.


To generate a diff of this commit:
cvs rdiff -u -r1.1189 -r1.1190 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1189 src/share/mk/bsd.own.mk:1.1190
--- src/share/mk/bsd.own.mk:1.1189	Mon May 18 21:19:35 2020
+++ src/share/mk/bsd.own.mk	Tue May 19 08:07:44 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1189 2020/05/18 21:19:35 jmcneill Exp $
+#	$NetBSD: bsd.own.mk,v 1.1190 2020/05/19 08:07:44 rin Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1090,7 +1090,7 @@ _MKVARS.yes= \
 	MKBINUTILS \
 	MKBSDTAR \
 	MKCOMPLEX MKCVS MKCXX \
-	MKDOC MKDTB MKDTC \
+	MKDOC MKDTC \
 	MKDYNAMICROOT \
 	MKGCC MKGDB MKGROFF \
 	MKHESIOD MKHTML \



CVS commit: src

2020-05-19 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue May 19 06:26:37 UTC 2020

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4/man4.sparc64: Makefile

Log Message:
Add tadpmu to Makefile and set list.


To generate a diff of this commit:
cvs rdiff -u -r1.1690 -r1.1691 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/man4.sparc64/Makefile

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1690 src/distrib/sets/lists/man/mi:1.1691
--- src/distrib/sets/lists/man/mi:1.1690	Sat May 16 19:05:05 2020
+++ src/distrib/sets/lists/man/mi	Tue May 19 06:26:37 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1690 2020/05/16 19:05:05 christos Exp $
+# $NetBSD: mi,v 1.1691 2020/05/19 06:26:37 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1775,6 +1775,7 @@
 ./usr/share/man/cat4/sparc64/lom.0		man-sys-catman		.cat
 ./usr/share/man/cat4/sparc64/sab.0		man-sys-catman		.cat
 ./usr/share/man/cat4/sparc64/sabtty.0		man-sys-catman		.cat
+./usr/share/man/cat4/sparc64/tadpmu.0		man-sys-catman		.cat
 ./usr/share/man/cat4/sparc64/tda.0		man-sys-catman		.cat
 ./usr/share/man/cat4/spc.0			man-sys-catman		.cat
 ./usr/share/man/cat4/spdmem.0			man-sys-catman		.cat
@@ -4907,6 +4908,7 @@
 ./usr/share/man/html4/sparc64/lom.html		man-sys-htmlman		html
 ./usr/share/man/html4/sparc64/sab.html		man-sys-htmlman		html
 ./usr/share/man/html4/sparc64/sabtty.html	man-sys-htmlman		html
+./usr/share/man/html4/sparc64/tadpmu.html	man-sys-htmlman		html
 ./usr/share/man/html4/sparc64/tda.html		man-sys-htmlman		html
 ./usr/share/man/html4/spc.html			man-sys-htmlman		html
 ./usr/share/man/html4/spdmem.html		man-sys-htmlman		html
@@ -7949,6 +7951,7 @@
 ./usr/share/man/man4/sparc64/lom.4		man-sys-man		.man
 ./usr/share/man/man4/sparc64/sab.4		man-sys-man		.man
 ./usr/share/man/man4/sparc64/sabtty.4		man-sys-man		.man
+./usr/share/man/man4/sparc64/tadpmu.4		man-sys-man		.man
 ./usr/share/man/man4/sparc64/tda.4		man-sys-man		.man
 ./usr/share/man/man4/spc.4			man-sys-man		.man
 ./usr/share/man/man4/spdmem.4			man-sys-man		.man

Index: src/share/man/man4/man4.sparc64/Makefile
diff -u src/share/man/man4/man4.sparc64/Makefile:1.7 src/share/man/man4/man4.sparc64/Makefile:1.8
--- src/share/man/man4/man4.sparc64/Makefile:1.7	Sun Feb  3 14:51:57 2013
+++ src/share/man/man4/man4.sparc64/Makefile	Tue May 19 06:26:37 2020
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2013/02/03 14:51:57 jdc Exp $
+# $NetBSD: Makefile,v 1.8 2020/05/19 06:26:37 jdc Exp $
 
 MANSUBDIR=/sparc64
 
-MAN=	envctrl.4 ffb.4 fdc.4 intro.4 lom.4 sab.4 tda.4
+MAN=	envctrl.4 ffb.4 fdc.4 intro.4 lom.4 sab.4 tadpmu.4 tda.4
 
 MLINKS+=	sab.4 sabtty.4