CVS commit: src/sys/netinet6

2023-08-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Aug  3 05:45:36 UTC 2023

Modified Files:
src/sys/netinet6: ip6_output.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 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/ip6_output.c
diff -u src/sys/netinet6/ip6_output.c:1.233 src/sys/netinet6/ip6_output.c:1.234
--- src/sys/netinet6/ip6_output.c:1.233	Mon Mar 20 09:15:52 2023
+++ src/sys/netinet6/ip6_output.c	Thu Aug  3 05:45:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.233 2023/03/20 09:15:52 ozaki-r Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.234 2023/08/03 05:45:36 ozaki-r 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.233 2023/03/20 09:15:52 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.234 2023/08/03 05:45:36 ozaki-r 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: src/sys/netinet6

2023-08-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Aug  3 05:45:36 UTC 2023

Modified Files:
src/sys/netinet6: ip6_output.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 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: src/sys/netinet6

2023-08-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Aug  3 05:44:22 UTC 2023

Modified Files:
src/sys/netinet6: in6.c

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


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

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



CVS commit: src/sys/netinet6

2023-08-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Aug  3 05:44:22 UTC 2023

Modified Files:
src/sys/netinet6: in6.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/netinet6/in6.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.289
--- src/sys/netinet6/in6.c:1.288	Mon Oct 24 14:15:19 2022
+++ src/sys/netinet6/in6.c	Thu Aug  3 05:44:22 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.288 2022/10/24 14:15:19 msaitoh Exp $	*/
+/*	$NetBSD: in6.c,v 1.289 2023/08/03 05:44:22 ozaki-r 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.289 2023/08/03 05:44:22 ozaki-r 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



CVS commit: src/sys/netinet6

2023-08-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Aug  3 04:24:55 UTC 2023

Modified Files:
src/sys/netinet6: in6_src.c

Log Message:
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.92 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.92
--- src/sys/netinet6/in6_src.c:1.91	Fri Nov  4 09:01:53 2022
+++ src/sys/netinet6/in6_src.c	Thu Aug  3 04:24:55 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.92 2023/08/03 04:24:55 ozaki-r 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.92 2023/08/03 04:24:55 ozaki-r 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: src/sys/netinet6

2023-08-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Aug  3 04:24:55 UTC 2023

Modified Files:
src/sys/netinet6: in6_src.c

Log Message:
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.92 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: src/tests/rump/rumpvfs

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:21:56 UTC 2023

Modified Files:
src/tests/rump/rumpvfs: t_etfs.c

Log Message:
t_etfs: Skip large_blk for system with page size > 8192

Work around kernel freeze reported as PR kern/55658 for
powerpc/ibm4xx (16K pages)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/rump/rumpvfs/t_etfs.c

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

Modified files:

Index: src/tests/rump/rumpvfs/t_etfs.c
diff -u src/tests/rump/rumpvfs/t_etfs.c:1.11 src/tests/rump/rumpvfs/t_etfs.c:1.12
--- src/tests/rump/rumpvfs/t_etfs.c:1.11	Fri Jan 13 21:30:43 2017
+++ src/tests/rump/rumpvfs/t_etfs.c	Thu Aug  3 03:21:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_etfs.c,v 1.11 2017/01/13 21:30:43 christos Exp $	*/
+/*	$NetBSD: t_etfs.c,v 1.12 2023/08/03 03:21:56 rin Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -169,6 +169,11 @@ ATF_TC_BODY(large_blk, tc)
 	ssize_t n;
 	int rv, tfd;
 
+	if (sysconf(_SC_PAGESIZE) > 8192) {
+		atf_tc_skip(
+		"PR kern/55658: cause kernel freeze for page size > 8192");
+	}
+
 	/*
 	 * mount mfs.  it would be nice if this would not be required,
 	 * but a) tmpfs doesn't "support" sparse files b) we don't really



CVS commit: src/tests/rump/rumpvfs

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:21:56 UTC 2023

Modified Files:
src/tests/rump/rumpvfs: t_etfs.c

Log Message:
t_etfs: Skip large_blk for system with page size > 8192

Work around kernel freeze reported as PR kern/55658 for
powerpc/ibm4xx (16K pages)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/rump/rumpvfs/t_etfs.c

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



CVS commit: src/tests/lib/libc/sys

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:18:12 UTC 2023

Modified Files:
src/tests/lib/libc/sys: t_getrandom.c

Log Message:
t_getrandom: Fix false positives for short read(2)

This only affects really slow machines, 68030 for me :)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/t_getrandom.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_getrandom.c
diff -u src/tests/lib/libc/sys/t_getrandom.c:1.4 src/tests/lib/libc/sys/t_getrandom.c:1.5
--- src/tests/lib/libc/sys/t_getrandom.c:1.4	Fri Mar 18 23:35:37 2022
+++ src/tests/lib/libc/sys/t_getrandom.c	Thu Aug  3 03:18:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_getrandom.c,v 1.4 2022/03/18 23:35:37 riastradh Exp $	*/
+/*	$NetBSD: t_getrandom.c,v 1.5 2023/08/03 03:18:12 rin Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_getrandom.c,v 1.4 2022/03/18 23:35:37 riastradh Exp $");
+__RCSID("$NetBSD: t_getrandom.c,v 1.5 2023/08/03 03:18:12 rin Exp $");
 
 #include 
 
@@ -94,7 +94,7 @@ ATF_TC_BODY(getrandom_default, tc)
 		ATF_CHECK(n >= (ssize_t)MIN(256, sizeof buf));
 		ATF_CHECK((size_t)n <= sizeof buf);
 		ATF_CHECK(memcmp(buf, zero24, 24) != 0);
-		ATF_CHECK(memcmp(buf + sizeof buf - 24, zero24, 24) != 0);
+		ATF_CHECK(memcmp(buf + n - 24, zero24, 24) != 0);
 	}
 	alarm(0);
 }
@@ -117,7 +117,7 @@ ATF_TC_BODY(getrandom_nonblock, tc)
 		ATF_CHECK(n >= (ssize_t)MIN(256, sizeof buf));
 		ATF_CHECK((size_t)n <= sizeof buf);
 		ATF_CHECK(memcmp(buf, zero24, 24) != 0);
-		ATF_CHECK(memcmp(buf + sizeof buf - 24, zero24, 24) != 0);
+		ATF_CHECK(memcmp(buf + n - 24, zero24, 24) != 0);
 	}
 }
 
@@ -137,7 +137,7 @@ ATF_TC_BODY(getrandom_insecure, tc)
 	ATF_CHECK(n >= (ssize_t)MIN(256, sizeof buf));
 	ATF_CHECK((size_t)n <= sizeof buf);
 	ATF_CHECK(memcmp(buf, zero24, 24) != 0);
-	ATF_CHECK(memcmp(buf + sizeof buf - 24, zero24, 24) != 0);
+	ATF_CHECK(memcmp(buf + n - 24, zero24, 24) != 0);
 }
 
 ATF_TC(getrandom_insecure_nonblock);
@@ -157,7 +157,7 @@ ATF_TC_BODY(getrandom_insecure_nonblock,
 	ATF_CHECK(n >= (ssize_t)MIN(256, sizeof buf));
 	ATF_CHECK((size_t)n <= sizeof buf);
 	ATF_CHECK(memcmp(buf, zero24, 24) != 0);
-	ATF_CHECK(memcmp(buf + sizeof buf - 24, zero24, 24) != 0);
+	ATF_CHECK(memcmp(buf + n - 24, zero24, 24) != 0);
 }
 
 ATF_TC(getrandom_random);



CVS commit: src/tests/lib/libc/sys

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:18:12 UTC 2023

Modified Files:
src/tests/lib/libc/sys: t_getrandom.c

Log Message:
t_getrandom: Fix false positives for short read(2)

This only affects really slow machines, 68030 for me :)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/sys/t_getrandom.c

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



CVS commit: src/sys/uvm

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:15:48 UTC 2023

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

Log Message:
uvm_findspace(): For sh3, convert a KASSERTMSG(9) into printf(9)

XXX
Work around for PR kern/51254 until it gets fixed.

With this change, landisk survives full ATF with DIAGNOSTIC enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.406 -r1.407 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.406 src/sys/uvm/uvm_map.c:1.407
--- src/sys/uvm/uvm_map.c:1.406	Mon May 15 01:42:42 2023
+++ src/sys/uvm/uvm_map.c	Thu Aug  3 03:15:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.406 2023/05/15 01:42:42 chs Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.407 2023/08/03 03:15:48 rin Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.406 2023/05/15 01:42:42 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.407 2023/08/03 03:15:48 rin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pax.h"
@@ -1792,7 +1792,12 @@ uvm_findspace_invariants(struct vm_map *
 	map, hint, orig_hint,
 	length, uobj, (unsigned long long)uoffset, align,
 	flags, entry, line);
+#ifndef __sh3__ /* XXXRO: kern/51254 */
 	KASSERTMSG(!topdown || hint <= orig_hint,
+#else
+	if (__predict_false(!(!topdown || hint <= orig_hint)))
+		printf(
+#endif
 	"map=%p hint=%#"PRIxVADDR" orig_hint=%#"PRIxVADDR
 	" length=%#"PRIxVSIZE" uobj=%p uoffset=%#llx align=%"PRIxVSIZE
 	" flags=%#x entry=%p (uvm_map_findspace line %d)",



CVS commit: src/sys/uvm

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:15:48 UTC 2023

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

Log Message:
uvm_findspace(): For sh3, convert a KASSERTMSG(9) into printf(9)

XXX
Work around for PR kern/51254 until it gets fixed.

With this change, landisk survives full ATF with DIAGNOSTIC enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.406 -r1.407 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: src/sys/coda

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:10:23 UTC 2023

Modified Files:
src/sys/coda: coda_psdev.c

Log Message:
coda_call(): Appease GCC 12.3.0 -Wmisleading-indentation
No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/coda/coda_psdev.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/coda/coda_psdev.c
diff -u src/sys/coda/coda_psdev.c:1.62 src/sys/coda/coda_psdev.c:1.63
--- src/sys/coda/coda_psdev.c:1.62	Tue May  3 20:52:31 2022
+++ src/sys/coda/coda_psdev.c	Thu Aug  3 03:10:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_psdev.c,v 1.62 2022/05/03 20:52:31 andvar Exp $	*/
+/*	$NetBSD: coda_psdev.c,v 1.63 2023/08/03 03:10:23 rin Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 /* These routines are the device entry points for Venus. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.62 2022/05/03 20:52:31 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.63 2023/08/03 03:10:23 rin Exp $");
 
 extern int coda_nc_initialized;/* Set if cache has been initialized */
 
@@ -712,9 +712,10 @@ coda_call(struct coda_mntinfo *mntinfo, 
 	}
 
 	else {	/* If venus died (!VC_OPEN(vcp)) */
-	if (codadebug)
-		myprintf(("vcclose woke op %d.%d flags %d\n",
-		   vmp->vm_opcode, vmp->vm_unique, vmp->vm_flags));
+		if (codadebug) {
+			myprintf(("vcclose woke op %d.%d flags %d\n",
+			   vmp->vm_opcode, vmp->vm_unique, vmp->vm_flags));
+		}
 
 		error = ENODEV;
 	}



CVS commit: src/sys/coda

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:10:23 UTC 2023

Modified Files:
src/sys/coda: coda_psdev.c

Log Message:
coda_call(): Appease GCC 12.3.0 -Wmisleading-indentation
No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/coda/coda_psdev.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/alpha/alpha

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:07:36 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: machdep.c

Log Message:
alpha: Add support for bootflags [xX] to enable debug messages.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/sys/arch/alpha/alpha/machdep.c

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

Modified files:

Index: src/sys/arch/alpha/alpha/machdep.c
diff -u src/sys/arch/alpha/alpha/machdep.c:1.375 src/sys/arch/alpha/alpha/machdep.c:1.376
--- src/sys/arch/alpha/alpha/machdep.c:1.375	Thu Jul 22 01:39:18 2021
+++ src/sys/arch/alpha/alpha/machdep.c	Thu Aug  3 03:07:35 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.375 2021/07/22 01:39:18 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.376 2023/08/03 03:07:35 rin Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2019, 2020 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.375 2021/07/22 01:39:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.376 2023/08/03 03:07:35 rin Exp $");
 
 #include 
 #include 
@@ -797,6 +797,11 @@ nobootinfo:
 			boothowto |= AB_VERBOSE;
 			break;
 
+		case 'x': /* debug messages */
+		case 'X':
+			boothowto |= AB_DEBUG;
+			break;
+
 		case '-':
 			/*
 			 * Just ignore this.  It's not required, but it's



CVS commit: src/sys/arch/alpha/alpha

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:07:36 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: machdep.c

Log Message:
alpha: Add support for bootflags [xX] to enable debug messages.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/sys/arch/alpha/alpha/machdep.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-02 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Thu Aug  3 02:32:16 UTC 2023

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

Log Message:
acronyms.comp: add MLO, MMC, SPL

It takes a lot of acronyms to boot a kernel!


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 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-02 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Thu Aug  3 02:32:16 UTC 2023

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

Log Message:
acronyms.comp: add MLO, MMC, SPL

It takes a lot of acronyms to boot a kernel!


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 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.357 src/share/misc/acronyms.comp:1.358
--- src/share/misc/acronyms.comp:1.357	Thu Jul  6 21:10:15 2023
+++ src/share/misc/acronyms.comp	Thu Aug  3 02:32:16 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.357 2023/07/06 21:10:15 jschauma Exp $
+$NetBSD: acronyms.comp,v 1.358 2023/08/03 02:32:16 gutteridge Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1009,6 +1009,8 @@ MLC	multi-level cell
 MLD	multicast listener discovery
 MLHP	micro loop heat pipe
 MLIR	multi-level intermediate representation
+MLO	MMC loader
+MMC	multi-media card
 MMF	multi-mode fiber
 MMIC	monolithic microwave integrated circuit
 MMIO	memory mapped input/output
@@ -1582,8 +1584,9 @@ SPDIF	Sony/Philips digital interface for
 SPI	serial peripheral interface
 SPI	stateful packet inspection
 SPIR	standard portable intermediate representation
-SPL	system interrupt priority level
+SPL	secondary program loader
 SPL	spinlock
+SPL	system interrupt priority level
 SPMD	single process, multiple data
 SPR	special purpose register
 SPT	sectors per track



CVS commit: src/sys/dev/wscons

2023-08-02 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  3 02:25:09 UTC 2023

Modified Files:
src/sys/dev/wscons: wsemul_vt100_subr.c

Log Message:
wsemul_vt100_subr: fix IL/DL to match specified behavior

Acoording to DEC manuals: "The cursor is reset to the first column.
This sequence is ignored when the cursor is outside the scrolling
region."


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/wscons/wsemul_vt100_subr.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/wscons

2023-08-02 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  3 02:25:09 UTC 2023

Modified Files:
src/sys/dev/wscons: wsemul_vt100_subr.c

Log Message:
wsemul_vt100_subr: fix IL/DL to match specified behavior

Acoording to DEC manuals: "The cursor is reset to the first column.
This sequence is ignored when the cursor is outside the scrolling
region."


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/wscons/wsemul_vt100_subr.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/wscons/wsemul_vt100_subr.c
diff -u src/sys/dev/wscons/wsemul_vt100_subr.c:1.32 src/sys/dev/wscons/wsemul_vt100_subr.c:1.33
--- src/sys/dev/wscons/wsemul_vt100_subr.c:1.32	Thu Aug  3 02:04:17 2023
+++ src/sys/dev/wscons/wsemul_vt100_subr.c	Thu Aug  3 02:25:09 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_subr.c,v 1.32 2023/08/03 02:04:17 uwe Exp $ */
+/* $NetBSD: wsemul_vt100_subr.c,v 1.33 2023/08/03 02:25:09 uwe Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.32 2023/08/03 02:04:17 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.33 2023/08/03 02:25:09 uwe Exp $");
 
 #include 
 #include 
@@ -436,6 +436,10 @@ wsemul_vt100_handle_csi(struct vt100base
 		break;
 	case 'L': /* IL insert line */
 	case 'M': /* DL delete line */
+		/* ignored when the cursor is outside the scrolling region */
+		if (vd->crow < vd->scrreg_startrow
+		|| vd->scrreg_startrow + vd->scrreg_nrows <= vd->crow)
+			break;
 		n = uimin(DEF1_ARG(vd, 0), ROWS_BELOW(vd) + 1);
 		{
 		int savscrstartrow, savscrnrows;
@@ -450,6 +454,7 @@ wsemul_vt100_handle_csi(struct vt100base
 		vd->scrreg_startrow = savscrstartrow;
 		vd->scrreg_nrows = savscrnrows;
 		}
+		vd->ccol = 0;
 		break;
 	case 'P': /* DCH delete character */
 		n = uimin(DEF1_ARG(vd, 0), COLS_LEFT(vd) + 1);



CVS commit: src/sys/dev/wscons

2023-08-02 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  3 02:04:17 UTC 2023

Modified Files:
src/sys/dev/wscons: wsemul_vt100_subr.c

Log Message:
wsemul_vt100_subr: properly clamp CUU/CUD parameter

If the cursor is outside of the scrolling region the movement should
stop at the screen border.  Reported by David Leadbeater.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/wscons/wsemul_vt100_subr.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/wscons

2023-08-02 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Aug  3 02:04:17 UTC 2023

Modified Files:
src/sys/dev/wscons: wsemul_vt100_subr.c

Log Message:
wsemul_vt100_subr: properly clamp CUU/CUD parameter

If the cursor is outside of the scrolling region the movement should
stop at the screen border.  Reported by David Leadbeater.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/wscons/wsemul_vt100_subr.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/wscons/wsemul_vt100_subr.c
diff -u src/sys/dev/wscons/wsemul_vt100_subr.c:1.31 src/sys/dev/wscons/wsemul_vt100_subr.c:1.32
--- src/sys/dev/wscons/wsemul_vt100_subr.c:1.31	Wed Jul 26 10:46:01 2023
+++ src/sys/dev/wscons/wsemul_vt100_subr.c	Thu Aug  3 02:04:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_subr.c,v 1.31 2023/07/26 10:46:01 uwe Exp $ */
+/* $NetBSD: wsemul_vt100_subr.c,v 1.32 2023/08/03 02:04:17 uwe Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.31 2023/07/26 10:46:01 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.32 2023/08/03 02:04:17 uwe Exp $");
 
 #include 
 #include 
@@ -396,11 +396,21 @@ wsemul_vt100_handle_csi(struct vt100base
 		ERASECOLS(vd, vd->ccol, n, vd->bkgdattr);
 		break;
 	case 'A': /* CUU */
-		vd->crow -= uimin(DEF1_ARG(vd, 0), ROWS_ABOVE(vd));
+		/* stop at the top scroll margin */
+		m = vd->scrreg_startrow;
+		if (vd->crow < m)/* but if already above the margin */
+			m = 0;	 /* then at the screen top */
+		help = vd->crow - m; /* rows above */
+		vd->crow -= uimin(DEF1_ARG(vd, 0), help);
 		CHECK_DW(vd);
 		break;
 	case 'B': /* CUD */
-		vd->crow += uimin(DEF1_ARG(vd, 0), ROWS_BELOW(vd));
+		/* stop at the bottom scroll margin */
+		m = vd->scrreg_startrow + vd->scrreg_nrows - 1;
+		if (vd->crow > m) /* but if already below the margin */
+			m = vd->nrows - 1; /* then at the screen bottom */
+		help = m - vd->crow; /* rows below */
+		vd->crow += uimin(DEF1_ARG(vd, 0), help);
 		CHECK_DW(vd);
 		break;
 	case 'C': /* CUF */



CVS commit: src/external/gpl3/gcc

2023-08-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug  3 01:36:55 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12
src/external/gpl3/gcc/dist/gcc: common.opt
src/external/gpl3/gcc/dist/gcc/config: netbsd.cc
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h
src/external/gpl3/gcc/dist/gcc/config/vax: elf.h netbsd-elf.h
vax-protos.h vax.h
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_allocator.h
lsan_common.cpp
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_internal_defs.h sanitizer_linux.cpp
sanitizer_platform_limits_netbsd.cpp
sanitizer_platform_limits_netbsd.h
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_platform_linux.cpp
src/external/gpl3/gcc/lib: Makefile Makefile.sanitizer
src/external/gpl3/gcc/lib/libasan: Makefile shlib_version
src/external/gpl3/gcc/lib/liblsan: Makefile shlib_version
src/external/gpl3/gcc/lib/libtsan: Makefile shlib_version
src/external/gpl3/gcc/lib/libubsan: Makefile shlib_version
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
many fixes for native GCC 12 builds

- default to dwarf4 since out ctf tools fail with dwarf5.  i tried to
  do this via subtarget options as other ports do, but this would
  require adjusting several of the targets non-netbsd code, and ideally
  we'll fix our tools sooner than later, so just hack it here for now.
- catch up config/rs6000/netbsd64.h (mostly delete things)
- remove some more upstream diffs in config/vax, though it does not work
  currently - libc.so link fails due to weird relocations.
- include some headers to ensure types are available
- add missing sanitizer netbsd files to the 'dist' tree
- remove no longer present TIOCRCVFRAME and TIOCXMTFRAME interceptors
- expanding the sanitizer OS/cpu defs to cover more netbsd platforms
- copy across a few minor changes from gcc.old's sanitizer's (eg,
  disabling linux-specific code, adding netbsd specific code.)
- add (untested, but building) tsan support for arm64
- re-enable the sanitzers, at least simple -fsanitize=address builds a
  working application on amd64 now
- fix the source lists (mostly .cc -> .cpp rename here)
- add some missing new defines, -f*, and -W*
- bump sanitizer shlib version
- apply -fno-jump-tables in some more places on m68k
- update the list in README.gcc12 to note many things now work or a few
  things to do not work (although there are many uncommited changes at
  this point across the rest of 'src' and 'xsrc'.)  main points are that
  vax, hppa, ppc, and sh3 don't build yet, but most other things are
  either testing and working or at least building.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.gcc12
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/common.opt
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/config/netbsd.cc
cvs rdiff -u -r1.27 -r1.28 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/dist/gcc/config/vax/elf.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/dist/gcc/config/vax/netbsd-elf.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/dist/gcc/config/vax/vax.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cpp
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in
cvs rdiff -u -r1.6 -r1.7 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
cvs rdiff -u -r1.17 -r1.18 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h
cvs rdiff -u -r1.3 -r1.4 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
cvs rdiff -u -r1.10 -r1.11 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cpp
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/lib/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/lib/Makefile.sanitizer
cvs rdiff -u -r1.33 -r1.34 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/libasan/shlib_version
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/lib/liblsan/shlib_version
cvs rdiff -u -r1.16 -r1.17 

CVS commit: src/external/gpl3/gcc

2023-08-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Aug  3 01:36:55 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12
src/external/gpl3/gcc/dist/gcc: common.opt
src/external/gpl3/gcc/dist/gcc/config: netbsd.cc
src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h
src/external/gpl3/gcc/dist/gcc/config/vax: elf.h netbsd-elf.h
vax-protos.h vax.h
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_allocator.h
lsan_common.cpp
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: Makefile.am
Makefile.in sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_internal_defs.h sanitizer_linux.cpp
sanitizer_platform_limits_netbsd.cpp
sanitizer_platform_limits_netbsd.h
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_platform_linux.cpp
src/external/gpl3/gcc/lib: Makefile Makefile.sanitizer
src/external/gpl3/gcc/lib/libasan: Makefile shlib_version
src/external/gpl3/gcc/lib/liblsan: Makefile shlib_version
src/external/gpl3/gcc/lib/libtsan: Makefile shlib_version
src/external/gpl3/gcc/lib/libubsan: Makefile shlib_version
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
many fixes for native GCC 12 builds

- default to dwarf4 since out ctf tools fail with dwarf5.  i tried to
  do this via subtarget options as other ports do, but this would
  require adjusting several of the targets non-netbsd code, and ideally
  we'll fix our tools sooner than later, so just hack it here for now.
- catch up config/rs6000/netbsd64.h (mostly delete things)
- remove some more upstream diffs in config/vax, though it does not work
  currently - libc.so link fails due to weird relocations.
- include some headers to ensure types are available
- add missing sanitizer netbsd files to the 'dist' tree
- remove no longer present TIOCRCVFRAME and TIOCXMTFRAME interceptors
- expanding the sanitizer OS/cpu defs to cover more netbsd platforms
- copy across a few minor changes from gcc.old's sanitizer's (eg,
  disabling linux-specific code, adding netbsd specific code.)
- add (untested, but building) tsan support for arm64
- re-enable the sanitzers, at least simple -fsanitize=address builds a
  working application on amd64 now
- fix the source lists (mostly .cc -> .cpp rename here)
- add some missing new defines, -f*, and -W*
- bump sanitizer shlib version
- apply -fno-jump-tables in some more places on m68k
- update the list in README.gcc12 to note many things now work or a few
  things to do not work (although there are many uncommited changes at
  this point across the rest of 'src' and 'xsrc'.)  main points are that
  vax, hppa, ppc, and sh3 don't build yet, but most other things are
  either testing and working or at least building.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.gcc12
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/common.opt
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/config/netbsd.cc
cvs rdiff -u -r1.27 -r1.28 \
src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/dist/gcc/config/vax/elf.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/dist/gcc/config/vax/netbsd-elf.h
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/dist/gcc/config/vax/vax.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.cpp
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.am \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/Makefile.in
cvs rdiff -u -r1.6 -r1.7 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
cvs rdiff -u -r1.17 -r1.18 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h
cvs rdiff -u -r1.3 -r1.4 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
cvs rdiff -u -r1.10 -r1.11 \

src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cpp
cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/lib/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/lib/Makefile.sanitizer
cvs rdiff -u -r1.33 -r1.34 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/libasan/shlib_version
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/lib/liblsan/shlib_version
cvs rdiff -u -r1.16 -r1.17 

CVS commit: src/external/gpl3/gcc

2023-08-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Aug  2 23:03:40 UTC 2023

Modified Files:
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64:
backtrace-supported.h config.h
src/external/gpl3/gcc/lib/libgcc/arch/earmv4: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: auto-target.h defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb: defs.mk
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64: defs.mk
src/external/gpl3/gcc/lib/libgomp/arch/earmv4: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64: config.h libgomp_f.h
omp.h
src/external/gpl3/gcc/lib/libobjc/arch/earmv4: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/earmv4eb: defs.mk
src/external/gpl3/gcc/lib/libobjc/arch/powerpc64: defs.mk
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h
cxxabi_tweaks.h defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmv4: arm-cpu-cdata.h
arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h bversion.h
configargs.h defs.mk gtyp-input.list insn-modes.h plugin-version.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb: arm-cpu-cdata.h
arm-cpu-data.h arm-cpu.h arm-isa.h auto-host.h bversion.h
configargs.h defs.mk gtyp-input.list insn-modes.h plugin-version.h
src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: auto-host.h
bversion.h configargs.h defs.mk gtyp-input.list insn-modes.h
plugin-version.h
src/external/gpl3/gcc/usr.bin/include/arch: powerpc64.mk
src/external/gpl3/gcc/usr.bin/libcpp/arch/earmv4: config.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/earmv4eb: config.h
src/external/gpl3/gcc/usr.bin/libcpp/arch/powerpc64: config.h

Log Message:
mknative-gcc for GCC 12.3.0 on earmv4*, and powerpc64.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4/backtrace-supported.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4/config.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb/backtrace-supported.h
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libbacktrace/arch/earmv4eb/config.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/config.h
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libgcc/arch/earmv4/auto-target.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/lib/libgcc/arch/earmv4/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb/auto-target.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libgcc/arch/earmv4eb/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/auto-target.h
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb/defs.mk
cvs rdiff -u -r1.6 -r1.7 \
src/external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/defs.mk
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libgomp/arch/earmv4/config.h \
src/external/gpl3/gcc/lib/libgomp/arch/earmv4/omp.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libgomp/arch/earmv4/libgomp_f.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb/config.h \
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb/omp.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libgomp/arch/earmv4eb/libgomp_f.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/config.h \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/libgomp_f.h
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/gcc/lib/libgomp/arch/powerpc64/omp.h
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/gcc/lib/libobjc/arch/earmv4/defs.mk
cvs rdiff -u -r1.7 -r1.8 \

CVS commit: src/sys/dev/wscons

2023-08-02 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Aug  2 22:37:02 UTC 2023

Modified Files:
src/sys/dev/wscons: wsemul_vt100.c

Log Message:
wsemul_vt100: fix RI to not scroll outside of scroll region

This is the inverse (scroll down) of the problem reported and fixed
for IND (scroll up) in PR kern/11827 back in 2000.

We only have one call site for this, but still move this bit of code
into a separate wsemul_vt100_prevline function to make it symmetric
with wsemul_vt100_nextline.  While here, make both take vt100base_data.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/wscons/wsemul_vt100.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/wscons/wsemul_vt100.c
diff -u src/sys/dev/wscons/wsemul_vt100.c:1.51 src/sys/dev/wscons/wsemul_vt100.c:1.52
--- src/sys/dev/wscons/wsemul_vt100.c:1.51	Sun Jul 16 17:43:50 2023
+++ src/sys/dev/wscons/wsemul_vt100.c	Wed Aug  2 22:37:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsemul_vt100.c,v 1.51 2023/07/16 17:43:50 christos Exp $	*/
+/*	$NetBSD: wsemul_vt100.c,v 1.52 2023/08/02 22:37:02 uwe Exp $	*/
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.51 2023/07/16 17:43:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.52 2023/08/02 22:37:02 uwe Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_wsmsgattrs.h"
@@ -88,7 +88,10 @@ static void wsemul_vt100_output_normal(s
    u_char, int);
 static void wsemul_vt100_output_c0c1(struct wsemul_vt100_emuldata *,
  u_char, int);
-static void wsemul_vt100_nextline(struct wsemul_vt100_emuldata *);
+
+static void wsemul_vt100_nextline(struct vt100base_data *); /* IND */
+static void wsemul_vt100_prevline(struct vt100base_data *); /* RI */
+
 typedef u_int vt100_handler(struct wsemul_vt100_emuldata *, u_char);
 
 static vt100_handler
@@ -364,14 +367,15 @@ wsemul_vt100_reset(struct wsemul_vt100_e
  */
 
 /*
- * Move the cursor to the next line if possible. If the cursor is at
- * the bottom of the scroll area, then scroll it up. If the cursor is
+ * New line (including autowrap), index (IND).
+ *
+ * Move the cursor to the next line if possible.  If the cursor is at
+ * the bottom of the scroll area, then scroll it up.  If the cursor is
  * at the bottom of the screen then don't move it down.
  */
 static void
-wsemul_vt100_nextline(struct wsemul_vt100_emuldata *edp)
+wsemul_vt100_nextline(struct vt100base_data *vd)
 {
-	struct vt100base_data *vd = >bd;
 
 	if (ROWS_BELOW(vd) == 0) {
 		/* Bottom of the scroll region. */
@@ -384,6 +388,26 @@ wsemul_vt100_nextline(struct wsemul_vt10
 	}
 }
 
+/*
+ * Reverse index (RI).
+ *
+ * Inverse of wsemul_vt100_nextline.  Move up, scroll down.
+ */
+static void
+wsemul_vt100_prevline(struct vt100base_data *vd)
+{
+
+	if (ROWS_ABOVE(vd) == 0) {
+		/* Top of the scroll region. */
+	  	wsemul_vt100_scrolldown(vd, 1);
+	} else {
+		if (vd->crow > 0)
+			/* Cursor not at the top of the screen. */
+			vd->crow--;
+		CHECK_DW(vd);
+	}
+}
+
 static void
 wsemul_vt100_output_normal(struct wsemul_vt100_emuldata *edp, u_char c,
 	int kernel)
@@ -393,7 +417,7 @@ wsemul_vt100_output_normal(struct wsemul
 
 	if ((vd->flags & (VTFL_LASTCHAR | VTFL_DECAWM)) ==
 	(VTFL_LASTCHAR | VTFL_DECAWM)) {
-		wsemul_vt100_nextline(edp);
+		wsemul_vt100_nextline(vd);
 		vd->ccol = 0;
 		vd->flags &= ~VTFL_LASTCHAR;
 	}
@@ -509,7 +533,7 @@ wsemul_vt100_output_c0c1(struct wsemul_v
 	case ASCII_LF:
 	case ASCII_VT:
 	case ASCII_FF:
-		wsemul_vt100_nextline(edp);
+		wsemul_vt100_nextline(vd);
 		break;
 	}
 }
@@ -565,7 +589,7 @@ wsemul_vt100_output_esc(struct wsemul_vt
 		vd->ccol = 0;
 		/* FALLTHRU */
 	case 'D': /* IND */
-		wsemul_vt100_nextline(edp);
+		wsemul_vt100_nextline(vd);
 		break;
 	case 'H': /* HTS */
 		KASSERT(vd->tabs != 0);
@@ -593,12 +617,7 @@ wsemul_vt100_output_esc(struct wsemul_vt
 		edp->sschartab = 3;
 		break;
 	case 'M': /* RI */
-		if (ROWS_ABOVE(vd) > 0) {
-			vd->crow--;
-			CHECK_DW(vd);
-			break;
-		}
-		wsemul_vt100_scrolldown(vd, 1);
+		wsemul_vt100_prevline(vd);
 		break;
 	case 'P': /* DCS */
 		vd->nargs = 0;



CVS commit: src/sys/dev/wscons

2023-08-02 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Aug  2 22:37:02 UTC 2023

Modified Files:
src/sys/dev/wscons: wsemul_vt100.c

Log Message:
wsemul_vt100: fix RI to not scroll outside of scroll region

This is the inverse (scroll down) of the problem reported and fixed
for IND (scroll up) in PR kern/11827 back in 2000.

We only have one call site for this, but still move this bit of code
into a separate wsemul_vt100_prevline function to make it symmetric
with wsemul_vt100_nextline.  While here, make both take vt100base_data.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/wscons/wsemul_vt100.c

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



CVS commit: src/usr.bin/xlint/lint1

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 21:58:12 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: debug.c decl.c externs1.h

Log Message:
lint: remove unused string literals


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.376 -r1.377 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.206 -r1.207 src/usr.bin/xlint/lint1/externs1.h

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/xlint/lint1/debug.c
diff -u src/usr.bin/xlint/lint1/debug.c:1.60 src/usr.bin/xlint/lint1/debug.c:1.61
--- src/usr.bin/xlint/lint1/debug.c:1.60	Wed Aug  2 18:51:25 2023
+++ src/usr.bin/xlint/lint1/debug.c	Wed Aug  2 21:58:11 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.60 2023/08/02 18:51:25 rillig Exp $ */
+/* $NetBSD: debug.c,v 1.61 2023/08/02 21:58:11 rillig Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: debug.c,v 1.60 2023/08/02 18:51:25 rillig Exp $");
+__RCSID("$NetBSD: debug.c,v 1.61 2023/08/02 21:58:11 rillig Exp $");
 #endif
 
 #include 
@@ -200,7 +200,7 @@ debug_node(const tnode_t *tn) // NOLINT(
 	if (op == NAME)
 		debug_printf(" '%s' with %s",
 		tn->tn_sym->s_name,
-		storage_class_name(tn->tn_sym->s_scl));
+		scl_name(tn->tn_sym->s_scl));
 	else
 		debug_printf(" type");
 	debug_printf(" '%s'", type_name(tn->tn_type));

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.376 src/usr.bin/xlint/lint1/decl.c:1.377
--- src/usr.bin/xlint/lint1/decl.c:1.376	Wed Aug  2 21:26:12 2023
+++ src/usr.bin/xlint/lint1/decl.c	Wed Aug  2 21:58:11 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.376 2023/08/02 21:26:12 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.377 2023/08/02 21:58:11 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.376 2023/08/02 21:26:12 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.377 2023/08/02 21:58:11 rillig Exp $");
 #endif
 
 #include 
@@ -1297,6 +1297,14 @@ block_derive_function(type_t *ret, bool 
 	return tp;
 }
 
+static const char *
+tag_name(scl_t sc)
+{
+	return sc == STRUCT_TAG ? "struct"
+	: sc == UNION_TAG ? "union"
+	: "enum";
+}
+
 static void
 check_prototype_parameters(sym_t *args)
 {
@@ -1306,7 +1314,7 @@ check_prototype_parameters(sym_t *args)
 		scl_t sc = sym->s_scl;
 		if (sc == STRUCT_TAG || sc == UNION_TAG || sc == ENUM_TAG) {
 			/* dubious tag declaration '%s %s' */
-			warning(85, storage_class_name(sc), sym->s_name);
+			warning(85, tag_name(sc), sym->s_name);
 		}
 	}
 
@@ -1546,13 +1554,12 @@ new_tag(sym_t *tag, scl_t scl, bool decl
 /* XXX: Why is this warning suppressed in C90 mode? */
 if (allow_trad || allow_c99)
 	/* declaration of '%s %s' intro... */
-	warning(44, storage_class_name(scl),
+	warning(44, tag_name(scl),
 	tag->s_name);
 tag = pushdown(tag);
 			} else if (tag->s_scl != scl) {
 /* base type is really '%s %s' */
-warning(45, storage_class_name(tag->s_scl),
-tag->s_name);
+warning(45, tag_name(tag->s_scl), tag->s_name);
 			}
 			dcs->d_enclosing->d_nonempty_decl = true;
 		} else if (decl) {
@@ -1564,13 +1571,11 @@ new_tag(sym_t *tag, scl_t scl, bool decl
 			dcs->d_enclosing->d_nonempty_decl = true;
 		} else if (tag->s_scl != scl) {
 			/* base type is really '%s %s' */
-			warning(45, storage_class_name(tag->s_scl),
-			tag->s_name);
+			warning(45, tag_name(tag->s_scl), tag->s_name);
 			/* XXX: Why is this warning suppressed in C90 mode? */
 			if (allow_trad || allow_c99) {
 /* declaration of '%s %s' introduces ... */
-warning(44, storage_class_name(scl),
-tag->s_name);
+warning(44, tag_name(scl), tag->s_name);
 			}
 			tag = pushdown(tag);
 			dcs->d_enclosing->d_nonempty_decl = true;
@@ -1579,8 +1584,8 @@ new_tag(sym_t *tag, scl_t scl, bool decl
 		if (tag->s_scl != scl ||
 		(decl && !is_incomplete(tag->s_type))) {
 			/* %s tag '%s' redeclared as %s */
-			error(46, storage_class_name(tag->s_scl),
-			tag->s_name, storage_class_name(scl));
+			error(46, tag_name(tag->s_scl),
+			tag->s_name, tag_name(scl));
 			print_previous_declaration(tag);
 			tag = pushdown(tag);
 			dcs->d_enclosing->d_nonempty_decl = true;
@@ -1668,23 +1673,6 @@ make_tag_type(sym_t *tag, tspec_t kind, 
 	return tp;
 }
 
-const char *
-storage_class_name(scl_t sc)
-{
-	switch (sc) {
-	case EXTERN:	return "extern";
-	case STATIC:	return "static";
-	case AUTO:	return "auto";
-	case REG:	return "register";
-	case TYPEDEF:	return "typedef";
-	case STRUCT_TAG:return "struct";
-	case UNION_TAG:	return "union";
-	case ENUM_TAG:	return "enum";
-	default:	lint_assert(/*CONSTCOND*/false);
-	}
-	/* NOTREACHED */
-}
-
 static bool
 has_named_member(const 

CVS commit: src/usr.bin/xlint/lint1

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 21:58:12 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: debug.c decl.c externs1.h

Log Message:
lint: remove unused string literals


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.376 -r1.377 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.206 -r1.207 src/usr.bin/xlint/lint1/externs1.h

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



CVS commit: src/usr.bin/xlint/lint1

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 21:26:12 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: decl.c

Log Message:
lint: do not return bogus types for unnamed function parameters

Since decl.c 1.18 from 2000-07-05, lint has returned bogus type
information in cases where it couldn't interpret complicated
declarators.

In cases like these, rather fail than proceed with wrong data.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/usr.bin/xlint/lint1/decl.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/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.375 src/usr.bin/xlint/lint1/decl.c:1.376
--- src/usr.bin/xlint/lint1/decl.c:1.375	Wed Aug  2 21:11:35 2023
+++ src/usr.bin/xlint/lint1/decl.c	Wed Aug  2 21:26:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.375 2023/08/02 21:11:35 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.376 2023/08/02 21:26:12 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.375 2023/08/02 21:11:35 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.376 2023/08/02 21:26:12 rillig Exp $");
 #endif
 
 #include 
@@ -1203,12 +1203,10 @@ add_pointer(sym_t *decl, qual_ptr *p)
 	debug_dcs();
 
 	type_t **tpp = >s_type;
-	while (*tpp != NULL && *tpp != dcs->d_type)
+	lint_assert(*tpp != NULL);
+	while (*tpp != dcs->d_type) {
 		tpp = &(*tpp)->t_subt;
-	if (*tpp == NULL) {
-		debug_step("add_pointer: unchanged '%s'",
-		type_name(decl->s_type));
-		return decl;
+		lint_assert(*tpp != NULL);
 	}
 
 	while (p != NULL) {
@@ -1274,12 +1272,10 @@ add_array(sym_t *decl, bool dim, int n)
 	debug_dcs();
 
 	type_t **tpp = >s_type;
-	while (*tpp != NULL && *tpp != dcs->d_type)
+	lint_assert(*tpp != NULL);
+	while (*tpp != dcs->d_type) {
 		tpp = &(*tpp)->t_subt;
-	if (*tpp == NULL) {
-		debug_step("add_array: unchanged '%s'",
-		type_name(decl->s_type));
-		return decl;
+		lint_assert(*tpp != NULL);
 	}
 
 	*tpp = block_derive_array(dcs->d_type, dim, n);
@@ -1389,24 +1385,11 @@ add_function(sym_t *decl, struct paramet
 		debug_dcs_all();
 	}
 
-	/*
-	 * XXX: What is this code doing on a semantic level, and why?
-	 * Returning decl leads to the wrong function types in msg_347.
-	 */
 	type_t **tpp = >s_type;
-	if (*tpp == NULL)
-		decl->s_type = dcs->d_enclosing->d_type;
-	while (*tpp != NULL && *tpp != dcs->d_enclosing->d_type)
-		/*
-		 * XXX: accessing INT->t_subt feels strange, even though it
-		 * may even be guaranteed to be NULL.
-		 */
+	lint_assert(*tpp != NULL);
+	while (*tpp != dcs->d_enclosing->d_type) {
 		tpp = &(*tpp)->t_subt;
-	if (*tpp == NULL) {
-		debug_step("add_function: unchanged '%s'",
-		type_name(decl->s_type));
-		debug_leave();
-		return decl;	/* see msg_347 */
+		lint_assert(*tpp != NULL);
 	}
 
 	*tpp = block_derive_function(dcs->d_enclosing->d_type,



CVS commit: src/usr.bin/xlint/lint1

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 21:26:12 UTC 2023

Modified Files:
src/usr.bin/xlint/lint1: decl.c

Log Message:
lint: do not return bogus types for unnamed function parameters

Since decl.c 1.18 from 2000-07-05, lint has returned bogus type
information in cases where it couldn't interpret complicated
declarators.

In cases like these, rather fail than proceed with wrong data.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/usr.bin/xlint/lint1/decl.c

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



CVS commit: src

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 21:11:36 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: decl_direct_abstract.c msg_347.c
parse_type_name.c
src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h

Log Message:
lint: fix handling of unnamed function parameters


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_347.c
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/parse_type_name.c
cvs rdiff -u -r1.468 -r1.469 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.374 -r1.375 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/xlint/lint1/externs1.h

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c
diff -u src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c:1.9 src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c:1.10
--- src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c:1.9	Sat Jul  1 20:57:37 2023
+++ src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c	Wed Aug  2 21:11:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: decl_direct_abstract.c,v 1.9 2023/07/01 20:57:37 rillig Exp $	*/
+/*	$NetBSD: decl_direct_abstract.c,v 1.10 2023/08/02 21:11:35 rillig Exp $	*/
 # 3 "decl_direct_abstract.c"
 
 /*
@@ -42,8 +42,7 @@ function_returning_char(void)
 	// GCC adds a pointer, then says 'char (*)(short int (*)(long int))'.
 	// Clang says 'char (short (*)(long))'.
 	/* cdecl says 'function (pointer to function (long) returning short) returning char' */
-	/* FIXME: It's a function type, not only 'short'. */
-	/* expect+1: ... 'short' ... */
+	/* expect+1: ... 'function(pointer to function(long) returning short) returning char' ... */
 	x = (char(short (*)(long)))x;
 
 	/* expect+1: warning: nested 'extern' declaration of 'f1' [352] */
@@ -58,7 +57,7 @@ function_returning_pointer(void)
 {
 	// GCC says 'error: cast specifies function type'.
 	// Clang says 'char (short *(*)(long))'.
-	/* expect+1: error: invalid cast from 'struct incompatible' to 'short' [147] */
+	/* expect+1: error: invalid cast from 'struct incompatible' to 'function(pointer to function(long) returning pointer to short) returning char' [147] */
 	x = (char(short *(long)))x;
 
 	/* expect+1: warning: nested 'extern' declaration of 'f2' [352] */
@@ -67,8 +66,7 @@ function_returning_pointer(void)
 	// GCC adds two pointers, saying 'char (*)(short int * (*)(long int))'.
 	// Clang says 'char (short *(*)(long))' */
 	/* cdecl says 'syntax error' */
-	/* FIXME: lint is wrong, it discards the 'short *' */
-	/* expect+1: ... 'pointer to function(long) returning char' ... */
+	/* expect+1: ... 'pointer to function(pointer to function(long) returning pointer to short) returning char' ... */
 	x = f2;
 }
 
@@ -90,12 +88,11 @@ void int_array_ast_array(int[*][7]);
 
 /* expect+1: error: cannot take size/alignment of function type 'function() returning int' [144] */
 unsigned long size_unspecified_args = sizeof(int());
-/* FIXME: Must be 'of function', not 'of void'. */
-/* expect+1: error: cannot take size/alignment of void [146] */
+/* expect+1: error: cannot take size/alignment of function type 'function(void) returning int' [144] */
 unsigned long size_prototype_void = sizeof(int(void));
-/* TODO: error: cannot take size/alignment of function type 'function(double) returning int' [144] */
+/* expect+1: error: cannot take size/alignment of function type 'function(double) returning int' [144] */
 unsigned long size_prototype_unnamed = sizeof(int(double));
-/* TODO: error: cannot take size/alignment of function type 'function(double) returning int' [144] */
+/* expect+1: error: cannot take size/alignment of function type 'function(double) returning int' [144] */
 unsigned long size_prototype_named = sizeof(int(double dbl));
 
 /* expect+2: error: cannot take size/alignment of function type 'function() returning int' [144] */
@@ -106,26 +103,28 @@ int size_unspecified_args_return_int[-10
 /* expect+1: error: negative array dimension (-1000) [20] */
 int size_unspecified_args_return_char[-1000 - (int)sizeof(char())];
 
-/* FIXME: 'of void' must be 'of function'. */
-/* expect+2: error: cannot take size/alignment of void [146] */
+/* expect+2: error: cannot take size/alignment of function type 'function(void) returning int' [144] */
 /* expect+1: error: negative array dimension (-1000) [20] */
 int size_prototype_void_return_int[-1000 - (int)sizeof(int(void))];
 
-/* FIXME: 'of void' must be 'of function'. */
-/* expect+2: error: cannot take size/alignment of void [146] */
+/* expect+2: error: cannot take size/alignment of function type 'function(void) returning double' [144] */
 /* expect+1: error: negative array dimension (-1000) [20] */
 int size_prototype_void_return_double[-1000 - (int)sizeof(double(void))];
 

CVS commit: src

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 21:11:36 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: decl_direct_abstract.c msg_347.c
parse_type_name.c
src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h

Log Message:
lint: fix handling of unnamed function parameters


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/tests/usr.bin/xlint/lint1/decl_direct_abstract.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_347.c
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/parse_type_name.c
cvs rdiff -u -r1.468 -r1.469 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.374 -r1.375 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/xlint/lint1/externs1.h

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



CVS commit: src

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 18:57:54 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_150.c msg_346.c
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix plural form in message 150


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_150.c
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_346.c
cvs rdiff -u -r1.574 -r1.575 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_150.c
diff -u src/tests/usr.bin/xlint/lint1/msg_150.c:1.6 src/tests/usr.bin/xlint/lint1/msg_150.c:1.7
--- src/tests/usr.bin/xlint/lint1/msg_150.c:1.6	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/msg_150.c	Wed Aug  2 18:57:54 2023
@@ -1,16 +1,21 @@
-/*	$NetBSD: msg_150.c,v 1.6 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: msg_150.c,v 1.7 2023/08/02 18:57:54 rillig Exp $	*/
 # 3 "msg_150.c"
 
 // Test for message: argument mismatch: %d %s passed, %d expected [150]
 
 /* lint1-extra-flags: -X 351 */
 
-int
-add2(int, int);
+int add2(int, int);
 
 int
 example(void)
 {
+	/* expect+1: error: argument mismatch: 0 arguments passed, 2 expected [150] */
+	int a = add2();
+	/* expect+1: error: argument mismatch: 1 argument passed, 2 expected [150] */
+	int b = add2(1);
 	/* expect+1: error: argument mismatch: 4 arguments passed, 2 expected [150] */
-	return add2(2, 3, 5, 7);
+	int c = add2(2, 3, 5, 7);
+
+	return a + b + c;
 }

Index: src/tests/usr.bin/xlint/lint1/msg_346.c
diff -u src/tests/usr.bin/xlint/lint1/msg_346.c:1.8 src/tests/usr.bin/xlint/lint1/msg_346.c:1.9
--- src/tests/usr.bin/xlint/lint1/msg_346.c:1.8	Tue Mar 28 14:44:35 2023
+++ src/tests/usr.bin/xlint/lint1/msg_346.c	Wed Aug  2 18:57:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_346.c,v 1.8 2023/03/28 14:44:35 rillig Exp $	*/
+/*	$NetBSD: msg_346.c,v 1.9 2023/08/02 18:57:54 rillig Exp $	*/
 # 3 "msg_346.c"
 
 // Test for message: call to '%s' effectively discards 'const' from argument [346]
@@ -56,9 +56,9 @@ all_functions(void)
 
 void
 edge_cases(void)
-{	/* TODO: '0 argument passed' is not correct English */
+{
 	/* No arguments, to cover the 'an == NULL' in is_first_arg_const. */
-	/* expect+1: error: argument mismatch: 0 argument passed, 2 expected [150] */
+	/* expect+1: error: argument mismatch: 0 arguments passed, 2 expected [150] */
 	take_char_ptr(strchr());
 }
 

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.574 src/usr.bin/xlint/lint1/tree.c:1.575
--- src/usr.bin/xlint/lint1/tree.c:1.574	Wed Aug  2 18:51:25 2023
+++ src/usr.bin/xlint/lint1/tree.c	Wed Aug  2 18:57:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.574 2023/08/02 18:51:25 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.575 2023/08/02 18:57:54 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.574 2023/08/02 18:51:25 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.575 2023/08/02 18:57:54 rillig Exp $");
 #endif
 
 #include 
@@ -4223,7 +4223,7 @@ check_function_arguments(type_t *ftp, tn
 	const sym_t *param = ftp->t_params;
 	if (ftp->t_proto && npar != narg && !(ftp->t_vararg && npar < narg)) {
 		/* argument mismatch: %d %s passed, %d expected */
-		error(150, narg, narg > 1 ? "arguments" : "argument", npar);
+		error(150, narg, narg != 1 ? "arguments" : "argument", npar);
 		param = NULL;
 	}
 



CVS commit: src

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 18:57:54 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_150.c msg_346.c
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: fix plural form in message 150


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_150.c
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_346.c
cvs rdiff -u -r1.574 -r1.575 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 18:51:25 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
d_c99_bool_strict_syshdr.c d_c99_decls_after_stmt.c
d_decl_old_style_arguments.c d_lint_assert.c decl_arg.c
gcc_typeof.c msg_003.c msg_021.c msg_032.c msg_053.c msg_064.c
msg_085.c msg_086.c msg_129.c msg_204.c msg_239.c msg_240.c
msg_257.c msg_280.c msg_283.c msg_293.c msg_310.c msg_330.c
msg_331.c msg_332.c msg_334.c msg_336.c msg_337.c msg_347.c
src/tests/usr.bin/xlint/lint2: msg_000.ln read.ln
src/usr.bin/xlint/common: tyname.c
src/usr.bin/xlint/lint1: README.md cgram.y ckbool.c ckctype.c debug.c
decl.c emit1.c err.c externs1.h func.c lint1.h tree.c
src/usr.bin/xlint/xlint: lint.1

Log Message:
lint: distinguish between arguments and parameters


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.20 -r1.21 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
cvs rdiff -u -r1.6 -r1.7 \
src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c \
src/tests/usr.bin/xlint/lint1/gcc_typeof.c \
src/tests/usr.bin/xlint/lint1/msg_003.c \
src/tests/usr.bin/xlint/lint1/msg_086.c \
src/tests/usr.bin/xlint/lint1/msg_331.c \
src/tests/usr.bin/xlint/lint1/msg_332.c \
src/tests/usr.bin/xlint/lint1/msg_336.c \
src/tests/usr.bin/xlint/lint1/msg_337.c
cvs rdiff -u -r1.8 -r1.9 \
src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.c \
src/tests/usr.bin/xlint/lint1/msg_280.c
cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/d_lint_assert.c \
src/tests/usr.bin/xlint/lint1/msg_204.c
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/decl_arg.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_021.c \
src/tests/usr.bin/xlint/lint1/msg_293.c \
src/tests/usr.bin/xlint/lint1/msg_310.c \
src/tests/usr.bin/xlint/lint1/msg_347.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_032.c \
src/tests/usr.bin/xlint/lint1/msg_053.c \
src/tests/usr.bin/xlint/lint1/msg_085.c \
src/tests/usr.bin/xlint/lint1/msg_129.c \
src/tests/usr.bin/xlint/lint1/msg_239.c \
src/tests/usr.bin/xlint/lint1/msg_240.c \
src/tests/usr.bin/xlint/lint1/msg_257.c \
src/tests/usr.bin/xlint/lint1/msg_283.c \
src/tests/usr.bin/xlint/lint1/msg_330.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_064.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_334.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint2/msg_000.ln
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint2/read.ln
cvs rdiff -u -r1.56 -r1.57 src/usr.bin/xlint/common/tyname.c
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/xlint/lint1/README.md
cvs rdiff -u -r1.467 -r1.468 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/lint1/ckbool.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/ckctype.c
cvs rdiff -u -r1.59 -r1.60 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.373 -r1.374 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/xlint/lint1/emit1.c
cvs rdiff -u -r1.214 -r1.215 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.204 -r1.205 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.172 -r1.173 src/usr.bin/xlint/lint1/func.c
cvs rdiff -u -r1.198 -r1.199 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.573 -r1.574 src/usr.bin/xlint/lint1/tree.c
cvs rdiff -u -r1.62 -r1.63 src/usr.bin/xlint/xlint/lint.1

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.43 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.44
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.43	Sun Jul  9 11:18:55 2023
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c	Wed Aug  2 18:51:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict.c,v 1.43 2023/07/09 11:18:55 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict.c,v 1.44 2023/08/02 18:51:25 rillig Exp $	*/
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -124,11 +124,11 @@ strict_bool_constant(void)
 {
 	accept_bool(__lint_false);
 	accept_bool(__lint_true);
-	/* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */
+	/* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */
 	accept_bool(0);
-	/* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */
+	/* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */
 	accept_bool(1);
-	/* expect+1: error: argument 1 expects '_Bool', gets passed 'int' [334] */
+	/* expect+1: error: parameter 1 expects '_Bool', gets passed 'int' [334] */
 	accept_bool(2);
 }
 
@@ -334,17 +334,17 @@ strict_bool_conversion_function_argument
 	take_arguments(b, i, 

CVS commit: src

2023-08-02 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Aug  2 18:51:25 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
d_c99_bool_strict_syshdr.c d_c99_decls_after_stmt.c
d_decl_old_style_arguments.c d_lint_assert.c decl_arg.c
gcc_typeof.c msg_003.c msg_021.c msg_032.c msg_053.c msg_064.c
msg_085.c msg_086.c msg_129.c msg_204.c msg_239.c msg_240.c
msg_257.c msg_280.c msg_283.c msg_293.c msg_310.c msg_330.c
msg_331.c msg_332.c msg_334.c msg_336.c msg_337.c msg_347.c
src/tests/usr.bin/xlint/lint2: msg_000.ln read.ln
src/usr.bin/xlint/common: tyname.c
src/usr.bin/xlint/lint1: README.md cgram.y ckbool.c ckctype.c debug.c
decl.c emit1.c err.c externs1.h func.c lint1.h tree.c
src/usr.bin/xlint/xlint: lint.1

Log Message:
lint: distinguish between arguments and parameters


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.20 -r1.21 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict_syshdr.c
cvs rdiff -u -r1.6 -r1.7 \
src/tests/usr.bin/xlint/lint1/d_c99_decls_after_stmt.c \
src/tests/usr.bin/xlint/lint1/gcc_typeof.c \
src/tests/usr.bin/xlint/lint1/msg_003.c \
src/tests/usr.bin/xlint/lint1/msg_086.c \
src/tests/usr.bin/xlint/lint1/msg_331.c \
src/tests/usr.bin/xlint/lint1/msg_332.c \
src/tests/usr.bin/xlint/lint1/msg_336.c \
src/tests/usr.bin/xlint/lint1/msg_337.c
cvs rdiff -u -r1.8 -r1.9 \
src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.c \
src/tests/usr.bin/xlint/lint1/msg_280.c
cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/d_lint_assert.c \
src/tests/usr.bin/xlint/lint1/msg_204.c
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/decl_arg.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_021.c \
src/tests/usr.bin/xlint/lint1/msg_293.c \
src/tests/usr.bin/xlint/lint1/msg_310.c \
src/tests/usr.bin/xlint/lint1/msg_347.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_032.c \
src/tests/usr.bin/xlint/lint1/msg_053.c \
src/tests/usr.bin/xlint/lint1/msg_085.c \
src/tests/usr.bin/xlint/lint1/msg_129.c \
src/tests/usr.bin/xlint/lint1/msg_239.c \
src/tests/usr.bin/xlint/lint1/msg_240.c \
src/tests/usr.bin/xlint/lint1/msg_257.c \
src/tests/usr.bin/xlint/lint1/msg_283.c \
src/tests/usr.bin/xlint/lint1/msg_330.c
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_064.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_334.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint2/msg_000.ln
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint2/read.ln
cvs rdiff -u -r1.56 -r1.57 src/usr.bin/xlint/common/tyname.c
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/xlint/lint1/README.md
cvs rdiff -u -r1.467 -r1.468 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/lint1/ckbool.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/ckctype.c
cvs rdiff -u -r1.59 -r1.60 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.373 -r1.374 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.72 -r1.73 src/usr.bin/xlint/lint1/emit1.c
cvs rdiff -u -r1.214 -r1.215 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.204 -r1.205 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.172 -r1.173 src/usr.bin/xlint/lint1/func.c
cvs rdiff -u -r1.198 -r1.199 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.573 -r1.574 src/usr.bin/xlint/lint1/tree.c
cvs rdiff -u -r1.62 -r1.63 src/usr.bin/xlint/xlint/lint.1

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



CVS commit: src/sys/arch

2023-08-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug  2 15:57:21 UTC 2023

Modified Files:
src/sys/arch/aarch64/include: pmap.h
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
No need to define cpu_{,set}_tlb_info here - just use the
sys/uvm/pmap/pmap_tlb.h versions.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/aarch64/include/pmap.h
cvs rdiff -u -r1.175 -r1.176 src/sys/arch/arm/include/arm32/pmap.h

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

Modified files:

Index: src/sys/arch/aarch64/include/pmap.h
diff -u src/sys/arch/aarch64/include/pmap.h:1.58 src/sys/arch/aarch64/include/pmap.h:1.59
--- src/sys/arch/aarch64/include/pmap.h:1.58	Thu Apr 20 08:28:03 2023
+++ src/sys/arch/aarch64/include/pmap.h	Wed Aug  2 15:57:21 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.58 2023/04/20 08:28:03 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.59 2023/08/02 15:57:21 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -59,12 +59,6 @@
 /* Maximum number of ASIDs. Some CPUs have less.*/
 #define	PMAP_TLB_NUM_PIDS		65536
 #define	PMAP_TLB_BITMAP_LENGTH		PMAP_TLB_NUM_PIDS
-#define	cpu_set_tlb_info(ci, ti)((void)((ci)->ci_tlb_info = (ti)))
-#if PMAP_TLB_MAX > 1
-#define	cpu_tlb_info(ci)		((ci)->ci_tlb_info)
-#else
-#define	cpu_tlb_info(ci)		(_tlb0_info)
-#endif
 
 static inline tlb_asid_t
 pmap_md_tlb_asid_max(void)

Index: src/sys/arch/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.175 src/sys/arch/arm/include/arm32/pmap.h:1.176
--- src/sys/arch/arm/include/arm32/pmap.h:1.175	Mon Apr 24 16:32:54 2023
+++ src/sys/arch/arm/include/arm32/pmap.h	Wed Aug  2 15:57:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.175 2023/04/24 16:32:54 martin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.176 2023/08/02 15:57:21 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -94,12 +94,7 @@
 #endif
 #define	PMAP_TLB_FLUSH_ASID_ON_RESET	arm_has_tlbiasid_p
 #define	PMAP_TLB_NUM_PIDS		256
-#define	cpu_set_tlb_info(ci, ti)((void)((ci)->ci_tlb_info = (ti)))
-#if PMAP_TLB_MAX > 1
-#define	cpu_tlb_info(ci)		((ci)->ci_tlb_info)
-#else
-#define	cpu_tlb_info(ci)		(_tlb0_info)
-#endif
+
 #define	pmap_md_tlb_asid_max()		(PMAP_TLB_NUM_PIDS - 1)
 #include 
 #include 



CVS commit: src/sys/arch

2023-08-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug  2 15:57:21 UTC 2023

Modified Files:
src/sys/arch/aarch64/include: pmap.h
src/sys/arch/arm/include/arm32: pmap.h

Log Message:
No need to define cpu_{,set}_tlb_info here - just use the
sys/uvm/pmap/pmap_tlb.h versions.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/aarch64/include/pmap.h
cvs rdiff -u -r1.175 -r1.176 src/sys/arch/arm/include/arm32/pmap.h

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



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

2023-08-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug  2 14:45:04 UTC 2023

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

Log Message:
Relax the TLB invalidation from full to by va for writing to kernel text
in db_write_text.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/aarch64/aarch64/db_interface.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/aarch64/aarch64

2023-08-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug  2 14:45:04 UTC 2023

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

Log Message:
Relax the TLB invalidation from full to by va for writing to kernel text
in db_write_text.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/aarch64/aarch64/db_interface.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/db_interface.c
diff -u src/sys/arch/aarch64/aarch64/db_interface.c:1.22 src/sys/arch/aarch64/aarch64/db_interface.c:1.23
--- src/sys/arch/aarch64/aarch64/db_interface.c:1.22	Wed Nov  2 08:37:32 2022
+++ src/sys/arch/aarch64/aarch64/db_interface.c	Wed Aug  2 14:45:04 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.22 2022/11/02 08:37:32 skrll Exp $ */
+/* $NetBSD: db_interface.c,v 1.23 2023/08/02 14:45:04 skrll Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.22 2022/11/02 08:37:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.23 2023/08/02 14:45:04 skrll Exp $");
 
 #include 
 #include 
@@ -171,7 +171,8 @@ db_write_text(vaddr_t addr, size_t size,
 		 */
 		/* old pte is returned by pmap_kvattr */
 		pte = pmap_kvattr(ptep, VM_PROT_EXECUTE | VM_PROT_READ | VM_PROT_WRITE);
-		aarch64_tlbi_all();
+		/* dsb(ishst) included in aarch64_tlbi_by_va */
+		aarch64_tlbi_by_va(addr);
 
 		s = size;
 		if (size > PAGE_SIZE)
@@ -182,7 +183,8 @@ db_write_text(vaddr_t addr, size_t size,
 
 		/* restore pte */
 		*ptep = pte;
-		aarch64_tlbi_all();
+		/* dsb(ishst) included in aarch64_tlbi_by_va */
+		aarch64_tlbi_by_va(addr);
 
 		addr += s;
 		size -= s;



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

2023-08-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug  2 14:36:40 UTC 2023

Modified Files:
src/sys/arch/arm/arm32: db_interface.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/arm/arm32/db_interface.c

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

Modified files:

Index: src/sys/arch/arm/arm32/db_interface.c
diff -u src/sys/arch/arm/arm32/db_interface.c:1.64 src/sys/arch/arm/arm32/db_interface.c:1.65
--- src/sys/arch/arm/arm32/db_interface.c:1.64	Wed Oct 26 23:38:06 2022
+++ src/sys/arch/arm/arm32/db_interface.c	Wed Aug  2 14:36:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.64 2022/10/26 23:38:06 riastradh Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.65 2023/08/02 14:36:39 skrll Exp $	*/
 
 /*
  * Copyright (c) 1996 Scott K. Stevens
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.64 2022/10/26 23:38:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.65 2023/08/02 14:36:39 skrll Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -276,10 +276,10 @@ db_write_bytes(vaddr_t addr, size_t size
 	}
 
 	if (size == 4 && (addr & 3) == 0 && ((uintptr_t)data & 3) == 0)
-		*((int*)dst) = *((const int *)data);
+		*((int *)dst) = *((const int *)data);
 	else
 	if (size == 2 && (addr & 1) == 0 && ((uintptr_t)data & 1) == 0)
-		*((short*)dst) = *((const short *)data);
+		*((short *)dst) = *((const short *)data);
 	else {
 		loop = size;
 		while (loop-- > 0) {



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

2023-08-02 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug  2 14:36:40 UTC 2023

Modified Files:
src/sys/arch/arm/arm32: db_interface.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/arm/arm32/db_interface.c

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-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 12:12:52 UTC 2023

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
Bump libc minor here too


To generate a diff of this commit:
cvs rdiff -u -r1.954 -r1.955 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.316 -r1.317 src/distrib/sets/lists/debug/shl.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/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.954 src/distrib/sets/lists/base/shl.mi:1.955
--- src/distrib/sets/lists/base/shl.mi:1.954	Tue Aug  1 06:35:55 2023
+++ src/distrib/sets/lists/base/shl.mi	Wed Aug  2 12:12:52 2023
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.954 2023/08/01 06:35:55 mrg Exp $
+# $NetBSD: shl.mi,v 1.955 2023/08/02 12:12:52 martin Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -24,7 +24,7 @@
 ./lib/libblocklist.so.0.0			base-sys-shlib		dynamicroot
 ./lib/libc.so	base-sys-shlib		dynamicroot
 ./lib/libc.so.12base-sys-shlib		dynamicroot
-./lib/libc.so.12.220base-sys-shlib		dynamicroot
+./lib/libc.so.12.221base-sys-shlib		dynamicroot
 ./lib/libcrypt.sobase-sys-shlib		dynamicroot
 ./lib/libcrypt.so.1base-sys-shlib		dynamicroot
 ./lib/libcrypt.so.1.0base-sys-shlib		dynamicroot
@@ -257,7 +257,7 @@
 ./usr/lib/libc++.so.1.0base-sys-shlib		compatfile,libcxx
 ./usr/lib/libc.sobase-sys-shlib		compatfile
 ./usr/lib/libc.so.12base-sys-shlib		compatfile
-./usr/lib/libc.so.12.220			base-sys-shlib		compatfile
+./usr/lib/libc.so.12.221			base-sys-shlib		compatfile
 ./usr/lib/libcbor.sobase-sys-shlib		compatfile
 ./usr/lib/libcbor.so.0base-sys-shlib		compatfile
 ./usr/lib/libcbor.so.0.5			base-sys-shlib		compatfile

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.316 src/distrib/sets/lists/debug/shl.mi:1.317
--- src/distrib/sets/lists/debug/shl.mi:1.316	Tue Aug  1 06:35:55 2023
+++ src/distrib/sets/lists/debug/shl.mi	Wed Aug  2 12:12:52 2023
@@ -1,10 +1,10 @@
-# $NetBSD: shl.mi,v 1.316 2023/08/01 06:35:55 mrg Exp $
+# $NetBSD: shl.mi,v 1.317 2023/08/02 12:12:52 martin Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libavl.so.0.0.debug			comp-zfs-debug	debug,dynamicroot,zfs
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-obsolete	obsolete,compatfile
 ./usr/libdata/debug/lib/libblocklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
-./usr/libdata/debug/lib/libc.so.12.220.debug			comp-sys-debug	debug,dynamicroot
+./usr/libdata/debug/lib/libc.so.12.221.debug			comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libcrypt.so.1.0.debug			comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libcrypto.so.12.0.debug			comp-sys-debug	debug,dynamicroot,openssl=10
 ./usr/libdata/debug/lib/libcrypto.so.14.1.debug			comp-sys-debug	debug,dynamicroot,openssl=11
@@ -86,7 +86,7 @@
 ./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.1.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug			comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libc++.so.1.0.debug			comp-sys-debug	debug,compatfile,libcxx
-./usr/libdata/debug/usr/lib/libc.so.12.220.debug		comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libc.so.12.221.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libcbor.so.0.5.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libcom_err.so.8.0.debug		comp-krb5-debug	debug,compatfile,kerberos
 ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug		comp-sys-debug	debug,compatfile



CVS commit: src/distrib/sets/lists

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 12:12:52 UTC 2023

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/debug: shl.mi

Log Message:
Bump libc minor here too


To generate a diff of this commit:
cvs rdiff -u -r1.954 -r1.955 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.316 -r1.317 src/distrib/sets/lists/debug/shl.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-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:36:01 UTC 2023

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

Log Message:
Tickets #301 - #304


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.94 -r1.1.2.95 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.94 src/doc/CHANGES-10.0:1.1.2.95
--- src/doc/CHANGES-10.0:1.1.2.94	Tue Aug  1 17:05:58 2023
+++ src/doc/CHANGES-10.0	Wed Aug  2 10:36:01 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.94 2023/08/01 17:05:58 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.95 2023/08/02 10:36:01 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -3561,3 +3561,25 @@ tests/libexec/ld.elf_so/t_hash.c		1.1
 	ld.elf_so(1): fix sysv hash on LP64 platforms.
 	[riastradh, ticket #300]
 
+sys/dev/usb/ehci.c1.317
+
+	PR 57518: usb keyboard causes host controller to miss microframe.
+	[skrll, ticket #301]
+
+sys/external/bsd/drm2/amdgpu/files.amdgpu	1.30
+sys/modules/amdgpu/Makefile			1.6
+
+	amdgpu: enable display core logic.
+	[riastradh, ticket #302]
+
+sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c 1.11
+
+	amdgpu: fix an error branch.
+	[riastradh, ticket #303]
+
+sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c 1.4
+sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c 1.5
+
+	amdgpu: mark float-dependent variables volatile.
+	[riastradh, ticket #304]
+



CVS commit: [netbsd-10] src/doc

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:36:01 UTC 2023

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

Log Message:
Tickets #301 - #304


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.94 -r1.1.2.95 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/sys/external/bsd/drm2/dist/drm/amd/display/dc

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:34:25 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs [netbsd-10]:
amdgpu_dcn_calcs.c
src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20 [netbsd-10]:
amdgpu_dcn20_resource.c

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

sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c: 
revision 1.4

sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c: 
revision 1.5

amdgpu: Mark float-dependent variables volatile.

This way they are computed -- using FP instructions -- before
DC_FP_END, after which point FP instructions will trap or behave
unpredictably.

This is a workaround, not a proper solution -- really, the
DC_FP_START/END calls should happen in a separate compilation unit
built without -mhard-float or whatever, but that's a lot more work to
make happen for now.

PR kern/57059


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 \
src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c
cvs rdiff -u -r1.4 -r1.4.4.1 \

src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.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/amd/display/dc/calcs/amdgpu_dcn_calcs.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c:1.3 src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c:1.3.4.1
--- src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c:1.3	Sun Dec 19 11:35:07 2021
+++ src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c	Wed Aug  2 10:34:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_dcn_calcs.c,v 1.3 2021/12/19 11:35:07 riastradh Exp $	*/
+/*	$NetBSD: amdgpu_dcn_calcs.c,v 1.3.4.1 2023/08/02 10:34:25 martin Exp $	*/
 
 /*
  * Copyright 2017 Advanced Micro Devices, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn_calcs.c,v 1.3 2021/12/19 11:35:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn_calcs.c,v 1.3.4.1 2023/08/02 10:34:25 martin Exp $");
 
 #include "dm_services.h"
 #include "dc.h"
@@ -626,7 +626,7 @@ static void calc_wm_sets_and_perf_params
 
 static bool dcn_bw_apply_registry_override(struct dc *dc)
 {
-	bool updated = false;
+	volatile bool updated = false;
 
 	DC_FP_START();
 	if ((int)(dc->dcn_soc->sr_exit_time * 1000) != dc->debug.sr_exit_time_ns
@@ -733,7 +733,7 @@ bool dcn_validate_bandwidth(
 	struct dcn_bw_internal_vars *v = >dcn_bw_vars;
 	int i, input_idx, k;
 	int vesa_sync_start, asic_blank_end, asic_blank_start;
-	bool bw_limit_pass;
+	volatile bool bw_limit_pass;
 	float bw_limit;
 
 	PERFORMANCE_TRACE_START();
@@ -1502,7 +1502,7 @@ void dcn_bw_notify_pplib_of_wm_ranges(st
 {
 	struct pp_smu_funcs_rv *pp = NULL;
 	struct pp_smu_wm_range_sets ranges = {0};
-	int min_fclk_khz, min_dcfclk_khz, socclk_khz;
+	volatile int min_fclk_khz, min_dcfclk_khz, socclk_khz;
 	const int overdrive = 500; /* 5 GHz to cover Overdrive */
 
 	if (dc->res_pool->pp_smu)

Index: src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c:1.4 src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c:1.4.4.1
--- src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c:1.4	Sun Dec 19 11:59:31 2021
+++ src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c	Wed Aug  2 10:34:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_dcn20_resource.c,v 1.4 2021/12/19 11:59:31 riastradh Exp $	*/
+/*	$NetBSD: amdgpu_dcn20_resource.c,v 1.4.4.1 2023/08/02 10:34:25 martin Exp $	*/
 
 /*
 * Copyright 2016 Advanced Micro Devices, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn20_resource.c,v 1.4 2021/12/19 11:59:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_dcn20_resource.c,v 1.4.4.1 2023/08/02 10:34:25 martin Exp $");
 
 #include 
 
@@ -2932,7 +2932,7 @@ validate_out:
 bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context,
 		bool fast_validate)
 {
-	bool voltage_supported = false;
+	volatile bool voltage_supported = false;
 	bool full_pstate_supported = false;
 	bool dummy_pstate_supported = false;
 	double p_state_latency_us;



CVS commit: [netbsd-10] src/sys/external/bsd/drm2/dist/drm/amd/display/dc

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:34:25 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs [netbsd-10]:
amdgpu_dcn_calcs.c
src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20 [netbsd-10]:
amdgpu_dcn20_resource.c

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

sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c: 
revision 1.4

sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c: 
revision 1.5

amdgpu: Mark float-dependent variables volatile.

This way they are computed -- using FP instructions -- before
DC_FP_END, after which point FP instructions will trap or behave
unpredictably.

This is a workaround, not a proper solution -- really, the
DC_FP_START/END calls should happen in a separate compilation unit
built without -mhard-float or whatever, but that's a lot more work to
make happen for now.

PR kern/57059


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 \
src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/amdgpu_dcn_calcs.c
cvs rdiff -u -r1.4 -r1.4.4.1 \

src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/amdgpu_dcn20_resource.c

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



CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common

2023-08-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug  2 10:31:46 UTC 2023

Modified Files:
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_platform_limits_netbsd.cc
sanitizer_platform_limits_netbsd.h

Log Message:
Use the new struct and ioctl names for the compat functions (thanks Ryo)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
cvs rdiff -u -r1.8 -r1.9 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
cvs rdiff -u -r1.6 -r1.7 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.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/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.5 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.6
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.5	Mon Dec 26 17:22:22 2022
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc	Wed Aug  2 06:31:46 2023
@@ -452,7 +452,7 @@ static void ioctl_table_fill() {
   _(USB_SETDEBUG, READ, sizeof(int));
   _(USB_DISCOVER, NONE, 0);
   _(USB_DEVICEINFO, READWRITE, struct_usb_device_info_sz);
-  _(USB_DEVICEINFO_OLD, READWRITE, struct_usb_device_info_old_sz);
+  _(USB_DEVICEINFO_30, READWRITE, struct_usb_device_info30_sz);
   _(USB_DEVICESTATS, WRITE, struct_usb_device_stats_sz);
   _(USB_GET_REPORT_DESC, WRITE, struct_usb_ctl_report_desc_sz);
   _(USB_SET_IMMED, READ, sizeof(int));
@@ -472,7 +472,7 @@ static void ioctl_table_fill() {
   _(USB_GET_STRING_DESC, READWRITE, struct_usb_string_desc_sz);
   _(USB_DO_REQUEST, READWRITE, struct_usb_ctl_request_sz);
   _(USB_GET_DEVICEINFO, WRITE, struct_usb_device_info_sz);
-  _(USB_GET_DEVICEINFO_OLD, WRITE, struct_usb_device_info_old_sz);
+  _(USB_GET_DEVICEINFO_30, WRITE, struct_usb_device_info30_sz);
   _(USB_SET_SHORT_XFER, READ, sizeof(int));
   _(USB_SET_TIMEOUT, READ, sizeof(int));
   _(USB_SET_BULK_RA, READ, sizeof(int));
@@ -675,7 +675,7 @@ static void ioctl_table_fill() {
   _(BIOCGETIF, WRITE, struct_ifreq_sz);
   _(BIOCSETIF, READ, struct_ifreq_sz);
   _(BIOCGSTATS, WRITE, struct_bpf_stat_sz);
-  _(BIOCGSTATSOLD, WRITE, struct_bpf_stat_old_sz);
+  _(BIOCGSTATS_30, WRITE, struct_bpf_stat30_sz);
   _(BIOCIMMEDIATE, READ, sizeof(unsigned int));
   _(BIOCVERSION, WRITE, struct_bpf_version_sz);
   _(BIOCSTCPF, READ, struct_bpf_program_sz);

Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.8 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.9
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.8	Mon Dec 26 17:22:22 2022
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Wed Aug  2 06:31:46 2023
@@ -549,7 +549,7 @@ unsigned struct_blue_interface_sz = size
 unsigned struct_blue_stats_sz = sizeof(blue_stats);
 unsigned struct_bpf_dltlist_sz = sizeof(bpf_dltlist);
 unsigned struct_bpf_program_sz = sizeof(bpf_program);
-unsigned struct_bpf_stat_old_sz = sizeof(bpf_stat_old);
+unsigned struct_bpf_stat30_sz = sizeof(bpf_stat30);
 unsigned struct_bpf_stat_sz = sizeof(bpf_stat);
 unsigned struct_bpf_version_sz = sizeof(bpf_version);
 unsigned struct_btreq_sz = sizeof(btreq);
@@ -856,7 +856,7 @@ unsigned struct_spi_ioctl_transfer_sz = 
 unsigned struct_autofs_daemon_request_sz = sizeof(autofs_daemon_request);
 unsigned struct_autofs_daemon_done_sz = sizeof(autofs_daemon_done);
 unsigned struct_sctp_connectx_addrs_sz = sizeof(sctp_connectx_addrs);
-unsigned struct_usb_device_info_old_sz = sizeof(usb_device_info_old);
+unsigned struct_usb_device_info30_sz = sizeof(usb_device_info30);
 unsigned struct_usb_device_info_sz = sizeof(usb_device_info);
 unsigned struct_usb_device_stats_sz = sizeof(usb_device_stats);
 unsigned struct_usb_endpoint_desc_sz = sizeof(usb_endpoint_desc);
@@ -1419,7 +1419,7 @@ unsigned IOCTL_USB_REQUEST = USB_REQUEST
 unsigned IOCTL_USB_SETDEBUG = USB_SETDEBUG;
 unsigned IOCTL_USB_DISCOVER = USB_DISCOVER;
 unsigned IOCTL_USB_DEVICEINFO = USB_DEVICEINFO;
-unsigned IOCTL_USB_DEVICEINFO_OLD = USB_DEVICEINFO_OLD;
+unsigned IOCTL_USB_DEVICEINFO_30 = USB_DEVICEINFO_30;
 unsigned IOCTL_USB_DEVICESTATS = USB_DEVICESTATS;
 unsigned IOCTL_USB_GET_REPORT_DESC = 

CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common

2023-08-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug  2 10:31:46 UTC 2023

Modified Files:
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_interceptors_ioctl_netbsd.inc
sanitizer_platform_limits_netbsd.cc
sanitizer_platform_limits_netbsd.h

Log Message:
Use the new struct and ioctl names for the compat functions (thanks Ryo)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
cvs rdiff -u -r1.8 -r1.9 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
cvs rdiff -u -r1.6 -r1.7 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h

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.old/dist/libsanitizer/sanitizer_common

2023-08-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug  2 10:30:34 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common:
sanitizer_platform_limits_netbsd.h

Log Message:
Forgot to commit the rest of the renames.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \

src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.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.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h
diff -u src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3 src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.4
--- src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3	Sun Feb 19 21:11:40 2023
+++ src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h	Wed Aug  2 06:30:34 2023
@@ -579,7 +579,7 @@ extern unsigned struct_blue_interface_sz
 extern unsigned struct_blue_stats_sz;
 extern unsigned struct_bpf_dltlist_sz;
 extern unsigned struct_bpf_program_sz;
-extern unsigned struct_bpf_stat_old_sz;
+extern unsigned struct_bpf_stat30_sz;
 extern unsigned struct_bpf_stat_sz;
 extern unsigned struct_bpf_version_sz;
 extern unsigned struct_btreq_sz;
@@ -883,7 +883,7 @@ extern unsigned struct_spi_ioctl_transfe
 extern unsigned struct_autofs_daemon_request_sz;
 extern unsigned struct_autofs_daemon_done_sz;
 extern unsigned struct_sctp_connectx_addrs_sz;
-extern unsigned struct_usb_device_info_old_sz;
+extern unsigned struct_usb_device_info30_sz;
 extern unsigned struct_usb_device_info_sz;
 extern unsigned struct_usb_device_stats_sz;
 extern unsigned struct_usb_endpoint_desc_sz;
@@ -1434,7 +1434,7 @@ extern unsigned IOCTL_USB_REQUEST;
 extern unsigned IOCTL_USB_SETDEBUG;
 extern unsigned IOCTL_USB_DISCOVER;
 extern unsigned IOCTL_USB_DEVICEINFO;
-extern unsigned IOCTL_USB_DEVICEINFO_OLD;
+extern unsigned IOCTL_USB_DEVICEINFO_30;
 extern unsigned IOCTL_USB_DEVICESTATS;
 extern unsigned IOCTL_USB_GET_REPORT_DESC;
 extern unsigned IOCTL_USB_SET_IMMED;
@@ -1454,7 +1454,7 @@ extern unsigned IOCTL_USB_GET_FULL_DESC;
 extern unsigned IOCTL_USB_GET_STRING_DESC;
 extern unsigned IOCTL_USB_DO_REQUEST;
 extern unsigned IOCTL_USB_GET_DEVICEINFO;
-extern unsigned IOCTL_USB_GET_DEVICEINFO_OLD;
+extern unsigned IOCTL_USB_GET_DEVICEINFO_30;
 extern unsigned IOCTL_USB_SET_SHORT_XFER;
 extern unsigned IOCTL_USB_SET_TIMEOUT;
 extern unsigned IOCTL_USB_SET_BULK_RA;
@@ -1637,7 +1637,7 @@ extern unsigned IOCTL_BIOCGDLT;
 extern unsigned IOCTL_BIOCGETIF;
 extern unsigned IOCTL_BIOCSETIF;
 extern unsigned IOCTL_BIOCGSTATS;
-extern unsigned IOCTL_BIOCGSTATSOLD;
+extern unsigned IOCTL_BIOCGSTATS_30;
 extern unsigned IOCTL_BIOCIMMEDIATE;
 extern unsigned IOCTL_BIOCVERSION;
 extern unsigned IOCTL_BIOCSTCPF;



CVS commit: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common

2023-08-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug  2 10:30:34 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common:
sanitizer_platform_limits_netbsd.h

Log Message:
Forgot to commit the rest of the renames.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \

src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h

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



Re: CVS commit: src

2023-08-02 Thread Christos Zoulas
Let's not make a mountain out of a molehill. Thanks Ryo for looking into it and 
the changes are good. In fact I had forgotten to commit the:

M dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_netbsd.h

And the others worked for me because of the compat name stuff that I added as 
Matt requested.
I will apply the rest of Ryo's patch and hopefully we can put it behind us.

Best,

christos

> On Aug 2, 2023, at 2:38 AM, Ryo ONODERA  wrote:
> 
> Hi,
> 
> I have the same build failure.
> I think that there are some typos and inconsistencies.
> 
> With the attached patch, I can finish build.sh build successfully.
> 
> Thank you.
> 
> On Wed, Aug 2, 2023 at 2:32 AM Christos Zoulas  wrote:
>> 
>> I am looking into it. With new code that restores the old names it should 
>> all work, unless I have typo that I have not found yet.
>> 
>> christos
>> 
>> 
> 
> 
> --
> Ryo ONODERA // r...@tetera.org
> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
> 



signature.asc
Description: Message signed with OpenPGP


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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:30:18 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu [netbsd-10]:
amdgpu_fence.c

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

sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c: revision 1.11

avoid calling drm_sched_fini() for AMDGPU_RING_TYPE_KIQ rings.

drm_sched_init() is not called for these rings, and we'd panic trying
to mutex_destroy() a mutex that wasn't initialised.

this seems like a general bug, not a bug in netbsd port.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.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/amd/amdgpu/amdgpu_fence.c
diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c:1.10 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c:1.10.4.1
--- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c:1.10	Sun Dec 19 12:02:39 2021
+++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c	Wed Aug  2 10:30:18 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdgpu_fence.c,v 1.10 2021/12/19 12:02:39 riastradh Exp $	*/
+/*	$NetBSD: amdgpu_fence.c,v 1.10.4.1 2023/08/02 10:30:18 martin Exp $	*/
 
 /*
  * Copyright 2009 Jerome Glisse.
@@ -31,7 +31,7 @@
  *Dave Airlie
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_fence.c,v 1.10 2021/12/19 12:02:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_fence.c,v 1.10.4.1 2023/08/02 10:30:18 martin Exp $");
 
 #include 
 #include 
@@ -541,7 +541,9 @@ void amdgpu_fence_driver_fini(struct amd
 		}
 		amdgpu_irq_put(adev, ring->fence_drv.irq_src,
 			   ring->fence_drv.irq_type);
-		drm_sched_fini(>sched);
+		if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
+			drm_sched_fini(>sched);
+		}
 		del_timer_sync(>fence_drv.fallback_timer);
 		for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
 			dma_fence_put(ring->fence_drv.fences[j]);



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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:30:18 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu [netbsd-10]:
amdgpu_fence.c

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

sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.c: revision 1.11

avoid calling drm_sched_fini() for AMDGPU_RING_TYPE_KIQ rings.

drm_sched_init() is not called for these rings, and we'd panic trying
to mutex_destroy() a mutex that wasn't initialised.

this seems like a general bug, not a bug in netbsd port.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 \
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fence.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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:28:08 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/amdgpu [netbsd-10]: files.amdgpu
src/sys/modules/amdgpu [netbsd-10]: Makefile

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

sys/modules/amdgpu/Makefile: revision 1.6
sys/external/bsd/drm2/amdgpu/files.amdgpu: revision 1.30

amdgpu: Define CONFIG_DRM_AMD_DC to enable display core logic.

Probably resolves a host of issues with amdgpu not detecting
displays!
Noticed by rjs@.

PR kern/57059
PR kern/57325
PR kern/57452


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.4.1 src/sys/external/bsd/drm2/amdgpu/files.amdgpu
cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/modules/amdgpu/Makefile

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/amdgpu/files.amdgpu
diff -u src/sys/external/bsd/drm2/amdgpu/files.amdgpu:1.29 src/sys/external/bsd/drm2/amdgpu/files.amdgpu:1.29.4.1
--- src/sys/external/bsd/drm2/amdgpu/files.amdgpu:1.29	Sun Jul 24 20:05:00 2022
+++ src/sys/external/bsd/drm2/amdgpu/files.amdgpu	Wed Aug  2 10:28:08 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amdgpu,v 1.29 2022/07/24 20:05:00 riastradh Exp $
+#	$NetBSD: files.amdgpu,v 1.29.4.1 2023/08/02 10:28:08 martin Exp $
 
 version	20180827
 
@@ -33,6 +33,7 @@ makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-
 makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-I$S/external/bsd/drm2/dist/drm/amd/display/dmub/inc"
 
 makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-DCONFIG_DRM_AMD_ACP=1"
+makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-DCONFIG_DRM_AMD_DC=1"
 makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-DCONFIG_DRM_AMD_DC_DCN=1"
 makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-DCONFIG_DRM_AMD_DC_HDCP=1"
 makeoptions	amdgpu	"CPPFLAGS.amdgpu"+="-DCONFIG_PERF_EVENTS=0"

Index: src/sys/modules/amdgpu/Makefile
diff -u src/sys/modules/amdgpu/Makefile:1.5 src/sys/modules/amdgpu/Makefile:1.5.4.1
--- src/sys/modules/amdgpu/Makefile:1.5	Sat Jul 30 03:29:52 2022
+++ src/sys/modules/amdgpu/Makefile	Wed Aug  2 10:28:07 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2022/07/30 03:29:52 tnn Exp $
+# $NetBSD: Makefile,v 1.5.4.1 2023/08/02 10:28:07 martin Exp $
 
 .include "../Makefile.inc"
 .include "../drmkms/Makefile.inc"
@@ -35,6 +35,7 @@ CPPFLAGS+=	-I${S}/external/bsd/drm2/dist
 CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm
 CPPFLAGS+=	-I${S}/external/bsd/drm2/dist/drm/amd/display/dmub/inc
 CPPFLAGS+=	-DCONFIG_DRM_AMD_ACP=1
+CPPFLAGS+=	-DCONFIG_DRM_AMD_DC=1
 CPPFLAGS+=	-DCONFIG_DRM_AMD_DC_DCN=1
 CPPFLAGS+=	-DCONFIG_DRM_AMD_DC_HDCP=1
 CPPFLAGS+=	-DCONFIG_PERF_EVENTS=0



CVS commit: [netbsd-10] src/sys

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:28:08 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/amdgpu [netbsd-10]: files.amdgpu
src/sys/modules/amdgpu [netbsd-10]: Makefile

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

sys/modules/amdgpu/Makefile: revision 1.6
sys/external/bsd/drm2/amdgpu/files.amdgpu: revision 1.30

amdgpu: Define CONFIG_DRM_AMD_DC to enable display core logic.

Probably resolves a host of issues with amdgpu not detecting
displays!
Noticed by rjs@.

PR kern/57059
PR kern/57325
PR kern/57452


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.4.1 src/sys/external/bsd/drm2/amdgpu/files.amdgpu
cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/modules/amdgpu/Makefile

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-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:25:32 UTC 2023

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

Log Message:
Ticket #1877


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.188 -r1.1.2.189 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.188 src/doc/CHANGES-8.3:1.1.2.189
--- src/doc/CHANGES-8.3:1.1.2.188	Tue Aug  1 17:31:33 2023
+++ src/doc/CHANGES-8.3	Wed Aug  2 10:25:32 2023
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.188 2023/08/01 17:31:33 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.189 2023/08/02 10:25:32 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -3740,3 +3740,8 @@ sys/external/bsd/drm2/linux/linux_ww_mut
 	drm: PR 57537: fix mistake in ww_mutex wait loops.
 	[riastradh, ticket #1876]
 
+sys/dev/usb/ehci.c1.317
+
+	PR 57518: usb keyboard causes host controller to miss microframe.
+	[skrll, ticket #1877]
+



CVS commit: [netbsd-8] src/doc

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:25:32 UTC 2023

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

Log Message:
Ticket #1877


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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:24:17 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1877):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.


To generate a diff of this commit:
cvs rdiff -u -r1.254.8.7 -r1.254.8.8 src/sys/dev/usb/ehci.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-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:23:26 UTC 2023

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

Log Message:
Ticket #1698


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.85 -r1.1.2.86 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-8] src/sys/dev/usb

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:24:17 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1877):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.


To generate a diff of this commit:
cvs rdiff -u -r1.254.8.7 -r1.254.8.8 src/sys/dev/usb/ehci.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.254.8.7 src/sys/dev/usb/ehci.c:1.254.8.8
--- src/sys/dev/usb/ehci.c:1.254.8.7	Tue Feb 25 18:52:44 2020
+++ src/sys/dev/usb/ehci.c	Wed Aug  2 10:24:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.254.8.7 2020/02/25 18:52:44 martin Exp $ */
+/*	$NetBSD: ehci.c,v 1.254.8.8 2023/08/02 10:24:16 martin Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.254.8.7 2020/02/25 18:52:44 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.254.8.8 2023/08/02 10:24:16 martin Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -1989,14 +1989,17 @@ ehci_open(struct usbd_pipe *pipe)
 		);
 		sqh->qh.qh_endphub = htole32(
 		EHCI_QH_SET_MULT(1) |
-		EHCI_QH_SET_SMASK(xfertype == UE_INTERRUPT ? 0x02 : 0)
+		(xfertype == UE_INTERRUPT ?
+			EHCI_QH_SET_SMASK(__BIT(1))	   /* Start Split Y1 */
+			: 0)
 		);
 		if (speed != EHCI_QH_SPEED_HIGH)
 			sqh->qh.qh_endphub |= htole32(
 			EHCI_QH_SET_PORT(hshubport) |
 			EHCI_QH_SET_HUBA(hshubaddr) |
 			(xfertype == UE_INTERRUPT ?
- EHCI_QH_SET_CMASK(0x08) : 0)
+ EHCI_QH_SET_CMASK(__BITS(3,5)) /* CS Y[345] */
+ : 0)
 			);
 		sqh->qh.qh_curqtd = EHCI_NULL;
 		/* Fill the overlay qTD */



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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:22:13 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1698):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.


To generate a diff of this commit:
cvs rdiff -u -r1.267.2.6 -r1.267.2.7 src/sys/dev/usb/ehci.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.267.2.6 src/sys/dev/usb/ehci.c:1.267.2.7
--- src/sys/dev/usb/ehci.c:1.267.2.6	Mon Dec  6 19:28:57 2021
+++ src/sys/dev/usb/ehci.c	Wed Aug  2 10:22:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.267.2.6 2021/12/06 19:28:57 martin Exp $ */
+/*	$NetBSD: ehci.c,v 1.267.2.7 2023/08/02 10:22:13 martin Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.6 2021/12/06 19:28:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.7 2023/08/02 10:22:13 martin Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -1974,14 +1974,17 @@ ehci_open(struct usbd_pipe *pipe)
 		);
 		sqh->qh.qh_endphub = htole32(
 		EHCI_QH_SET_MULT(1) |
-		EHCI_QH_SET_SMASK(xfertype == UE_INTERRUPT ? 0x02 : 0)
+		(xfertype == UE_INTERRUPT ?
+			EHCI_QH_SET_SMASK(__BIT(1))	   /* Start Split Y1 */
+			: 0)
 		);
 		if (speed != EHCI_QH_SPEED_HIGH)
 			sqh->qh.qh_endphub |= htole32(
 			EHCI_QH_SET_PORT(hshubport) |
 			EHCI_QH_SET_HUBA(hshubaddr) |
 			(xfertype == UE_INTERRUPT ?
- EHCI_QH_SET_CMASK(0x08) : 0)
+ EHCI_QH_SET_CMASK(__BITS(3,5)) /* CS Y[345] */
+ : 0)
 			);
 		sqh->qh.qh_curqtd = EHCI_NULL;
 		/* Fill the overlay qTD */



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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:22:13 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1698):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.


To generate a diff of this commit:
cvs rdiff -u -r1.267.2.6 -r1.267.2.7 src/sys/dev/usb/ehci.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-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:23:26 UTC 2023

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

Log Message:
Ticket #1698


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.85 -r1.1.2.86 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.85 src/doc/CHANGES-9.4:1.1.2.86
--- src/doc/CHANGES-9.4:1.1.2.85	Tue Aug  1 17:36:58 2023
+++ src/doc/CHANGES-9.4	Wed Aug  2 10:23:26 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.85 2023/08/01 17:36:58 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.86 2023/08/02 10:23:26 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -1863,3 +1863,8 @@ sys/dev/tprof/tprof_x86_intel.c 
 - KNF
 	[msaitoh, ticket #1697]
 
+sys/dev/usb/ehci.c1.317
+
+	PR 57518: usb keyboard causes host controller to miss microframe.
+	[skrll, ticket #1698]
+



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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:20:38 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by skrll in ticket #301):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.


To generate a diff of this commit:
cvs rdiff -u -r1.315 -r1.315.2.1 src/sys/dev/usb/ehci.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.315 src/sys/dev/usb/ehci.c:1.315.2.1
--- src/sys/dev/usb/ehci.c:1.315	Tue Dec 13 21:29:04 2022
+++ src/sys/dev/usb/ehci.c	Wed Aug  2 10:20:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.315 2022/12/13 21:29:04 jakllsch Exp $ */
+/*	$NetBSD: ehci.c,v 1.315.2.1 2023/08/02 10:20:38 martin Exp $ */
 
 /*
  * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.315 2022/12/13 21:29:04 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.315.2.1 2023/08/02 10:20:38 martin Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -2032,14 +2032,17 @@ ehci_open(struct usbd_pipe *pipe)
 		);
 		sqh->qh.qh_endphub = htole32(
 		EHCI_QH_SET_MULT(1) |
-		EHCI_QH_SET_SMASK(xfertype == UE_INTERRUPT ? 0x02 : 0)
+		(xfertype == UE_INTERRUPT ?
+			EHCI_QH_SET_SMASK(__BIT(1))	   /* Start Split Y1 */
+			: 0)
 		);
 		if (speed != EHCI_QH_SPEED_HIGH)
 			sqh->qh.qh_endphub |= htole32(
 			EHCI_QH_SET_PORT(hshubport) |
 			EHCI_QH_SET_HUBA(hshubaddr) |
 			(xfertype == UE_INTERRUPT ?
- EHCI_QH_SET_CMASK(0x08) : 0)
+ EHCI_QH_SET_CMASK(__BITS(3,5)) /* CS Y[345] */
+ : 0)
 			);
 		sqh->qh.qh_curqtd = EHCI_NULL;
 		/* Fill the overlay qTD */



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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 10:20:38 UTC 2023

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

Log Message:
Pull up following revision(s) (requested by skrll in ticket #301):

sys/dev/usb/ehci.c: revision 1.317

PR 57518: usb keyboard causes host controller to miss microframe

As per the USB 2.0 specification section 11.18.4; paragraph 3.b
For interrupt IN/OUT full-/low-speed transactions, the host must  schedule a
complete-split transaction in each of the two microframes following the
first microframe in which the full-/low-speed transaction is budgeted. An
additional complete-split must also be scheduled in the third following
microframe unless the full-/low-speed transaction was budgeted to start
in microframe Y6.


To generate a diff of this commit:
cvs rdiff -u -r1.315 -r1.315.2.1 src/sys/dev/usb/ehci.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/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 09:18:14 UTC 2023

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

Log Message:
check for empty ranges in pmap_page_physload() itself


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/hppa/hppa/pmap.c

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

Modified files:

Index: src/sys/arch/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.121 src/sys/arch/hppa/hppa/pmap.c:1.122
--- src/sys/arch/hppa/hppa/pmap.c:1.121	Wed Aug  2 08:54:42 2023
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Aug  2 09:18:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $	*/
+/*	$NetBSD: pmap.c,v 1.122 2023/08/02 09:18:14 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.122 2023/08/02 09:18:14 macallan Exp $");
 
 #include "opt_cputype.h"
 
@@ -767,6 +767,9 @@ static void
 pmap_page_physload(paddr_t spa, paddr_t epa)
 {
 
+	if (spa == epa)
+		return;
+
 	if (spa < FIRST_16M && epa <= FIRST_16M) {
 		uvm_page_physload(spa, epa, spa, epa, VM_FREELIST_ISADMA);
 	} else if (spa < FIRST_16M && epa > FIRST_16M) {
@@ -1090,8 +1093,7 @@ pmap_bootstrap(vaddr_t vstart)
 	availphysmem = 0;
 
 	pmap_page_physload(resvmem, atop(ksrx));
-	if (atop(kero) != atop(ksrw))
-		pmap_page_physload(atop(kero), atop(ksrw));
+	pmap_page_physload(atop(kero), atop(ksrw));
 	pmap_page_physload(atop(kerw), physmem);
 
 	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 09:18:14 UTC 2023

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

Log Message:
check for empty ranges in pmap_page_physload() itself


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 08:54:42 UTC 2023

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

Log Message:
avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/hppa/hppa/pmap.c

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



CVS commit: src/sys/arch/hppa/hppa

2023-08-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Aug  2 08:54:42 UTC 2023

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

Log Message:
avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/hppa/hppa/pmap.c

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

Modified files:

Index: src/sys/arch/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.120 src/sys/arch/hppa/hppa/pmap.c:1.121
--- src/sys/arch/hppa/hppa/pmap.c:1.120	Thu Jun 16 06:25:42 2022
+++ src/sys/arch/hppa/hppa/pmap.c	Wed Aug  2 08:54:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.120 2022/06/16 06:25:42 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2022/06/16 06:25:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2023/08/02 08:54:42 macallan Exp $");
 
 #include "opt_cputype.h"
 
@@ -1090,7 +1090,8 @@ pmap_bootstrap(vaddr_t vstart)
 	availphysmem = 0;
 
 	pmap_page_physload(resvmem, atop(ksrx));
-	pmap_page_physload(atop(kero), atop(ksrw));
+	if (atop(kero) != atop(ksrw))
+		pmap_page_physload(atop(kero), atop(ksrw));
 	pmap_page_physload(atop(kerw), physmem);
 
 	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);



Re: CVS commit: src

2023-08-02 Thread Ryo ONODERA
Hi,

I have no strong opinion about this change.
I just want to unbreak the build to test the latest epoll(2) related
side effects for pkgsrc packages.

Thank you.

On Wed, Aug 2, 2023 at 4:20 PM Taylor R Campbell
 wrote:
>
> Let's please just revert all these ioctl renames now, and go back to
> the drawing board, rather than continue to dig ourselves into a deeper
> hole with unnecessary incremental cosmetic changes that are breaking
> all the builds.
>
> I generally agree that calling something plain `old' is bad and the
> proliferation of them into sanitizers is also bad, but flailing around
> with broken builds and without a clear plan for how this should fit
> together and be maintained is much worse.



-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src

2023-08-02 Thread Taylor R Campbell
Let's please just revert all these ioctl renames now, and go back to
the drawing board, rather than continue to dig ourselves into a deeper
hole with unnecessary incremental cosmetic changes that are breaking
all the builds.

I generally agree that calling something plain `old' is bad and the
proliferation of them into sanitizers is also bad, but flailing around
with broken builds and without a clear plan for how this should fit
together and be maintained is much worse.


re: CVS commit: src

2023-08-02 Thread matthew green
Ryo ONODERA writes:
> I have the same build failure.
> I think that there are some typos and inconsistencies.
>
> With the attached patch, I can finish build.sh build successfully.

this looks like what i expected.

the before / after showed fewer of the new names.  please commit.

we'll need similar fix for new gcc, but it's isn't building the
sanitizer libraries yet.


.mrg.


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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 07:12:04 UTC 2023

Modified Files:
src/libexec/ld.elf_so/arch/riscv [netbsd-10]: mdreloc.c

Log Message:
Fix member name in patch for  ticket #297 (fix dlopen with static thread-local
storage)


To generate a diff of this commit:
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/libexec/ld.elf_so/arch/riscv/mdreloc.c

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

Modified files:

Index: src/libexec/ld.elf_so/arch/riscv/mdreloc.c
diff -u src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.7.2.1 src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.7.2.2
--- src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.7.2.1	Tue Aug  1 16:34:59 2023
+++ src/libexec/ld.elf_so/arch/riscv/mdreloc.c	Wed Aug  2 07:12:04 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdreloc.c,v 1.7.2.1 2023/08/01 16:34:59 martin Exp $	*/
+/*	$NetBSD: mdreloc.c,v 1.7.2.2 2023/08/02 07:12:04 martin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.7.2.1 2023/08/01 16:34:59 martin Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.7.2.2 2023/08/02 07:12:04 martin Exp $");
 #endif /* not lint */
 
 #include 
@@ -168,7 +168,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry 
 			Elf_Addr old = *where;
 			Elf_Addr val = old;
 
-			if (!defobj->tls_done &&
+			if (!defobj->tls_static &&
 			_rtld_tls_offset_allocate(__UNCONST(defobj)))
 return -1;
 



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

2023-08-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Aug  2 07:12:04 UTC 2023

Modified Files:
src/libexec/ld.elf_so/arch/riscv [netbsd-10]: mdreloc.c

Log Message:
Fix member name in patch for  ticket #297 (fix dlopen with static thread-local
storage)


To generate a diff of this commit:
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/libexec/ld.elf_so/arch/riscv/mdreloc.c

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-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug  2 07:11:31 UTC 2023

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

Log Message:
fileassoc(9): Fast paths to skip global locks when not in use.

PR kern/57552


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/kern_fileassoc.c

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-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug  2 07:11:31 UTC 2023

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

Log Message:
fileassoc(9): Fast paths to skip global locks when not in use.

PR kern/57552


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/kern_fileassoc.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_fileassoc.c
diff -u src/sys/kern/kern_fileassoc.c:1.36 src/sys/kern/kern_fileassoc.c:1.37
--- src/sys/kern/kern_fileassoc.c:1.36	Thu Jul 10 15:00:28 2014
+++ src/sys/kern/kern_fileassoc.c	Wed Aug  2 07:11:31 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_fileassoc.c,v 1.36 2014/07/10 15:00:28 christos Exp $ */
+/* $NetBSD: kern_fileassoc.c,v 1.37 2023/08/02 07:11:31 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2006 Elad Efrat 
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_fileassoc.c,v 1.36 2014/07/10 15:00:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_fileassoc.c,v 1.37 2023/08/02 07:11:31 riastradh Exp $");
 
 #include "opt_fileassoc.h"
 
@@ -42,6 +42,8 @@ __KERNEL_RCSID(0, "$NetBSD: kern_fileass
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #define	FILEASSOC_INITIAL_TABLESIZE	128
 
@@ -88,6 +90,52 @@ struct fileassoc_table {
 	(hash32_buf((handle), FHANDLE_SIZE(handle), HASH32_BUF_INIT) \
 	 & ((tbl)->tbl_mask))
 
+/*
+ * Global usage counting.  This is bad for parallelism of updates, but
+ * good for avoiding calls to fileassoc when it's not in use.  Unclear
+ * if parallelism of updates matters much.  If you want to improve
+ * fileassoc(9) update performance, feel free to rip this out as long
+ * as you don't cause the fast paths to take any global locks or incur
+ * memory barriers when fileassoc(9) is not in use.
+ */
+static struct {
+	kmutex_t lock;
+	uint64_t nassocs;
+	volatile bool inuse;
+} fileassoc_global __cacheline_aligned;
+
+static void
+fileassoc_incuse(void)
+{
+
+	mutex_enter(_global.lock);
+	if (fileassoc_global.nassocs++ == 0) {
+		KASSERT(!fileassoc_global.inuse);
+		atomic_store_relaxed(_global.inuse, true);
+		xc_barrier(0);
+	}
+	mutex_exit(_global.lock);
+}
+
+static void
+fileassoc_decuse(void)
+{
+
+	mutex_enter(_global.lock);
+	KASSERT(fileassoc_global.nassocs > 0);
+	KASSERT(fileassoc_global.inuse);
+	if (--fileassoc_global.nassocs == 0)
+		atomic_store_relaxed(_global.inuse, false);
+	mutex_exit(_global.lock);
+}
+
+static bool
+fileassoc_inuse(void)
+{
+
+	return __predict_false(atomic_load_relaxed(_global.inuse));
+}
+
 static void *
 file_getdata(struct fileassoc_file *faf, const struct fileassoc *assoc)
 {
@@ -128,6 +176,7 @@ file_free(struct fileassoc_file *faf)
 
 	LIST_FOREACH(assoc, _list, assoc_list) {
 		file_cleanup(faf, assoc);
+		fileassoc_decuse();
 	}
 	vfs_composefh_free(faf->faf_handle);
 	specificdata_fini(fileassoc_domain, >faf_data);
@@ -226,6 +275,9 @@ fileassoc_table_lookup(struct mount *mp)
 {
 	int error;
 
+	if (!fileassoc_inuse())
+		return NULL;
+
 	error = RUN_ONCE(, fileassoc_init);
 	if (error) {
 		return NULL;
@@ -437,6 +489,8 @@ fileassoc_table_clear(struct mount *mp, 
 		LIST_FOREACH(faf, >tbl_hash[i], faf_list) {
 			file_cleanup(faf, assoc);
 			file_setdata(faf, assoc, NULL);
+			/* XXX missing faf->faf_nassocs--? */
+			fileassoc_decuse();
 		}
 	}
 
@@ -510,10 +564,9 @@ fileassoc_file_delete(struct vnode *vp)
 	struct fileassoc_table *tbl;
 	struct fileassoc_file *faf;
 
-	/* Pre-check if fileassoc is used. XXX */
-	if (!fileassoc_domain) {
+	if (!fileassoc_inuse())
 		return ENOENT;
-	}
+
 	KERNEL_LOCK(1, NULL);
 
 	faf = fileassoc_file_lookup(vp, NULL);
@@ -553,6 +606,8 @@ fileassoc_add(struct vnode *vp, fileasso
 	if (olddata != NULL)
 		return (EEXIST);
 
+	fileassoc_incuse();
+
 	file_setdata(faf, assoc, data);
 
 	faf->faf_nassocs++;
@@ -577,5 +632,7 @@ fileassoc_clear(struct vnode *vp, fileas
 
 	--(faf->faf_nassocs); /* XXX gc? */
 
+	fileassoc_decuse();
+
 	return (0);
 }



Re: CVS commit: src

2023-08-02 Thread Ryo ONODERA
Hi,

I have the same build failure.
I think that there are some typos and inconsistencies.

With the attached patch, I can finish build.sh build successfully.

Thank you.

On Wed, Aug 2, 2023 at 2:32 AM Christos Zoulas  wrote:
>
> I am looking into it. With new code that restores the old names it should all 
> work, unless I have typo that I have not found yet.
>
> christos
>
>


-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


libsanitizer.diff
Description: Binary data


CVS commit: src/share/man/man9

2023-08-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug  2 06:24:46 UTC 2023

Modified Files:
src/share/man/man9: percpu.9

Log Message:
percpu(9): percpu_create ctor may be called later, not synchronously.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/percpu.9

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

Modified files:

Index: src/share/man/man9/percpu.9
diff -u src/share/man/man9/percpu.9:1.15 src/share/man/man9/percpu.9:1.16
--- src/share/man/man9/percpu.9:1.15	Fri Feb  7 15:11:46 2020
+++ src/share/man/man9/percpu.9	Wed Aug  2 06:24:46 2023
@@ -1,4 +1,4 @@
-.\" $NetBSD: percpu.9,v 1.15 2020/02/07 15:11:46 wiz Exp $
+.\" $NetBSD: percpu.9,v 1.16 2023/08/02 06:24:46 riastradh Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -94,15 +94,18 @@ returns a handle for the per-CPU storage
 .It Fn percpu_create "size" "ctor" "dtor" "arg"
 Like
 .Fn percpu_alloc ,
-but before returning, for each CPU, call
-.Fn "(*ctor)" p arg ci
-in the current thread, where
+but before any access to the storage on any CPU, arrange to call
+.Fn "(*ctor)" p arg ci ,
+where
 .Fa p
 is the pointer to that CPU's storage and
 .Fa ci
 is the
 .Vt "struct cpu_info *"
 for that CPU.
+This may happen synchronously in
+.Fn percpu_create
+or when a CPU is attached later.
 Further, arrange that
 .Fn percpu_free
 will do the same with



CVS commit: src/share/man/man9

2023-08-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug  2 06:24:46 UTC 2023

Modified Files:
src/share/man/man9: percpu.9

Log Message:
percpu(9): percpu_create ctor may be called later, not synchronously.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/percpu.9

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