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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 21 05:51:08 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Fix build after previous.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/evbarm/fdt/fdt_machdep.c

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



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 21 05:51:08 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Fix build after previous.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/evbarm/fdt/fdt_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.97 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.98
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.97	Thu Oct 20 07:16:19 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Fri Oct 21 05:51:08 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.98 2022/10/21 05:51:08 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.98 2022/10/21 05:51:08 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -609,7 +609,7 @@ initarm(void *arg)
 	fdt_probe_rndseed(_start, _end);
 	fdt_probe_efirng(_start, _end);
 
-	fdt_memory_remove_reserved(mem_start, mem_end);
+	fdt_memory_remove_reserved(memory_start, memory_end);
 
 	/*
 	 * Populate bootconfig structure for the benefit of dodumpsys



CVS commit: src/sys/dev/usb

2022-10-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Oct 21 04:55:12 UTC 2022

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

Log Message:
ugen(4): convert to USBHIST style debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/dev/usb/ugen.c

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



CVS commit: src/sys/dev/usb

2022-10-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Oct 21 04:55:12 UTC 2022

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

Log Message:
ugen(4): convert to USBHIST style debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/dev/usb/ugen.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/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.168 src/sys/dev/usb/ugen.c:1.169
--- src/sys/dev/usb/ugen.c:1.168	Sun Sep 26 01:16:09 2021
+++ src/sys/dev/usb/ugen.c	Fri Oct 21 04:55:11 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.168 2021/09/26 01:16:09 thorpej Exp $	*/
+/*	$NetBSD: ugen.c,v 1.169 2022/10/21 04:55:11 mrg Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.168 2021/09/26 01:16:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.169 2022/10/21 04:55:11 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -64,17 +64,50 @@ __KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.1
 #include 
 #include 
 #include 
+#include 
 
 #include "ioconf.h"
 
-#ifdef UGEN_DEBUG
-#define DPRINTF(x)	if (ugendebug) printf x
-#define DPRINTFN(n,x)	if (ugendebug>(n)) printf x
-int	ugendebug = 0;
+#ifdef USB_DEBUG
+#ifndef UGEN_DEBUG
+#define ugendebug 0
 #else
-#define DPRINTF(x)
-#define DPRINTFN(n,x)
-#endif
+int	ugendebug = 0;
+
+SYSCTL_SETUP(sysctl_hw_ugen_setup, "sysctl hw.ugen setup")
+{
+	int err;
+	const struct sysctlnode *rnode;
+	const struct sysctlnode *cnode;
+
+	err = sysctl_createv(clog, 0, NULL, ,
+	CTLFLAG_PERMANENT, CTLTYPE_NODE, "ugen",
+	SYSCTL_DESCR("ugen global controls"),
+	NULL, 0, NULL, 0, CTL_HW, CTL_CREATE, CTL_EOL);
+
+	if (err)
+		goto fail;
+
+	/* control debugging printfs */
+	err = sysctl_createv(clog, 0, , ,
+	CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT,
+	"debug", SYSCTL_DESCR("Enable debugging output"),
+	NULL, 0, , sizeof(ugendebug), CTL_CREATE, CTL_EOL);
+	if (err)
+		goto fail;
+
+	return;
+fail:
+	aprint_error("%s: sysctl_createv failed (err = %d)\n", __func__, err);
+}
+
+#endif /* UGEN_DEBUG */
+#endif /* USB_DEBUG */
+
+#define DPRINTF(FMT,A,B,C,D)USBHIST_LOGN(ugendebug,1,FMT,A,B,C,D)
+#define DPRINTFN(N,FMT,A,B,C,D) USBHIST_LOGN(ugendebug,N,FMT,A,B,C,D)
+#define UGENHIST_FUNC() USBHIST_FUNC()
+#define UGENHIST_CALLED(name)   USBHIST_CALLED(ugendebug)
 
 #define	UGEN_CHUNK	128	/* chunk size for read */
 #define	UGEN_IBSIZE	1020	/* buffer size */
@@ -438,8 +471,10 @@ ugen_set_config(struct ugen_softc *sc, i
 	usbd_status err;
 	int dir;
 
-	DPRINTFN(1,("ugen_set_config: %s to configno %d, sc=%p\n",
-		device_xname(sc->sc_dev), configno, sc));
+	UGENHIST_FUNC(); UGENHIST_CALLED();
+
+	DPRINTFN(1, "ugen%jd: %s to configno %jd, sc=%jx",
+		device_unit(sc->sc_dev), configno, sc, 0);
 
 	KASSERT(KERNEL_LOCKED_P()); /* sc_is_open */
 
@@ -451,8 +486,8 @@ ugen_set_config(struct ugen_softc *sc, i
 		for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++)
 			if (sc->sc_is_open[endptno]) {
 DPRINTFN(1,
- ("ugen_set_config: %s - endpoint %d is open\n",
-  device_xname(sc->sc_dev), endptno));
+ "%s - endpoint %d is open",
+  endptno, 0, 0, 0);
 return USBD_IN_USE;
 			}
 
@@ -478,7 +513,7 @@ ugen_set_config(struct ugen_softc *sc, i
 		goto out;
 
 	for (ifaceno = 0; ifaceno < niface; ifaceno++) {
-		DPRINTFN(1,("ugen_set_config: ifaceno %d\n", ifaceno));
+		DPRINTFN(1, "ifaceno %jd", ifaceno, 0, 0, 0);
 		err = usbd_device2interface_handle(dev, ifaceno, );
 		if (err)
 			goto out;
@@ -491,10 +526,9 @@ ugen_set_config(struct ugen_softc *sc, i
 			endpt = ed->bEndpointAddress;
 			dir = UE_GET_DIR(endpt) == UE_DIR_IN ? IN : OUT;
 			sce = >sc_endpoints[UE_GET_ADDR(endpt)][dir];
-			DPRINTFN(1,("ugen_set_config: endptno %d, endpt=0x%02x"
-"(%d,%d), sce=%p\n",
-endptno, endpt, UE_GET_ADDR(endpt),
-UE_GET_DIR(endpt), sce));
+			DPRINTFN(1, "endptno %jd, endpt=0x%02jx (%jd,%jd)",
+ endptno, endpt, UE_GET_ADDR(endpt),
+ UE_GET_DIR(endpt));
 			sce->sc = sc;
 			sce->edesc = ed;
 			sce->iface = iface;
@@ -530,13 +564,15 @@ ugenopen(dev_t dev, int flag, int mode, 
 	int error;
 	int opened;
 
+	UGENHIST_FUNC(); UGENHIST_CALLED();
+
 	KASSERT(KERNEL_LOCKED_P()); /* sc_is_open */
 
 	if ((sc = ugenif_acquire(unit)) == NULL)
 		return ENXIO;
 
-	DPRINTFN(5, ("ugenopen: flag=%d, mode=%d, unit=%d endpt=%d\n",
-		 flag, mode, unit, endpt));
+	DPRINTFN(5, "flag=%jd, mode=%jd, unit=%jd endpt=%jd",
+		 flag, mode, unit, endpt);
 
 	/* The control endpoint allows multiple opens. */
 	if (endpt == USB_CONTROL_ENDPOINT) {
@@ -570,8 +606,8 @@ ugenopen(dev_t dev, int flag, int mode, 
 		sce = >sc_endpoints[endpt][dir];
 		sce->state = 0;
 		sce->timeout = USBD_NO_TIMEOUT;
-		DPRINTFN(5, ("ugenopen: sc=%p, endpt=%d, dir=%d, sce=%p\n",
-			 sc, endpt, 

CVS commit: src/lib/libc/time

2022-10-20 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Oct 21 03:08:29 UTC 2022

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
escape mathematical minus so it doesn't get rendered as a dash


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/lib/libc/time/ctime.3

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



CVS commit: src/lib/libc/time

2022-10-20 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Oct 21 03:08:29 UTC 2022

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
escape mathematical minus so it doesn't get rendered as a dash


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/lib/libc/time/ctime.3

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

Modified files:

Index: src/lib/libc/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.64 src/lib/libc/time/ctime.3:1.65
--- src/lib/libc/time/ctime.3:1.64	Fri Oct 21 03:05:15 2022
+++ src/lib/libc/time/ctime.3	Fri Oct 21 03:08:29 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: ctime.3,v 1.64 2022/10/21 03:05:15 jschauma Exp $
+.\" $NetBSD: ctime.3,v 1.65 2022/10/21 03:08:29 jschauma Exp $
 .\"
 .\" XXX: License missing?
 .\"
@@ -298,7 +298,7 @@ are determined.
 .Pp
 The function returns the specified calendar time;
 if the calendar time cannot be represented, it returns
-.Va "(time_t)-1" .
+.Va "(time_t)\-1" .
 This can happen either because the resulting conversion would not fit
 in a
 .Vt time_t



CVS commit: src/lib/libc/time

2022-10-20 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Oct 21 03:05:15 UTC 2022

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
Note normalizing behavior of mktime(3) using language from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libc/time/ctime.3

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



CVS commit: src/lib/libc/time

2022-10-20 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Oct 21 03:05:15 UTC 2022

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
Note normalizing behavior of mktime(3) using language from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libc/time/ctime.3

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

Modified files:

Index: src/lib/libc/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.63 src/lib/libc/time/ctime.3:1.64
--- src/lib/libc/time/ctime.3:1.63	Tue Aug 16 11:07:40 2022
+++ src/lib/libc/time/ctime.3	Fri Oct 21 03:05:15 2022
@@ -1,8 +1,8 @@
-.\" $NetBSD: ctime.3,v 1.63 2022/08/16 11:07:40 christos Exp $
+.\" $NetBSD: ctime.3,v 1.64 2022/10/21 03:05:15 jschauma Exp $
 .\"
 .\" XXX: License missing?
 .\"
-.Dd August 16, 2022
+.Dd October 22, 2022
 .Dt CTIME 3
 .Os
 .Sh NAME
@@ -253,7 +253,17 @@ and
 .Fa tm_yday
 components of the structure are ignored,
 and the original values of the other components are not restricted
-to their normal ranges.
+to their normal ranges and will be normalized,
+if need be.
+For example,
+October 40 is changed into November 9, a
+.Fa tm_hour
+of \-1 means 1 hour before midnight,
+.Fa tm_mday
+of 0 means the day preceding the current month, and
+.Fa tm_mon
+of \-2 means 2 months before January of
+.Fa tm_year .
 (A positive or zero value for
 .Fa tm_isdst
 causes



CVS commit: [netbsd-9] src/doc

2022-10-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 20 13:20:36 UTC 2022

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

Log Message:
Ticket #1546


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/doc

2022-10-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 20 13:20:36 UTC 2022

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

Log Message:
Ticket #1546


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-9.4

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.4
diff -u src/doc/CHANGES-9.4:1.1.2.25 src/doc/CHANGES-9.4:1.1.2.26
--- src/doc/CHANGES-9.4:1.1.2.25	Sat Oct 15 10:31:45 2022
+++ src/doc/CHANGES-9.4	Thu Oct 20 13:20:35 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.25 2022/10/15 10:31:45 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.26 2022/10/20 13:20:35 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -385,3 +385,34 @@ sys/dev/pci/ichsmb.c1.76-1.77 (via p
 	Add Intel 600 Series PCH support.
 	[msaitoh, ticket #1544]
 
+external/public-domain/tz/dist/SECURITY up to 1.1.1.1
+external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.7
+external/public-domain/tz/dist/Makefile up to 1.1.1.33
+external/public-domain/tz/dist/NEWS up to 1.1.1.38
+external/public-domain/tz/dist/README   up to 1.1.1.10
+external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
+external/public-domain/tz/dist/africa   up to 1.1.1.28
+external/public-domain/tz/dist/antarctica   up to 1.1.1.15
+external/public-domain/tz/dist/asia up to 1.5
+external/public-domain/tz/dist/australasia  up to 1.5
+external/public-domain/tz/dist/backward up to 1.5
+external/public-domain/tz/dist/backzone up to 1.1.1.23
+external/public-domain/tz/dist/calendarsup to 1.1.1.2
+external/public-domain/tz/dist/checktab.awk up to 1.1.1.11
+external/public-domain/tz/dist/etcetera up to 1.1.1.6
+external/public-domain/tz/dist/europe   up to 1.1.1.34
+external/public-domain/tz/dist/leap-seconds.list up to 1.4
+external/public-domain/tz/dist/leapseconds  up to 1.4
+external/public-domain/tz/dist/northamerica up to 1.1.1.30
+external/public-domain/tz/dist/southamerica up to 1.1.1.20
+external/public-domain/tz/dist/theory.html  up to 1.1.1.15
+external/public-domain/tz/dist/version  up to 1.5
+external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.9
+external/public-domain/tz/dist/zishrink.awk up to 1.1.1.8
+external/public-domain/tz/dist/zone.tab up to 1.1.1.22
+external/public-domain/tz/dist/zone1970.tab up to 1.1.1.23
+distrib/sets/lists/base/mi			(apply patch)
+doc/3RDPARTY	(apply patch)
+
+	Update timezone data to 2022e.
+	[kre, ticket #1546]



CVS commit: [netbsd-9] src

2022-10-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 20 13:18:54 UTC 2022

Modified Files:
src/distrib/sets/lists/base [netbsd-9]: mi
src/doc [netbsd-9]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-9]: CONTRIBUTING Makefile
NEWS README TZDATA_VERSION africa antarctica asia australasia
backward backzone calendars checktab.awk etcetera europe
leap-seconds.list leapseconds northamerica southamerica theory.html
version ziguard.awk zishrink.awk zone.tab zone1970.tab
Added Files:
src/external/public-domain/tz/dist [netbsd-9]: SECURITY

Log Message:
Pull up the following, requested by kre in ticket #1546:
Catch up to -current of external/public-domain/tz/dist and apply corresponding
patches to distrib/sets/lists/base/mi and doc/3RDPARTY:

external/public-domain/tz/dist/SECURITY up to 1.1.1.1
external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.7
external/public-domain/tz/dist/Makefile up to 1.1.1.33
external/public-domain/tz/dist/NEWS up to 1.1.1.38
external/public-domain/tz/dist/README   up to 1.1.1.10
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
external/public-domain/tz/dist/africa   up to 1.1.1.28
external/public-domain/tz/dist/antarctica   up to 1.1.1.15
external/public-domain/tz/dist/asia up to 1.5
external/public-domain/tz/dist/australasia  up to 1.5
external/public-domain/tz/dist/backward up to 1.5
external/public-domain/tz/dist/backzone up to 1.1.1.23
external/public-domain/tz/dist/calendarsup to 1.1.1.2
external/public-domain/tz/dist/checktab.awk up to 1.1.1.11
external/public-domain/tz/dist/etcetera up to 1.1.1.6
external/public-domain/tz/dist/europe   up to 1.1.1.34
external/public-domain/tz/dist/leap-seconds.list up to 1.4
external/public-domain/tz/dist/leapseconds  up to 1.4
external/public-domain/tz/dist/northamerica up to 1.1.1.30
external/public-domain/tz/dist/southamerica up to 1.1.1.20
external/public-domain/tz/dist/theory.html  up to 1.1.1.15
external/public-domain/tz/dist/version  up to 1.5
external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.9
external/public-domain/tz/dist/zishrink.awk up to 1.1.1.8
external/public-domain/tz/dist/zone.tab up to 1.1.1.22
external/public-domain/tz/dist/zone1970.tab up to 1.1.1.23
distrib/sets/lists/base/mi  (apply patch)
doc/3RDPARTY(apply patch)

Update timezone data to 2022e.


To generate a diff of this commit:
cvs rdiff -u -r1.1209.2.7 -r1.1209.2.8 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1640.2.24 -r1.1640.2.25 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.6 -r1.1.1.6.2.1 \
src/external/public-domain/tz/dist/CONTRIBUTING
cvs rdiff -u -r1.1.1.24.2.6 -r1.1.1.24.2.7 \
src/external/public-domain/tz/dist/Makefile \
src/external/public-domain/tz/dist/europe
cvs rdiff -u -r1.1.1.27.2.6 -r1.1.1.27.2.7 \
src/external/public-domain/tz/dist/NEWS
cvs rdiff -u -r1.1.1.8.2.1 -r1.1.1.8.2.2 \
src/external/public-domain/tz/dist/README
cvs rdiff -u -r0 -r1.1.1.1.2.2 src/external/public-domain/tz/dist/SECURITY
cvs rdiff -u -r1.17.2.6 -r1.17.2.7 \
src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.20.2.4 -r1.1.1.20.2.5 \
src/external/public-domain/tz/dist/africa
cvs rdiff -u -r1.1.1.11.2.2 -r1.1.1.11.2.3 \
src/external/public-domain/tz/dist/antarctica
cvs rdiff -u -r1.1.1.23.2.5 -r1.1.1.23.2.6 \
src/external/public-domain/tz/dist/asia
cvs rdiff -u -r1.1.1.17.2.4 -r1.1.1.17.2.5 \
src/external/public-domain/tz/dist/australasia
cvs rdiff -u -r1.1.1.10.2.2 -r1.1.1.10.2.3 \
src/external/public-domain/tz/dist/backward
cvs rdiff -u -r1.1.1.16.2.4 -r1.1.1.16.2.5 \
src/external/public-domain/tz/dist/backzone
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.14.1 \
src/external/public-domain/tz/dist/calendars
cvs rdiff -u -r1.1.1.9.4.1 -r1.1.1.9.4.2 \
src/external/public-domain/tz/dist/checktab.awk
cvs rdiff -u -r1.1.1.4.2.1 -r1.1.1.4.2.2 \
src/external/public-domain/tz/dist/etcetera
cvs rdiff -u -r1.1.1.11.2.4 -r1.1.1.11.2.5 \
src/external/public-domain/tz/dist/leap-seconds.list
cvs rdiff -u -r1.1.1.13.2.4 -r1.1.1.13.2.5 \
src/external/public-domain/tz/dist/leapseconds
cvs rdiff -u -r1.1.1.23.2.4 -r1.1.1.23.2.5 \
src/external/public-domain/tz/dist/northamerica
cvs rdiff -u -r1.1.1.15.2.2 -r1.1.1.15.2.3 \
src/external/public-domain/tz/dist/southamerica
cvs rdiff -u -r1.1.1.8.2.4 -r1.1.1.8.2.5 \
src/external/public-domain/tz/dist/theory.html
cvs rdiff -u -r1.1.1.14.2.6 -r1.1.1.14.2.7 \
src/external/public-domain/tz/dist/version
cvs rdiff -u 

CVS commit: src/sys/dev/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 11:38:21 UTC 2022

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

Log Message:
Do what the comment says and reserve ranges that do and do not have the
"no-map" property.

Required for qemu/riscv


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

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



CVS commit: src/sys/dev/fdt

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 11:38:21 UTC 2022

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

Log Message:
Do what the comment says and reserve ranges that do and do not have the
"no-map" property.

Required for qemu/riscv


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

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

Modified files:

Index: src/sys/dev/fdt/fdt_memory.c
diff -u src/sys/dev/fdt/fdt_memory.c:1.6 src/sys/dev/fdt/fdt_memory.c:1.7
--- src/sys/dev/fdt/fdt_memory.c:1.6	Sat Aug  6 20:16:42 2022
+++ src/sys/dev/fdt/fdt_memory.c	Thu Oct 20 11:38:21 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_memory.c,v 1.6 2022/08/06 20:16:42 ryo Exp $ */
+/* $NetBSD: fdt_memory.c,v 1.7 2022/10/20 11:38:21 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "opt_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.6 2022/08/06 20:16:42 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.7 2022/10/20 11:38:21 skrll Exp $");
 
 #include 
 #include 
@@ -154,9 +154,6 @@ fdt_memory_remove_reserved(uint64_t min_
 			bus_addr_t addr;
 			bus_size_t size;
 
-			if (!of_hasprop(child, "no-map"))
-continue;
-
 			if (fdtbus_get_reg(child, 0, , ) != 0)
 continue;
 			if (size == 0)



CVS commit: src/sys/arch/riscv/include

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:18:11 UTC 2022

Modified Files:
src/sys/arch/riscv/include: pmap.h

Log Message:
Add the "memory" clobber in two places that it's needed.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/riscv/include/pmap.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/riscv/include/pmap.h
diff -u src/sys/arch/riscv/include/pmap.h:1.12 src/sys/arch/riscv/include/pmap.h:1.13
--- src/sys/arch/riscv/include/pmap.h:1.12	Tue Oct 18 04:39:38 2022
+++ src/sys/arch/riscv/include/pmap.h	Thu Oct 20 07:18:11 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.12 2022/10/18 04:39:38 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.13 2022/10/20 07:18:11 skrll Exp $ */
 
 /*
  * Copyright (c) 2014, 2019, 2021 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@
 static inline void
 pmap_procwr(struct proc *p, vaddr_t va, vsize_t len)
 {
-	__asm __volatile("fence\trw,rw; fence.i");
+	__asm __volatile("fence\trw,rw; fence.i" ::: "memory");
 }
 
 #include 
@@ -158,7 +158,7 @@ pmap_md_tlb_check_entry(void *ctx, vaddr
 static inline void
 pmap_md_page_syncicache(struct vm_page_md *mdpg, const kcpuset_t *kc)
 {
-	__asm __volatile("fence\trw,rw; fence.i");
+	__asm __volatile("fence\trw,rw; fence.i" ::: "memory");
 }
 
 /*



CVS commit: src/sys/arch/riscv/include

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:18:11 UTC 2022

Modified Files:
src/sys/arch/riscv/include: pmap.h

Log Message:
Add the "memory" clobber in two places that it's needed.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/riscv/include/pmap.h

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



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:16:20 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Remove an empty line


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/evbarm/fdt/fdt_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.96 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.97
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.96	Thu Oct 20 07:13:45 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Thu Oct 20 07:16:19 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.97 2022/10/20 07:16:19 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -662,7 +662,6 @@ initarm(void *arg)
 		"loading in freelist %d\n", spa, epa, VM_FREELIST_DEFAULT);
 
 		uvm_page_physload(spg, epg, spg, epg, VM_FREELIST_DEFAULT);
-
 	}
 
 	return sp;



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:16:20 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Remove an empty line


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/evbarm/fdt/fdt_machdep.c

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



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:13:45 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Move the fdt_memory_remove_reserved call out of fdt_build_bootconfig

NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/evbarm/fdt/fdt_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.95 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.96
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.95	Fri Sep 30 06:39:54 2022
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Thu Oct 20 07:13:45 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.96 2022/10/20 07:13:45 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -240,8 +240,6 @@ fdt_build_bootconfig(uint64_t mem_start,
 	uint64_t addr, size;
 	int index;
 
-	fdt_memory_remove_reserved(mem_start, mem_end);
-
 	const uint64_t initrd_size =
 	round_page(initrd_end) - trunc_page(initrd_start);
 	if (initrd_size > 0)
@@ -611,6 +609,8 @@ initarm(void *arg)
 	fdt_probe_rndseed(_start, _end);
 	fdt_probe_efirng(_start, _end);
 
+	fdt_memory_remove_reserved(mem_start, mem_end);
+
 	/*
 	 * Populate bootconfig structure for the benefit of dodumpsys
 	 */



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 07:13:45 UTC 2022

Modified Files:
src/sys/arch/evbarm/fdt: fdt_machdep.c

Log Message:
Move the fdt_memory_remove_reserved call out of fdt_build_bootconfig

NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/evbarm/fdt/fdt_machdep.c

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



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 06:58:38 UTC 2022

Modified Files:
src/sys/arch/arm/arm: bcopyinout.S bcopyinout_xscale.S blockio.S
copystr.S cpu_in_cksum.S cpufunc_asm_arm10.S cpufunc_asm_arm67.S
cpufunc_asm_arm7tdmi.S cpufunc_asm_arm8.S cpufunc_asm_arm9.S
cpufunc_asm_armv4.S cpufunc_asm_armv5.S cpufunc_asm_fa526.S
cpufunc_asm_pj4b.S cpufunc_asm_sa1.S cpufunc_asm_xscale.S vectors.S

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/arm/bcopyinout.S
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/arm/bcopyinout_xscale.S \
src/sys/arch/arm/arm/cpufunc_asm_arm10.S \
src/sys/arch/arm/arm/cpufunc_asm_arm9.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/blockio.S \
src/sys/arch/arm/arm/cpufunc_asm_armv5.S
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/arm/copystr.S \
src/sys/arch/arm/arm/cpufunc_asm_pj4b.S
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm/cpu_in_cksum.S
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/cpufunc_asm_arm67.S \
src/sys/arch/arm/arm/cpufunc_asm_arm7tdmi.S \
src/sys/arch/arm/arm/cpufunc_asm_fa526.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm/cpufunc_asm_arm8.S \
src/sys/arch/arm/arm/vectors.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm/cpufunc_asm_armv4.S
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/arm/cpufunc_asm_sa1.S
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/arm/cpufunc_asm_xscale.S

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

Modified files:

Index: src/sys/arch/arm/arm/bcopyinout.S
diff -u src/sys/arch/arm/arm/bcopyinout.S:1.22 src/sys/arch/arm/arm/bcopyinout.S:1.23
--- src/sys/arch/arm/arm/bcopyinout.S:1.22	Fri Dec 11 09:14:19 2020
+++ src/sys/arch/arm/arm/bcopyinout.S	Thu Oct 20 06:58:38 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcopyinout.S,v 1.22 2020/12/11 09:14:19 dholland Exp $	*/
+/*	$NetBSD: bcopyinout.S,v 1.23 2022/10/20 06:58:38 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -52,14 +52,14 @@
 #include "bcopyinout_xscale.S"
 #else
 
-RCSID("$NetBSD: bcopyinout.S,v 1.22 2020/12/11 09:14:19 dholland Exp $")	
+RCSID("$NetBSD: bcopyinout.S,v 1.23 2022/10/20 06:58:38 skrll Exp $")
 
 	.text
 	.align	0
 
 #define SAVE_REGS	stmfd	sp!, {r4-r11}
 #define RESTORE_REGS	ldmfd	sp!, {r4-r11}
-		
+
 #if defined(__XSCALE__) || defined(_ARM_ARCH_6)
 #define HELLOCPP #
 #define PREFETCH(rx,o)	pld	[ rx , HELLOCPP (o) ]
@@ -78,7 +78,7 @@ RCSID("$NetBSD: bcopyinout.S,v 1.22 2020
  * r4-r11 are scratch
  */
 ENTRY(copyin)
-	/* Quick exit if length is zero */	
+	/* Quick exit if length is zero */
 	teq	r2, #0
 	moveq	r0, #0
 	RETc(eq)
@@ -291,7 +291,7 @@ END(copyin)
  */
 
 ENTRY(copyout)
-	/* Quick exit if length is zero */	
+	/* Quick exit if length is zero */
 	teq	r2, #0
 	moveq	r0, #0
 	moveq	pc, lr
@@ -494,7 +494,7 @@ END(copyout)
  */
 
 ENTRY(kcopy)
-	/* Quick exit if length is zero */	
+	/* Quick exit if length is zero */
 	teq	r2, #0
 	moveq	r0, #0
 	moveq	pc, lr

Index: src/sys/arch/arm/arm/bcopyinout_xscale.S
diff -u src/sys/arch/arm/arm/bcopyinout_xscale.S:1.11 src/sys/arch/arm/arm/bcopyinout_xscale.S:1.12
--- src/sys/arch/arm/arm/bcopyinout_xscale.S:1.11	Sun Dec  1 02:54:33 2013
+++ src/sys/arch/arm/arm/bcopyinout_xscale.S	Thu Oct 20 06:58:38 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcopyinout_xscale.S,v 1.11 2013/12/01 02:54:33 joerg Exp $	*/
+/*	$NetBSD: bcopyinout_xscale.S,v 1.12 2022/10/20 06:58:38 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -35,7 +35,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-RCSID("$NetBSD: bcopyinout_xscale.S,v 1.11 2013/12/01 02:54:33 joerg Exp $")	
+RCSID("$NetBSD: bcopyinout_xscale.S,v 1.12 2022/10/20 06:58:38 skrll Exp $")
 
 	.text
 	.align	0
@@ -292,10 +292,10 @@ ENTRY(copyin)
 	str	r6, [r1], #0x04
 	str	r7, [r1], #0x04
 .Lcopyin_bad1:
-	subs	r2, r2, #0x10 
+	subs	r2, r2, #0x10
 	bge	.Lcopyin_bad1_loop16
 
-	adds	r2, r2, #0x10 
+	adds	r2, r2, #0x10
 	popeq	{r4-r7}
 	RETc(eq)			/* Return now if done */
 	subs	r2, r2, #0x04
@@ -353,10 +353,10 @@ ENTRY(copyin)
 	str	r6, [r1], #0x04
 	str	r7, [r1], #0x04
 .Lcopyin_bad2:
-	subs	r2, r2, #0x10 
+	subs	r2, r2, #0x10
 	bge	.Lcopyin_bad2_loop16
 
-	adds	r2, r2, #0x10 
+	adds	r2, r2, #0x10
 	popeq	{r4-r7}
 	RETc(eq)			/* Return now if done */
 	subs	r2, r2, #0x04
@@ -414,10 +414,10 @@ ENTRY(copyin)
 	str	r6, [r1], #0x04
 	str	r7, [r1], #0x04
 .Lcopyin_bad3:
-	subs	r2, r2, #0x10 
+	subs	r2, r2, #0x10
 	bge	.Lcopyin_bad3_loop16
 
-	adds	r2, r2, #0x10 
+	adds	r2, r2, #0x10
 	popeq	{r4-r7}
 	RETc(eq)			/* Return now if done */
 	subs	r2, r2, #0x04
@@ -445,7 +445,7 @@ ENTRY(copyin)
 	pop	{r4-r7}
 	mov	r3, #0x00
 	adds	r2, r2, #0x04
-	RETc(eq)	
+	RETc(eq)
 .Lcopyin_l4_2:
 	rsbs	r2, r2, #0x03
 	addne	pc, pc, r2, lsl #3
@@ -732,10 +732,10 @@ ENTRY(copyout)
 	strt	r6, [r1], #0x04
 	strt	r7, [r1], 

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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 06:58:38 UTC 2022

Modified Files:
src/sys/arch/arm/arm: bcopyinout.S bcopyinout_xscale.S blockio.S
copystr.S cpu_in_cksum.S cpufunc_asm_arm10.S cpufunc_asm_arm67.S
cpufunc_asm_arm7tdmi.S cpufunc_asm_arm8.S cpufunc_asm_arm9.S
cpufunc_asm_armv4.S cpufunc_asm_armv5.S cpufunc_asm_fa526.S
cpufunc_asm_pj4b.S cpufunc_asm_sa1.S cpufunc_asm_xscale.S vectors.S

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/arm/bcopyinout.S
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/arm/bcopyinout_xscale.S \
src/sys/arch/arm/arm/cpufunc_asm_arm10.S \
src/sys/arch/arm/arm/cpufunc_asm_arm9.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm/blockio.S \
src/sys/arch/arm/arm/cpufunc_asm_armv5.S
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/arm/copystr.S \
src/sys/arch/arm/arm/cpufunc_asm_pj4b.S
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm/cpu_in_cksum.S
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/cpufunc_asm_arm67.S \
src/sys/arch/arm/arm/cpufunc_asm_arm7tdmi.S \
src/sys/arch/arm/arm/cpufunc_asm_fa526.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm/cpufunc_asm_arm8.S \
src/sys/arch/arm/arm/vectors.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/arm/cpufunc_asm_armv4.S
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/arm/cpufunc_asm_sa1.S
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/arm/cpufunc_asm_xscale.S

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



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 06:47:29 UTC 2022

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.140 src/sys/arch/aarch64/aarch64/pmap.c:1.141
--- src/sys/arch/aarch64/aarch64/pmap.c:1.140	Sat Oct 15 11:07:38 2022
+++ src/sys/arch/aarch64/aarch64/pmap.c	Thu Oct 20 06:47:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.140 2022/10/15 11:07:38 jmcneill Exp $	*/
+/*	$NetBSD: pmap.c,v 1.141 2022/10/20 06:47:29 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.140 2022/10/15 11:07:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.141 2022/10/20 06:47:29 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -844,7 +844,7 @@ pmap_extract_coherency(struct pmap *pm, 
 			 * have no physical memory haven't been mapped.
 			 * fast lookup by using the S1E1R/PAR_EL1 registers.
 			 */
-			register_t s = daif_disable(DAIF_I|DAIF_F);
+			register_t s = daif_disable(DAIF_I | DAIF_F);
 			reg_s1e1r_write(va);
 			isb();
 			uint64_t par = reg_par_el1_read();
@@ -1064,7 +1064,7 @@ _pmap_pte_adjust_prot(pt_entry_t pte, vm
 	pt_entry_t xn;
 
 	masked = prot & refmod;
-	pte &= ~(LX_BLKPAG_OS_RWMASK|LX_BLKPAG_AF|LX_BLKPAG_DBM|LX_BLKPAG_AP);
+	pte &= ~(LX_BLKPAG_OS_RWMASK | LX_BLKPAG_AF | LX_BLKPAG_DBM | LX_BLKPAG_AP);
 
 	/*
 	 * keep actual prot in the pte as OS_{READ|WRITE} for ref/mod emulation,
@@ -1072,9 +1072,9 @@ _pmap_pte_adjust_prot(pt_entry_t pte, vm
 	 */
 	pte |= LX_BLKPAG_OS_READ;	/* a valid pte can always be readable */
 	if (prot & VM_PROT_WRITE)
-		pte |= LX_BLKPAG_OS_WRITE|LX_BLKPAG_DBM;
+		pte |= LX_BLKPAG_OS_WRITE | LX_BLKPAG_DBM;
 
-	switch (masked & (VM_PROT_READ|VM_PROT_WRITE)) {
+	switch (masked & (VM_PROT_READ | VM_PROT_WRITE)) {
 	case 0:
 	default:
 		/*
@@ -1092,7 +1092,7 @@ _pmap_pte_adjust_prot(pt_entry_t pte, vm
 		pte |= LX_BLKPAG_AP_RO;
 		break;
 	case VM_PROT_WRITE:
-	case VM_PROT_READ|VM_PROT_WRITE:
+	case VM_PROT_READ | VM_PROT_WRITE:
 		/* fully readable and writable */
 		pte |= LX_BLKPAG_AF;
 		pte |= LX_BLKPAG_AP_RW;
@@ -1100,7 +1100,7 @@ _pmap_pte_adjust_prot(pt_entry_t pte, vm
 	}
 
 	/* executable for kernel or user? first set never exec both */
-	pte |= (LX_BLKPAG_UXN|LX_BLKPAG_PXN);
+	pte |= (LX_BLKPAG_UXN | LX_BLKPAG_PXN);
 	/* and either to executable */
 	xn = user ? LX_BLKPAG_UXN : LX_BLKPAG_PXN;
 	if (prot & VM_PROT_EXECUTE)
@@ -1115,7 +1115,7 @@ _pmap_pte_adjust_cacheflags(pt_entry_t p
 
 	pte &= ~LX_BLKPAG_ATTR_MASK;
 
-	switch (flags & (PMAP_CACHE_MASK|PMAP_DEV_MASK)) {
+	switch (flags & (PMAP_CACHE_MASK | PMAP_DEV_MASK)) {
 	case PMAP_DEV_NP ... PMAP_DEV_NP | PMAP_CACHE_MASK:
 		pte |= LX_BLKPAG_ATTR_DEVICE_MEM_NP;	/* Device-nGnRnE */
 		break;
@@ -1348,7 +1348,7 @@ _pmap_protect_pv(struct pmap_page *pp, s
 
 	/* get prot mask from pte */
 	pteprot = VM_PROT_READ;	/* a valid pte can always be readable */
-	if ((pte & (LX_BLKPAG_OS_WRITE|LX_BLKPAG_DBM)) != 0)
+	if ((pte & (LX_BLKPAG_OS_WRITE | LX_BLKPAG_DBM)) != 0)
 		pteprot |= VM_PROT_WRITE;
 	if (l3pte_executable(pte, user))
 		pteprot |= VM_PROT_EXECUTE;
@@ -2071,9 +2071,9 @@ _pmap_enter(struct pmap *pm, vaddr_t va,
 	 * read permission is treated as an access permission internally.
 	 * require to add PROT_READ even if only PROT_WRITE or PROT_EXEC
 	 */
-	if (prot & (VM_PROT_WRITE|VM_PROT_EXECUTE))
+	if (prot & (VM_PROT_WRITE | VM_PROT_EXECUTE))
 		prot |= VM_PROT_READ;
-	if (flags & (VM_PROT_WRITE|VM_PROT_EXECUTE))
+	if (flags & (VM_PROT_WRITE | VM_PROT_EXECUTE))
 		flags |= VM_PROT_READ;
 
 	mdattr = VM_PROT_READ | VM_PROT_WRITE;
@@ -2434,7 +2434,7 @@ pmap_page_protect(struct vm_page *pg, vm
 		return;
 	}
 
-	if ((prot & (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)) ==
+	if ((prot & (VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE)) ==
 	VM_PROT_NONE) {
 		pmap_page_remove(pp, prot);
 	} else {
@@ -2549,7 +2549,7 @@ pmap_fault_fixup(struct pmap *pm, vaddr_
 	 * If DBM is 1, it is considered a writable page.
 	 */
 	pmap_prot = VM_PROT_READ;
-	if ((pte & (LX_BLKPAG_OS_WRITE|LX_BLKPAG_DBM)) != 0)
+	if ((pte & (LX_BLKPAG_OS_WRITE | LX_BLKPAG_DBM)) != 0)
 		pmap_prot |= VM_PROT_WRITE;
 
 	if (l3pte_executable(pte, pm != pmap_kernel()))
@@ -2559,7 +2559,7 @@ pmap_fault_fixup(struct pmap *pm, vaddr_
 	va, pmap_prot, accessprot, 0);
 
 	/* ignore except read/write */
-	accessprot &= (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
+	accessprot &= (VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE);
 
 	/* PROT_EXEC requires implicit PROT_READ */
 	if (accessprot & VM_PROT_EXECUTE)



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

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 06:47:29 UTC 2022

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/aarch64/aarch64/pmap.c

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



CVS commit: src/sys/uvm/pmap

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 06:24:51 UTC 2022

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Add a KASSERT to check that tlb_asid_t is a large enough type.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/uvm/pmap/pmap_tlb.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/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.52 src/sys/uvm/pmap/pmap_tlb.c:1.53
--- src/sys/uvm/pmap/pmap_tlb.c:1.52	Fri Mar  4 08:11:48 2022
+++ src/sys/uvm/pmap/pmap_tlb.c	Thu Oct 20 06:24:51 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.52 2022/03/04 08:11:48 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.53 2022/10/20 06:24:51 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.52 2022/03/04 08:11:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.53 2022/10/20 06:24:51 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -384,6 +384,7 @@ pmap_tlb_info_init(struct pmap_tlb_info 
 		ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max);
 	}
 
+	KASSERT(__type_fit(tlb_asid_t, ti->ti_asid_max + 1));
 	KASSERT(ti->ti_asid_max < PMAP_TLB_BITMAP_LENGTH);
 }
 



CVS commit: src/sys/uvm/pmap

2022-10-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 20 06:24:51 UTC 2022

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
Add a KASSERT to check that tlb_asid_t is a large enough type.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/uvm/pmap/pmap_tlb.c

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