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

2023-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Aug  5 03:13:57 UTC 2023

Modified Files:
src/distrib/sets/lists/debug: ad.aarch64 md.amd64

Log Message:
revert debug data for libtsan to previous version, too.

XXX Perhaps this should be done by obsoleting the 2.0 file?  For now
XXX this will require manual cleaning of the no-longer-used 2.0 file.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/debug/ad.aarch64
cvs rdiff -u -r1.117 -r1.118 src/distrib/sets/lists/debug/md.amd64

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/debug/ad.aarch64
diff -u src/distrib/sets/lists/debug/ad.aarch64:1.34 src/distrib/sets/lists/debug/ad.aarch64:1.35
--- src/distrib/sets/lists/debug/ad.aarch64:1.34	Fri Aug  4 08:54:00 2023
+++ src/distrib/sets/lists/debug/ad.aarch64	Sat Aug  5 03:13:57 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.34 2023/08/04 08:54:00 mrg Exp $
+# $NetBSD: ad.aarch64,v 1.35 2023/08/05 03:13:57 pgoyette Exp $
 ./usr/lib/eabi/libarm_g.a	comp-sys-debug	debuglib,compat,llvm
 ./usr/lib/eabi/libc_vfp_g.a	comp-sys-debug	debuglib,compat,llvm
 ./usr/lib/eabihf/libarm_g.a	comp-sys-debug	debuglib,compat,llvm
@@ -20,7 +20,7 @@
 ./usr/libdata/debug/usr/lib/eabi/libc_vfp.so.0.0.debug		comp-sys-debug	debug,compat,pic,llvm
 ./usr/libdata/debug/usr/lib/eabi/libproc.so.1.0.debug		comp-sys-debug	debug,compat,pic,llvm,dtrace
 ./usr/libdata/debug/usr/lib/eabi/librtld_db.so.0.0.debug	comp-sys-debug	debug,compat,pic,llvm,dtrace
-./usr/libdata/debug/usr/lib/libtsan.so.2.0.debug		comp-sys-debug	debug,cxx,gcc=12
+./usr/libdata/debug/usr/lib/libtsan.so.1.0.debug		comp-sys-debug	debug,cxx,gcc=12
 ./usr/libdata/debug/usr/lib/eabihfcomp-sys-debug	compat,llvm
 ./usr/libdata/debug/usr/lib/eabihf/i18ncomp-sys-debug	compat,llvm
 ./usr/libdata/debug/usr/lib/eabihf/libarm.so.0.0.debug		comp-sys-debug	debug,compat,pic,llvm

Index: src/distrib/sets/lists/debug/md.amd64
diff -u src/distrib/sets/lists/debug/md.amd64:1.117 src/distrib/sets/lists/debug/md.amd64:1.118
--- src/distrib/sets/lists/debug/md.amd64:1.117	Fri Aug  4 08:54:00 2023
+++ src/distrib/sets/lists/debug/md.amd64	Sat Aug  5 03:13:57 2023
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.117 2023/08/04 08:54:00 mrg Exp $
+# $NetBSD: md.amd64,v 1.118 2023/08/05 03:13:57 pgoyette Exp $
 ./usr/libdata/debug/usr/bin/gdbserver.debug	base-util-debug		gdb,debug
 ./usr/lib/i386/12.202++_g.a			comp-c-debuglib		debuglib,compat,12.202xx
 ./usr/lib/i386/libi386_g.a			comp-c-debuglib		debuglib,compat
@@ -12,7 +12,7 @@
 ./usr/libdata/debug/usr/lib/i386/libpam.so.4.1.debug	comp-compat-shlib	compat,pic,debug,pam
 ./usr/libdata/debug/usr/lib/i386/libproc.so.1.0.debug	comp-compat-shlib	compat,pic,debug,dtrace
 ./usr/libdata/debug/usr/lib/i386/librtld_db.so.0.0.debug	comp-compat-shlib	compat,pic,debug,dtrace
-./usr/libdata/debug/usr/lib/libtsan.so.2.0.debug		comp-sys-debug	debug,cxx,gcc
+./usr/libdata/debug/usr/lib/libtsan.so.1.0.debug		comp-sys-debug	debug,cxx,gcc
 ./usr/libdata/debug/usr/lib/libx86_64.so.0.0.debug	comp-sys-shlib		pic,debug
 ./usr/libdata/debug/usr/libexec/ld.elf_so-i386	comp-obsolete	obsolete
 ./usr/libdata/debug/usr/libexec/ld.elf_so-i386.debug	comp-sys-debug		debug,compat



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

2023-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Aug  5 03:13:57 UTC 2023

Modified Files:
src/distrib/sets/lists/debug: ad.aarch64 md.amd64

Log Message:
revert debug data for libtsan to previous version, too.

XXX Perhaps this should be done by obsoleting the 2.0 file?  For now
XXX this will require manual cleaning of the no-longer-used 2.0 file.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/debug/ad.aarch64
cvs rdiff -u -r1.117 -r1.118 src/distrib/sets/lists/debug/md.amd64

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



CVS commit: src/distrib/sets/lists

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 20:56:08 UTC 2023

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
t_ubsan, t_ubsanxx: Remove gcc=10, gcc=12 conditionals.

These are built unconditionally.  Should help fix the clang build.


To generate a diff of this commit:
cvs rdiff -u -r1.414 -r1.415 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1284 -r1.1285 src/distrib/sets/lists/tests/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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.414 src/distrib/sets/lists/debug/mi:1.415
--- src/distrib/sets/lists/debug/mi:1.414	Fri Aug  4 08:54:00 2023
+++ src/distrib/sets/lists/debug/mi	Fri Aug  4 20:56:08 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.414 2023/08/04 08:54:00 mrg Exp $
+# $NetBSD: mi,v 1.415 2023/08/04 20:56:08 riastradh Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2072,10 +2072,8 @@
 ./usr/libdata/debug/usr/tests/lib/libc/membar/t_dekker.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/membar/t_seqlock.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/membar/t_spinlock.debug		tests-lib-debug		debug,atf,compattestfile
-./usr/libdata/debug/usr/tests/lib/libc/misc/t_ubsan.debug		tests-lib-debug		debug,atf,compattestfile,gcc=10
-./usr/libdata/debug/usr/tests/lib/libc/misc/t_ubsan.debug		tests-lib-debug		debug,atf,compattestfile,gcc=12
-./usr/libdata/debug/usr/tests/lib/libc/misc/t_ubsanxx.debug		tests-lib-debug		debug,atf,compattestfile,gcc=10
-./usr/libdata/debug/usr/tests/lib/libc/misc/t_ubsanxx.debug		tests-lib-debug		debug,atf,compattestfile,gcc=12
+./usr/libdata/debug/usr/tests/lib/libc/misc/t_ubsan.debug		tests-lib-debug		debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/lib/libc/misc/t_ubsanxx.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/net/getaddrinfo/h_gai.debug	tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/net/h_dns_server.debug		tests-lib-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/lib/libc/net/h_hostent.debug		tests-lib-debug		debug,atf,compattestfile

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1284 src/distrib/sets/lists/tests/mi:1.1285
--- src/distrib/sets/lists/tests/mi:1.1284	Thu Aug  3 18:48:42 2023
+++ src/distrib/sets/lists/tests/mi	Fri Aug  4 20:56:08 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1284 2023/08/03 18:48:42 rillig Exp $
+# $NetBSD: mi,v 1.1285 2023/08/04 20:56:08 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3061,10 +3061,8 @@
 ./usr/tests/lib/libc/misctests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/misc/Atffile			tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/misc/Kyuafile			tests-lib-tests		compattestfile,atf,kyua
-./usr/tests/lib/libc/misc/t_ubsan			tests-lib-tests		compattestfile,atf,gcc=10
-./usr/tests/lib/libc/misc/t_ubsan			tests-lib-tests		compattestfile,atf,gcc=12
-./usr/tests/lib/libc/misc/t_ubsanxx			tests-lib-tests		compattestfile,atf,gcc=10
-./usr/tests/lib/libc/misc/t_ubsanxx			tests-lib-tests		compattestfile,atf,gcc=12
+./usr/tests/lib/libc/misc/t_ubsan			tests-lib-tests		compattestfile,atf
+./usr/tests/lib/libc/misc/t_ubsanxx			tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/nettests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/net/Atffile			tests-lib-tests		compattestfile,atf
 ./usr/tests/lib/libc/net/Kyuafile			tests-lib-tests		compattestfile,atf,kyua



CVS commit: src/distrib/sets/lists

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 20:56:08 UTC 2023

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
t_ubsan, t_ubsanxx: Remove gcc=10, gcc=12 conditionals.

These are built unconditionally.  Should help fix the clang build.


To generate a diff of this commit:
cvs rdiff -u -r1.414 -r1.415 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1284 -r1.1285 src/distrib/sets/lists/tests/mi

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



CVS commit: [netbsd-10] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:55:08 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #311 and #312


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.96 -r1.1.2.97 src/doc/CHANGES-10.0

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



CVS commit: [netbsd-10] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:55:08 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #311 and #312


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.96 -r1.1.2.97 src/doc/CHANGES-10.0

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-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.96 src/doc/CHANGES-10.0:1.1.2.97
--- src/doc/CHANGES-10.0:1.1.2.96	Fri Aug  4 15:03:43 2023
+++ src/doc/CHANGES-10.0	Fri Aug  4 19:55:08 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.96 2023/08/04 15:03:43 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.97 2023/08/04 19:55:08 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -3618,3 +3618,14 @@ sys/netinet6/ip6_output.c			1.234
 	in6: fixes for IPv6-disabled interfaces.
 	[ozaki-r, ticket #310]
 
+sys/dev/usb/umodeswitch.c			1.6
+
+	Add support for D-Link DWM-222 4G LTS USB adapter.
+	[manu, ticket #311]
+
+sys/arch/xen/xen/xennetback_xenbus.c		1.113-1.115
+
+	xvif(4): Revert the changes that caused PR 57560 pending
+	investigation.
+	[riastradh, ticket #312]
+



CVS commit: [netbsd-10] src/sys/arch/xen/xen

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:53:43 UTC 2023

Modified Files:
src/sys/arch/xen/xen [netbsd-10]: xennetback_xenbus.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #312):

sys/arch/xen/xen/xennetback_xenbus.c: revision 1.113
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.114
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.115

Revert "xennetback(4): Omit needless membars in xennetback_connect."
PR kern/57560

Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."
PR kern/57560

Revert "xennetback(4): Fix xennetback_evthandler loop."
PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.108.4.1 -r1.108.4.2 src/sys/arch/xen/xen/xennetback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.108.4.1 src/sys/arch/xen/xen/xennetback_xenbus.c:1.108.4.2
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.108.4.1	Mon Jul 31 15:23:02 2023
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Fri Aug  4 19:53:43 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.108.4.1 2023/07/31 15:23:02 martin Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.108.4.2 2023/08/04 19:53:43 martin Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.108.4.1 2023/07/31 15:23:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.108.4.2 2023/08/04 19:53:43 martin Exp $");
 
 #include 
 #include 
@@ -497,7 +497,9 @@ xennetback_connect(struct xnetback_insta
 		goto err2;
 	}
 	xneti->xni_evtchn = evop.u.bind_interdomain.local_port;
+	xen_wmb();
 	xneti->xni_status = CONNECTED;
+	xen_wmb();
 
 	xneti->xni_ih = xen_intr_establish_xname(-1, _pic,
 	xneti->xni_evtchn, IST_LEVEL, IPL_NET, xennetback_evthandler,
@@ -803,7 +805,7 @@ xennetback_evthandler(void *arg)
 	netif_tx_request_t txreq;
 	struct mbuf *m, *m0 = NULL, *mlast = NULL;
 	int receive_pending;
-	RING_IDX req_cons, req_prod;
+	RING_IDX req_cons;
 	int queued = 0, m0_len = 0;
 	struct xnetback_xstate *xst;
 	const bool discard = ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) !=
@@ -811,12 +813,17 @@ xennetback_evthandler(void *arg)
 
 	XENPRINTF(("xennetback_evthandler "));
 	req_cons = xneti->xni_txring.req_cons;
-again:
-	req_prod = xneti->xni_txring.sring->req_prod;
-	xen_rmb();
-	while (req_cons != req_prod) {
+	while (1) {
+		xen_rmb(); /* be sure to read the request before updating */
+		xneti->xni_txring.req_cons = req_cons;
+		xen_wmb();
+		RING_FINAL_CHECK_FOR_REQUESTS(>xni_txring,
+		receive_pending);
+		if (receive_pending == 0)
+			break;
 		RING_COPY_REQUEST(>xni_txring, req_cons,
 		);
+		xen_rmb();
 		XENPRINTF(("%s pkt size %d\n", xneti->xni_if.if_xname,
 		txreq.size));
 		req_cons++;
@@ -955,12 +962,6 @@ mbuf_fail:
 			queued = 0;
 		}
 	}
-	xen_wmb();
-	RING_FINAL_CHECK_FOR_REQUESTS(>xni_txring, receive_pending);
-	if (receive_pending)
-		goto again;
-	xneti->xni_txring.req_cons = req_cons;
-
 	if (m0) {
 		/* Queue empty, and still unfinished multi-fragment request */
 		printf("%s: dropped unfinished multi-fragment\n",
@@ -1020,13 +1021,14 @@ xennetback_rx_copy_process(struct ifnet 
 	}
 
 	/* update pointer */
+	xen_rmb();
 	xneti->xni_rxring.req_cons += queued;
 	xneti->xni_rxring.rsp_prod_pvt += queued;
 	RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(>xni_rxring, notify);
 
 	/* send event */
 	if (notify) {
-		xen_wmb();
+		xen_rmb();
 		XENPRINTF(("%s receive event\n",
 		xneti->xni_if.if_xname));
 		hypervisor_notify_via_evtchn(xneti->xni_evtchn);



CVS commit: [netbsd-10] src/sys/arch/xen/xen

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:53:43 UTC 2023

Modified Files:
src/sys/arch/xen/xen [netbsd-10]: xennetback_xenbus.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #312):

sys/arch/xen/xen/xennetback_xenbus.c: revision 1.113
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.114
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.115

Revert "xennetback(4): Omit needless membars in xennetback_connect."
PR kern/57560

Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."
PR kern/57560

Revert "xennetback(4): Fix xennetback_evthandler loop."
PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.108.4.1 -r1.108.4.2 src/sys/arch/xen/xen/xennetback_xenbus.c

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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:51:59 UTC 2023

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

Log Message:
Ticket #1709


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.87 -r1.1.2.88 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.87 src/doc/CHANGES-9.4:1.1.2.88
--- src/doc/CHANGES-9.4:1.1.2.87	Fri Aug  4 15:11:22 2023
+++ src/doc/CHANGES-9.4	Fri Aug  4 19:51:59 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.87 2023/08/04 15:11:22 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.88 2023/08/04 19:51:59 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -1983,3 +1983,8 @@ sys/net/bpf.c	(apply patch)
 	bpf: allow to read with no filter.
 	[ozaki-r, ticket #1708]
 
+sys/dev/usb/umodeswitch.c			1.6
+
+	Add support for D-Link DWM-222 4G LTS USB adapter.
+	[manu, ticket #1709]
+



CVS commit: [netbsd-9] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:51:59 UTC 2023

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

Log Message:
Ticket #1709


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.87 -r1.1.2.88 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/sys/dev/usb

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:51:03 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by manu in ticket #1709):

sys/dev/usb/umodeswitch.c: revision 1.6

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.


To generate a diff of this commit:
cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/sys/dev/usb/umodeswitch.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/umodeswitch.c
diff -u src/sys/dev/usb/umodeswitch.c:1.4.6.1 src/sys/dev/usb/umodeswitch.c:1.4.6.2
--- src/sys/dev/usb/umodeswitch.c:1.4.6.1	Thu Feb 27 17:22:56 2020
+++ src/sys/dev/usb/umodeswitch.c	Fri Aug  4 19:51:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodeswitch.c,v 1.4.6.1 2020/02/27 17:22:56 martin Exp $	*/
+/*	$NetBSD: umodeswitch.c,v 1.4.6.2 2023/08/04 19:51:03 martin Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.4.6.1 2020/02/27 17:22:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.4.6.2 2023/08/04 19:51:03 martin Exp $");
 
 #include 
 #include 
@@ -440,6 +440,7 @@ umodeswitch_match(device_t parent, cfdat
 		switch (uaa->uaa_product) {
 		case USB_PRODUCT_DLINK_DWM157E_CD:
 		case USB_PRODUCT_DLINK_DWM157_CD:
+		case USB_PRODUCT_DLINK_DWM222_CD:
 			(void)u3g_bulk_ata_eject(uaa->uaa_device);
 			(void)u3g_bulk_scsi_eject(uaa->uaa_device);
 			return UMATCH_HIGHEST;



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:51:03 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by manu in ticket #1709):

sys/dev/usb/umodeswitch.c: revision 1.6

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.


To generate a diff of this commit:
cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/sys/dev/usb/umodeswitch.c

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



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:48:57 UTC 2023

Modified Files:
src/sys/dev/usb [netbsd-10]: umodeswitch.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #311):

sys/dev/usb/umodeswitch.c: revision 1.6

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.24.1 src/sys/dev/usb/umodeswitch.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/umodeswitch.c
diff -u src/sys/dev/usb/umodeswitch.c:1.5 src/sys/dev/usb/umodeswitch.c:1.5.24.1
--- src/sys/dev/usb/umodeswitch.c:1.5	Sat Feb 15 02:14:02 2020
+++ src/sys/dev/usb/umodeswitch.c	Fri Aug  4 19:48:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodeswitch.c,v 1.5 2020/02/15 02:14:02 manu Exp $	*/
+/*	$NetBSD: umodeswitch.c,v 1.5.24.1 2023/08/04 19:48:57 martin Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.5 2020/02/15 02:14:02 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.5.24.1 2023/08/04 19:48:57 martin Exp $");
 
 #include 
 #include 
@@ -440,6 +440,7 @@ umodeswitch_match(device_t parent, cfdat
 		switch (uaa->uaa_product) {
 		case USB_PRODUCT_DLINK_DWM157E_CD:
 		case USB_PRODUCT_DLINK_DWM157_CD:
+		case USB_PRODUCT_DLINK_DWM222_CD:
 			(void)u3g_bulk_ata_eject(uaa->uaa_device);
 			(void)u3g_bulk_scsi_eject(uaa->uaa_device);
 			return UMATCH_HIGHEST;



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 19:48:57 UTC 2023

Modified Files:
src/sys/dev/usb [netbsd-10]: umodeswitch.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #311):

sys/dev/usb/umodeswitch.c: revision 1.6

Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.24.1 src/sys/dev/usb/umodeswitch.c

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



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/lsan

2023-08-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Aug  4 19:25:06 UTC 2023

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_allocator.h

Log Message:
allow this to build on powerpc*.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h:1.8 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h:1.9
--- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h:1.8	Fri Aug  4 07:40:04 2023
+++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h	Fri Aug  4 19:25:06 2023
@@ -53,7 +53,8 @@ struct ChunkMetadata {
 defined(__arm__) || SANITIZER_RISCV64 || defined(__hexagon__) || \
 ((defined(__hppa__) || defined(__sparc__)) && !defined(_LP64)) || \
 defined(__mips_o32) || defined(__mips_n32) || defined(__m68k__) || \
-(defined(__riscv__) && !defined(_LP64))
+(defined(__riscv__) && !defined(_LP64)) || \
+(defined(__powerpc__) && !defined(__powerpc64__))
 template 
 struct AP32 {
   static const uptr kSpaceBeg = 0;
@@ -70,7 +71,7 @@ using PrimaryAllocatorASVT = SizeClassAl
 using PrimaryAllocator = PrimaryAllocatorASVT;
 #elif defined(__x86_64__) || defined(__powerpc64__) || defined(__s390x__) || \
   defined(__alpha__) || defined(__sparc64__) || defined(__ia64__) || \
-  (defined(__riscv__) && !defined(_LP64))
+  defined(__powerpc64__) || (defined(__riscv__) && !defined(_LP64))
 # if SANITIZER_FUCHSIA
 const uptr kAllocatorSpace = ~(uptr)0;
 const uptr kAllocatorSize  =  0x400ULL;  // 4T.



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/lsan

2023-08-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Aug  4 19:25:06 UTC 2023

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_allocator.h

Log Message:
allow this to build on powerpc*.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h

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



CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 19:17:00 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel I226 devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1486 -r1.1487 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 19:17:27 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1467 -r1.1468 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1466 -r1.1467 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 19:17:00 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel I226 devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1486 -r1.1487 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1486 src/sys/dev/pci/pcidevs:1.1487
--- src/sys/dev/pci/pcidevs:1.1486	Fri Aug  4 19:11:38 2023
+++ src/sys/dev/pci/pcidevs	Fri Aug  4 19:17:00 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1486 2023/08/04 19:11:38 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1487 2023/08/04 19:17:00 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4246,6 +4246,9 @@ product INTEL 82441FX		0x1237	82441FX (P
 product INTEL 82380AB		0x123c	82380AB (MISA) Mobile PCI-ISA Bridge
 product INTEL 82380FB		0x124b	82380FB (MPCI2) Mobile PCI-PCI Bridge
 product INTEL 82439HX		0x1250	82439HX (TXC) System Controller
+product INTEL I226_LM		0x125b	I226-LM Ethernet
+product INTEL I226_V		0x125c	I226-V Ethernet
+product INTEL I226_IT		0x125d	I226-IT Ethernet
 product INTEL C3K_X553_10G	0x1306	C3000 X553 10G Ethernet
 product INTEL C3K_X553_1G	0x1307	C3000 X553 1G Ethernet
 product INTEL 82870P2_PPB	0x1460	82870P2 P64H2 PCI-PCI Bridge



CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 19:11:39 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Fix some descriptions of Intel Snow Ridge.


To generate a diff of this commit:
cvs rdiff -u -r1.1485 -r1.1486 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1485 src/sys/dev/pci/pcidevs:1.1486
--- src/sys/dev/pci/pcidevs:1.1485	Fri Aug  4 12:48:00 2023
+++ src/sys/dev/pci/pcidevs	Fri Aug  4 19:11:38 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1485 2023/08/04 12:48:00 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1486 2023/08/04 19:11:38 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -4397,15 +4397,15 @@ product INTEL SNR_E882_L_SFP	0x1898	Snow
 product INTEL SNR_E882_L_10GT	0x1899	Snow Ridge E882-L/X557-AT 10GBASE-T
 product INTEL SNR_E882_L_1G	0x189a	Snow Ridge E882-L 1G
 product INTEL SNR_QAT_18	0x18a0	Snow Ridge QAT 1.8
-product INTEL SNR_PCH_C2_RP_11	0x18a2	Snow Ridge PCH PCIe Cluster 0, RP 11
+product INTEL SNR_PCH_C2_RP_11	0x18a2	Snow Ridge PCH PCIe Cluster 2, RP 11
 product INTEL SNR_PCH_C0_RP_0	0x18a4	Snow Ridge PCH PCIe Cluster 0, RP 0
 product INTEL SNR_PCH_C0_RP_1	0x18a5	Snow Ridge PCH PCIe Cluster 0, RP 1
 product INTEL SNR_PCH_C0_RP_2	0x18a6	Snow Ridge PCH PCIe Cluster 0, RP 2
 product INTEL SNR_PCH_C0_RP_3	0x18a7	Snow Ridge PCH PCIe Cluster 0, RP 3
 product INTEL SNR_SMB_HOST	0x18ac	Snow Ridge Host (DMA) SMBus
-product INTEL SNR_PCH_C2_RP_8	0x18ad	Snow Ridge PCH PCIe Cluster 0, RP 8
-product INTEL SNR_PCH_C2_RP_9	0x18ae	Snow Ridge PCH PCIe Cluster 0, RP 9
-product INTEL SNR_PCH_C2_RP_10	0x18af	Snow Ridge PCH PCIe Cluster 0, RP 10
+product INTEL SNR_PCH_C2_RP_8	0x18ad	Snow Ridge PCH PCIe Cluster 2, RP 8
+product INTEL SNR_PCH_C2_RP_9	0x18ae	Snow Ridge PCH PCIe Cluster 2, RP 9
+product INTEL SNR_PCH_C2_RP_10	0x18af	Snow Ridge PCH PCIe Cluster 2, RP 10
 product INTEL SNR_SATA_0	0x18b3	Snow Ridge SATA 0
 product INTEL SNR_USB		0x18d0	Snow Ridge USB
 product INTEL SNR_NIS		0x18d1	Snow Ridge VRP to NIS
@@ -5480,7 +5480,7 @@ product INTEL 82X58_QP1_P1	0x3428	5520/5
 product INTEL 82X58_IOXAPIC	0x342d	5520/5500/X58 IOxAPIC
 product INTEL 82X58_MISC	0x342e	5520/5500/X58 Misc
 product INTEL 82X58_THROTTLE	0x3438	5520/5500/X58 Throttling
-product INTEL SNR_SMB_SPD	0x3448	Snow Ridge SPD0 SMBus
+product INTEL SNR_SMB_SPD	0x3448	Snow Ridge SPD SMBus
 product INTEL SNR_IMC		0x344a	Snow Ridge IMC
 product INTEL SNR_MCC		0x344c	Snow Ridge Mesh Credit Configuration
 product INTEL SNR_IMC_CM	0x344d	Snow Ridge IMC Channel Mapping



CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 19:11:39 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Fix some descriptions of Intel Snow Ridge.


To generate a diff of this commit:
cvs rdiff -u -r1.1485 -r1.1486 src/sys/dev/pci/pcidevs

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



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

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 18:41:01 UTC 2023

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

Log Message:
Revert "xennetback(4): Fix xennetback_evthandler loop."

PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/xen/xen/xennetback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.114 src/sys/arch/xen/xen/xennetback_xenbus.c:1.115
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.114	Fri Aug  4 18:40:49 2023
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Fri Aug  4 18:41:01 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.114 2023/08/04 18:40:49 riastradh Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.115 2023/08/04 18:41:01 riastradh Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.114 2023/08/04 18:40:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.115 2023/08/04 18:41:01 riastradh Exp $");
 
 #include 
 #include 
@@ -805,7 +805,7 @@ xennetback_evthandler(void *arg)
 	netif_tx_request_t txreq;
 	struct mbuf *m, *m0 = NULL, *mlast = NULL;
 	int receive_pending;
-	RING_IDX req_cons, req_prod;
+	RING_IDX req_cons;
 	int queued = 0, m0_len = 0;
 	struct xnetback_xstate *xst;
 	const bool discard = ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) !=
@@ -813,12 +813,17 @@ xennetback_evthandler(void *arg)
 
 	XENPRINTF(("xennetback_evthandler "));
 	req_cons = xneti->xni_txring.req_cons;
-again:
-	req_prod = xneti->xni_txring.sring->req_prod;
-	xen_rmb();
-	while (req_cons != req_prod) {
+	while (1) {
+		xen_rmb(); /* be sure to read the request before updating */
+		xneti->xni_txring.req_cons = req_cons;
+		xen_wmb();
+		RING_FINAL_CHECK_FOR_REQUESTS(>xni_txring,
+		receive_pending);
+		if (receive_pending == 0)
+			break;
 		RING_COPY_REQUEST(>xni_txring, req_cons,
 		);
+		xen_rmb();
 		XENPRINTF(("%s pkt size %d\n", xneti->xni_if.if_xname,
 		txreq.size));
 		req_cons++;
@@ -957,12 +962,6 @@ mbuf_fail:
 			queued = 0;
 		}
 	}
-	xen_wmb();
-	RING_FINAL_CHECK_FOR_REQUESTS(>xni_txring, receive_pending);
-	if (receive_pending)
-		goto again;
-	xneti->xni_txring.req_cons = req_cons;
-
 	if (m0) {
 		/* Queue empty, and still unfinished multi-fragment request */
 		printf("%s: dropped unfinished multi-fragment\n",



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

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 18:41:01 UTC 2023

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

Log Message:
Revert "xennetback(4): Fix xennetback_evthandler loop."

PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 18:40:49 UTC 2023

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

Log Message:
Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."

PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/xen/xen/xennetback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.113 src/sys/arch/xen/xen/xennetback_xenbus.c:1.114
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.113	Fri Aug  4 18:40:36 2023
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Fri Aug  4 18:40:49 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.113 2023/08/04 18:40:36 riastradh Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.114 2023/08/04 18:40:49 riastradh Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.113 2023/08/04 18:40:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.114 2023/08/04 18:40:49 riastradh Exp $");
 
 #include 
 #include 
@@ -1022,13 +1022,14 @@ xennetback_rx_copy_process(struct ifnet 
 	}
 
 	/* update pointer */
+	xen_rmb();
 	xneti->xni_rxring.req_cons += queued;
 	xneti->xni_rxring.rsp_prod_pvt += queued;
 	RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(>xni_rxring, notify);
 
 	/* send event */
 	if (notify) {
-		xen_wmb();
+		xen_rmb();
 		XENPRINTF(("%s receive event\n",
 		xneti->xni_if.if_xname));
 		hypervisor_notify_via_evtchn(xneti->xni_evtchn);



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

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 18:40:49 UTC 2023

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

Log Message:
Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."

PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 18:40:36 UTC 2023

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

Log Message:
Revert "xennetback(4): Omit needless membars in xennetback_connect."

PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/xen/xen/xennetback_xenbus.c

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

Modified files:

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.112 src/sys/arch/xen/xen/xennetback_xenbus.c:1.113
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.112	Sat Feb 25 00:37:47 2023
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Fri Aug  4 18:40:36 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.112 2023/02/25 00:37:47 riastradh Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.113 2023/08/04 18:40:36 riastradh Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.112 2023/02/25 00:37:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.113 2023/08/04 18:40:36 riastradh Exp $");
 
 #include 
 #include 
@@ -497,7 +497,9 @@ xennetback_connect(struct xnetback_insta
 		goto err2;
 	}
 	xneti->xni_evtchn = evop.u.bind_interdomain.local_port;
+	xen_wmb();
 	xneti->xni_status = CONNECTED;
+	xen_wmb();
 
 	xneti->xni_ih = xen_intr_establish_xname(-1, _pic,
 	xneti->xni_evtchn, IST_LEVEL, IPL_NET, xennetback_evthandler,



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

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 18:40:36 UTC 2023

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

Log Message:
Revert "xennetback(4): Omit needless membars in xennetback_connect."

PR kern/57560


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/xen/xen/xennetback_xenbus.c

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



CVS commit: src/external/gpl3/gcc/usr.bin

2023-08-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  4 17:17:06 UTC 2023

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
gcc/usr.bin: Sprinkle -fno-jump-tables more for m68k and friends

Now, gcc builds for m68k native.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/external/gpl3/gcc/usr.bin/Makefile.inc

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.38 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.39
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.38	Thu Aug  3 01:36:55 2023
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Fri Aug  4 17:17:06 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.38 2023/08/03 01:36:55 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.39 2023/08/04 17:17:06 rin Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1
@@ -88,6 +88,8 @@ CFLAGS+=	-Wno-format-diag
 .if ${GCC_MACHINE_ARCH} == "m68000" || ${GCC_MACHINE_ARCH} == "m68k" || \
 	${GCC_MACHINE_ARCH} == "coldfire"
 COPTS.c-omp.cc+=-fno-jump-tables
+COPTS.generic-match.cc+=-fno-jump-tables
+COPTS.gimple-match.cc+=-fno-jump-tables
 .endif
 
 .endif



CVS commit: src/external/gpl3/gcc/usr.bin

2023-08-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  4 17:17:06 UTC 2023

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
gcc/usr.bin: Sprinkle -fno-jump-tables more for m68k and friends

Now, gcc builds for m68k native.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/external/gpl3/gcc/usr.bin/Makefile.inc

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



CVS commit: src/sys/kern

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 16:02:01 UTC 2023

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
entropy(9): Disable !cold assertion in rump for now.

Evidently rump starts threads before it sets cold = 0, and deferring
the call to rump_thread_allow(NULL) in rump.c rump_init_callback
until after setting cold = 0 doesn't work either -- rump kernels just
hang.  To be investigated -- for now, let's just stop breaking
thousands of tests.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/kern/kern_entropy.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/kern/kern_entropy.c
diff -u src/sys/kern/kern_entropy.c:1.63 src/sys/kern/kern_entropy.c:1.64
--- src/sys/kern/kern_entropy.c:1.63	Fri Aug  4 07:38:53 2023
+++ src/sys/kern/kern_entropy.c	Fri Aug  4 16:02:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_entropy.c,v 1.63 2023/08/04 07:38:53 riastradh Exp $	*/
+/*	$NetBSD: kern_entropy.c,v 1.64 2023/08/04 16:02:01 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.63 2023/08/04 07:38:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.64 2023/08/04 16:02:01 riastradh Exp $");
 
 #include 
 #include 
@@ -1115,7 +1115,9 @@ entropy_thread(void *cookie)
 {
 	bool consolidate;
 
+#ifndef _RUMPKERNEL		/* XXX rump starts threads before cold */
 	KASSERT(!cold);
+#endif
 
 	for (;;) {
 		/*



CVS commit: src/sys/kern

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 16:02:01 UTC 2023

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
entropy(9): Disable !cold assertion in rump for now.

Evidently rump starts threads before it sets cold = 0, and deferring
the call to rump_thread_allow(NULL) in rump.c rump_init_callback
until after setting cold = 0 doesn't work either -- rump kernels just
hang.  To be investigated -- for now, let's just stop breaking
thousands of tests.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/kern/kern_entropy.c

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



CVS commit: src/share/misc

2023-08-04 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Aug  4 15:42:09 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+RAT   register allocation table


To generate a diff of this commit:
cvs rdiff -u -r1.359 -r1.360 src/share/misc/acronyms.comp

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



CVS commit: src/share/misc

2023-08-04 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Aug  4 15:42:09 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+RAT   register allocation table


To generate a diff of this commit:
cvs rdiff -u -r1.359 -r1.360 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.359 src/share/misc/acronyms.comp:1.360
--- src/share/misc/acronyms.comp:1.359	Fri Aug  4 03:59:00 2023
+++ src/share/misc/acronyms.comp	Fri Aug  4 15:42:09 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.359 2023/08/04 03:59:00 gutteridge Exp $
+$NetBSD: acronyms.comp,v 1.360 2023/08/04 15:42:09 jschauma Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1354,6 +1354,7 @@ RAS	reliability, availability and servic
 RAS	remote access service
 RAS	restartable atomic sequence
 RAS	row address strobe
+RAT	register allocation table
 RBF	radial basis function
 RBL reputation block list
 RBL real-time blackhole list



CVS commit: src/bin/sh

2023-08-04 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Aug  4 15:31:40 UTC 2023

Modified Files:
src/bin/sh: sh.1

Log Message:
tyops:
* redicection -> redirection
* escaoed -> escaped

Noted by J. Lewis Muir on netbsd-docs@


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/bin/sh/sh.1

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

Modified files:

Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.255 src/bin/sh/sh.1:1.256
--- src/bin/sh/sh.1:1.255	Tue Dec 20 17:51:54 2022
+++ src/bin/sh/sh.1	Fri Aug  4 15:31:40 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sh.1,v 1.255 2022/12/20 17:51:54 kre Exp $
+.\"	$NetBSD: sh.1,v 1.256 2023/08/04 15:31:40 jschauma Exp $
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -1000,7 +1000,7 @@ If not explicitly present,
 .Ar n
 will be 0 (standard input)
 or 1 (standard output)
-depending upon the redicection operator used.
+depending upon the redirection operator used.
 If file descriptor
 .Ar n
 was open prior to the redirection, its previous use is closed.
@@ -3632,7 +3632,7 @@ which is processed as if it had been par
 This includes reading yet more input if necessary,
 until a line is read that contains or ends with an unescaped
 copy of the delimiter character.
-If the end delimiter (when it is not a newline) is escaoed,
+If the end delimiter (when it is not a newline) is escaped,
 it is treated as a normal character, and
 .Ic read
 continues looking for an unescaped end delimiter character.



CVS commit: src/bin/sh

2023-08-04 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Fri Aug  4 15:31:40 UTC 2023

Modified Files:
src/bin/sh: sh.1

Log Message:
tyops:
* redicection -> redirection
* escaoed -> escaped

Noted by J. Lewis Muir on netbsd-docs@


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/bin/sh/sh.1

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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:11:22 UTC 2023

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

Log Message:
Tickets #1699 - #1708


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.86 -r1.1.2.87 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.86 src/doc/CHANGES-9.4:1.1.2.87
--- src/doc/CHANGES-9.4:1.1.2.86	Wed Aug  2 10:23:26 2023
+++ src/doc/CHANGES-9.4	Fri Aug  4 15:11:22 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.86 2023/08/02 10:23:26 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.87 2023/08/04 15:11:22 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -1868,3 +1868,118 @@ sys/dev/usb/ehci.c1.317
 	PR 57518: usb keyboard causes host controller to miss microframe.
 	[skrll, ticket #1698]
 
+distrib/sets/lists/debug/mi			1.400-1.406 (patch)
+distrib/sets/lists/debug/shl.mi			1.306-1.311,1.314 (patch)
+distrib/sets/lists/tests/mi			1.1265 (patch)
+distrib/sets/lists/tests/shl.mi			1.12-1.16 (patch)
+libexec/ld.elf_so/README.TLS			1.6 (patch)
+libexec/ld.elf_so/arch/aarch64/mdreloc.c	1.18 (patch)
+libexec/ld.elf_so/arch/alpha/alpha_reloc.c	1.44 (patch)
+libexec/ld.elf_so/arch/arm/mdreloc.c		1.46 (patch)
+libexec/ld.elf_so/arch/hppa/hppa_reloc.c	1.50 (patch)
+libexec/ld.elf_so/arch/i386/mdreloc.c		1.42,1.43 (patch)
+libexec/ld.elf_so/arch/m68k/mdreloc.c		1.34 (patch)
+libexec/ld.elf_so/arch/mips/mips_reloc.c	1.75 (patch)
+libexec/ld.elf_so/arch/or1k/mdreloc.c		1.4 (patch)
+libexec/ld.elf_so/arch/powerpc/ppc_reloc.c	1.63 (patch)
+libexec/ld.elf_so/arch/riscv/mdreloc.c		1.9 (patch)
+libexec/ld.elf_so/arch/sh3/mdreloc.c		1.36 (patch)
+libexec/ld.elf_so/arch/sparc/mdreloc.c		1.57 (patch)
+libexec/ld.elf_so/arch/sparc64/mdreloc.c	1.70 (patch)
+libexec/ld.elf_so/arch/x86_64/mdreloc.c		1.48 (patch)
+libexec/ld.elf_so/map_object.c			1.66,1.67 (patch)
+libexec/ld.elf_so/rtld.c			1.214 (patch)
+libexec/ld.elf_so/rtld.h			1.146 (patch)
+libexec/ld.elf_so/tls.c1.16-1.19 (patch)
+tests/libexec/ld.elf_so/Makefile		1.13-1.19 (patch)
+tests/libexec/ld.elf_so/helper.mk		1.1 (patch)
+tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_abuse_dynamic/h_abuse_dynamic.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_abuse_static/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_abuse_static/h_abuse_static.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_def_dynamic/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_def_dynamic/h_def_dynamic.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_def_static/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_def_static/h_def_static.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_dso1/Makefile	1.2 (patch)
+tests/libexec/ld.elf_so/helper_dso2/Makefile	1.2 (patch)
+tests/libexec/ld.elf_so/helper_dso3/Makefile	1.2 (patch)
+tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile 1.2 (patch)
+tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_onlyctor_dynamic/h_onlyctor_dynamic.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_onlydef/Makefile	1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_onlydef/h_onlydef.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_onlydef_static/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_onlydef_static/h_onlydef_static.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_onlyuse_dynamic/h_onlyuse_dynamic.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_onlyuse_static/h_onlyuse_static.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_symver_dso0/Makefile 1.2 (patch)
+tests/libexec/ld.elf_so/helper_symver_dso1/Makefile 1.4 (patch)
+tests/libexec/ld.elf_so/helper_symver_dso2/Makefile 1.4 (patch)
+tests/libexec/ld.elf_so/helper_use_dynamic/Makefile 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/helper_use_dynamic/h_use_dynamic.c 1.1 (patch)
+tests/libexec/ld.elf_so/helper_use_static/Makefile 1.1-1.3 (patch)
+tests/libexec/ld.elf_so/helper_use_static/h_use_static.c 1.1,1.2 (patch)
+tests/libexec/ld.elf_so/t_tls_extern.c		1.1-1.12 (patch)
+
+	ld.elf_so(1): fix dlopen with static thread-local storage.
+	[riastradh, ticket #1699]
+
+lib/libpthread/arch/aarch64/pthread_md.h	1.2
+lib/libpthread/arch/arm/pthread_md.h		1.12,1.13
+lib/libpthread/arch/i386/pthread_md.h		1.21
+lib/libpthread/arch/x86_64/pthread_md.h		1.13
+lib/libpthread/pthread_int.h			1.110,1.111
+lib/libpthread/pthread_spin.c			1.11
+
+	libpthread: reduce spin lock hangs on arm.
+	[riastradh, ticket #1700]
+
+usr.bin/find/function.c1.80
+usr.bin/find/main.c1.32
+
+	find(1): PR 57313: don't bail if "." cannot be opened.
+	[riastradh, ticket #1701]
+
+usr.sbin/ldpd/fsm.c1.16

CVS commit: [netbsd-9] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:11:22 UTC 2023

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

Log Message:
Tickets #1699 - #1708


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.86 -r1.1.2.87 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/sys/dev/ic

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:06:50 UTC 2023

Modified Files:
src/sys/dev/ic [netbsd-9]: rtl8169.c rtl81x9reg.h rtl81x9var.h

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1705):

sys/dev/ic/rtl81x9var.h: revision 1.58
sys/dev/ic/rtl81x9reg.h: revision 1.54
sys/dev/ic/rtl8169.c: revision 1.167
sys/dev/ic/rtl8169.c: revision 1.168

re(4): misc chip revision support changes
 * remove impossible-to-match chip revision cases
 * bring support for modern chips in line with FreeBSD and OpenBSD
  * adds support for RTL8168GU

Addresses PR kern/56312.

- Print chip revision. From OpenBSD.
- Rename RTK_HWREV_8168_SPIN[123] to RTK_HWREV_8168'B'_SPIN[123].
  Same as other *BSDs.
- Rename RTK_HWREV_8168G_SPIN4 to RTK_HWREV_8411B. Same as other *BSDs.
- Add definition of RTK_HWREV_8169_8110SCE.


To generate a diff of this commit:
cvs rdiff -u -r1.159.2.1 -r1.159.2.2 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.50.4.1 -r1.50.4.2 src/sys/dev/ic/rtl81x9reg.h
cvs rdiff -u -r1.56.18.1 -r1.56.18.2 src/sys/dev/ic/rtl81x9var.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/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.159.2.1 src/sys/dev/ic/rtl8169.c:1.159.2.2
--- src/sys/dev/ic/rtl8169.c:1.159.2.1	Tue Jan 28 11:12:30 2020
+++ src/sys/dev/ic/rtl8169.c	Fri Aug  4 15:06:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.159.2.1 2020/01/28 11:12:30 martin Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.159.2.2 2023/08/04 15:06:50 martin Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.159.2.1 2020/01/28 11:12:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.159.2.2 2023/08/04 15:06:50 martin Exp $");
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -172,6 +172,54 @@ static void re_miibus_statchg(struct ifn
 
 static void re_reset(struct rtk_softc *);
 
+static const struct re_revision {
+	uint32_t		re_chipid;
+	const char		*re_name;
+} re_revisions[] = {
+	{ RTK_HWREV_8100,	"RTL8100" },
+	{ RTK_HWREV_8100E,	"RTL8100E" },
+	{ RTK_HWREV_8100E_SPIN2, "RTL8100E 2" },
+	{ RTK_HWREV_8101,	"RTL8101" },
+	{ RTK_HWREV_8101E,	"RTL8101E" },
+	{ RTK_HWREV_8102E,	"RTL8102E" },
+	{ RTK_HWREV_8106E,	"RTL8106E" },
+	{ RTK_HWREV_8401E,	"RTL8401E" },
+	{ RTK_HWREV_8402,	"RTL8402" },
+	{ RTK_HWREV_8411,	"RTL8411" },
+	{ RTK_HWREV_8411B,	"RTL8411B" },
+	{ RTK_HWREV_8102EL,	"RTL8102EL" },
+	{ RTK_HWREV_8102EL_SPIN1, "RTL8102EL 1" },
+	{ RTK_HWREV_8103E,   "RTL8103E" },
+	{ RTK_HWREV_8110S,	"RTL8110S" },
+	{ RTK_HWREV_8139CPLUS,	"RTL8139C+" },
+	{ RTK_HWREV_8168B_SPIN1, "RTL8168 1" },
+	{ RTK_HWREV_8168B_SPIN2, "RTL8168 2" },
+	{ RTK_HWREV_8168B_SPIN3, "RTL8168 3" },
+	{ RTK_HWREV_8168C,	"RTL8168C/8111C" },
+	{ RTK_HWREV_8168C_SPIN2, "RTL8168C/8111C" },
+	{ RTK_HWREV_8168CP,	"RTL8168CP/8111CP" },
+	{ RTK_HWREV_8168F,	"RTL8168F/8111F" },
+	{ RTK_HWREV_8168G,	"RTL8168G/8111G" },
+	{ RTK_HWREV_8168GU,	"RTL8168GU/8111GU" },
+	{ RTK_HWREV_8168H,	"RTL8168H/8111H" },
+	{ RTK_HWREV_8105E,	"RTL8105E" },
+	{ RTK_HWREV_8105E_SPIN1, "RTL8105E" },
+	{ RTK_HWREV_8168D,	"RTL8168D/8111D" },
+	{ RTK_HWREV_8168DP,	"RTL8168DP/8111DP" },
+	{ RTK_HWREV_8168E,	"RTL8168E/8111E" },
+	{ RTK_HWREV_8168E_VL,	"RTL8168E/8111E-VL" },
+	{ RTK_HWREV_8168EP,	"RTL8168EP/8111EP" },
+	{ RTK_HWREV_8168FP,	"RTL8168FP/8117" },
+	{ RTK_HWREV_8169,	"RTL8169" },
+	{ RTK_HWREV_8169_8110SB, "RTL8169/8110SB" },
+	{ RTK_HWREV_8169_8110SBL, "RTL8169SBL" },
+	{ RTK_HWREV_8169_8110SC, "RTL8169/8110SCd" },
+	{ RTK_HWREV_8169_8110SCE, "RTL8169/8110SCe" },
+	{ RTK_HWREV_8169S,	"RTL8169S" },
+
+	{ 0, NULL }
+};
+
 static inline void
 re_set_bufaddr(struct re_desc *d, bus_addr_t addr)
 {
@@ -562,13 +610,26 @@ re_attach(struct rtk_softc *sc)
 	struct ifnet *ifp;
 	struct mii_data *mii = >mii;
 	int error = 0, i;
+	const struct re_revision *rr;
+	const char *re_name = NULL;
 
 	if ((sc->sc_quirk & RTKQ_8139CPLUS) == 0) {
-		uint32_t hwrev;
-
 		/* Revision of 8169/8169S/8110s in bits 30..26, 23 */
-		hwrev = CSR_READ_4(sc, RTK_TXCFG) & RTK_TXCFG_HWREV;
-		switch (hwrev) {
+		sc->sc_hwrev = CSR_READ_4(sc, RTK_TXCFG) & RTK_TXCFG_HWREV;
+
+		for (rr = re_revisions; rr->re_name != NULL; rr++) {
+			if (rr->re_chipid == sc->sc_hwrev)
+re_name = rr->re_name;
+		}
+
+		if (re_name == NULL)
+			aprint_normal_dev(sc->sc_dev,
+			"unknown ASIC (0x%04x)\n", sc->sc_hwrev >> 16);
+		else
+			aprint_normal_dev(sc->sc_dev,
+			"%s (0x%04x)\n", re_name, sc->sc_hwrev >> 16);
+
+		switch (sc->sc_hwrev) {
 		case RTK_HWREV_8169:
 			sc->sc_quirk |= RTKQ_8169NONS;
 			break;
@@ -579,9 +640,9 @@ re_attach(struct rtk_softc *sc)
 		case RTK_HWREV_8169_8110SC:
 			sc->sc_quirk |= RTKQ_MACLDPS;
 			break;
-		case RTK_HWREV_8168_SPIN1:
-		case RTK_HWREV_8168_SPIN2:
-		case 

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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:06:50 UTC 2023

Modified Files:
src/sys/dev/ic [netbsd-9]: rtl8169.c rtl81x9reg.h rtl81x9var.h

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1705):

sys/dev/ic/rtl81x9var.h: revision 1.58
sys/dev/ic/rtl81x9reg.h: revision 1.54
sys/dev/ic/rtl8169.c: revision 1.167
sys/dev/ic/rtl8169.c: revision 1.168

re(4): misc chip revision support changes
 * remove impossible-to-match chip revision cases
 * bring support for modern chips in line with FreeBSD and OpenBSD
  * adds support for RTL8168GU

Addresses PR kern/56312.

- Print chip revision. From OpenBSD.
- Rename RTK_HWREV_8168_SPIN[123] to RTK_HWREV_8168'B'_SPIN[123].
  Same as other *BSDs.
- Rename RTK_HWREV_8168G_SPIN4 to RTK_HWREV_8411B. Same as other *BSDs.
- Add definition of RTK_HWREV_8169_8110SCE.


To generate a diff of this commit:
cvs rdiff -u -r1.159.2.1 -r1.159.2.2 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.50.4.1 -r1.50.4.2 src/sys/dev/ic/rtl81x9reg.h
cvs rdiff -u -r1.56.18.1 -r1.56.18.2 src/sys/dev/ic/rtl81x9var.h

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



CVS commit: [netbsd-10] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:03:43 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #305 - #310


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-10.0

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-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.95 src/doc/CHANGES-10.0:1.1.2.96
--- src/doc/CHANGES-10.0:1.1.2.95	Wed Aug  2 10:36:01 2023
+++ src/doc/CHANGES-10.0	Fri Aug  4 15:03:43 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.95 2023/08/02 10:36:01 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.96 2023/08/04 15:03:43 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -3583,3 +3583,38 @@ sys/external/bsd/drm2/dist/drm/amd/displ
 	amdgpu: mark float-dependent variables volatile.
 	[riastradh, ticket #304]
 
+usr.bin/find/function.c1.80
+usr.bin/find/main.c1.32
+
+	find(1): PR 57313: don't bail if "." cannot be opened.
+	[riastradh, ticket #305]
+
+libexec/ld.elf_so/arch/powerpc/Makefile.inc	1.17
+libexec/ld.elf_so/arch/powerpc/ld.so.script	delete
+
+	ld.elf_so powerpc: PR 57323: remove bogus ldscript.
+	[riastradh, ticket #306]
+
+sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c 1.16
+
+	i915: PR 56648: fail gracefully, don't panic, with unsupported 
+ggtt views.
+	[riastradh, ticket #307]
+
+xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c 1.2
+xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c	1.4
+
+	mesa: remove massive kludge that worked around PR 50277.
+	[riastradh, ticket #308]
+
+sys/netinet6/in6_src.c1.92
+
+	in6: add missing rtcache_unref.
+	[ozaki-r, ticket #309]
+
+sys/netinet6/in6.c1.289
+sys/netinet6/ip6_output.c			1.234
+
+	in6: fixes for IPv6-disabled interfaces.
+	[ozaki-r, ticket #310]
+



CVS commit: [netbsd-10] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:03:43 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #305 - #310


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-10.0

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



CVS commit: [netbsd-8] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:02:46 UTC 2023

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

Log Message:
Tickets #1878 - #1885


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.189 -r1.1.2.190 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.189 src/doc/CHANGES-8.3:1.1.2.190
--- src/doc/CHANGES-8.3:1.1.2.189	Wed Aug  2 10:25:32 2023
+++ src/doc/CHANGES-8.3	Fri Aug  4 15:02:46 2023
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.189 2023/08/02 10:25:32 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.190 2023/08/04 15:02:46 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -3745,3 +3745,51 @@ sys/dev/usb/ehci.c1.317
 	PR 57518: usb keyboard causes host controller to miss microframe.
 	[skrll, ticket #1877]
 
+lib/libpthread/arch/aarch64/pthread_md.h	1.2
+lib/libpthread/arch/arm/pthread_md.h		1.12,1.13
+lib/libpthread/arch/i386/pthread_md.h		1.21
+lib/libpthread/arch/x86_64/pthread_md.h		1.13
+lib/libpthread/pthread_int.h			1.110,1.111
+lib/libpthread/pthread_spin.c			1.11
+
+	libpthread: reduce spin lock hangs on arm.
+	[riastradh, ticket #1878]
+
+usr.bin/find/function.c1.80
+usr.bin/find/main.c1.32
+
+	find(1): PR 57313: don't bail if "." cannot be opened.
+	[riastradh, ticket #1879]
+
+sys/uvm/uvm_map.c1.403 (patch)
+
+	mmap(2): PR 56900: fix arithmetic overflow in mmap search.
+	[riastradh, ticket #1880]
+
+usr.sbin/ldpd/fsm.c1.16
+usr.sbin/ldpd/ldp_peer.c			1.19
+usr.sbin/ldpd/socketops.c			1.36
+
+	ldpd(8): PR 56895: fix address of misaligned packed members.
+	[riastradh, ticket #1881]
+
+sys/kern/init_main.c(apply patch)
+
+	PR 55906: fix aiodoned workqueue initialization order.
+	[riastradh, ticket #1882]
+
+sys/netinet6/in6_src.c1.92
+
+	in6: add missing rtcache_unref.
+	[ozaki-r, ticket #1883]
+
+sys/netinet6/in6.c1.289
+sys/netinet6/ip6_output.c			1.234
+
+	in6: fixes for IPv6-disabled interfaces.
+	[ozaki-r, ticket #1884]
+
+sys/net/bpf.c	(apply patch)
+
+	bpf: allow to read with no filter.
+	[ozaki-r, ticket #1885]



CVS commit: [netbsd-8] src/doc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:02:46 UTC 2023

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

Log Message:
Tickets #1878 - #1885


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.189 -r1.1.2.190 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/sys/net

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:00:28 UTC 2023

Modified Files:
src/sys/net [netbsd-8]: bpf.c

Log Message:
Apply patch, requested by ozaki-r in ticket #1885:

sys/net/bpf.c   (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)


To generate a diff of this commit:
cvs rdiff -u -r1.216.6.8 -r1.216.6.9 src/sys/net/bpf.c

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

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.216.6.8 src/sys/net/bpf.c:1.216.6.9
--- src/sys/net/bpf.c:1.216.6.8	Wed Feb 22 19:51:47 2023
+++ src/sys/net/bpf.c	Fri Aug  4 15:00:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.216.6.8 2023/02/22 19:51:47 martin Exp $	*/
+/*	$NetBSD: bpf.c,v 1.216.6.9 2023/08/04 15:00:28 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.216.6.8 2023/02/22 19:51:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.216.6.9 2023/08/04 15:00:28 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1605,6 +1605,8 @@ bpf_deliver(struct bpf_if *bp, void *(*c
 			else
 slen = bpf_filter_ext(NULL, filter->bf_insn,
 );
+		} else {
+			slen = (u_int)-1; /* No filter means accept all */
 		}
 
 		if (!slen) {



CVS commit: [netbsd-8] src/sys/net

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 15:00:28 UTC 2023

Modified Files:
src/sys/net [netbsd-8]: bpf.c

Log Message:
Apply patch, requested by ozaki-r in ticket #1885:

sys/net/bpf.c   (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)


To generate a diff of this commit:
cvs rdiff -u -r1.216.6.8 -r1.216.6.9 src/sys/net/bpf.c

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



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:57:52 UTC 2023

Modified Files:
src/sys/net [netbsd-9]: bpf.c

Log Message:
Apply patch, requested by ozaki-r in ticket #1708:

sys/net/bpf.c   (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)


To generate a diff of this commit:
cvs rdiff -u -r1.229.2.2 -r1.229.2.3 src/sys/net/bpf.c

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

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.229.2.2 src/sys/net/bpf.c:1.229.2.3
--- src/sys/net/bpf.c:1.229.2.2	Wed Feb 22 19:50:33 2023
+++ src/sys/net/bpf.c	Fri Aug  4 14:57:52 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.229.2.2 2023/02/22 19:50:33 martin Exp $	*/
+/*	$NetBSD: bpf.c,v 1.229.2.3 2023/08/04 14:57:52 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.229.2.2 2023/02/22 19:50:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.229.2.3 2023/08/04 14:57:52 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1628,6 +1628,8 @@ bpf_deliver(struct bpf_if *bp, void *(*c
 			else
 slen = bpf_filter_ext(NULL, filter->bf_insn,
 );
+		} else {
+			slen = (u_int)-1; /* No filter means accept all */
 		}
 
 		if (!slen) {



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:57:52 UTC 2023

Modified Files:
src/sys/net [netbsd-9]: bpf.c

Log Message:
Apply patch, requested by ozaki-r in ticket #1708:

sys/net/bpf.c   (apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)


To generate a diff of this commit:
cvs rdiff -u -r1.229.2.2 -r1.229.2.3 src/sys/net/bpf.c

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



CVS commit: src/external/gpl3/gcc

2023-08-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  4 14:54:40 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
README.gcc12: Updated m68000 and m68k

- Kernel works just fine for sun2. Once-observed error was due to
  misc/57562.
- Kernel and bootloader work just fine for amiga.
- Userland needs COPTS.strsuftoll.c+=-fno-stack-protector.
- For amiga, no regression for tests/lib/libc/{sys,gen}.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc12

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.6 src/external/gpl3/gcc/README.gcc12:1.7
--- src/external/gpl3/gcc/README.gcc12:1.6	Fri Aug  4 07:40:04 2023
+++ src/external/gpl3/gcc/README.gcc12	Fri Aug  4 14:54:40 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.6 2023/08/04 07:40:04 mrg Exp $
+$NetBSD: README.gcc12,v 1.7 2023/08/04 14:54:40 rin Exp $
 
 
 new stuff:
@@ -19,7 +19,7 @@ todo:
 arch/feature list.
 
 tools:		does build.sh tools work?
-kernels:	does a kernel run?  y (yes), b (builds/ready), ? (not ready)
+kernels:	does a kernel run?  y (yes), b (builds/ready), p (partially), ? (not ready)
 libgcc:		does libgcc build?
 native-gcc:	does a full mknative-gcc complete?
 sani:		has sanitizer been ported to this CPU again for GCC 12?  b (build) y (works)
@@ -51,8 +51,8 @@ earmv7hfeb	y	b	?	y	b	y		?	?	?
 hppa		y	b	y	y	?	n[5]		?	?	?
 i386		y	b	y	y	y	y		?	?	?
 ia64		y	b	y	y	y	y		y[3]	n	?
-m68000		y	n[9]	y	y	n[11]	n		?	?	?
-m68k		y	b	y	y	b	y		?	?	?
+m68000		y	y	y	y	n[11]	n		y[14]	?	?
+m68k		y	y	y	y	b	y		y[14]	p[15]	?
 mipseb		y	b	y	y	b	y		?	?	?
 mipsel		y	b	y	y	b	y		?	?	?
 mips64eb	y	b	y	y	b	y		?	?	?
@@ -87,7 +87,6 @@ architecture	tools	kernels	libgcc	native
  534 | #define Bcopy(x,y) memcpy(>sign,>sign,y->wds*sizeof(ULong) + 2*sizeof(int))
  src/lib/libc/gdtoa/strtod.c:582:17: note: in expansion of macro 'Bcopy'
  582 | Bcopy(bd, bd0);
-[9]: sun2 fails to load the kernel, probably too big again.
 [10]: libc.so fails to link with weird relocation errors:
   vax--netbsdelf/bin/ld: warning: dynamic relocation to `?' in readonly section `.eh_frame'
 [11]: sanitizers don't build yet.
@@ -105,6 +104,8 @@ architecture	tools	kernels	libgcc	native
   ==21499==Hint: address points to the zero page.
   ThreadSanitizer:DEADLYSIGNAL
   ThreadSanitizer: nested bug in the same thread, aborting.
+[14]: "dd count=1" aborts. "COPTS.strsuftoll.c+=-fno-stack-protector" works around the problem.
+[15]: No regression observed for tests/lib/libc/{sys,gen}.
 
 
 CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.



CVS commit: src/external/gpl3/gcc

2023-08-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  4 14:54:40 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
README.gcc12: Updated m68000 and m68k

- Kernel works just fine for sun2. Once-observed error was due to
  misc/57562.
- Kernel and bootloader work just fine for amiga.
- Userland needs COPTS.strsuftoll.c+=-fno-stack-protector.
- For amiga, no regression for tests/lib/libc/{sys,gen}.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/README.gcc12

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



CVS commit: [netbsd-8] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:38:09 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-8]: in6.c ip6_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1884):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface


To generate a diff of this commit:
cvs rdiff -u -r1.245.2.13 -r1.245.2.14 src/sys/netinet6/in6.c
cvs rdiff -u -r1.191.6.5 -r1.191.6.6 src/sys/netinet6/ip6_output.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.245.2.13 src/sys/netinet6/in6.c:1.245.2.14
--- src/sys/netinet6/in6.c:1.245.2.13	Thu Oct  8 18:06:13 2020
+++ src/sys/netinet6/in6.c	Fri Aug  4 14:38:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.245.2.13 2020/10/08 18:06:13 martin Exp $	*/
+/*	$NetBSD: in6.c,v 1.245.2.14 2023/08/04 14:38:09 martin Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.245.2.13 2020/10/08 18:06:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.245.2.14 2023/08/04 14:38:09 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2311,6 +2311,10 @@ in6_if_link_down(struct ifnet *ifp)
 	}
 	pserialize_read_exit(s);
 	curlwp_bindx(bound);
+
+	/* Clear ND6_IFF_IFDISABLED to allow DAD again on link-up. */
+	if (ifp->if_afdata[AF_INET6] != NULL)
+		ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED;
 }
 
 void

Index: src/sys/netinet6/ip6_output.c
diff -u src/sys/netinet6/ip6_output.c:1.191.6.5 src/sys/netinet6/ip6_output.c:1.191.6.6
--- src/sys/netinet6/ip6_output.c:1.191.6.5	Thu Mar 23 12:08:39 2023
+++ src/sys/netinet6/ip6_output.c	Fri Aug  4 14:38:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.191.6.5 2023/03/23 12:08:39 martin Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.191.6.6 2023/08/04 14:38:09 martin Exp $	*/
 /*	$KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.191.6.5 2023/03/23 12:08:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.191.6.6 2023/08/04 14:38:09 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -197,6 +197,12 @@ ip6_if_output(struct ifnet * const ifp, 
 		}
 	}
 
+	/* discard the packet if IPv6 operation is disabled on the interface */
+	if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) {
+		m_freem(m);
+		return ENETDOWN; /* better error? */
+	}
+
 	if ((ifp->if_flags & IFF_LOOPBACK) != 0)
 		error = if_output_lock(ifp, origifp, m, sin6tocsa(dst), rt);
 	else



CVS commit: [netbsd-8] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:38:09 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-8]: in6.c ip6_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1884):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface


To generate a diff of this commit:
cvs rdiff -u -r1.245.2.13 -r1.245.2.14 src/sys/netinet6/in6.c
cvs rdiff -u -r1.191.6.5 -r1.191.6.6 src/sys/netinet6/ip6_output.c

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



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:29:44 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-9]: in6.c ip6_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1707):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface


To generate a diff of this commit:
cvs rdiff -u -r1.275.2.1 -r1.275.2.2 src/sys/netinet6/in6.c
cvs rdiff -u -r1.220.2.1 -r1.220.2.2 src/sys/netinet6/ip6_output.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.275.2.1 src/sys/netinet6/in6.c:1.275.2.2
--- src/sys/netinet6/in6.c:1.275.2.1	Thu Oct  8 18:04:59 2020
+++ src/sys/netinet6/in6.c	Fri Aug  4 14:29:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.275.2.1 2020/10/08 18:04:59 martin Exp $	*/
+/*	$NetBSD: in6.c,v 1.275.2.2 2023/08/04 14:29:44 martin Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.275.2.1 2020/10/08 18:04:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.275.2.2 2023/08/04 14:29:44 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2310,6 +2310,10 @@ in6_if_link_down(struct ifnet *ifp)
 	}
 	pserialize_read_exit(s);
 	curlwp_bindx(bound);
+
+	/* Clear ND6_IFF_IFDISABLED to allow DAD again on link-up. */
+	if (ifp->if_afdata[AF_INET6] != NULL)
+		ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED;
 }
 
 void

Index: src/sys/netinet6/ip6_output.c
diff -u src/sys/netinet6/ip6_output.c:1.220.2.1 src/sys/netinet6/ip6_output.c:1.220.2.2
--- src/sys/netinet6/ip6_output.c:1.220.2.1	Thu Mar 23 12:06:49 2023
+++ src/sys/netinet6/ip6_output.c	Fri Aug  4 14:29:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.220.2.1 2023/03/23 12:06:49 martin Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.220.2.2 2023/08/04 14:29:44 martin Exp $	*/
 /*	$KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.220.2.1 2023/03/23 12:06:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.220.2.2 2023/08/04 14:29:44 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -170,6 +170,12 @@ ip6_if_output(struct ifnet * const ifp, 
 		}
 	}
 
+	/* discard the packet if IPv6 operation is disabled on the interface */
+	if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) {
+		m_freem(m);
+		return ENETDOWN; /* better error? */
+	}
+
 	if ((ifp->if_flags & IFF_LOOPBACK) != 0)
 		error = if_output_lock(ifp, origifp, m, sin6tocsa(dst), rt);
 	else



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:29:44 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-9]: in6.c ip6_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1707):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface


To generate a diff of this commit:
cvs rdiff -u -r1.275.2.1 -r1.275.2.2 src/sys/netinet6/in6.c
cvs rdiff -u -r1.220.2.1 -r1.220.2.2 src/sys/netinet6/ip6_output.c

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



CVS commit: [netbsd-10] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:28:02 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-10]: in6.c ip6_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #310):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.288.2.1 src/sys/netinet6/in6.c
cvs rdiff -u -r1.231.2.1 -r1.231.2.2 src/sys/netinet6/ip6_output.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.288 src/sys/netinet6/in6.c:1.288.2.1
--- src/sys/netinet6/in6.c:1.288	Mon Oct 24 14:15:19 2022
+++ src/sys/netinet6/in6.c	Fri Aug  4 14:28:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.288 2022/10/24 14:15:19 msaitoh Exp $	*/
+/*	$NetBSD: in6.c,v 1.288.2.1 2023/08/04 14:28:01 martin Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.288 2022/10/24 14:15:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.288.2.1 2023/08/04 14:28:01 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2293,6 +2293,10 @@ in6_if_link_down(struct ifnet *ifp)
 	}
 	pserialize_read_exit(s);
 	curlwp_bindx(bound);
+
+	/* Clear ND6_IFF_IFDISABLED to allow DAD again on link-up. */
+	if (ifp->if_afdata[AF_INET6] != NULL)
+		ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED;
 }
 
 void

Index: src/sys/netinet6/ip6_output.c
diff -u src/sys/netinet6/ip6_output.c:1.231.2.1 src/sys/netinet6/ip6_output.c:1.231.2.2
--- src/sys/netinet6/ip6_output.c:1.231.2.1	Thu Mar 23 12:03:04 2023
+++ src/sys/netinet6/ip6_output.c	Fri Aug  4 14:28:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.231.2.1 2023/03/23 12:03:04 martin Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.231.2.2 2023/08/04 14:28:01 martin Exp $	*/
 /*	$KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.231.2.1 2023/03/23 12:03:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.231.2.2 2023/08/04 14:28:01 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -171,6 +171,12 @@ ip6_if_output(struct ifnet * const ifp, 
 		}
 	}
 
+	/* discard the packet if IPv6 operation is disabled on the interface */
+	if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) {
+		m_freem(m);
+		return ENETDOWN; /* better error? */
+	}
+
 	if ((ifp->if_flags & IFF_LOOPBACK) != 0)
 		error = if_output_lock(ifp, origifp, m, sin6tocsa(dst), rt);
 	else



CVS commit: [netbsd-10] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:28:02 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-10]: in6.c ip6_output.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #310):

sys/netinet6/in6.c: revision 1.289
sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.288.2.1 src/sys/netinet6/in6.c
cvs rdiff -u -r1.231.2.1 -r1.231.2.2 src/sys/netinet6/ip6_output.c

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



CVS commit: [netbsd-8] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:24:16 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-8]: in6_src.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1883):

sys/netinet6/in6_src.c: revision 1.92

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.


To generate a diff of this commit:
cvs rdiff -u -r1.79.6.3 -r1.79.6.4 src/sys/netinet6/in6_src.c

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



CVS commit: [netbsd-8] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:24:16 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-8]: in6_src.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1883):

sys/netinet6/in6_src.c: revision 1.92

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.


To generate a diff of this commit:
cvs rdiff -u -r1.79.6.3 -r1.79.6.4 src/sys/netinet6/in6_src.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/netinet6/in6_src.c
diff -u src/sys/netinet6/in6_src.c:1.79.6.3 src/sys/netinet6/in6_src.c:1.79.6.4
--- src/sys/netinet6/in6_src.c:1.79.6.3	Wed Aug 11 17:24:42 2021
+++ src/sys/netinet6/in6_src.c	Fri Aug  4 14:24:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_src.c,v 1.79.6.3 2021/08/11 17:24:42 martin Exp $	*/
+/*	$NetBSD: in6_src.c,v 1.79.6.4 2023/08/04 14:24:16 martin Exp $	*/
 /*	$KAME: in6_src.c,v 1.159 2005/10/19 01:40:32 t-momose Exp $	*/
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.79.6.3 2021/08/11 17:24:42 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.79.6.4 2023/08/04 14:24:16 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -704,6 +704,7 @@ in6_selectroute(struct sockaddr_in6 *dst
 			if (count_discard)
 in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
 			error = EHOSTUNREACH;
+			rtcache_unref(rt, *ro);
 			rt = NULL;
 		}
 	}



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:23:02 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-9]: in6_src.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1706):

sys/netinet6/in6_src.c: revision 1.92

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.


To generate a diff of this commit:
cvs rdiff -u -r1.85.6.1 -r1.85.6.2 src/sys/netinet6/in6_src.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/netinet6/in6_src.c
diff -u src/sys/netinet6/in6_src.c:1.85.6.1 src/sys/netinet6/in6_src.c:1.85.6.2
--- src/sys/netinet6/in6_src.c:1.85.6.1	Wed Aug 11 17:22:17 2021
+++ src/sys/netinet6/in6_src.c	Fri Aug  4 14:23:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_src.c,v 1.85.6.1 2021/08/11 17:22:17 martin Exp $	*/
+/*	$NetBSD: in6_src.c,v 1.85.6.2 2023/08/04 14:23:02 martin Exp $	*/
 /*	$KAME: in6_src.c,v 1.159 2005/10/19 01:40:32 t-momose Exp $	*/
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.85.6.1 2021/08/11 17:22:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.85.6.2 2023/08/04 14:23:02 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -708,6 +708,7 @@ in6_selectroute(struct sockaddr_in6 *dst
 			if (count_discard)
 in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
 			error = EHOSTUNREACH;
+			rtcache_unref(rt, *ro);
 			rt = NULL;
 		}
 	}



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:23:02 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-9]: in6_src.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1706):

sys/netinet6/in6_src.c: revision 1.92

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.


To generate a diff of this commit:
cvs rdiff -u -r1.85.6.1 -r1.85.6.2 src/sys/netinet6/in6_src.c

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



CVS commit: [netbsd-10] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:21:48 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-10]: in6_src.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #309):

sys/netinet6/in6_src.c: revision 1.92

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.2.1 src/sys/netinet6/in6_src.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/netinet6/in6_src.c
diff -u src/sys/netinet6/in6_src.c:1.91 src/sys/netinet6/in6_src.c:1.91.2.1
--- src/sys/netinet6/in6_src.c:1.91	Fri Nov  4 09:01:53 2022
+++ src/sys/netinet6/in6_src.c	Fri Aug  4 14:21:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_src.c,v 1.91 2022/11/04 09:01:53 ozaki-r Exp $	*/
+/*	$NetBSD: in6_src.c,v 1.91.2.1 2023/08/04 14:21:48 martin Exp $	*/
 /*	$KAME: in6_src.c,v 1.159 2005/10/19 01:40:32 t-momose Exp $	*/
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.91 2022/11/04 09:01:53 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.91.2.1 2023/08/04 14:21:48 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -709,6 +709,7 @@ in6_selectroute(struct sockaddr_in6 *dst
 			if (count_discard)
 in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
 			error = EHOSTUNREACH;
+			rtcache_unref(rt, *ro);
 			rt = NULL;
 		}
 	}



CVS commit: [netbsd-10] src/sys/netinet6

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 14:21:48 UTC 2023

Modified Files:
src/sys/netinet6 [netbsd-10]: in6_src.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #309):

sys/netinet6/in6_src.c: revision 1.92

in6: add missing rtcache_unref to in6_selectroute

By default, this issue is harmless.  However, if NET_MPSAFE
is enabled, it could eventually lead to a kernel panic.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.91.2.1 src/sys/netinet6/in6_src.c

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



CVS commit: [netbsd-9] xsrc/external/mit/MesaLib/dist/src/glx

2023-08-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Fri Aug  4 14:12:49 UTC 2023

Modified Files:
xsrc/external/mit/MesaLib/dist/src/glx [netbsd-9]: glxcurrent.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1704):

xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c: revision 1.4 
(patch)

mesa: Remove massive kludge that worked around PR toolchain/50277.

Now that the underlying bug in ld.elf_so is fixed, the workaround is
causing harm.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 \
xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c

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



CVS commit: [netbsd-9] xsrc/external/mit/MesaLib/dist/src/glx

2023-08-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Fri Aug  4 14:12:49 UTC 2023

Modified Files:
xsrc/external/mit/MesaLib/dist/src/glx [netbsd-9]: glxcurrent.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1704):

xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c: revision 1.4 
(patch)

mesa: Remove massive kludge that worked around PR toolchain/50277.

Now that the underlying bug in ld.elf_so is fixed, the workaround is
causing harm.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 \
xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c

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

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c
diff -u xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.2 xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.2.2.1
--- xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.2	Tue Apr  9 14:14:59 2019
+++ xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c	Fri Aug  4 14:12:49 2023
@@ -40,18 +40,6 @@
 #include "glx_error.h"
 
 /*
- * MASSIVE KLUDGE!
- * We need these to not be extern in libGL.so because of
- * PR toolchain/50277
- */
-#if defined(GLX_USE_TLS) && defined(__NetBSD__)
-_X_EXPORT __thread struct _glapi_table * _glapi_tls_Dispatch
-__attribute__((tls_model("initial-exec"))) = NULL;
-_X_EXPORT __thread void * _glapi_tls_Context
-__attribute__((tls_model("initial-exec")));
-#endif
-
-/*
 ** We setup some dummy structures here so that the API can be used
 ** even if no context is current.
 */



CVS commit: [netbsd-10] xsrc/external/mit

2023-08-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Fri Aug  4 14:09:25 UTC 2023

Modified Files:
xsrc/external/mit/MesaLib.old/dist/src/glx [netbsd-10]: glxcurrent.c
xsrc/external/mit/MesaLib/dist/src/glx [netbsd-10]: glxcurrent.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #308):

xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c: revision 1.4
xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c: revision 1.2

mesa: Remove massive kludge that worked around PR toolchain/50277.

Now that the underlying bug in ld.elf_so is fixed, the workaround is
causing harm.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.2.1 \
xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c
cvs rdiff -u -r1.3 -r1.3.2.1 \
xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c

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

Modified files:

Index: xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c
diff -u xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c:1.1.1.2 xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c:1.1.1.2.2.1
--- xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c:1.1.1.2	Sun Jul 11 20:36:29 2021
+++ xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c	Fri Aug  4 14:09:25 2023
@@ -40,18 +40,6 @@
 #include "glx_error.h"
 
 /*
- * MASSIVE KLUDGE!
- * We need these to not be extern in libGL.so because of
- * PR toolchain/50277
- */
-#if defined(GLX_USE_TLS) && defined(__NetBSD__)
-_X_EXPORT __thread struct _glapi_table * _glapi_tls_Dispatch
-__attribute__((tls_model("initial-exec"))) = NULL;
-_X_EXPORT __thread void * _glapi_tls_Context
-__attribute__((tls_model("initial-exec")));
-#endif
-
-/*
 ** We setup some dummy structures here so that the API can be used
 ** even if no context is current.
 */

Index: xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c
diff -u xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.3 xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.3.2.1
--- xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c:1.3	Mon May  9 01:27:33 2022
+++ xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c	Fri Aug  4 14:09:25 2023
@@ -40,18 +40,6 @@
 #include "glx_error.h"
 
 /*
- * MASSIVE KLUDGE!
- * We need these to not be extern in libGL.so because of
- * PR toolchain/50277
- */
-#if defined(GLX_USE_TLS) && defined(__NetBSD__)
-_X_EXPORT __thread struct _glapi_table * _glapi_tls_Dispatch
-__attribute__((tls_model("initial-exec"))) = NULL;
-_X_EXPORT __thread void * _glapi_tls_Context
-__attribute__((tls_model("initial-exec")));
-#endif
-
-/*
 ** We setup some dummy structures here so that the API can be used
 ** even if no context is current.
 */



CVS commit: [netbsd-10] xsrc/external/mit

2023-08-04 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Fri Aug  4 14:09:25 UTC 2023

Modified Files:
xsrc/external/mit/MesaLib.old/dist/src/glx [netbsd-10]: glxcurrent.c
xsrc/external/mit/MesaLib/dist/src/glx [netbsd-10]: glxcurrent.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #308):

xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c: revision 1.4
xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c: revision 1.2

mesa: Remove massive kludge that worked around PR toolchain/50277.

Now that the underlying bug in ld.elf_so is fixed, the workaround is
causing harm.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.2.1 \
xsrc/external/mit/MesaLib.old/dist/src/glx/glxcurrent.c
cvs rdiff -u -r1.3 -r1.3.2.1 \
xsrc/external/mit/MesaLib/dist/src/glx/glxcurrent.c

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



Re: CVS commit: src/sys/arch/sun2/dev

2023-08-04 Thread Rin Okuyama

On 2023/08/04 20:18, Rin Okuyama wrote:

Module Name:src
Committed By:   rin
Date:   Fri Aug  4 11:18:18 UTC 2023

Modified Files:
src/sys/arch/sun2/dev: sc_mbmem.c

Log Message:
sun2/sc(4): Fix panic due to wrong ENOMEM for DMA buffer

Use kmem_zalloc(9) for sc->sc_dma_handles[] to zero-initialize flags.

XXX
Will soon apply to sun3.


Correction: sun3 is not affected. "sc(4) at vme(4)" has been fixed.


CVS commit: src/sys/dev/vme

2023-08-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  4 14:04:44 UTC 2023

Modified Files:
src/sys/dev/vme: sc_vme.c

Log Message:
sc(4) at vme(4): Fix panic due to false ENOMEM for DMA buffer

Similar fix to "sc(4) at mbmem(4)" one; make sure flags are correctly
initialized.

sun3 is not affected.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/vme/sc_vme.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/vme/sc_vme.c
diff -u src/sys/dev/vme/sc_vme.c:1.18 src/sys/dev/vme/sc_vme.c:1.19
--- src/sys/dev/vme/sc_vme.c:1.18	Sun Nov 10 21:16:38 2019
+++ src/sys/dev/vme/sc_vme.c	Fri Aug  4 14:04:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sc_vme.c,v 1.18 2019/11/10 21:16:38 chs Exp $	*/
+/*	$NetBSD: sc_vme.c,v 1.19 2023/08/04 14:04:44 rin Exp $	*/
 
 /*-
  * Copyright (c) 1996,2000,2001 The NetBSD Foundation, Inc.
@@ -62,14 +62,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sc_vme.c,v 1.18 2019/11/10 21:16:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sc_vme.c,v 1.19 2023/08/04 14:04:44 rin Exp $");
 
 #include "opt_ddb.h"
 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -188,7 +188,7 @@ sc_vme_attach(device_t parent, device_t 
 	 * Allocate DMA handles.
 	 */
 	i = SUNSCPAL_OPENINGS * sizeof(struct sunscpal_dma_handle);
-	sc->sc_dma_handles = malloc(i, M_DEVBUF, M_WAITOK);
+	sc->sc_dma_handles = kmem_zalloc(i, KM_SLEEP);
 	for (i = 0; i < SUNSCPAL_OPENINGS; i++) {
 		sc->sc_dma_handles[i].dh_flags = 0;
 



CVS commit: src/sys/dev/vme

2023-08-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Aug  4 14:04:44 UTC 2023

Modified Files:
src/sys/dev/vme: sc_vme.c

Log Message:
sc(4) at vme(4): Fix panic due to false ENOMEM for DMA buffer

Similar fix to "sc(4) at mbmem(4)" one; make sure flags are correctly
initialized.

sun3 is not affected.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/vme/sc_vme.c

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



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:58:11 UTC 2023

Modified Files:
src/sys/kern [netbsd-8]: init_main.c

Log Message:
Apply patch, requested by riastradh in ticket #1882 (issue solved differently
in -current):

sys/kern/init_main.c(apply patch)

PR kern/55906: create the aiodone workqueue before running mountroothooks.


To generate a diff of this commit:
cvs rdiff -u -r1.490.6.2 -r1.490.6.3 src/sys/kern/init_main.c

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



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

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:58:11 UTC 2023

Modified Files:
src/sys/kern [netbsd-8]: init_main.c

Log Message:
Apply patch, requested by riastradh in ticket #1882 (issue solved differently
in -current):

sys/kern/init_main.c(apply patch)

PR kern/55906: create the aiodone workqueue before running mountroothooks.


To generate a diff of this commit:
cvs rdiff -u -r1.490.6.2 -r1.490.6.3 src/sys/kern/init_main.c

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.490.6.2 src/sys/kern/init_main.c:1.490.6.3
--- src/sys/kern/init_main.c:1.490.6.2	Sat Feb  6 15:22:19 2021
+++ src/sys/kern/init_main.c	Fri Aug  4 13:58:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.490.6.2 2021/02/06 15:22:19 martin Exp $	*/
+/*	$NetBSD: init_main.c,v 1.490.6.3 2023/08/04 13:58:11 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.490.6.2 2021/02/06 15:22:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.490.6.3 2023/08/04 13:58:11 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -638,6 +638,11 @@ main(void)
 	cpu_rootconf();
 	cpu_dumpconf();
 
+	/* Create the aiodone daemon kernel thread. */
+	if (workqueue_create(_queue, "aiodoned",
+	uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE))
+		panic("fork aiodoned");
+
 	/* Mount the root file system. */
 	do {
 		domountroothook(root_device);
@@ -697,11 +702,6 @@ main(void)
 	NULL, NULL, "ioflush"))
 		panic("fork syncer");
 
-	/* Create the aiodone daemon kernel thread. */
-	if (workqueue_create(_queue, "aiodoned",
-	uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE))
-		panic("fork aiodoned");
-
 	/* Wait for final configure threads to complete. */
 	config_finalize_mountroot();
 



CVS commit: [netbsd-9] src/sys/fs/ptyfs

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:34:58 UTC 2023

Modified Files:
src/sys/fs/ptyfs [netbsd-9]: ptyfs_vnops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1703):

sys/fs/ptyfs/ptyfs_vnops.c: revision 1.61

PR/55821: tar can not extract base.tgz anymore (./dev/pts and mounted ptyfs)

Allow chown/chmod at the root of ptyfs.


To generate a diff of this commit:
cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/fs/ptyfs/ptyfs_vnops.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/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.1 src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.2
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.1	Mon Aug 29 15:45:10 2022
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Fri Aug  4 13:34:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.55.4.2 2023/08/04 13:34:58 martin Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55.4.2 2023/08/04 13:34:58 martin Exp $");
 
 #include 
 #include 
@@ -455,8 +455,6 @@ ptyfs_setattr(void *v)
 	if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return EROFS;
-		if (ptyfs->ptyfs_type == PTYFSroot)
-			return EPERM;
 		error = ptyfs_chown(vp, vap->va_uid, vap->va_gid, cred, l);
 		if (error)
 			return error;
@@ -491,8 +489,6 @@ ptyfs_setattr(void *v)
 	if (vap->va_mode != (mode_t)VNOVAL) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return EROFS;
-		if (ptyfs->ptyfs_type == PTYFSroot)
-			return EPERM;
 		if ((ptyfs->ptyfs_flags & SF_SNAPSHOT) != 0 &&
 		(vap->va_mode &
 		(S_IXUSR|S_IWUSR|S_IXGRP|S_IWGRP|S_IXOTH|S_IWOTH)))



CVS commit: [netbsd-9] src/sys/fs/ptyfs

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:34:58 UTC 2023

Modified Files:
src/sys/fs/ptyfs [netbsd-9]: ptyfs_vnops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1703):

sys/fs/ptyfs/ptyfs_vnops.c: revision 1.61

PR/55821: tar can not extract base.tgz anymore (./dev/pts and mounted ptyfs)

Allow chown/chmod at the root of ptyfs.


To generate a diff of this commit:
cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/fs/ptyfs/ptyfs_vnops.c

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



CVS commit: [netbsd-10] src/sys/external/bsd/drm2/dist/drm/i915/gt

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:30:57 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915/gt [netbsd-10]: intel_ggtt.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #307):

sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c: revision 1.16

i915: Fail gracefully, don't panic, with unsupported ggtt views.

Workaround for part of PR kern/56648.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.4.1 \
src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.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/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c:1.15 src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c:1.15.4.1
--- src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c:1.15	Sun Dec 19 12:35:13 2021
+++ src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c	Fri Aug  4 13:30:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_ggtt.c,v 1.15 2021/12/19 12:35:13 riastradh Exp $	*/
+/*	$NetBSD: intel_ggtt.c,v 1.15.4.1 2023/08/04 13:30:57 martin Exp $	*/
 
 // SPDX-License-Identifier: MIT
 /*
@@ -6,7 +6,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.15 2021/12/19 12:35:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.15.4.1 2023/08/04 13:30:57 martin Exp $");
 
 #include 
 
@@ -1772,17 +1772,23 @@ i915_get_ggtt_vma_pages(struct i915_vma 
 		vma->pages = vma->obj->mm.pages;
 		return 0;
 
-#ifndef __NetBSD__
 	case I915_GGTT_VIEW_ROTATED:
+#ifdef __NetBSD__
+		vma->pages = ERR_PTR(-ENODEV);
+#else
 		vma->pages =
 			intel_rotate_pages(>ggtt_view.rotated, vma->obj);
+#endif
 		break;
 
 	case I915_GGTT_VIEW_REMAPPED:
+#ifdef __NetBSD__
+		vma->pages = ERR_PTR(-ENODEV);
+#else
 		vma->pages =
 			intel_remap_pages(>ggtt_view.remapped, vma->obj);
-		break;
 #endif
+		break;
 
 	case I915_GGTT_VIEW_PARTIAL:
 		vma->pages = intel_partial_pages(>ggtt_view, vma->obj);



CVS commit: [netbsd-10] src/sys/external/bsd/drm2/dist/drm/i915/gt

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:30:57 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915/gt [netbsd-10]: intel_ggtt.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #307):

sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c: revision 1.16

i915: Fail gracefully, don't panic, with unsupported ggtt views.

Workaround for part of PR kern/56648.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.4.1 \
src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c

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



CVS commit: [netbsd-8] src/usr.sbin/ldpd

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:28:40 UTC 2023

Modified Files:
src/usr.sbin/ldpd [netbsd-8]: fsm.c ldp_peer.c socketops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1881):

usr.sbin/ldpd/socketops.c: revision 1.36
usr.sbin/ldpd/fsm.c: revision 1.16
usr.sbin/ldpd/ldp_peer.c: revision 1.19

ldpd(8): Fix address of misaligned packed members.

PR kern/56895


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.18.1 src/usr.sbin/ldpd/fsm.c
cvs rdiff -u -r1.16 -r1.16.18.1 src/usr.sbin/ldpd/ldp_peer.c
cvs rdiff -u -r1.34 -r1.34.4.1 src/usr.sbin/ldpd/socketops.c

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



CVS commit: [netbsd-8] src/usr.sbin/ldpd

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:28:40 UTC 2023

Modified Files:
src/usr.sbin/ldpd [netbsd-8]: fsm.c ldp_peer.c socketops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1881):

usr.sbin/ldpd/socketops.c: revision 1.36
usr.sbin/ldpd/fsm.c: revision 1.16
usr.sbin/ldpd/ldp_peer.c: revision 1.19

ldpd(8): Fix address of misaligned packed members.

PR kern/56895


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.18.1 src/usr.sbin/ldpd/fsm.c
cvs rdiff -u -r1.16 -r1.16.18.1 src/usr.sbin/ldpd/ldp_peer.c
cvs rdiff -u -r1.34 -r1.34.4.1 src/usr.sbin/ldpd/socketops.c

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

Modified files:

Index: src/usr.sbin/ldpd/fsm.c
diff -u src/usr.sbin/ldpd/fsm.c:1.15 src/usr.sbin/ldpd/fsm.c:1.15.18.1
--- src/usr.sbin/ldpd/fsm.c:1.15	Tue Mar 18 18:20:47 2014
+++ src/usr.sbin/ldpd/fsm.c	Fri Aug  4 13:28:40 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: fsm.c,v 1.15 2014/03/18 18:20:47 riastradh Exp $ */
+/* $NetBSD: fsm.c,v 1.15.18.1 2023/08/04 13:28:40 martin Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -59,6 +59,7 @@ run_ldp_hello(const struct ldp_pdu * pdu
 	const struct transport_address_tlv *trtlv;
 	struct hello_info *hi = NULL;
 	union sockunion traddr;
+	struct in_addr ldp_id;
 
 	if ((!pduid) || (!ht))
 		return;
@@ -125,7 +126,8 @@ run_ldp_hello(const struct ldp_pdu * pdu
 			hi->keepalive = LDP_THELLO_KEEP;
 	}
 
-	if (!get_ldp_peer_by_id(>ldp_id)) {
+	ldp_id = pduid->ldp_id;
+	if (!get_ldp_peer_by_id(_id)) {
 		/*
 		 * RFC 5036 2.5.2: If A1 > A2, LSR1 plays the active role;
 		 * otherwise it is passive.
@@ -134,7 +136,7 @@ run_ldp_hello(const struct ldp_pdu * pdu
 		(hi->transport_address.sa.sa_family == AF_INET &&
 		ntohl(hi->transport_address.sin.sin_addr.s_addr) <
 		ntohl(ladd->s_addr))) {
-			peer = ldp_peer_new(>ldp_id, padd,
+			peer = ldp_peer_new(_id, padd,
 >transport_address.sa,
 ntohs(ht->ch.holdtime), 0);
 			if (peer == NULL)
@@ -151,7 +153,7 @@ build_address_list_tlv(void)
 	struct address_list_tlv *t;
 	struct ifaddrs *ifa, *ifb;
 	struct sockaddr_in *sa;
-	struct in_addr *ia;
+	char *ia;
 	uint16_t   adrcount = 0;
 
 	if (getifaddrs() == -1)
@@ -184,7 +186,7 @@ build_address_list_tlv(void)
 	adrcount * sizeof(struct in_addr));
 	t->a_af = htons(LDP_AF_INET);
 
-	ia = >a_address;
+	ia = (void *)>a_address;
 	for (adrcount = 0, ifb = ifa; ifb; ifb = ifb->ifa_next) {
 		if ((ifb->ifa_addr->sa_family != AF_INET) ||
 		(!(ifb->ifa_flags & IFF_UP)))
@@ -192,7 +194,8 @@ build_address_list_tlv(void)
 		sa = (struct sockaddr_in *) ifb->ifa_addr;
 		if (ntohl(sa->sin_addr.s_addr) >> 24 == IN_LOOPBACKNET)
 			continue;
-		memcpy([adrcount], >sin_addr, sizeof(struct in_addr));
+		memcpy(ia + adrcount*sizeof(struct in_addr), >sin_addr,
+		sizeof(struct in_addr));
 		adrcount++;
 	}
 	freeifaddrs(ifa);

Index: src/usr.sbin/ldpd/ldp_peer.c
diff -u src/usr.sbin/ldpd/ldp_peer.c:1.16 src/usr.sbin/ldpd/ldp_peer.c:1.16.18.1
--- src/usr.sbin/ldpd/ldp_peer.c:1.16	Fri Aug  2 07:29:56 2013
+++ src/usr.sbin/ldpd/ldp_peer.c	Fri Aug  4 13:28:40 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_peer.c,v 1.16 2013/08/02 07:29:56 kefren Exp $ */
+/* $NetBSD: ldp_peer.c,v 1.16.18.1 2023/08/04 13:28:40 martin Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -306,7 +306,7 @@ int 
 add_ifaddresses(struct ldp_peer * p, const struct al_tlv * a)
 {
 	int i, c, n;
-	const struct in_addr *ia;
+	const char		*ia;
 	struct sockaddr_in	ipa;
 
 	memset(, 0, sizeof(ipa));
@@ -328,8 +328,9 @@ add_ifaddresses(struct ldp_peer * p, con
 	debugp("Trying to add %d addresses to peer %s ... \n", n,
 	inet_ntoa(p->ldp_id));
 
-	for (ia = (const struct in_addr *) & a->address,c = 0,i = 0; iaddress, c = 0, i = 0; i < n; i++) {
+		memcpy(_addr, ia + i*sizeof(ipa.sin_addr),
+		sizeof(ipa.sin_addr));
 		if (add_ifaddr(p, (struct sockaddr *)) == LDP_E_OK)
 			c++;
 	}

Index: src/usr.sbin/ldpd/socketops.c
diff -u src/usr.sbin/ldpd/socketops.c:1.34 src/usr.sbin/ldpd/socketops.c:1.34.4.1
--- src/usr.sbin/ldpd/socketops.c:1.34	Wed Apr 12 17:02:51 2017
+++ src/usr.sbin/ldpd/socketops.c	Fri Aug  4 13:28:40 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.34 2017/04/12 17:02:51 roy Exp $ */
+/* $NetBSD: socketops.c,v 1.34.4.1 2023/08/04 13:28:40 martin Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -401,6 +401,7 @@ send_hello(void)
 	struct hello_tlv *t;
 	struct common_hello_tlv *cht;
 	struct ldp_pdu  *spdu;
+	struct in_addr ldp_id;
 	struct transport_address_tlv *trtlv;
 	void *v;
 	struct sockaddr_in sadest;	/* Destination ALL_ROUTERS */
@@ -440,7 +441,8 @@ send_hello(void)
 	/* Prepare PDU envelope */
 	spdu->version = htons(LDP_VERSION);
 	spdu->length = htons(IPV4_HELLO_MSG_SIZE - PDU_VER_LENGTH);
-	inet_aton(LDP_ID, >ldp_id);
+	

CVS commit: [netbsd-9] src/usr.sbin/ldpd

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:26:17 UTC 2023

Modified Files:
src/usr.sbin/ldpd [netbsd-9]: fsm.c ldp_peer.c socketops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1702):

usr.sbin/ldpd/socketops.c: revision 1.36
usr.sbin/ldpd/fsm.c: revision 1.16
usr.sbin/ldpd/ldp_peer.c: revision 1.19

ldpd(8): Fix address of misaligned packed members.

PR kern/56895


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.28.1 src/usr.sbin/ldpd/fsm.c
cvs rdiff -u -r1.16 -r1.16.28.1 src/usr.sbin/ldpd/ldp_peer.c
cvs rdiff -u -r1.34 -r1.34.14.1 src/usr.sbin/ldpd/socketops.c

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

Modified files:

Index: src/usr.sbin/ldpd/fsm.c
diff -u src/usr.sbin/ldpd/fsm.c:1.15 src/usr.sbin/ldpd/fsm.c:1.15.28.1
--- src/usr.sbin/ldpd/fsm.c:1.15	Tue Mar 18 18:20:47 2014
+++ src/usr.sbin/ldpd/fsm.c	Fri Aug  4 13:26:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: fsm.c,v 1.15 2014/03/18 18:20:47 riastradh Exp $ */
+/* $NetBSD: fsm.c,v 1.15.28.1 2023/08/04 13:26:17 martin Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -59,6 +59,7 @@ run_ldp_hello(const struct ldp_pdu * pdu
 	const struct transport_address_tlv *trtlv;
 	struct hello_info *hi = NULL;
 	union sockunion traddr;
+	struct in_addr ldp_id;
 
 	if ((!pduid) || (!ht))
 		return;
@@ -125,7 +126,8 @@ run_ldp_hello(const struct ldp_pdu * pdu
 			hi->keepalive = LDP_THELLO_KEEP;
 	}
 
-	if (!get_ldp_peer_by_id(>ldp_id)) {
+	ldp_id = pduid->ldp_id;
+	if (!get_ldp_peer_by_id(_id)) {
 		/*
 		 * RFC 5036 2.5.2: If A1 > A2, LSR1 plays the active role;
 		 * otherwise it is passive.
@@ -134,7 +136,7 @@ run_ldp_hello(const struct ldp_pdu * pdu
 		(hi->transport_address.sa.sa_family == AF_INET &&
 		ntohl(hi->transport_address.sin.sin_addr.s_addr) <
 		ntohl(ladd->s_addr))) {
-			peer = ldp_peer_new(>ldp_id, padd,
+			peer = ldp_peer_new(_id, padd,
 >transport_address.sa,
 ntohs(ht->ch.holdtime), 0);
 			if (peer == NULL)
@@ -151,7 +153,7 @@ build_address_list_tlv(void)
 	struct address_list_tlv *t;
 	struct ifaddrs *ifa, *ifb;
 	struct sockaddr_in *sa;
-	struct in_addr *ia;
+	char *ia;
 	uint16_t   adrcount = 0;
 
 	if (getifaddrs() == -1)
@@ -184,7 +186,7 @@ build_address_list_tlv(void)
 	adrcount * sizeof(struct in_addr));
 	t->a_af = htons(LDP_AF_INET);
 
-	ia = >a_address;
+	ia = (void *)>a_address;
 	for (adrcount = 0, ifb = ifa; ifb; ifb = ifb->ifa_next) {
 		if ((ifb->ifa_addr->sa_family != AF_INET) ||
 		(!(ifb->ifa_flags & IFF_UP)))
@@ -192,7 +194,8 @@ build_address_list_tlv(void)
 		sa = (struct sockaddr_in *) ifb->ifa_addr;
 		if (ntohl(sa->sin_addr.s_addr) >> 24 == IN_LOOPBACKNET)
 			continue;
-		memcpy([adrcount], >sin_addr, sizeof(struct in_addr));
+		memcpy(ia + adrcount*sizeof(struct in_addr), >sin_addr,
+		sizeof(struct in_addr));
 		adrcount++;
 	}
 	freeifaddrs(ifa);

Index: src/usr.sbin/ldpd/ldp_peer.c
diff -u src/usr.sbin/ldpd/ldp_peer.c:1.16 src/usr.sbin/ldpd/ldp_peer.c:1.16.28.1
--- src/usr.sbin/ldpd/ldp_peer.c:1.16	Fri Aug  2 07:29:56 2013
+++ src/usr.sbin/ldpd/ldp_peer.c	Fri Aug  4 13:26:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ldp_peer.c,v 1.16 2013/08/02 07:29:56 kefren Exp $ */
+/* $NetBSD: ldp_peer.c,v 1.16.28.1 2023/08/04 13:26:17 martin Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -306,7 +306,7 @@ int 
 add_ifaddresses(struct ldp_peer * p, const struct al_tlv * a)
 {
 	int i, c, n;
-	const struct in_addr *ia;
+	const char		*ia;
 	struct sockaddr_in	ipa;
 
 	memset(, 0, sizeof(ipa));
@@ -328,8 +328,9 @@ add_ifaddresses(struct ldp_peer * p, con
 	debugp("Trying to add %d addresses to peer %s ... \n", n,
 	inet_ntoa(p->ldp_id));
 
-	for (ia = (const struct in_addr *) & a->address,c = 0,i = 0; iaddress, c = 0, i = 0; i < n; i++) {
+		memcpy(_addr, ia + i*sizeof(ipa.sin_addr),
+		sizeof(ipa.sin_addr));
 		if (add_ifaddr(p, (struct sockaddr *)) == LDP_E_OK)
 			c++;
 	}

Index: src/usr.sbin/ldpd/socketops.c
diff -u src/usr.sbin/ldpd/socketops.c:1.34 src/usr.sbin/ldpd/socketops.c:1.34.14.1
--- src/usr.sbin/ldpd/socketops.c:1.34	Wed Apr 12 17:02:51 2017
+++ src/usr.sbin/ldpd/socketops.c	Fri Aug  4 13:26:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.34 2017/04/12 17:02:51 roy Exp $ */
+/* $NetBSD: socketops.c,v 1.34.14.1 2023/08/04 13:26:17 martin Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -401,6 +401,7 @@ send_hello(void)
 	struct hello_tlv *t;
 	struct common_hello_tlv *cht;
 	struct ldp_pdu  *spdu;
+	struct in_addr ldp_id;
 	struct transport_address_tlv *trtlv;
 	void *v;
 	struct sockaddr_in sadest;	/* Destination ALL_ROUTERS */
@@ -440,7 +441,8 @@ send_hello(void)
 	/* Prepare PDU envelope */
 	spdu->version = htons(LDP_VERSION);
 	spdu->length = htons(IPV4_HELLO_MSG_SIZE - PDU_VER_LENGTH);
-	inet_aton(LDP_ID, >ldp_id);
+	

CVS commit: [netbsd-9] src/usr.sbin/ldpd

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:26:17 UTC 2023

Modified Files:
src/usr.sbin/ldpd [netbsd-9]: fsm.c ldp_peer.c socketops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1702):

usr.sbin/ldpd/socketops.c: revision 1.36
usr.sbin/ldpd/fsm.c: revision 1.16
usr.sbin/ldpd/ldp_peer.c: revision 1.19

ldpd(8): Fix address of misaligned packed members.

PR kern/56895


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.28.1 src/usr.sbin/ldpd/fsm.c
cvs rdiff -u -r1.16 -r1.16.28.1 src/usr.sbin/ldpd/ldp_peer.c
cvs rdiff -u -r1.34 -r1.34.14.1 src/usr.sbin/ldpd/socketops.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

2023-08-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Aug  4 13:25:18 UTC 2023

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

Log Message:
Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/umodeswitch.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/umodeswitch.c
diff -u src/sys/dev/usb/umodeswitch.c:1.5 src/sys/dev/usb/umodeswitch.c:1.6
--- src/sys/dev/usb/umodeswitch.c:1.5	Sat Feb 15 02:14:02 2020
+++ src/sys/dev/usb/umodeswitch.c	Fri Aug  4 13:25:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: umodeswitch.c,v 1.5 2020/02/15 02:14:02 manu Exp $	*/
+/*	$NetBSD: umodeswitch.c,v 1.6 2023/08/04 13:25:17 manu Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.5 2020/02/15 02:14:02 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodeswitch.c,v 1.6 2023/08/04 13:25:17 manu Exp $");
 
 #include 
 #include 
@@ -440,6 +440,7 @@ umodeswitch_match(device_t parent, cfdat
 		switch (uaa->uaa_product) {
 		case USB_PRODUCT_DLINK_DWM157E_CD:
 		case USB_PRODUCT_DLINK_DWM157_CD:
+		case USB_PRODUCT_DLINK_DWM222_CD:
 			(void)u3g_bulk_ata_eject(uaa->uaa_device);
 			(void)u3g_bulk_scsi_eject(uaa->uaa_device);
 			return UMATCH_HIGHEST;



CVS commit: src/sys/dev/usb

2023-08-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Aug  4 13:25:18 UTC 2023

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

Log Message:
Add support for D-Link DWM-222 4G LTS USB adapter

Oddly, the fake umass device does not detach after umodeswitch does
its duty, but functionality is there, thanks to five u3g devices that
attach. u3g devices 0, 3 and 4 does not seem to accept AT commands.
u3g devices 1 and 2 are fine to be used as modems.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/umodeswitch.c

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



CVS commit: [netbsd-10] src/libexec/ld.elf_so/arch/powerpc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:17:38 UTC 2023

Modified Files:
src/libexec/ld.elf_so/arch/powerpc [netbsd-10]: Makefile.inc
Removed Files:
src/libexec/ld.elf_so/arch/powerpc [netbsd-10]: ld.so.script

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #306):

libexec/ld.elf_so/arch/powerpc/Makefile.inc: revision 1.17
libexec/ld.elf_so/arch/powerpc/ld.so.script: file removal

ld.elf_so powerpc: remove bogus ldscript

This ldscript is not needed and actually makes things worse by putting
everything in one LOAD section, which then needs to have rwx permission.

Remove it so that we get two LOAD sections with better permissions.
Fixes PR 57323.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.12.1 \
src/libexec/ld.elf_so/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.4 -r0 src/libexec/ld.elf_so/arch/powerpc/ld.so.script

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

Modified files:

Index: src/libexec/ld.elf_so/arch/powerpc/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/powerpc/Makefile.inc:1.16 src/libexec/ld.elf_so/arch/powerpc/Makefile.inc:1.16.12.1
--- src/libexec/ld.elf_so/arch/powerpc/Makefile.inc:1.16	Tue Apr  3 21:10:27 2018
+++ src/libexec/ld.elf_so/arch/powerpc/Makefile.inc	Fri Aug  4 13:17:38 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.16 2018/04/03 21:10:27 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.16.12.1 2023/08/04 13:17:38 martin Exp $
 
 SRCS+=		ppc_reloc.c
 LDFLAGS+=	-Wl,-e,_rtld_start
@@ -12,5 +12,4 @@ CPPFLAGS+=	-DELFSIZE=64
 .else
 SRCS+=		rtld_start.S
 CPPFLAGS+=	-DELFSIZE=32
-LDFLAGS+=	-Wl,--script,${.CURDIR}/arch/powerpc/ld.so.script
 .endif



CVS commit: [netbsd-10] src/libexec/ld.elf_so/arch/powerpc

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:17:38 UTC 2023

Modified Files:
src/libexec/ld.elf_so/arch/powerpc [netbsd-10]: Makefile.inc
Removed Files:
src/libexec/ld.elf_so/arch/powerpc [netbsd-10]: ld.so.script

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #306):

libexec/ld.elf_so/arch/powerpc/Makefile.inc: revision 1.17
libexec/ld.elf_so/arch/powerpc/ld.so.script: file removal

ld.elf_so powerpc: remove bogus ldscript

This ldscript is not needed and actually makes things worse by putting
everything in one LOAD section, which then needs to have rwx permission.

Remove it so that we get two LOAD sections with better permissions.
Fixes PR 57323.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.12.1 \
src/libexec/ld.elf_so/arch/powerpc/Makefile.inc
cvs rdiff -u -r1.4 -r0 src/libexec/ld.elf_so/arch/powerpc/ld.so.script

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



CVS commit: [netbsd-8] src/sys/uvm

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:15:25 UTC 2023

Modified Files:
src/sys/uvm [netbsd-8]: uvm_map.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1880):

sys/uvm/uvm_map.c: revision 1.403 (patch)

mmap(2): Avoid arithmetic overflow in search for free space.

PR kern/56900


To generate a diff of this commit:
cvs rdiff -u -r1.351.2.5 -r1.351.2.6 src/sys/uvm/uvm_map.c

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



CVS commit: [netbsd-8] src/usr.bin/find

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:12:00 UTC 2023

Modified Files:
src/usr.bin/find [netbsd-8]: function.c main.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1879):

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.75.8.2 -r1.75.8.3 src/usr.bin/find/function.c
cvs rdiff -u -r1.31 -r1.31.22.1 src/usr.bin/find/main.c

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

Modified files:

Index: src/usr.bin/find/function.c
diff -u src/usr.bin/find/function.c:1.75.8.2 src/usr.bin/find/function.c:1.75.8.3
--- src/usr.bin/find/function.c:1.75.8.2	Mon Sep 10 15:48:25 2018
+++ src/usr.bin/find/function.c	Fri Aug  4 13:12:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: function.c,v 1.75.8.2 2018/09/10 15:48:25 martin Exp $	*/
+/*	$NetBSD: function.c,v 1.75.8.3 2023/08/04 13:12:00 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)function.c	8.10 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: function.c,v 1.75.8.2 2018/09/10 15:48:25 martin Exp $");
+__RCSID("$NetBSD: function.c,v 1.75.8.3 2023/08/04 13:12:00 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -641,7 +641,8 @@ f_exec(PLAN *plan, FTSENT *entry)
 			err(1, "vfork");
 			/* NOTREACHED */
 		case 0:
-			if (fchdir(dotfd)) {
+			/* change dir back from where we started */
+			if (!(ftsoptions & FTS_NOCHDIR) && fchdir(dotfd)) {
 warn("chdir");
 _exit(1);
 			}
@@ -673,7 +674,8 @@ run_f_exec(PLAN *plan)
 		err(1, "vfork");
 		/* NOTREACHED */
 	case 0:
-		if (fchdir(dotfd)) {
+		/* change dir back from where we started */
+		if (!(ftsoptions & FTS_NOCHDIR) && fchdir(dotfd)) {
 			warn("chdir");
 			_exit(1);
 		}

Index: src/usr.bin/find/main.c
diff -u src/usr.bin/find/main.c:1.31 src/usr.bin/find/main.c:1.31.22.1
--- src/usr.bin/find/main.c:1.31	Thu Jan 24 17:50:08 2013
+++ src/usr.bin/find/main.c	Fri Aug  4 13:12:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.31.22.1 2023/08/04 13:12:00 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -39,7 +39,7 @@ static char sccsid[] = "@(#)main.c	8.4 (
 #else
 __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\
  The Regents of the University of California.  All rights reserved.");
-__RCSID("$NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.31.22.1 2023/08/04 13:12:00 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -149,9 +149,9 @@ main(int argc, char *argv[])
 	*p = NULL;
 
 	if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
-		err(1, ".");
+		ftsoptions |= FTS_NOCHDIR;
 
-	exit(find_execute(find_formplan(argv), start));
+	return find_execute(find_formplan(argv), start);
 }
 
 static void



CVS commit: [netbsd-8] src/sys/uvm

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:15:25 UTC 2023

Modified Files:
src/sys/uvm [netbsd-8]: uvm_map.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1880):

sys/uvm/uvm_map.c: revision 1.403 (patch)

mmap(2): Avoid arithmetic overflow in search for free space.

PR kern/56900


To generate a diff of this commit:
cvs rdiff -u -r1.351.2.5 -r1.351.2.6 src/sys/uvm/uvm_map.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_map.c
diff -u src/sys/uvm/uvm_map.c:1.351.2.5 src/sys/uvm/uvm_map.c:1.351.2.6
--- src/sys/uvm/uvm_map.c:1.351.2.5	Sat Apr  1 16:05:00 2023
+++ src/sys/uvm/uvm_map.c	Fri Aug  4 13:15:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.351.2.5 2023/04/01 16:05:00 martin Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.351.2.6 2023/08/04 13:15:25 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.351.2.5 2023/04/01 16:05:00 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.351.2.6 2023/08/04 13:15:25 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -2014,7 +2014,21 @@ uvm_map_findspace(struct vm_map *map, va
 	/* Try to find the space in the red-black tree */
 
 	/* Check slot before any entry */
-	hint = topdown ? entry->next->start - length : entry->end;
+	if (topdown) {
+		KASSERTMSG(entry->next->start >= vm_map_min(map),
+		"map=%p entry=%p entry->next=%p"
+		" entry->next->start=0x%"PRIxVADDR" min=0x%"PRIxVADDR,
+		map, entry, entry->next,
+		entry->next->start, vm_map_min(map));
+		if (length > entry->next->start - vm_map_min(map))
+			hint = vm_map_min(map); /* XXX goto wraparound? */
+		else
+			hint = entry->next->start - length;
+		KASSERT(hint >= vm_map_min(map));
+	} else {
+		hint = entry->end;
+	}
+
 	switch (uvm_map_space_avail(, length, uoffset, align, flags,
 	topdown, entry)) {
 	case 1:



CVS commit: [netbsd-8] src/usr.bin/find

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:12:00 UTC 2023

Modified Files:
src/usr.bin/find [netbsd-8]: function.c main.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1879):

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.75.8.2 -r1.75.8.3 src/usr.bin/find/function.c
cvs rdiff -u -r1.31 -r1.31.22.1 src/usr.bin/find/main.c

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



CVS commit: [netbsd-9] src/usr.bin/find

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:10:35 UTC 2023

Modified Files:
src/usr.bin/find [netbsd-9]: function.c main.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1701):

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.77.2.1 src/usr.bin/find/function.c
cvs rdiff -u -r1.31 -r1.31.32.1 src/usr.bin/find/main.c

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

Modified files:

Index: src/usr.bin/find/function.c
diff -u src/usr.bin/find/function.c:1.77 src/usr.bin/find/function.c:1.77.2.1
--- src/usr.bin/find/function.c:1.77	Tue Sep  4 15:16:15 2018
+++ src/usr.bin/find/function.c	Fri Aug  4 13:10:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: function.c,v 1.77 2018/09/04 15:16:15 kre Exp $	*/
+/*	$NetBSD: function.c,v 1.77.2.1 2023/08/04 13:10:35 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)function.c	8.10 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: function.c,v 1.77 2018/09/04 15:16:15 kre Exp $");
+__RCSID("$NetBSD: function.c,v 1.77.2.1 2023/08/04 13:10:35 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -641,7 +641,8 @@ f_exec(PLAN *plan, FTSENT *entry)
 			err(1, "vfork");
 			/* NOTREACHED */
 		case 0:
-			if (fchdir(dotfd)) {
+			/* change dir back from where we started */
+			if (!(ftsoptions & FTS_NOCHDIR) && fchdir(dotfd)) {
 warn("chdir");
 _exit(1);
 			}
@@ -673,7 +674,8 @@ run_f_exec(PLAN *plan)
 		err(1, "vfork");
 		/* NOTREACHED */
 	case 0:
-		if (fchdir(dotfd)) {
+		/* change dir back from where we started */
+		if (!(ftsoptions & FTS_NOCHDIR) && fchdir(dotfd)) {
 			warn("chdir");
 			_exit(1);
 		}

Index: src/usr.bin/find/main.c
diff -u src/usr.bin/find/main.c:1.31 src/usr.bin/find/main.c:1.31.32.1
--- src/usr.bin/find/main.c:1.31	Thu Jan 24 17:50:08 2013
+++ src/usr.bin/find/main.c	Fri Aug  4 13:10:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.31.32.1 2023/08/04 13:10:35 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -39,7 +39,7 @@ static char sccsid[] = "@(#)main.c	8.4 (
 #else
 __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\
  The Regents of the University of California.  All rights reserved.");
-__RCSID("$NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.31.32.1 2023/08/04 13:10:35 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -149,9 +149,9 @@ main(int argc, char *argv[])
 	*p = NULL;
 
 	if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
-		err(1, ".");
+		ftsoptions |= FTS_NOCHDIR;
 
-	exit(find_execute(find_formplan(argv), start));
+	return find_execute(find_formplan(argv), start);
 }
 
 static void



CVS commit: [netbsd-9] src/usr.bin/find

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:10:35 UTC 2023

Modified Files:
src/usr.bin/find [netbsd-9]: function.c main.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1701):

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.77.2.1 src/usr.bin/find/function.c
cvs rdiff -u -r1.31 -r1.31.32.1 src/usr.bin/find/main.c

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



CVS commit: [netbsd-10] src/usr.bin/find

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:09:17 UTC 2023

Modified Files:
src/usr.bin/find [netbsd-10]: function.c main.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #305):

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.6.1 src/usr.bin/find/function.c
cvs rdiff -u -r1.31 -r1.31.40.1 src/usr.bin/find/main.c

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

Modified files:

Index: src/usr.bin/find/function.c
diff -u src/usr.bin/find/function.c:1.79 src/usr.bin/find/function.c:1.79.6.1
--- src/usr.bin/find/function.c:1.79	Thu Mar 18 18:24:14 2021
+++ src/usr.bin/find/function.c	Fri Aug  4 13:09:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: function.c,v 1.79 2021/03/18 18:24:14 cheusov Exp $	*/
+/*	$NetBSD: function.c,v 1.79.6.1 2023/08/04 13:09:17 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)function.c	8.10 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: function.c,v 1.79 2021/03/18 18:24:14 cheusov Exp $");
+__RCSID("$NetBSD: function.c,v 1.79.6.1 2023/08/04 13:09:17 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -641,7 +641,8 @@ f_exec(PLAN *plan, FTSENT *entry)
 			err(1, "vfork");
 			/* NOTREACHED */
 		case 0:
-			if (fchdir(dotfd)) {
+			/* change dir back from where we started */
+			if (!(ftsoptions & FTS_NOCHDIR) && fchdir(dotfd)) {
 warn("chdir");
 _exit(1);
 			}
@@ -673,7 +674,8 @@ run_f_exec(PLAN *plan)
 		err(1, "vfork");
 		/* NOTREACHED */
 	case 0:
-		if (fchdir(dotfd)) {
+		/* change dir back from where we started */
+		if (!(ftsoptions & FTS_NOCHDIR) && fchdir(dotfd)) {
 			warn("chdir");
 			_exit(1);
 		}

Index: src/usr.bin/find/main.c
diff -u src/usr.bin/find/main.c:1.31 src/usr.bin/find/main.c:1.31.40.1
--- src/usr.bin/find/main.c:1.31	Thu Jan 24 17:50:08 2013
+++ src/usr.bin/find/main.c	Fri Aug  4 13:09:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.31.40.1 2023/08/04 13:09:17 martin Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -39,7 +39,7 @@ static char sccsid[] = "@(#)main.c	8.4 (
 #else
 __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\
  The Regents of the University of California.  All rights reserved.");
-__RCSID("$NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.31.40.1 2023/08/04 13:09:17 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -149,9 +149,9 @@ main(int argc, char *argv[])
 	*p = NULL;
 
 	if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
-		err(1, ".");
+		ftsoptions |= FTS_NOCHDIR;
 
-	exit(find_execute(find_formplan(argv), start));
+	return find_execute(find_formplan(argv), start);
 }
 
 static void



CVS commit: [netbsd-10] src/usr.bin/find

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:09:17 UTC 2023

Modified Files:
src/usr.bin/find [netbsd-10]: function.c main.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #305):

usr.bin/find/main.c: revision 1.32
usr.bin/find/function.c: revision 1.80

PR/57313: Timo Buhrmester: Don't bail if "." cannot be opened. From FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.6.1 src/usr.bin/find/function.c
cvs rdiff -u -r1.31 -r1.31.40.1 src/usr.bin/find/main.c

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



CVS commit: [netbsd-8] src/lib/libpthread

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:06:59 UTC 2023

Modified Files:
src/lib/libpthread [netbsd-8]: pthread_int.h pthread_spin.c
src/lib/libpthread/arch/aarch64 [netbsd-8]: pthread_md.h
src/lib/libpthread/arch/arm [netbsd-8]: pthread_md.h
src/lib/libpthread/arch/i386 [netbsd-8]: pthread_md.h
src/lib/libpthread/arch/x86_64 [netbsd-8]: pthread_md.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1878):

lib/libpthread/arch/x86_64/pthread_md.h: revision 1.13
lib/libpthread/pthread_int.h: revision 1.110
lib/libpthread/pthread_int.h: revision 1.111
lib/libpthread/arch/i386/pthread_md.h: revision 1.21
lib/libpthread/arch/arm/pthread_md.h: revision 1.12
lib/libpthread/arch/arm/pthread_md.h: revision 1.13
lib/libpthread/pthread_spin.c: revision 1.11
lib/libpthread/arch/aarch64/pthread_md.h: revision 1.2

libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.
PR port-arm/57437 (pthread__smt_pause/wake issue)

libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:
- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register
- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.
PR port-arm/57437


To generate a diff of this commit:
cvs rdiff -u -r1.93.4.1 -r1.93.4.2 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.6 -r1.6.24.1 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.1 -r1.1.18.1 src/lib/libpthread/arch/aarch64/pthread_md.h
cvs rdiff -u -r1.9 -r1.9.18.1 src/lib/libpthread/arch/arm/pthread_md.h
cvs rdiff -u -r1.20 -r1.20.24.1 src/lib/libpthread/arch/i386/pthread_md.h
cvs rdiff -u -r1.12 -r1.12.36.1 src/lib/libpthread/arch/x86_64/pthread_md.h

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

Modified files:

Index: src/lib/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.93.4.1 src/lib/libpthread/pthread_int.h:1.93.4.2
--- src/lib/libpthread/pthread_int.h:1.93.4.1	Thu Aug 31 08:32:39 2017
+++ src/lib/libpthread/pthread_int.h	Fri Aug  4 13:06:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.93.4.1 2017/08/31 08:32:39 bouyer Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.93.4.2 2023/08/04 13:06:59 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -301,10 +301,13 @@ int	pthread__checkpri(int) PTHREAD_HIDE;
 int	pthread__add_specific(pthread_t, pthread_key_t, const void *) PTHREAD_HIDE;
 
 #ifndef pthread__smt_pause
-#define	pthread__smt_pause()	/* nothing */
+#define	pthread__smt_pause()	__nothing
+#endif
+#ifndef pthread__smt_wait
+#define	pthread__smt_wait()	__nothing
 #endif
 #ifndef pthread__smt_wake
-#define	pthread__smt_wake()	/* nothing */
+#define	pthread__smt_wake()	__nothing
 #endif
 
 /*

Index: src/lib/libpthread/pthread_spin.c
diff -u src/lib/libpthread/pthread_spin.c:1.6 src/lib/libpthread/pthread_spin.c:1.6.24.1
--- src/lib/libpthread/pthread_spin.c:1.6	Thu Aug 16 04:49:47 2012
+++ src/lib/libpthread/pthread_spin.c	Fri Aug  4 13:06:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_spin.c,v 1.6 2012/08/16 04:49:47 matt Exp $	*/
+/*	$NetBSD: pthread_spin.c,v 1.6.24.1 2023/08/04 13:06:59 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread_spin.c,v 1.6 2012/08/16 04:49:47 matt Exp $");
+__RCSID("$NetBSD: pthread_spin.c,v 1.6.24.1 

CVS commit: [netbsd-8] src/lib/libpthread

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:06:59 UTC 2023

Modified Files:
src/lib/libpthread [netbsd-8]: pthread_int.h pthread_spin.c
src/lib/libpthread/arch/aarch64 [netbsd-8]: pthread_md.h
src/lib/libpthread/arch/arm [netbsd-8]: pthread_md.h
src/lib/libpthread/arch/i386 [netbsd-8]: pthread_md.h
src/lib/libpthread/arch/x86_64 [netbsd-8]: pthread_md.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1878):

lib/libpthread/arch/x86_64/pthread_md.h: revision 1.13
lib/libpthread/pthread_int.h: revision 1.110
lib/libpthread/pthread_int.h: revision 1.111
lib/libpthread/arch/i386/pthread_md.h: revision 1.21
lib/libpthread/arch/arm/pthread_md.h: revision 1.12
lib/libpthread/arch/arm/pthread_md.h: revision 1.13
lib/libpthread/pthread_spin.c: revision 1.11
lib/libpthread/arch/aarch64/pthread_md.h: revision 1.2

libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.
PR port-arm/57437 (pthread__smt_pause/wake issue)

libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:
- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register
- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.
PR port-arm/57437


To generate a diff of this commit:
cvs rdiff -u -r1.93.4.1 -r1.93.4.2 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.6 -r1.6.24.1 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.1 -r1.1.18.1 src/lib/libpthread/arch/aarch64/pthread_md.h
cvs rdiff -u -r1.9 -r1.9.18.1 src/lib/libpthread/arch/arm/pthread_md.h
cvs rdiff -u -r1.20 -r1.20.24.1 src/lib/libpthread/arch/i386/pthread_md.h
cvs rdiff -u -r1.12 -r1.12.36.1 src/lib/libpthread/arch/x86_64/pthread_md.h

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



CVS commit: [netbsd-9] src/lib/libpthread

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:04:04 UTC 2023

Modified Files:
src/lib/libpthread [netbsd-9]: pthread_int.h pthread_spin.c
src/lib/libpthread/arch/aarch64 [netbsd-9]: pthread_md.h
src/lib/libpthread/arch/arm [netbsd-9]: pthread_md.h
src/lib/libpthread/arch/i386 [netbsd-9]: pthread_md.h
src/lib/libpthread/arch/x86_64 [netbsd-9]: pthread_md.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1700):

lib/libpthread/arch/x86_64/pthread_md.h: revision 1.13
lib/libpthread/pthread_int.h: revision 1.110
lib/libpthread/pthread_int.h: revision 1.111
lib/libpthread/arch/i386/pthread_md.h: revision 1.21
lib/libpthread/arch/arm/pthread_md.h: revision 1.12
lib/libpthread/arch/arm/pthread_md.h: revision 1.13
lib/libpthread/pthread_spin.c: revision 1.11
lib/libpthread/arch/aarch64/pthread_md.h: revision 1.2

libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.
PR port-arm/57437 (pthread__smt_pause/wake issue)

libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:
- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register
- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.
PR port-arm/57437


To generate a diff of this commit:
cvs rdiff -u -r1.95.2.2 -r1.95.2.3 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.6 -r1.6.34.1 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.1 -r1.1.28.1 src/lib/libpthread/arch/aarch64/pthread_md.h
cvs rdiff -u -r1.11 -r1.11.2.1 src/lib/libpthread/arch/arm/pthread_md.h
cvs rdiff -u -r1.20 -r1.20.34.1 src/lib/libpthread/arch/i386/pthread_md.h
cvs rdiff -u -r1.12 -r1.12.46.1 src/lib/libpthread/arch/x86_64/pthread_md.h

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

Modified files:

Index: src/lib/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.95.2.2 src/lib/libpthread/pthread_int.h:1.95.2.3
--- src/lib/libpthread/pthread_int.h:1.95.2.2	Sun Jan 26 10:55:16 2020
+++ src/lib/libpthread/pthread_int.h	Fri Aug  4 13:04:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_int.h,v 1.95.2.2 2020/01/26 10:55:16 martin Exp $	*/
+/*	$NetBSD: pthread_int.h,v 1.95.2.3 2023/08/04 13:04:03 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -302,10 +302,13 @@ int	pthread__checkpri(int) PTHREAD_HIDE;
 int	pthread__add_specific(pthread_t, pthread_key_t, const void *) PTHREAD_HIDE;
 
 #ifndef pthread__smt_pause
-#define	pthread__smt_pause()	/* nothing */
+#define	pthread__smt_pause()	__nothing
+#endif
+#ifndef pthread__smt_wait
+#define	pthread__smt_wait()	__nothing
 #endif
 #ifndef pthread__smt_wake
-#define	pthread__smt_wake()	/* nothing */
+#define	pthread__smt_wake()	__nothing
 #endif
 
 /*

Index: src/lib/libpthread/pthread_spin.c
diff -u src/lib/libpthread/pthread_spin.c:1.6 src/lib/libpthread/pthread_spin.c:1.6.34.1
--- src/lib/libpthread/pthread_spin.c:1.6	Thu Aug 16 04:49:47 2012
+++ src/lib/libpthread/pthread_spin.c	Fri Aug  4 13:04:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_spin.c,v 1.6 2012/08/16 04:49:47 matt Exp $	*/
+/*	$NetBSD: pthread_spin.c,v 1.6.34.1 2023/08/04 13:04:03 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread_spin.c,v 1.6 2012/08/16 04:49:47 matt Exp $");
+__RCSID("$NetBSD: pthread_spin.c,v 1.6.34.1 

CVS commit: [netbsd-9] src/lib/libpthread

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 13:04:04 UTC 2023

Modified Files:
src/lib/libpthread [netbsd-9]: pthread_int.h pthread_spin.c
src/lib/libpthread/arch/aarch64 [netbsd-9]: pthread_md.h
src/lib/libpthread/arch/arm [netbsd-9]: pthread_md.h
src/lib/libpthread/arch/i386 [netbsd-9]: pthread_md.h
src/lib/libpthread/arch/x86_64 [netbsd-9]: pthread_md.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1700):

lib/libpthread/arch/x86_64/pthread_md.h: revision 1.13
lib/libpthread/pthread_int.h: revision 1.110
lib/libpthread/pthread_int.h: revision 1.111
lib/libpthread/arch/i386/pthread_md.h: revision 1.21
lib/libpthread/arch/arm/pthread_md.h: revision 1.12
lib/libpthread/arch/arm/pthread_md.h: revision 1.13
lib/libpthread/pthread_spin.c: revision 1.11
lib/libpthread/arch/aarch64/pthread_md.h: revision 1.2

libpthread: Use __nothing, not /* nothing */, for empty macros.

No functional change intended -- just safer to do it this way in case
the macros are used in if branches or comma expressions.
PR port-arm/57437 (pthread__smt_pause/wake issue)

libpthread: New pthread__smt_wait to put CPU in low power for spin.

This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:
- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register
- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.
PR port-arm/57437


To generate a diff of this commit:
cvs rdiff -u -r1.95.2.2 -r1.95.2.3 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.6 -r1.6.34.1 src/lib/libpthread/pthread_spin.c
cvs rdiff -u -r1.1 -r1.1.28.1 src/lib/libpthread/arch/aarch64/pthread_md.h
cvs rdiff -u -r1.11 -r1.11.2.1 src/lib/libpthread/arch/arm/pthread_md.h
cvs rdiff -u -r1.20 -r1.20.34.1 src/lib/libpthread/arch/i386/pthread_md.h
cvs rdiff -u -r1.12 -r1.12.46.1 src/lib/libpthread/arch/x86_64/pthread_md.h

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



CVS commit: [netbsd-9] src

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 12:55:48 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-9]: mi shl.mi
src/distrib/sets/lists/tests [netbsd-9]: mi shl.mi
src/libexec/ld.elf_so [netbsd-9]: README.TLS map_object.c rtld.c rtld.h
tls.c
src/libexec/ld.elf_so/arch/aarch64 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/alpha [netbsd-9]: alpha_reloc.c
src/libexec/ld.elf_so/arch/arm [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/hppa [netbsd-9]: hppa_reloc.c
src/libexec/ld.elf_so/arch/i386 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/m68k [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/mips [netbsd-9]: mips_reloc.c
src/libexec/ld.elf_so/arch/or1k [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/powerpc [netbsd-9]: ppc_reloc.c
src/libexec/ld.elf_so/arch/riscv [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/sh3 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc64 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/x86_64 [netbsd-9]: mdreloc.c
src/tests/libexec/ld.elf_so [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_dso1 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_dso2 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_dso3 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_ifunc_dso [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso0 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso1 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso2 [netbsd-9]: Makefile
Added Files:
src/tests/libexec/ld.elf_so [netbsd-9]: helper.mk t_tls_extern.c
src/tests/libexec/ld.elf_so/helper_abuse_dynamic [netbsd-9]: Makefile
h_abuse_dynamic.c
src/tests/libexec/ld.elf_so/helper_abuse_static [netbsd-9]: Makefile
h_abuse_static.c
src/tests/libexec/ld.elf_so/helper_def_dynamic [netbsd-9]: Makefile
h_def_dynamic.c
src/tests/libexec/ld.elf_so/helper_def_static [netbsd-9]: Makefile
h_def_static.c
src/tests/libexec/ld.elf_so/helper_onlyctor_dynamic [netbsd-9]:
Makefile h_onlyctor_dynamic.c
src/tests/libexec/ld.elf_so/helper_onlydef [netbsd-9]: Makefile
h_onlydef.c
src/tests/libexec/ld.elf_so/helper_onlydef_static [netbsd-9]: Makefile
h_onlydef_static.c
src/tests/libexec/ld.elf_so/helper_onlyuse_dynamic [netbsd-9]: Makefile
h_onlyuse_dynamic.c
src/tests/libexec/ld.elf_so/helper_onlyuse_static [netbsd-9]: Makefile
h_onlyuse_static.c
src/tests/libexec/ld.elf_so/helper_use_dynamic [netbsd-9]: Makefile
h_use_dynamic.c
src/tests/libexec/ld.elf_so/helper_use_static [netbsd-9]: Makefile
h_use_static.c

Log Message:
Pull up following revision(s), all via patch,
(requested by riastradh in ticket #1699):

distrib/sets/lists/tests/shl.mi: revision 1.14
distrib/sets/lists/tests/shl.mi: revision 1.15
distrib/sets/lists/tests/shl.mi: revision 1.16
tests/libexec/ld.elf_so/helper_def_static/h_def_static.c: revision 1.1
tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.2
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.75
distrib/sets/lists/tests/mi: revision 1.1265
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.36
libexec/ld.elf_so/rtld.c: revision 1.214
tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.1
distrib/sets/lists/debug/mi: revision 1.400
tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.2
distrib/sets/lists/debug/mi: revision 1.401
distrib/sets/lists/debug/mi: revision 1.402
tests/libexec/ld.elf_so/helper_dso2/Makefile: revision 1.2
distrib/sets/lists/debug/mi: revision 1.403
tests/libexec/ld.elf_so/helper_symver_dso0/Makefile: revision 1.2
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.48
distrib/sets/lists/debug/mi: revision 1.406
tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile: revision 1.2
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.70
libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.18
tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.1

CVS commit: [netbsd-9] src

2023-08-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug  4 12:55:48 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-9]: mi shl.mi
src/distrib/sets/lists/tests [netbsd-9]: mi shl.mi
src/libexec/ld.elf_so [netbsd-9]: README.TLS map_object.c rtld.c rtld.h
tls.c
src/libexec/ld.elf_so/arch/aarch64 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/alpha [netbsd-9]: alpha_reloc.c
src/libexec/ld.elf_so/arch/arm [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/hppa [netbsd-9]: hppa_reloc.c
src/libexec/ld.elf_so/arch/i386 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/m68k [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/mips [netbsd-9]: mips_reloc.c
src/libexec/ld.elf_so/arch/or1k [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/powerpc [netbsd-9]: ppc_reloc.c
src/libexec/ld.elf_so/arch/riscv [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/sh3 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/sparc64 [netbsd-9]: mdreloc.c
src/libexec/ld.elf_so/arch/x86_64 [netbsd-9]: mdreloc.c
src/tests/libexec/ld.elf_so [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_dso1 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_dso2 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_dso3 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_ifunc_dso [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso0 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso1 [netbsd-9]: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso2 [netbsd-9]: Makefile
Added Files:
src/tests/libexec/ld.elf_so [netbsd-9]: helper.mk t_tls_extern.c
src/tests/libexec/ld.elf_so/helper_abuse_dynamic [netbsd-9]: Makefile
h_abuse_dynamic.c
src/tests/libexec/ld.elf_so/helper_abuse_static [netbsd-9]: Makefile
h_abuse_static.c
src/tests/libexec/ld.elf_so/helper_def_dynamic [netbsd-9]: Makefile
h_def_dynamic.c
src/tests/libexec/ld.elf_so/helper_def_static [netbsd-9]: Makefile
h_def_static.c
src/tests/libexec/ld.elf_so/helper_onlyctor_dynamic [netbsd-9]:
Makefile h_onlyctor_dynamic.c
src/tests/libexec/ld.elf_so/helper_onlydef [netbsd-9]: Makefile
h_onlydef.c
src/tests/libexec/ld.elf_so/helper_onlydef_static [netbsd-9]: Makefile
h_onlydef_static.c
src/tests/libexec/ld.elf_so/helper_onlyuse_dynamic [netbsd-9]: Makefile
h_onlyuse_dynamic.c
src/tests/libexec/ld.elf_so/helper_onlyuse_static [netbsd-9]: Makefile
h_onlyuse_static.c
src/tests/libexec/ld.elf_so/helper_use_dynamic [netbsd-9]: Makefile
h_use_dynamic.c
src/tests/libexec/ld.elf_so/helper_use_static [netbsd-9]: Makefile
h_use_static.c

Log Message:
Pull up following revision(s), all via patch,
(requested by riastradh in ticket #1699):

distrib/sets/lists/tests/shl.mi: revision 1.14
distrib/sets/lists/tests/shl.mi: revision 1.15
distrib/sets/lists/tests/shl.mi: revision 1.16
tests/libexec/ld.elf_so/helper_def_static/h_def_static.c: revision 1.1
tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.2
libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.75
distrib/sets/lists/tests/mi: revision 1.1265
libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.36
libexec/ld.elf_so/rtld.c: revision 1.214
tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.1
distrib/sets/lists/debug/mi: revision 1.400
tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.2
distrib/sets/lists/debug/mi: revision 1.401
distrib/sets/lists/debug/mi: revision 1.402
tests/libexec/ld.elf_so/helper_dso2/Makefile: revision 1.2
distrib/sets/lists/debug/mi: revision 1.403
tests/libexec/ld.elf_so/helper_symver_dso0/Makefile: revision 1.2
libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.48
distrib/sets/lists/debug/mi: revision 1.406
tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.1
tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.2
tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile: revision 1.2
libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.70
libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.18
tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.1

CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 12:49:15 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1466 -r1.1467 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1465 -r1.1466 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 12:48:00 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel Snow Ridge devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1484 -r1.1485 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1484 src/sys/dev/pci/pcidevs:1.1485
--- src/sys/dev/pci/pcidevs:1.1484	Mon Jul 31 11:18:20 2023
+++ src/sys/dev/pci/pcidevs	Fri Aug  4 12:48:00 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1484 2023/07/31 11:18:20 tnn Exp $
+$NetBSD: pcidevs,v 1.1485 2023/08/04 12:48:00 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3877,6 +3877,13 @@ product INTEL WIFI_LINK_7265_2	0x095b	Du
 product INTEL X1000_LB		0x095e	Quark X1000 Legacy Bridge
 product INTEL 80960RM		0x0962	i960 RM PCI-PCI
 product INTEL 80960RN		0x0964	i960 RN PCI-PCI
+product INTEL SNR_IEH		0x0998	Snow Ridge IEH
+product INTEL SNR_M2IIO_VTD	0x09a2	Snow Ridge Mesh2IIO MMAP/VT-d
+product INTEL SNR_M2IIO_RAS	0x09a3	Snow Ridge Mesh2IIO RAS
+product INTEL SNR_M2IIO_PMU	0x09a4	Snow Ridge Mesh2IIO PMU/PMON
+product INTEL SNR_M2IIO_DFX	0x09a5	Snow Ridge Mesh2IIO DFx
+product INTEL SNR_PECI_OOB_MSM	0x09a6	Snow Ridge PECI OOB-MSM
+product INTEL SNR_PECI_OOB_MSM_PMU 0x09a7 Snow Ridge PECI OOB-MSM PMU
 product INTEL CORE4G_D_ULT_GT1	0x0a02	HD Graphics
 product INTEL CORE4G_M_HOST_DRAM 0x0a04	Core 4G (mobile) Host Bridge, DRAM
 product INTEL CORE4G_M_ULT_GT1	0x0a06	HD Graphics (GT1)
@@ -3897,6 +3904,7 @@ product INTEL CORE4G_R_ULT_GT3_2 0x0a2e	
 product INTEL DC_P3520_SSD	0x0a53	SSD DC P3520
 product INTEL DC_P4500_SSD	0x0a54	SSD DC P4500
 product INTEL DC_P4600_SSD	0x0a55	SSD DC P4600
+product INTEL SNR_DMA		0x0b00	Snow Ridge DMA
 product INTEL HASWELL_HOST_DRAM	0x0c00	Haswell Host Bridge, DRAM
 product INTEL HASWELL_PCIE16	0x0c01	Haswell PCI-E x16 Controller
 product INTEL HASWELL_PCIE8	0x0c05	Haswell PCI-E x8 Controller
@@ -4378,6 +4386,43 @@ product INTEL CORE5G_M_GT2_1	0x1616	HD G
 product INTEL CORE5G_M_GT2_2	0x161e	HD Graphics 5300
 product INTEL CORE5G_M_GT3_15W	0x1626	HD Graphics 6000
 product INTEL CORE5G_M_GT3_28W	0x162b	Iris Graphics 6100
+product INTEL SNR_E882_C_BP	0x1890	Snow Ridge E882-C for backplane
+product INTEL SNR_E882_C_QSFP	0x1891	Snow Ridge E882-C for QSFP
+product INTEL SNR_E882_C_SFP	0x1892	Snow Ridge E882-C for SFP
+product INTEL SNR_E882_C_10GT	0x1893	Snow Ridge E882-C/X557-AT 10GBASE-T
+product INTEL SNR_E882_C_1G	0x1894	Snow Ridge E882-C 1G
+product INTEL SNR_E882_X	0x1895	Snow Ridge E882-X (for BMSM)
+product INTEL SNR_E882_L_BP	0x1897	Snow Ridge E882-L for backplane
+product INTEL SNR_E882_L_SFP	0x1898	Snow Ridge E882-L for SFP
+product INTEL SNR_E882_L_10GT	0x1899	Snow Ridge E882-L/X557-AT 10GBASE-T
+product INTEL SNR_E882_L_1G	0x189a	Snow Ridge E882-L 1G
+product INTEL SNR_QAT_18	0x18a0	Snow Ridge QAT 1.8
+product INTEL SNR_PCH_C2_RP_11	0x18a2	Snow Ridge PCH PCIe Cluster 0, RP 11
+product INTEL SNR_PCH_C0_RP_0	0x18a4	Snow Ridge PCH PCIe Cluster 0, RP 0
+product INTEL SNR_PCH_C0_RP_1	0x18a5	Snow Ridge PCH PCIe Cluster 0, RP 1
+product INTEL SNR_PCH_C0_RP_2	0x18a6	Snow Ridge PCH PCIe Cluster 0, RP 2
+product INTEL SNR_PCH_C0_RP_3	0x18a7	Snow Ridge PCH PCIe Cluster 0, RP 3
+product INTEL SNR_SMB_HOST	0x18ac	Snow Ridge Host (DMA) SMBus
+product INTEL SNR_PCH_C2_RP_8	0x18ad	Snow Ridge PCH PCIe Cluster 0, RP 8
+product INTEL SNR_PCH_C2_RP_9	0x18ae	Snow Ridge PCH PCIe Cluster 0, RP 9
+product INTEL SNR_PCH_C2_RP_10	0x18af	Snow Ridge PCH PCIe Cluster 0, RP 10
+product INTEL SNR_SATA_0	0x18b3	Snow Ridge SATA 0
+product INTEL SNR_USB		0x18d0	Snow Ridge USB
+product INTEL SNR_NIS		0x18d1	Snow Ridge VRP to NIS
+product INTEL SNR_ME_HECI	0x18d3	Snow Ridge ME HECI
+product INTEL SNR_HSUART	0x18d8	Snow Ridge HSUART
+product INTEL SNR_VRP_QAT	0x18da	Snow Ridge VRP for QAT
+product INTEL SNR_EMMC		0x18db	Snow Ridge eMMC
+product INTEL SNR_LPC		0x18dc	Snow Ridge LPC/eSPI
+product INTEL SNR_P2SB		0x18dd	Snow Ridge PCH P2SB
+product INTEL SNR_PMC		0x18de	Snow Ridge PCH PMC
+product INTEL SNR_SMB_LEGACY	0x18df	Snow Ridge Legacy SMBus
+product INTEL SNR_SPI		0x18e0	Snow Ridge SPI
+product INTEL SNR_PCH_TRACE	0x18e1	Snow Ridge PCH Trace Hub
+product INTEL SNR_IRC		0x18e2	Snow Ridge MAC iRC
+product INTEL SNR_PMC_SRAM	0x18e3	Snow Ridge PMC/SRAM
+product INTEL SNR_QAT_17	0x18ee	Snow Ridge QAT 1.7
+product INTEL SNR_SATA_2	0x18f3	Snow Ridge SATA 2
 product INTEL CORE6G_H_HB_1	0x1900	Core 6G Host and DRAM (H, Dual Core)
 product INTEL CORE6G_PCIE_X16	0x1901	Core 6G PCIe x16
 product INTEL CORE6G_PEN_GTX_1	0x1902	HD Graphics 510
@@ -4961,6 +5006,7 @@ product INTEL 63XXESB_ACA	0x2698	63xxESB
 product INTEL 63XXESB_HDA	0x269a	63xxESB High Definition Audio Controller
 product INTEL 63XXESB_SMB	0x269b	63xxESB SMBus Controller
 product INTEL 63XXESB_IDE	0x269e	63xxESB 

CVS commit: src/sys/dev/pci

2023-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug  4 12:48:00 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel Snow Ridge devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1484 -r1.1485 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/kern

2023-08-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Aug  4 12:24:36 UTC 2023

Modified Files:
src/sys/kern: kern_softint.c

Log Message:
Revert "softint(9): Sprinkle KASSERT(!cold)."

Temporary workaround for PR kern/57563 -- to be fixed properly after
analysis.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/kern_softint.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/kern/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.74 src/sys/kern/kern_softint.c:1.75
--- src/sys/kern/kern_softint.c:1.74	Fri Aug  4 07:40:30 2023
+++ src/sys/kern/kern_softint.c	Fri Aug  4 12:24:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.74 2023/08/04 07:40:30 riastradh Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.75 2023/08/04 12:24:36 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.74 2023/08/04 07:40:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.75 2023/08/04 12:24:36 riastradh Exp $");
 
 #include 
 #include 
@@ -488,8 +488,6 @@ softint_schedule(void *arg)
 
 	SDT_PROBE2(sdt, kernel, softint, schedule,  arg, /*ci*/NULL);
 
-	KASSERT(!cold);
-
 	/*
 	 * If this assert fires, rather than disabling preemption explicitly
 	 * to make it stop, consider that you are probably using a softint
@@ -571,7 +569,6 @@ softint_execute(lwp_t *l, int s)
 	KASSERT(si->si_cpu == curcpu());
 	KASSERT(si->si_lwp->l_wchan == NULL);
 	KASSERT(si->si_active);
-	KASSERT(!cold);
 
 	/*
 	 * Note: due to priority inheritance we may have interrupted a
@@ -724,8 +721,6 @@ softint_thread(void *cookie)
 	lwp_t *l;
 	int s;
 
-	KASSERT(!cold);
-
 	l = curlwp;
 	si = l->l_private;
 
@@ -805,8 +800,6 @@ softint_dispatch(lwp_t *pinned, int s)
 	u_int timing;
 	lwp_t *l;
 
-	KASSERT(!cold);
-
 #ifdef DIAGNOSTIC
 	if ((pinned->l_pflag & LP_RUNNING) == 0 || curlwp->l_stat != LSIDL) {
 		struct lwp *onproc = curcpu()->ci_onproc;



  1   2   >