CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:27:26 UTC 2020

Modified Files:
src/external/gpl3/gcc: README.gcc9
src/share/mk: bsd.own.mk

Log Message:
switch sparc* and mips* to GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/README.gcc9
cvs rdiff -u -r1.1217 -r1.1218 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc9
diff -u src/external/gpl3/gcc/README.gcc9:1.15 src/external/gpl3/gcc/README.gcc9:1.16
--- src/external/gpl3/gcc/README.gcc9:1.15	Tue Sep 15 08:44:02 2020
+++ src/external/gpl3/gcc/README.gcc9	Tue Sep 15 09:27:25 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.15 2020/09/15 08:44:02 mrg Exp $
+$NetBSD: README.gcc9,v 1.16 2020/09/15 09:27:25 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -30,7 +30,7 @@ switched:	has port switched?  y (yes), n
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf	switched
 	-	---	--	--			---	
 aarch64		y	y	y	y		y		y	y	y
-aarch64be	y	y	y	y		?		?	?	y
+aarch64be	y	y	y	y		y		y	y	y
 alpha		y	y	y	y		y		y	y[10]	n
 earmv4		y	y	y	y		y		?	?	y
 earmv4eb	y	n	n	y		n		?	?	y
@@ -51,16 +51,16 @@ i386		y	y	y	y		y		y	y	y
 ia64		y	y	y	y		y		y	N/A	y
 m68000		y	y	y	y		y		y	?	n
 m68k		y	y	y	y		y		y	y[11]	n
-mipseb		y	y	y	y		y		n	n	n
-mipsel		y	y	y	y		y		y	n	n
-mips64eb	y	y	y	y		y		y	y	n
-mips64el	y	y	y	y		y		n	n	n
+mipseb		y	y	y	y		y		n	n	y
+mipsel		y	y	y	y		y		y	n	y
+mips64eb	y	y	y	y		y		y	y	y
+mips64el	y	y	y	y		y		n	n	y
 powerpc		y	y	y	y		y		y	y	n
 powerpc64	y	y	y	y		y		N/A	N/A	n
 sh3eb		y	y	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	y	n
-sparc		y	y	y	y		y		y	y	n
-sparc64		y	y	y	y		y		y	n	?
+sparc		y	y	y	y		y		y	y	y
+sparc64		y	y	y	y		y		y	y	y
 vax		y	y	y	y		y		y	y	n
 x86_64		y	y	y	y		y		y	y	y
 riscv32		y	N/A	y	y		y		N/A	N/A	y	

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1217 src/share/mk/bsd.own.mk:1.1218
--- src/share/mk/bsd.own.mk:1.1217	Tue Sep 15 04:54:41 2020
+++ src/share/mk/bsd.own.mk	Tue Sep 15 09:27:25 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1217 2020/09/15 04:54:41 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1218 2020/09/15 09:27:25 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -63,10 +63,12 @@ TOOLCHAIN_MISSING?=	no
 #
 # What GCC is used?
 #
-.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" || \
+.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || \
+${MACHINE} == "sparc" || ${MACHINE} == "sparc64" || \
+${MACHINE} == "ia64" || \
 ${MACHINE_CPU} == "aarch64" || ${MACHINE_CPU} == "arm" || \
-${MACHINE_CPU} == "riscv" || ${MACHINE} == "ia64" || \
-${MACHINE_CPU} == "hppa"
+${MACHINE_CPU} == "hppa" || ${MACHINE_CPU} == "mips" || \
+${MACHINE_CPU} == "riscv"
 HAVE_GCC?=	9
 .else
 HAVE_GCC?=	8



CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:27:26 UTC 2020

Modified Files:
src/external/gpl3/gcc: README.gcc9
src/share/mk: bsd.own.mk

Log Message:
switch sparc* and mips* to GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/README.gcc9
cvs rdiff -u -r1.1217 -r1.1218 src/share/mk/bsd.own.mk

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



CVS commit: src/sys/arch/aarch64

2020-09-15 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Sep 15 09:28:21 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: genassym.cf locore.S locore_el2.S start.S
src/sys/arch/aarch64/include: armreg.h

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/aarch64/genassym.cf
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/locore_el2.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/aarch64/start.S
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/aarch64/include/armreg.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/aarch64/genassym.cf
diff -u src/sys/arch/aarch64/aarch64/genassym.cf:1.30 src/sys/arch/aarch64/aarch64/genassym.cf:1.31
--- src/sys/arch/aarch64/aarch64/genassym.cf:1.30	Wed Aug 12 13:19:35 2020
+++ src/sys/arch/aarch64/aarch64/genassym.cf	Tue Sep 15 09:28:20 2020
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.30 2020/08/12 13:19:35 skrll Exp $
+# $NetBSD: genassym.cf,v 1.31 2020/09/15 09:28:20 ryo Exp $
 #-
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -365,7 +365,7 @@ define	SCTLR_nTWE		SCTLR_nTWE
 define	SCTLR_WXN		SCTLR_WXN
 define	SCTLR_IESB		SCTLR_IESB
 define	SCTLR_SPAN		SCTLR_SPAN
-define	SCTLR_EOE		SCTLR_EOE
+define	SCTLR_E0E		SCTLR_E0E
 define	SCTLR_EE		SCTLR_EE
 define	SCTLR_UCI		SCTLR_UCI
 define	SCTLR_nTLSMD		SCTLR_nTLSMD

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.72 src/sys/arch/aarch64/aarch64/locore.S:1.73
--- src/sys/arch/aarch64/aarch64/locore.S:1.72	Tue Sep 15 09:23:15 2020
+++ src/sys/arch/aarch64/aarch64/locore.S	Tue Sep 15 09:28:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.72 2020/09/15 09:23:15 ryo Exp $	*/
+/*	$NetBSD: locore.S,v 1.73 2020/09/15 09:28:20 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -38,7 +38,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.72 2020/09/15 09:23:15 ryo Exp $")
+RCSID("$NetBSD: locore.S,v 1.73 2020/09/15 09:28:20 ryo Exp $")
 
 #ifdef AARCH64_DEVICE_MEM_STRONGLY_ORDERED
 #define	MAIR_DEVICE_MEM		MAIR_DEVICE_nGnRnE
@@ -390,9 +390,9 @@ ENTRY_NP(cpu_mpstart)
 1:
 	mrs	x8, sctlr_el1
 #ifdef __AARCH64EB__
-	orr	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* set: Big Endian */
+	orr	x8, x8, #(SCTLR_EE | SCTLR_E0E)	/* set: Big Endian */
 #else
-	bic	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* clear: Little Endian */
+	bic	x8, x8, #(SCTLR_EE | SCTLR_E0E)	/* clear: Little Endian */
 #endif
 	msr	sctlr_el1, x8
 	isb

Index: src/sys/arch/aarch64/aarch64/locore_el2.S
diff -u src/sys/arch/aarch64/aarch64/locore_el2.S:1.6 src/sys/arch/aarch64/aarch64/locore_el2.S:1.7
--- src/sys/arch/aarch64/aarch64/locore_el2.S:1.6	Tue Sep 15 09:23:15 2020
+++ src/sys/arch/aarch64/aarch64/locore_el2.S	Tue Sep 15 09:28:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_el2.S,v 1.6 2020/09/15 09:23:15 ryo Exp $	*/
+/*	$NetBSD: locore_el2.S,v 1.7 2020/09/15 09:28:20 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2012-2014 Andrew Turner
@@ -32,7 +32,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore_el2.S,v 1.6 2020/09/15 09:23:15 ryo Exp $")
+RCSID("$NetBSD: locore_el2.S,v 1.7 2020/09/15 09:28:20 ryo Exp $")
 
 /*
  * For use in #include "locore_el2.S".
@@ -76,7 +76,7 @@ in_el2:
 	/* Set the bits that need to be 1 in SCTLR_EL1. */
 	ldr	x2, .Lsctlr_res1
 	mrs	x1, sctlr_el1
-	and	x1, x1, #(SCTLR_EE | SCTLR_EOE)	/* keep SCTLR_EL1.{EE,E0E} */
+	and	x1, x1, #(SCTLR_EE | SCTLR_E0E)	/* keep SCTLR_EL1.{EE,E0E} */
 	orr	x2, x2, x1
 	msr	sctlr_el1, x2
 

Index: src/sys/arch/aarch64/aarch64/start.S
diff -u src/sys/arch/aarch64/aarch64/start.S:1.10 src/sys/arch/aarch64/aarch64/start.S:1.11
--- src/sys/arch/aarch64/aarch64/start.S:1.10	Tue Sep 15 09:23:15 2020
+++ src/sys/arch/aarch64/aarch64/start.S	Tue Sep 15 09:28:20 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: start.S,v 1.10 2020/09/15 09:23:15 ryo Exp $	*/
+/*	$NetBSD: start.S,v 1.11 2020/09/15 09:28:20 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -33,7 +33,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: start.S,v 1.10 2020/09/15 09:23:15 ryo Exp $")
+RCSID("$NetBSD: start.S,v 1.11 2020/09/15 09:28:20 ryo Exp $")
 
 /*
  * Padding at start of kernel image to make room for 64-byte header
@@ -63,9 +63,9 @@ start:
 1:
 	mrs	x8, sctlr_el1
 #ifdef __AARCH64EB__
-	orr	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* set: Big Endian */
+	orr	x8, x8, #(SCTLR_EE | SCTLR_E0E)	/* set: Big Endian */
 #else
-	bic	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* clear: Little Endian */
+	bic	x8, x8, #(SCTLR_EE | SCTLR_E0E)	/* clear: Little Endian */
 #endif
 	msr	sctlr_el1, x8
 	isb

Index: src/sys/arch/aarch64/include/armreg.h
diff -u src/sys/arch/aarch64/include/armreg.h:1.52 src/sys/arch/aarch64/include/armreg.h:1.53
--- src/sys/arch/aarch64/include/armreg.h:1.52	Sun Aug  2 06:58:16 2020
+++ 

CVS commit: src/usr.sbin/ndp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 10:11:36 UTC 2020

Modified Files:
src/usr.sbin/ndp: ndp.8 ndp.c

Log Message:
ndp: Show U for Unreachable


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/ndp/ndp.8
cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/ndp/ndp.c

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

Modified files:

Index: src/usr.sbin/ndp/ndp.8
diff -u src/usr.sbin/ndp/ndp.8:1.31 src/usr.sbin/ndp/ndp.8:1.32
--- src/usr.sbin/ndp/ndp.8:1.31	Fri Jun 12 21:08:02 2020
+++ src/usr.sbin/ndp/ndp.8	Tue Sep 15 10:11:35 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ndp.8,v 1.31 2020/06/12 21:08:02 roy Exp $
+.\"	$NetBSD: ndp.8,v 1.32 2020/09/15 10:11:35 roy Exp $
 .\"	$KAME: ndp.8,v 1.33 2005/10/19 14:57:42 suz Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 19, 2020
+.Dd September 15, 2020
 .Dt NDP 8
 .Os
 .\"
@@ -110,6 +110,8 @@ Probe
 Reachable
 .It S
 Stale
+.It U
+Unreachable
 .It W
 Waitdelete
 .It ?

Index: src/usr.sbin/ndp/ndp.c
diff -u src/usr.sbin/ndp/ndp.c:1.57 src/usr.sbin/ndp/ndp.c:1.58
--- src/usr.sbin/ndp/ndp.c:1.57	Fri Jun 12 21:08:02 2020
+++ src/usr.sbin/ndp/ndp.c	Tue Sep 15 10:11:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ndp.c,v 1.57 2020/06/12 21:08:02 roy Exp $	*/
+/*	$NetBSD: ndp.c,v 1.58 2020/09/15 10:11:35 roy Exp $	*/
 /*	$KAME: ndp.c,v 1.121 2005/07/13 11:30:13 keiichi Exp $	*/
 
 /*
@@ -571,29 +571,30 @@ again:;
 (void)printf(" %-9.9s", "expired");
 
 			switch (nbi->state) {
-			case ND6_LLINFO_NOSTATE:
+			case ND_LLINFO_NOSTATE:
  (void)printf(" N");
  break;
-#ifdef ND6_LLINFO_WAITDELETE
-			case ND6_LLINFO_WAITDELETE:
+			case ND_LLINFO_WAITDELETE:
  (void)printf(" W");
  break;
-#endif
-			case ND6_LLINFO_INCOMPLETE:
+			case ND_LLINFO_INCOMPLETE:
  (void)printf(" I");
  break;
-			case ND6_LLINFO_REACHABLE:
+			case ND_LLINFO_REACHABLE:
  (void)printf(" R");
  break;
-			case ND6_LLINFO_STALE:
+			case ND_LLINFO_STALE:
  (void)printf(" S");
  break;
-			case ND6_LLINFO_DELAY:
+			case ND_LLINFO_DELAY:
  (void)printf(" D");
  break;
-			case ND6_LLINFO_PROBE:
+			case ND_LLINFO_PROBE:
  (void)printf(" P");
  break;
+			case ND_LLINFO_UNREACHABLE:
+ (void)printf(" U");
+ break;
 			default:
  (void)printf(" ?");
  break;



CVS commit: src/sys/dev/pci

2020-09-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep 15 08:39:04 UTC 2020

Modified Files:
src/sys/dev/pci: if_wm.c if_wmvar.h

Log Message:
 Add new flag named WM_F_CRC_STRIP and use it. No functional change.

 This change also sets the RCTL_SECRC bit on I211 but it doesn't change
the behavior because I211 always strips CRC like I35[04] and I210.


To generate a diff of this commit:
cvs rdiff -u -r1.686 -r1.687 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_wmvar.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.686 src/sys/dev/pci/if_wm.c:1.687
--- src/sys/dev/pci/if_wm.c:1.686	Mon Aug 24 05:34:00 2020
+++ src/sys/dev/pci/if_wm.c	Tue Sep 15 08:39:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.686 2020/08/24 05:34:00 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.687 2020/09/15 08:39:04 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.686 2020/08/24 05:34:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.687 2020/09/15 08:39:04 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2887,6 +2887,14 @@ alloc_retry:
 			sc->sc_flags |= WM_F_EEE;
 	}
 
+	/*
+	 * The I350 has a bug where it always strips the CRC whether
+	 * asked to or not. So ask for stripped CRC here and cope in rxeof
+	 */
+	if ((sc->sc_type == WM_T_I350) || (sc->sc_type == WM_T_I354)
+	|| (sc->sc_type == WM_T_I210) || (sc->sc_type == WM_T_I211))
+		sc->sc_flags |= WM_F_CRC_STRIP;
+
 	/* Set device properties (macflags) */
 	prop_dictionary_set_uint32(dict, "macflags", sc->sc_flags);
 
@@ -6311,12 +6319,7 @@ wm_init_locked(struct ifnet *ifp)
 	if (sc->sc_type == WM_T_82574)
 		sc->sc_rctl |= RCTL_DTYP_ONEBUF;
 
-	/*
-	 * The I350 has a bug where it always strips the CRC whether
-	 * asked to or not. So ask for stripped CRC here and cope in rxeof
-	 */
-	if ((sc->sc_type == WM_T_I350) || (sc->sc_type == WM_T_I354)
-	|| (sc->sc_type == WM_T_I210))
+	if ((sc->sc_flags & WM_F_CRC_STRIP) != 0)
 		sc->sc_rctl |= RCTL_SECRC;
 
 	if (((ec->ec_capabilities & ETHERCAP_JUMBO_MTU) != 0)
@@ -9057,17 +9060,16 @@ wm_rxeof(struct wm_rxqueue *rxq, u_int l
 
 		/*
 		 * Okay, we have the entire packet now. The chip is
-		 * configured to include the FCS except I350 and I21[01]
-		 * (not all chips can be configured to strip it),
-		 * so we need to trim it.
+		 * configured to include the FCS except I35[05], I21[01].
+		 * (not all chips can be configured to strip it), so we need
+		 * to trim it. Those chips have an eratta, the RCTL_SECRC bit
+		 * in RCTL register is always set, so we don't trim it.
+		 * PCH2 and newer chip also not include FCS when jumbo
+		 * frame is used to do workaround an errata.
 		 * May need to adjust length of previous mbuf in the
 		 * chain if the current mbuf is too short.
-		 * For an eratta, the RCTL_SECRC bit in RCTL register
-		 * is always set in I350, so we don't trim it.
 		 */
-		if ((sc->sc_type != WM_T_I350) && (sc->sc_type != WM_T_I354)
-		&& (sc->sc_type != WM_T_I210)
-		&& (sc->sc_type != WM_T_I211)) {
+		if ((sc->sc_flags & WM_F_CRC_STRIP) == 0) {
 			if (m->m_len < ETHER_CRC_LEN) {
 rxq->rxq_tail->m_len
 -= (ETHER_CRC_LEN - m->m_len);

Index: src/sys/dev/pci/if_wmvar.h
diff -u src/sys/dev/pci/if_wmvar.h:1.45 src/sys/dev/pci/if_wmvar.h:1.46
--- src/sys/dev/pci/if_wmvar.h:1.45	Wed Dec 11 10:28:19 2019
+++ src/sys/dev/pci/if_wmvar.h	Tue Sep 15 08:39:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmvar.h,v 1.45 2019/12/11 10:28:19 msaitoh Exp $	*/
+/*	$NetBSD: if_wmvar.h,v 1.46 2020/09/15 08:39:04 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -99,6 +99,7 @@
 #define	WM_F_WA_I210_CLSEM	0x0800 /* I21[01] Semaphore workaround */
 #define	WM_F_SFP		0x1000 /* SFP */
 #define	WM_F_MAS		0x2000 /* Media Auto Sense */
+#define	WM_F_CRC_STRIP		0x4000 /* CRC strip */
 
 #define WM_FLAGS "\20" \
 	"\1" "HAS_MII"	"\2" "LOCK_EECD" "\3" "_B02"	"\4" "_B03"	\
@@ -108,7 +109,7 @@
 	"\21" "NEWQUEUE" "\22" "ASF_FIRM" "\23" "ARC_SUBSYS" "\24" "AMT" \
 	"\25" "MANAGE"	"\26" "WOL"	"\27" "EEE"	"\30" "ATTACHED" \
 	"\31" "MDIC_WA"	"\32" "PCS_DIS_AUTONEGO" "\33" "PLLWA" "\34" "CLSEMWA" \
-	"\35" "SFP"	"\36" "MAS"
+	"\35" "SFP"	"\36" "MAS"	"\37" "CRC_STRIP"
 
 /*
  * Variations of Intel gigabit Ethernet controller:



CVS commit: src/usr.sbin/arp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 10:11:15 UTC 2020

Modified Files:
src/usr.sbin/arp: arp.8 arp.c

Log Message:
arp: Show U for Unreachable


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/arp/arp.8
cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/arp/arp.c

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

Modified files:

Index: src/usr.sbin/arp/arp.8
diff -u src/usr.sbin/arp/arp.8:1.25 src/usr.sbin/arp/arp.8:1.26
--- src/usr.sbin/arp/arp.8:1.25	Fri Sep 11 15:28:29 2020
+++ src/usr.sbin/arp/arp.8	Tue Sep 15 10:11:15 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: arp.8,v 1.25 2020/09/11 15:28:29 roy Exp $
+.\"	$NetBSD: arp.8,v 1.26 2020/09/15 10:11:15 roy Exp $
 .\"
 .\" Copyright (c) 1985, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)arp.8	8.2 (Berkeley) 4/27/95
 .\"
-.Dd September 11, 2020
+.Dd September 15, 2020
 .Dt ARP 8
 .Os
 .Sh NAME
@@ -84,6 +84,8 @@ Probe
 Reachable
 .It S
 Stale
+.It U
+Unreachable
 .It W
 Waitdelete
 .It ?

Index: src/usr.sbin/arp/arp.c
diff -u src/usr.sbin/arp/arp.c:1.66 src/usr.sbin/arp/arp.c:1.67
--- src/usr.sbin/arp/arp.c:1.66	Fri Sep 11 15:28:29 2020
+++ src/usr.sbin/arp/arp.c	Tue Sep 15 10:11:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arp.c,v 1.66 2020/09/11 15:28:29 roy Exp $ */
+/*	$NetBSD: arp.c,v 1.67 2020/09/15 10:11:15 roy Exp $ */
 
 /*
  * Copyright (c) 1984, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1984, 19
 #if 0
 static char sccsid[] = "@(#)arp.c	8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: arp.c,v 1.66 2020/09/11 15:28:29 roy Exp $");
+__RCSID("$NetBSD: arp.c,v 1.67 2020/09/15 10:11:15 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -539,6 +539,9 @@ dump(uint32_t addr)
 			case ND_LLINFO_PROBE:
 (void)printf(" P");
 break;
+			case ND_LLINFO_UNREACHABLE:
+(void)printf(" U");
+break;
 			default:
 (void)printf(" ?");
 break;



CVS commit: src/usr.sbin/arp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 10:11:15 UTC 2020

Modified Files:
src/usr.sbin/arp: arp.8 arp.c

Log Message:
arp: Show U for Unreachable


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/arp/arp.8
cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/arp/arp.c

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



CVS commit: src/usr.sbin/ndp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 10:11:36 UTC 2020

Modified Files:
src/usr.sbin/ndp: ndp.8 ndp.c

Log Message:
ndp: Show U for Unreachable


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/ndp/ndp.8
cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/ndp/ndp.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

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 06:22:34 UTC 2020

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

Log Message:
mark tsan files as !machine=sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.903 -r1.904 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2354 -r1.2355 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.341 -r1.342 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.335 -r1.336 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.262 -r1.263 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.903 src/distrib/sets/lists/base/shl.mi:1.904
--- src/distrib/sets/lists/base/shl.mi:1.903	Sun Sep 13 03:43:16 2020
+++ src/distrib/sets/lists/base/shl.mi	Tue Sep 15 06:22:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.903 2020/09/13 03:43:16 kamil Exp $
+# $NetBSD: shl.mi,v 1.904 2020/09/15 06:22:33 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -896,9 +896,9 @@
 ./usr/lib/libtre.sobase-sys-shlib		compatfile
 ./usr/lib/libtre.so.0base-sys-shlib		compatfile
 ./usr/lib/libtre.so.0.8base-sys-shlib		compatfile
-./usr/lib/libtsan.sobase-sys-shlib		arch64,cxx,gcc=9
-./usr/lib/libtsan.so.1base-sys-shlib		arch64,cxx,gcc=9
-./usr/lib/libtsan.so.1.0			base-sys-shlib		arch64,cxx,gcc=9
+./usr/lib/libtsan.sobase-sys-shlib		arch64,cxx,gcc=9,!machine=sparc64
+./usr/lib/libtsan.so.1base-sys-shlib		arch64,cxx,gcc=9,!machine=sparc64
+./usr/lib/libtsan.so.1.0			base-sys-shlib		arch64,cxx,gcc=9,!machine=sparc64
 ./usr/lib/libtspi.sobase-sys-shlib		compatfile,tpm
 ./usr/lib/libtspi.so.3base-sys-shlib		compatfile,tpm
 ./usr/lib/libtspi.so.3.0			base-sys-shlib		compatfile,tpm

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2354 src/distrib/sets/lists/comp/mi:1.2355
--- src/distrib/sets/lists/comp/mi:1.2354	Mon Sep 14 00:40:02 2020
+++ src/distrib/sets/lists/comp/mi	Tue Sep 15 06:22:33 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2354 2020/09/14 00:40:02 rin Exp $
+#	$NetBSD: mi,v 1.2355 2020/09/15 06:22:33 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -3947,8 +3947,8 @@
 ./usr/lib/libtpm_unseal_p.a			comp-c-proflib		compatfile,tpm,profile
 ./usr/lib/libtre.acomp-c-lib		compatfile
 ./usr/lib/libtre_p.acomp-c-proflib		compatfile,profile
-./usr/lib/libtsan.acomp-c-lib		arch64,cxx,gcc=9
-./usr/lib/libtsan_p.acomp-c-proflib		arch64,profile,cxx,gcc=9
+./usr/lib/libtsan.acomp-c-lib		arch64,cxx,gcc=9,!machine=sparc64
+./usr/lib/libtsan_p.acomp-c-proflib		arch64,profile,cxx,gcc=9,!machine=sparc64
 ./usr/lib/libtspi.acomp-c-lib		compatfile,tpm
 ./usr/lib/libtspi_p.acomp-c-proflib		compatfile,tpm,profile
 ./usr/lib/libubsan.acomp-c-lib		compatfile,cxx,gcc

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.341 src/distrib/sets/lists/comp/shl.mi:1.342
--- src/distrib/sets/lists/comp/shl.mi:1.341	Sun Sep 13 03:43:16 2020
+++ src/distrib/sets/lists/comp/shl.mi	Tue Sep 15 06:22:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.341 2020/09/13 03:43:16 kamil Exp $
+# $NetBSD: shl.mi,v 1.342 2020/09/15 06:22:33 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -274,7 +274,7 @@
 ./usr/lib/libtermlib_pic.a			comp-c-piclib		compatfile,picinstall
 ./usr/lib/libtpm_unseal_pic.a			comp-tpm-lib		compatfile,picinstall,tpm
 ./usr/lib/libtre_pic.acomp-c-piclib		compatfile,picinstall
-./usr/lib/libtsan_pic.acomp-c-piclib		arch64,picinstall,cxx,gcc=9
+./usr/lib/libtsan_pic.acomp-c-piclib		arch64,picinstall,cxx,gcc=9,!machine=sparc64
 ./usr/lib/libtspi_pic.acomp-c-piclib		compatfile,picinstall,tpm
 ./usr/lib/libubsan_pic.a			comp-c-piclib		compatfile,picinstall,cxx,gcc
 ./usr/lib/libukfs_pic.acomp-c-piclib		compatfile,picinstall,rump

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.335 src/distrib/sets/lists/debug/mi:1.336
--- src/distrib/sets/lists/debug/mi:1.335	Sun Sep 13 03:43:16 2020
+++ src/distrib/sets/lists/debug/mi	Tue Sep 15 06:22:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.335 2020/09/13 03:43:16 kamil Exp $
+# $NetBSD: mi,v 1.336 2020/09/15 06:22:33 mrg Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -261,7 +261,7 @@
 ./usr/lib/libterminfo_g.a			comp-c-debuglib		debuglib,compatfile
 ./usr/lib/libtpm_unseal_g.a			comp-c-debuglib		debuglib,compatfile,tpm
 ./usr/lib/libtre_g.a

CVS commit: src/distrib/sets/lists

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 06:22:34 UTC 2020

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

Log Message:
mark tsan files as !machine=sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.903 -r1.904 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2354 -r1.2355 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.341 -r1.342 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.335 -r1.336 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.262 -r1.263 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: src/tests/usr.bin

2020-09-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep 15 09:33:13 UTC 2020

Modified Files:
src/tests/usr.bin/c++: t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
src/tests/usr.bin/cc: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh
t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh
t_tsan_signal_errno.sh t_tsan_thread_leak.sh

Log Message:
Simplify test requirements: we only build tsan for amd64 currently.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/c++/t_tsan_data_race.sh \
src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/c++/t_tsan_signal_errno.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/cc/t_tsan_data_race.sh \
src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/cc/t_tsan_signal_errno.sh \
src/tests/usr.bin/cc/t_tsan_thread_leak.sh

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/c++/t_tsan_data_race.sh
diff -u src/tests/usr.bin/c++/t_tsan_data_race.sh:1.3 src/tests/usr.bin/c++/t_tsan_data_race.sh:1.4
--- src/tests/usr.bin/c++/t_tsan_data_race.sh:1.3	Mon Sep 14 15:17:53 2020
+++ src/tests/usr.bin/c++/t_tsan_data_race.sh	Tue Sep 15 09:33:12 2020
@@ -26,43 +26,35 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-test_target()
+tsan_available_archs()
 {
-	SUPPORT='n'
-	# Detect address space larger than 32 bits
-	maxaddress=`sysctl vm.maxaddress|awk '{print $3}'`
-	if [ $maxaddress -gt 4294967295 ]; then
-		if command -v cc >/dev/null 2>&1; then
-			if ! echo __clang__ | cc -E - | grep -q __clang__; then
-SUPPORT='y'
-			elif ! cc -v 2>&1 | awk '/gcc version/{print $3}' | \
-awk -F '.' '($0+0) > 9 {exit 1}'; then
-SUPPORT='y'
-			fi
-		fi
-	fi
+	atf_set "require.arch" "x86_64"
 }
 
 atf_test_case data_race
 data_race_head() {
 	atf_set "descr" "Test thread sanitizer for data race condition"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 
 atf_test_case data_race_profile
 data_race_profile_head() {
 	atf_set "descr" "Test thread sanitizer for data race with profiling option"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 atf_test_case data_race_pic
 data_race_pic_head() {
 	atf_set "descr" "Test thread sanitizer for data race with position independent code (PIC) flag"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 atf_test_case data_race_pie
 data_race_pie_head() {
 	atf_set "descr" "Test thread sanitizer for data race with position independent execution (PIE) flag"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 
 data_race_body(){
@@ -163,25 +155,8 @@ EOF
 	atf_check -s ignore -o ignore -e match:"WARNING: ThreadSanitizer: data race " ./test
 }
 
-
-atf_test_case target_not_supported
-target_not_supported_head()
-{
-	atf_set "descr" "Test forced skip"
-}
-
-target_not_supported_body()
-{
-	atf_skip "Target is not supported"
-}
-
 atf_init_test_cases()
 {
-	test_target
-	test $SUPPORT = 'n' && {
-		atf_add_test_case target_not_supported
-		return 0
-	}
 	atf_add_test_case data_race
 	atf_add_test_case data_race_profile
 	atf_add_test_case data_race_pie
Index: src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh
diff -u src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.3 src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.4
--- src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.3	Mon Sep 14 15:17:53 2020
+++ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh	Tue Sep 15 09:33:12 2020
@@ -26,6 +26,11 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+tsan_available_archs()
+{
+	atf_set "require.arch" "x86_64"
+}
+
 test_target()
 {
 	SUPPORT='n'
@@ -47,22 +52,26 @@ atf_test_case heap_use_after_free
 heap_use_after_free_head() {
 	atf_set "descr" "Test thread sanitizer for use-after-free condition"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 
 atf_test_case heap_use_after_free_profile
 heap_use_after_free_profile_head() {
 	atf_set "descr" "Test thread sanitizer for use-after-free with profiling option"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 atf_test_case heap_use_after_free_pic
 heap_use_after_free_pic_head() {
 	atf_set "descr" "Test thread sanitizer for use-after-free with position independent code (PIC) flag"
 	atf_set "require.progs" "c++ paxctl"
+	tsan_available_archs
 }
 atf_test_case heap_use_after_free_pie
 heap_use_after_free_pie_head() {
 	atf_set "descr" "Test thread sanitizer for use-after-free with position independent execution (PIE) flag"
 	atf_set "require.progs" 

CVS commit: src/tests/usr.bin

2020-09-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Sep 15 09:33:13 UTC 2020

Modified Files:
src/tests/usr.bin/c++: t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
src/tests/usr.bin/cc: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh
t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh
t_tsan_signal_errno.sh t_tsan_thread_leak.sh

Log Message:
Simplify test requirements: we only build tsan for amd64 currently.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/c++/t_tsan_data_race.sh \
src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/c++/t_tsan_signal_errno.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/cc/t_tsan_data_race.sh \
src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/cc/t_tsan_signal_errno.sh \
src/tests/usr.bin/cc/t_tsan_thread_leak.sh

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



CVS commit: src/share/mk

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:32:31 UTC 2020

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

Log Message:
reverse HAVE_GCC test, and list remaining GCC 8 platforms:
- powerpc
- sh3
- m68k
- vax


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

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1218 src/share/mk/bsd.own.mk:1.1219
--- src/share/mk/bsd.own.mk:1.1218	Tue Sep 15 09:27:25 2020
+++ src/share/mk/bsd.own.mk	Tue Sep 15 09:32:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1218 2020/09/15 09:27:25 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.1219 2020/09/15 09:32:31 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -63,16 +63,11 @@ TOOLCHAIN_MISSING?=	no
 #
 # What GCC is used?
 #
-.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || \
-${MACHINE} == "sparc" || ${MACHINE} == "sparc64" || \
-${MACHINE} == "ia64" || \
-${MACHINE_CPU} == "aarch64" || ${MACHINE_CPU} == "arm" || \
-${MACHINE_CPU} == "hppa" || ${MACHINE_CPU} == "mips" || \
-${MACHINE_CPU} == "riscv"
-HAVE_GCC?=	9
-.else
+.if ${MACHINE_CPU} == "powerpc" || ${MACHINE_CPU} == "sh3" || \
+${MACHINE_CPU} == "m68k" || ${MACHINE} == "vax"
 HAVE_GCC?=	8
 .endif
+HAVE_GCC?=	9
 
 #
 # Platforms that can't run a modern GCC natively



CVS commit: src/share/mk

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:32:31 UTC 2020

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

Log Message:
reverse HAVE_GCC test, and list remaining GCC 8 platforms:
- powerpc
- sh3
- m68k
- vax


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

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



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

2020-09-15 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Sep 15 09:23:15 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: locore.S locore_el2.S start.S

Log Message:
fix aarch64eb MULTIPROCESSOR boot

- set endian of EL2,EL1 and EL0 at the beginning of start() and cpu_mpstart()
- drop_to_el1() keeps the endian setting


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/locore_el2.S
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/start.S

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:22:32 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aes.inc

Log Message:
build the 32 bit aesfx-sparcv9.S for sparc64 32 bit comapt libs.
now libcrypto works -m32.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc:1.4	Thu Nov  3 22:18:29 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc	Tue Sep 15 09:22:32 2020
@@ -1,6 +1,6 @@
 .if ${MACHINE} == "sparc64"
 .PATH.S: ${.PARSEDIR}
-AES_SRCS = aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S
+AES_SRCS = aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S
 AESCPPFLAGS = -DAES_ASM
 AFLAGS.aes-sparcv9.S+= -Wa,-Av9
 AFLAGS.aest4-sparcv9.S+= -Wa,-Av9



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 09:22:32 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: aes.inc

Log Message:
build the 32 bit aesfx-sparcv9.S for sparc64 32 bit comapt libs.
now libcrypto works -m32.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc

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



CVS commit: src/sys

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 10:05:37 UTC 2020

Modified Files:
src/sys/net: nd.c nd.h
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6.c

Log Message:
Implement RFC 7048, making Neighbor Unreachability Detection less impatient

RFC 7048 Section 3 says in the UNREACHABLE state packets continue to be
sent to the link-layer address and then backoff exponentially.
We adjust this slightly and move to the INCOMPLETE state after
`nd_mmaxtries` probes and then start backing off.

This results in simpler code whilst providing a more robust model which
doubles the time to failure over what we did before.
We don't want to be back to the old ARP model where no unreachability
errors are returned because very few applications would look at
unreachability hints provided such as ND_LLINFO_UNREACHABLE or RTM_MISS.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/net/nd.c src/sys/net/nd.h
cvs rdiff -u -r1.296 -r1.297 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.273 -r1.274 src/sys/netinet6/nd6.c

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

Modified files:

Index: src/sys/net/nd.c
diff -u src/sys/net/nd.c:1.2 src/sys/net/nd.c:1.3
--- src/sys/net/nd.c:1.2	Mon Sep 14 15:09:57 2020
+++ src/sys/net/nd.c	Tue Sep 15 10:05:36 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: */
+/*	$NetBSD: nd.c,v 1.3 2020/09/15 10:05:36 roy Exp $	*/
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd.c,v 1.2 2020/09/14 15:09:57 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd.c,v 1.3 2020/09/15 10:05:36 roy Exp $");
 
 #include 
 #include 
@@ -56,7 +56,8 @@ nd_timer(void *arg)
 	struct ifnet *ifp = NULL;
 	struct psref psref;
 	struct mbuf *m = NULL;
-	bool send_ns = false, missed = false;
+	bool send_ns = false;
+	uint16_t missed = 0;
 	union l3addr taddr, *daddrp = NULL;
 
 	SOFTNET_KERNEL_LOCK_UNLESS_NET_MPSAFE();
@@ -84,10 +85,9 @@ nd_timer(void *arg)
 		break;
 
 	case ND_LLINFO_INCOMPLETE:
-		if (ln->ln_asked++ < nd->nd_mmaxtries) {
-			send_ns = true;
+		send_ns = true;
+		if (ln->ln_asked++ < nd->nd_mmaxtries)
 			break;
-		}
 
 		if (ln->ln_hold) {
 			struct mbuf *m0, *mnxt;
@@ -107,12 +107,8 @@ nd_timer(void *arg)
 			ln->ln_hold = NULL;
 		}
 
-		missed = true;
+		missed = ND_LLINFO_INCOMPLETE;
 		ln->ln_state = ND_LLINFO_WAITDELETE;
-		if (ln->ln_asked == nd->nd_mmaxtries)
-			nd_set_timer(ln, ND_TIMER_RETRANS);
-		else
-			send_ns = true;
 		break;
 
 	case ND_LLINFO_REACHABLE:
@@ -144,23 +140,50 @@ nd_timer(void *arg)
 		break;
 
 	case ND_LLINFO_PROBE:
-		if (ln->ln_asked < nd->nd_umaxtries) {
-			ln->ln_asked++;
-			send_ns = true;
+		send_ns = true;
+		if (ln->ln_asked++ < nd->nd_umaxtries) {
 			daddrp = 
 		} else {
-			LLE_REMREF(ln);
-			nd->nd_free(ln, 0);
-			ln = NULL;
+			ln->ln_state = ND_LLINFO_UNREACHABLE;
+			ln->ln_asked = 1;
+			missed = ND_LLINFO_PROBE;
+			/* nd_missed() consumers can use missed to know if
+			 * they need to send ICMP UNREACHABLE or not. */
 		}
 		break;
+	case ND_LLINFO_UNREACHABLE:
+		/*
+		 * RFC 7048 Section 3 says in the UNREACHABLE state
+		 * packets continue to be sent to the link-layer address and
+		 * then backoff exponentially.
+		 * We adjust this slightly and move to the INCOMPLETE state
+		 * after nd_mmaxtries probes and then start backing off.
+		 *
+		 * This results in simpler code whilst providing a more robust
+		 * model which doubles the time to failure over what we did
+		 * before. We don't want to be back to the old ARP model where
+		 * no unreachability errors are returned because very
+		 * few applications would look at unreachability hints provided
+		 * such as ND_LLINFO_UNREACHABLE or RTM_MISS.
+		 */
+		send_ns = true;
+		if (ln->ln_asked++ < nd->nd_mmaxtries)
+			break;
+
+		missed = ND_LLINFO_UNREACHABLE;
+		ln->ln_state = ND_LLINFO_WAITDELETE;
+		ln->la_flags &= ~LLE_VALID;
+		break;
 	}
 
 	if (send_ns) {
 		uint8_t lladdr[255], *lladdrp;
 		union l3addr src, *psrc;
 
-		nd_set_timer(ln, ND_TIMER_RETRANS);
+		if (ln->ln_state == ND_LLINFO_WAITDELETE)
+			nd_set_timer(ln, ND_TIMER_RETRANS_BACKOFF);
+		else
+			nd_set_timer(ln, ND_TIMER_RETRANS);
 		if (ln->ln_state > ND_LLINFO_INCOMPLETE &&
 		ln->la_flags & LLE_VALID)
 		{
@@ -181,7 +204,7 @@ out:
 	SOFTNET_KERNEL_UNLOCK_UNLESS_NET_MPSAFE();
 
 	if (missed)
-		nd->nd_missed(ifp, , m);
+		nd->nd_missed(ifp, , missed, m);
 	if (ifp != NULL)
 		if_release(ifp, );
 }
@@ -241,6 +264,22 @@ nd_set_timer(struct llentry *ln, int typ
 	case ND_TIMER_RETRANS:
 		xtick = nd->nd_retrans(ifp) * hz / 1000;
 		break;
+	case ND_TIMER_RETRANS_BACKOFF:
+	{
+		unsigned int retrans = nd->nd_retrans(ifp);
+		unsigned int attempts = ln->ln_asked - nd->nd_mmaxtries;
+
+		xtick = retrans;
+		while (attempts-- != 0) {
+			xtick *= nd->nd_retransmultiple;
+			if (xtick > nd->nd_maxretrans || xtick < retrans) {
+xtick = 

CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:13:51 UTC 2020

Modified Files:
src/distrib/bebox/ramdisk: Makefile
src/distrib/prep/floppies/ramdisk: Makefile
src/sys/arch/bebox/conf: INSTALL
src/sys/arch/prep/conf: INSTALL INSTALL_SMALL

Log Message:
bump bebox and prep image sizes for GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/bebox/ramdisk/Makefile
cvs rdiff -u -r1.23 -r1.24 src/distrib/prep/floppies/ramdisk/Makefile
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/bebox/conf/INSTALL
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/prep/conf/INSTALL
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/prep/conf/INSTALL_SMALL

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

Modified files:

Index: src/distrib/bebox/ramdisk/Makefile
diff -u src/distrib/bebox/ramdisk/Makefile:1.4 src/distrib/bebox/ramdisk/Makefile:1.5
--- src/distrib/bebox/ramdisk/Makefile:1.4	Sun Dec 29 18:26:16 2019
+++ src/distrib/bebox/ramdisk/Makefile	Tue Sep 15 08:13:51 2020
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2019/12/29 18:26:16 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2020/09/15 08:13:51 mrg Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2048k
+IMAGESIZE=	2560k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1

Index: src/distrib/prep/floppies/ramdisk/Makefile
diff -u src/distrib/prep/floppies/ramdisk/Makefile:1.23 src/distrib/prep/floppies/ramdisk/Makefile:1.24
--- src/distrib/prep/floppies/ramdisk/Makefile:1.23	Sun Dec 29 18:26:18 2019
+++ src/distrib/prep/floppies/ramdisk/Makefile	Tue Sep 15 08:13:51 2020
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.23 2019/12/29 18:26:18 christos Exp $
+#	$NetBSD: Makefile,v 1.24 2020/09/15 08:13:51 mrg Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2048k
+IMAGESIZE=	2304k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1

Index: src/sys/arch/bebox/conf/INSTALL
diff -u src/sys/arch/bebox/conf/INSTALL:1.64 src/sys/arch/bebox/conf/INSTALL:1.65
--- src/sys/arch/bebox/conf/INSTALL:1.64	Sat Jul 14 15:09:40 2018
+++ src/sys/arch/bebox/conf/INSTALL	Tue Sep 15 08:13:51 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL,v 1.64 2018/07/14 15:09:40 maxv Exp $
+#	$NetBSD: INSTALL,v 1.65 2020/09/15 08:13:51 mrg Exp $
 #
 # First try for BeBox config file
 #
@@ -15,7 +15,7 @@ makeoptions	COPTS="-Os"		# Optimise for 
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# force root on memory disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=4096	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=5120	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 #makeoptions	DEBUG="-g"

Index: src/sys/arch/prep/conf/INSTALL
diff -u src/sys/arch/prep/conf/INSTALL:1.63 src/sys/arch/prep/conf/INSTALL:1.64
--- src/sys/arch/prep/conf/INSTALL:1.63	Thu Sep 14 07:58:43 2017
+++ src/sys/arch/prep/conf/INSTALL	Tue Sep 15 08:13:51 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL,v 1.63 2017/09/14 07:58:43 mrg Exp $
+#	$NetBSD: INSTALL,v 1.64 2020/09/15 08:13:51 mrg Exp $
 #
 #	INSTALL -- Installation kernel
 #
@@ -12,7 +12,7 @@ makeoptions	COPTS="-Os" # Reduce size.
 # Enable the hooks used for initializing the ram-disk.
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
-options 	MEMORY_DISK_ROOT_SIZE=4096	# 2mb
+options 	MEMORY_DISK_ROOT_SIZE=4608	# 2.25mb
 options 	MEMORY_DISK_SERVER=0	# don't need for install
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 

Index: src/sys/arch/prep/conf/INSTALL_SMALL
diff -u src/sys/arch/prep/conf/INSTALL_SMALL:1.18 src/sys/arch/prep/conf/INSTALL_SMALL:1.19
--- src/sys/arch/prep/conf/INSTALL_SMALL:1.18	Thu Sep 14 07:58:43 2017
+++ src/sys/arch/prep/conf/INSTALL_SMALL	Tue Sep 15 08:13:51 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL_SMALL,v 1.18 2017/09/14 07:58:43 mrg Exp $
+#	$NetBSD: INSTALL_SMALL,v 1.19 2020/09/15 08:13:51 mrg Exp $
 #
 #	INSTALL -- Installation kernel
 #
@@ -12,7 +12,7 @@ makeoptions	COPTS="-Os"	# Reduce size.
 # Enable the hooks used for initializing the ram-disk.
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
-options 	MEMORY_DISK_ROOT_SIZE=4096	# 2mb
+options 	MEMORY_DISK_ROOT_SIZE=4608	# 2mb
 options 	MEMORY_DISK_SERVER=0	# don't need for install
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 



CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:14:31 UTC 2020

Modified Files:
src/etc/etc.macppc: Makefile.inc
src/sys/arch/ofppc/stand/ofwboot: boot.c

Log Message:
partial port to powerpc64.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.macppc/Makefile.inc
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/ofppc/stand/ofwboot/boot.c

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

Modified files:

Index: src/etc/etc.macppc/Makefile.inc
diff -u src/etc/etc.macppc/Makefile.inc:1.11 src/etc/etc.macppc/Makefile.inc:1.12
--- src/etc/etc.macppc/Makefile.inc:1.11	Tue Feb 19 23:46:33 2019
+++ src/etc/etc.macppc/Makefile.inc	Tue Sep 15 08:14:31 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2019/02/19 23:46:33 sevan Exp $
+#	$NetBSD: Makefile.inc,v 1.12 2020/09/15 08:14:31 mrg Exp $
 #
 #	etc.macppc/Makefile.inc -- macppc-specific etc Makefile targets
 #
@@ -6,9 +6,11 @@
 # If you change the list of distributed kernels, don't forget
 # to update the release documentation in distrib/notes/common/contents
 
+.if ${MACHINE_ARCH} != "powerpc64"
 KERNEL_SETS=		GENERIC GENERIC.MP GENERIC_601 POWERMAC_G5 \
 			POWERMAC_G5.MP
 
 BUILD_KERNELS+=		INSTALL INSTALL_601 GENERIC_MD
 
 INSTALLATION_DIRS+=	installation/floppy
+.endif

Index: src/sys/arch/ofppc/stand/ofwboot/boot.c
diff -u src/sys/arch/ofppc/stand/ofwboot/boot.c:1.24 src/sys/arch/ofppc/stand/ofwboot/boot.c:1.25
--- src/sys/arch/ofppc/stand/ofwboot/boot.c:1.24	Sat Jun 11 06:35:38 2016
+++ src/sys/arch/ofppc/stand/ofwboot/boot.c	Tue Sep 15 08:14:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.24 2016/06/11 06:35:38 dholland Exp $	*/
+/*	$NetBSD: boot.c,v 1.25 2020/09/15 08:14:31 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -292,8 +292,8 @@ main(void)
 	esym = (void *)marks[MARK_END];
 
 	printf(" start=0x%x\n", entry);
-	__syncicache((void *) entry, (u_int) ssym - (u_int) entry);
-	chain((boot_entry_t) entry, bootline, ssym, esym);
+	__syncicache((void *)(uintptr_t)entry, (uintptr_t) ssym - entry);
+	chain((boot_entry_t)(uintptr_t)entry, bootline, ssym, esym);
 
 	OF_exit();
 }



CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:13:51 UTC 2020

Modified Files:
src/distrib/bebox/ramdisk: Makefile
src/distrib/prep/floppies/ramdisk: Makefile
src/sys/arch/bebox/conf: INSTALL
src/sys/arch/prep/conf: INSTALL INSTALL_SMALL

Log Message:
bump bebox and prep image sizes for GCC 9.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/bebox/ramdisk/Makefile
cvs rdiff -u -r1.23 -r1.24 src/distrib/prep/floppies/ramdisk/Makefile
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/bebox/conf/INSTALL
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/prep/conf/INSTALL
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/prep/conf/INSTALL_SMALL

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



CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:14:31 UTC 2020

Modified Files:
src/etc/etc.macppc: Makefile.inc
src/sys/arch/ofppc/stand/ofwboot: boot.c

Log Message:
partial port to powerpc64.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.macppc/Makefile.inc
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/ofppc/stand/ofwboot/boot.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

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:33:40 UTC 2020

Modified Files:
src/sys/dev/ic: gem.c
src/sys/dev/pci: if_cas.c

Log Message:
mii_detach() must come before ifmedia_fini(), otherwise mii_detach()
will have a NULL mutex and fault.

this appears to have been introduced in february, and may be a problem
in other drivers converted to use ifmedia_fini().  i've only fixed the
two that were faulting for me on sunblade 2000 during reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/ic/gem.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/if_cas.c

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

Modified files:

Index: src/sys/dev/ic/gem.c
diff -u src/sys/dev/ic/gem.c:1.131 src/sys/dev/ic/gem.c:1.132
--- src/sys/dev/ic/gem.c:1.131	Wed Jul 15 01:42:27 2020
+++ src/sys/dev/ic/gem.c	Tue Sep 15 08:33:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: gem.c,v 1.131 2020/07/15 01:42:27 msaitoh Exp $ */
+/*	$NetBSD: gem.c,v 1.132 2020/09/15 08:33:40 mrg Exp $ */
 
 /*
  *
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.131 2020/07/15 01:42:27 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.132 2020/09/15 08:33:40 mrg Exp $");
 
 #include "opt_inet.h"
 
@@ -175,7 +175,6 @@ gem_detach(struct gem_softc *sc, int fla
 		rnd_detach_source(>rnd_source);
 		ether_ifdetach(ifp);
 		if_detach(ifp);
-		ifmedia_fini(>sc_mii.mii_media);
 
 		callout_destroy(>sc_tick_ch);
 		callout_destroy(>sc_rx_watchdog);
@@ -184,6 +183,8 @@ gem_detach(struct gem_softc *sc, int fla
 	case GEM_ATT_MII:
 		sc->sc_att_stage = GEM_ATT_MII;
 		mii_detach(>sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
+		ifmedia_fini(>sc_mii.mii_media);
+
 		/*FALLTHROUGH*/
 	case GEM_ATT_7:
 		for (i = 0; i < GEM_NRXDESC; i++) {

Index: src/sys/dev/pci/if_cas.c
diff -u src/sys/dev/pci/if_cas.c:1.43 src/sys/dev/pci/if_cas.c:1.44
--- src/sys/dev/pci/if_cas.c:1.43	Thu Jul  2 09:02:04 2020
+++ src/sys/dev/pci/if_cas.c	Tue Sep 15 08:33:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cas.c,v 1.43 2020/07/02 09:02:04 msaitoh Exp $	*/
+/*	$NetBSD: if_cas.c,v 1.44 2020/09/15 08:33:40 mrg Exp $	*/
 /*	$OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $	*/
 
 /*
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.43 2020/07/02 09:02:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.44 2020/09/15 08:33:40 mrg Exp $");
 
 #ifndef _MODULE
 #include "opt_inet.h"
@@ -765,12 +765,13 @@ cas_detach(device_t self, int flags)
 
 		ether_ifdetach(ifp);
 		if_detach(ifp);
-		ifmedia_fini(>sc_mii.mii_media);
 
 		callout_destroy(>sc_tick_ch);
 
 		mii_detach(>sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
 
+		ifmedia_fini(>sc_mii.mii_media);
+
 		/*FALLTHROUGH*/
 	case CAS_ATT_MII:
 	case CAS_ATT_7:



CVS commit: src/sys/dev

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:33:40 UTC 2020

Modified Files:
src/sys/dev/ic: gem.c
src/sys/dev/pci: if_cas.c

Log Message:
mii_detach() must come before ifmedia_fini(), otherwise mii_detach()
will have a NULL mutex and fault.

this appears to have been introduced in february, and may be a problem
in other drivers converted to use ifmedia_fini().  i've only fixed the
two that were faulting for me on sunblade 2000 during reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/ic/gem.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/if_cas.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/pci

2020-09-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep 15 08:39:04 UTC 2020

Modified Files:
src/sys/dev/pci: if_wm.c if_wmvar.h

Log Message:
 Add new flag named WM_F_CRC_STRIP and use it. No functional change.

 This change also sets the RCTL_SECRC bit on I211 but it doesn't change
the behavior because I211 always strips CRC like I35[04] and I210.


To generate a diff of this commit:
cvs rdiff -u -r1.686 -r1.687 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_wmvar.h

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



CVS commit: src/sys

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 10:05:37 UTC 2020

Modified Files:
src/sys/net: nd.c nd.h
src/sys/netinet: if_arp.c
src/sys/netinet6: nd6.c

Log Message:
Implement RFC 7048, making Neighbor Unreachability Detection less impatient

RFC 7048 Section 3 says in the UNREACHABLE state packets continue to be
sent to the link-layer address and then backoff exponentially.
We adjust this slightly and move to the INCOMPLETE state after
`nd_mmaxtries` probes and then start backing off.

This results in simpler code whilst providing a more robust model which
doubles the time to failure over what we did before.
We don't want to be back to the old ARP model where no unreachability
errors are returned because very few applications would look at
unreachability hints provided such as ND_LLINFO_UNREACHABLE or RTM_MISS.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/net/nd.c src/sys/net/nd.h
cvs rdiff -u -r1.296 -r1.297 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.273 -r1.274 src/sys/netinet6/nd6.c

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



CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 07:00:04 UTC 2020

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/external/gpl3/gcc/lib: Makefile

Log Message:
actually, disable tsan on everything but amd64.

it fails to build on mips64 and arm64 for me as well as others..


To generate a diff of this commit:
cvs rdiff -u -r1.904 -r1.905 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2355 -r1.2356 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.342 -r1.343 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.336 -r1.337 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.263 -r1.264 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/lib/Makefile

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



CVS commit: src

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 07:00:04 UTC 2020

Modified Files:
src/distrib/sets/lists/base: shl.mi
src/distrib/sets/lists/comp: mi shl.mi
src/distrib/sets/lists/debug: mi shl.mi
src/external/gpl3/gcc/lib: Makefile

Log Message:
actually, disable tsan on everything but amd64.

it fails to build on mips64 and arm64 for me as well as others..


To generate a diff of this commit:
cvs rdiff -u -r1.904 -r1.905 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.2355 -r1.2356 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.342 -r1.343 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.336 -r1.337 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.263 -r1.264 src/distrib/sets/lists/debug/shl.mi
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/lib/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.904 src/distrib/sets/lists/base/shl.mi:1.905
--- src/distrib/sets/lists/base/shl.mi:1.904	Tue Sep 15 06:22:33 2020
+++ src/distrib/sets/lists/base/shl.mi	Tue Sep 15 07:00:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.904 2020/09/15 06:22:33 mrg Exp $
+# $NetBSD: shl.mi,v 1.905 2020/09/15 07:00:03 mrg Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -896,9 +896,9 @@
 ./usr/lib/libtre.sobase-sys-shlib		compatfile
 ./usr/lib/libtre.so.0base-sys-shlib		compatfile
 ./usr/lib/libtre.so.0.8base-sys-shlib		compatfile
-./usr/lib/libtsan.sobase-sys-shlib		arch64,cxx,gcc=9,!machine=sparc64
-./usr/lib/libtsan.so.1base-sys-shlib		arch64,cxx,gcc=9,!machine=sparc64
-./usr/lib/libtsan.so.1.0			base-sys-shlib		arch64,cxx,gcc=9,!machine=sparc64
+./usr/lib/libtsan.sobase-sys-shlib		arch64,cxx,gcc=9,machine=amd64
+./usr/lib/libtsan.so.1base-sys-shlib		arch64,cxx,gcc=9,machine=amd64
+./usr/lib/libtsan.so.1.0			base-sys-shlib		arch64,cxx,gcc=9,machine=amd64
 ./usr/lib/libtspi.sobase-sys-shlib		compatfile,tpm
 ./usr/lib/libtspi.so.3base-sys-shlib		compatfile,tpm
 ./usr/lib/libtspi.so.3.0			base-sys-shlib		compatfile,tpm

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2355 src/distrib/sets/lists/comp/mi:1.2356
--- src/distrib/sets/lists/comp/mi:1.2355	Tue Sep 15 06:22:33 2020
+++ src/distrib/sets/lists/comp/mi	Tue Sep 15 07:00:03 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2355 2020/09/15 06:22:33 mrg Exp $
+#	$NetBSD: mi,v 1.2356 2020/09/15 07:00:03 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -3947,8 +3947,8 @@
 ./usr/lib/libtpm_unseal_p.a			comp-c-proflib		compatfile,tpm,profile
 ./usr/lib/libtre.acomp-c-lib		compatfile
 ./usr/lib/libtre_p.acomp-c-proflib		compatfile,profile
-./usr/lib/libtsan.acomp-c-lib		arch64,cxx,gcc=9,!machine=sparc64
-./usr/lib/libtsan_p.acomp-c-proflib		arch64,profile,cxx,gcc=9,!machine=sparc64
+./usr/lib/libtsan.acomp-c-lib		arch64,cxx,gcc=9,machine=amd64
+./usr/lib/libtsan_p.acomp-c-proflib		arch64,profile,cxx,gcc=9,machine=amd64
 ./usr/lib/libtspi.acomp-c-lib		compatfile,tpm
 ./usr/lib/libtspi_p.acomp-c-proflib		compatfile,tpm,profile
 ./usr/lib/libubsan.acomp-c-lib		compatfile,cxx,gcc

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.342 src/distrib/sets/lists/comp/shl.mi:1.343
--- src/distrib/sets/lists/comp/shl.mi:1.342	Tue Sep 15 06:22:33 2020
+++ src/distrib/sets/lists/comp/shl.mi	Tue Sep 15 07:00:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.342 2020/09/15 06:22:33 mrg Exp $
+# $NetBSD: shl.mi,v 1.343 2020/09/15 07:00:03 mrg Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -274,7 +274,7 @@
 ./usr/lib/libtermlib_pic.a			comp-c-piclib		compatfile,picinstall
 ./usr/lib/libtpm_unseal_pic.a			comp-tpm-lib		compatfile,picinstall,tpm
 ./usr/lib/libtre_pic.acomp-c-piclib		compatfile,picinstall
-./usr/lib/libtsan_pic.acomp-c-piclib		arch64,picinstall,cxx,gcc=9,!machine=sparc64
+./usr/lib/libtsan_pic.acomp-c-piclib		arch64,picinstall,cxx,gcc=9,machine=amd64
 ./usr/lib/libtspi_pic.acomp-c-piclib		compatfile,picinstall,tpm
 ./usr/lib/libubsan_pic.a			comp-c-piclib		compatfile,picinstall,cxx,gcc
 ./usr/lib/libukfs_pic.acomp-c-piclib		compatfile,picinstall,rump

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.336 src/distrib/sets/lists/debug/mi:1.337
--- src/distrib/sets/lists/debug/mi:1.336	Tue Sep 15 06:22:33 2020
+++ src/distrib/sets/lists/debug/mi	Tue Sep 15 07:00:04 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.336 2020/09/15 06:22:33 mrg Exp $
+# $NetBSD: mi,v 1.337 2020/09/15 07:00:04 mrg Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 

CVS commit: src/distrib/notes/evbarm

2020-09-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Sep 15 07:15:22 UTC 2020

Modified Files:
src/distrib/notes/evbarm: contents hardware upgrade

Log Message:
new dtb set needs reflecting in instructions


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/notes/evbarm/contents
cvs rdiff -u -r1.23 -r1.24 src/distrib/notes/evbarm/hardware
cvs rdiff -u -r1.5 -r1.6 src/distrib/notes/evbarm/upgrade

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

Modified files:

Index: src/distrib/notes/evbarm/contents
diff -u src/distrib/notes/evbarm/contents:1.13 src/distrib/notes/evbarm/contents:1.14
--- src/distrib/notes/evbarm/contents:1.13	Fri Aug  7 00:43:48 2020
+++ src/distrib/notes/evbarm/contents	Tue Sep 15 07:15:21 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: contents,v 1.13 2020/08/07 00:43:48 snj Exp $
+.\"	$NetBSD: contents,v 1.14 2020/09/15 07:15:21 nia Exp $
 .\"
 .\" Copyright (c) 1999-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -74,8 +74,6 @@ do not need board-specific kernels.
 A gzipped Armv6 kernel which supports the Raspberry Pi 1 only.
 .			It Pa netbsd-RPI2.gz
 A gzipped Armv6 kernel which supports the Raspberry Pi 2 only.
-.			It Pa *.dtb.gz
-Gzipped board-specific device trees.
 .		tag) \" binary/kernel/
 .
 .		It Pa sets/
@@ -155,6 +153,9 @@ It is useful when reporting issues with 
 development.
 This set is huge, if the target disk is small, do not install it.
 .
+.It Sy dtb
+Devicetree hardware descriptions for specific boards.
+.
 .It Sy etc
 This distribution set contains the system
 configuration files that reside in

Index: src/distrib/notes/evbarm/hardware
diff -u src/distrib/notes/evbarm/hardware:1.23 src/distrib/notes/evbarm/hardware:1.24
--- src/distrib/notes/evbarm/hardware:1.23	Sun Jul 26 11:00:28 2020
+++ src/distrib/notes/evbarm/hardware	Tue Sep 15 07:15:21 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: hardware,v 1.23 2020/07/26 11:00:28 jmcneill Exp $
+.\"	$NetBSD: hardware,v 1.24 2020/09/15 07:15:21 nia Exp $
 .\"
 .\" Copyright (c) 2001-2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -46,6 +46,11 @@ Xilinx Zynq (e.g. Zedboard, Parallella..
 .It
 NVIDIA Tegra K1
 .El
+.Pp
+For a full list of supported devicetree-based boards, see the
+contents of the
+.Pa dtb.tgz
+set.
 .Ss2 64-bit SoCs supported by GENERIC64 kernels
 .Pp
 Devices conforming to the Arm "ServerReady" (SBBR and SBSA) specifications,
@@ -66,3 +71,8 @@ Rockchip RK3328, RK3328 (e.g. Pinebook P
 .It
 NVIDIA Tegra X1
 .El
+.Pp
+For a full list of supported devicetree-based boards, see the
+contents of the
+.Pa dtb.tar.xz
+set.

Index: src/distrib/notes/evbarm/upgrade
diff -u src/distrib/notes/evbarm/upgrade:1.5 src/distrib/notes/evbarm/upgrade:1.6
--- src/distrib/notes/evbarm/upgrade:1.5	Fri Jul 24 12:41:20 2020
+++ src/distrib/notes/evbarm/upgrade	Tue Sep 15 07:15:21 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: upgrade,v 1.5 2020/07/24 12:41:20 nia Exp $
+.\"	$NetBSD: upgrade,v 1.6 2020/09/15 07:15:21 nia Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -52,9 +52,9 @@ e.g. allwinner, amlogic, broadcom, frees
 .Pp
 For example, for the Allwinner-based PINE A64 LTS:
 .Bd -literal
-$ ftp https://cdn.netbsd.org/pub/NetBSD/NetBSD-\*V/evbarm-aarch64/binary/kernel/sun50i-a64-pine64-lts.dtb.gz
-$ gunzip sun50i-a64-pine64-lts.dtb.gz
-# cp sun50i-a64-pine64-lts.dtb /boot/dtb/allwinner/
+$ ftp https://cdn.netbsd.org/pub/NetBSD/NetBSD-\*V/evbarm-aarch64/binary/sets/dtb.tar.xz
+$ unxz dtb.tar.xz
+# cp ./boot/dtb/allwinner/sun50i-a64-pine64-lts.dtb /boot/dtb/allwinner/
 .Ed
 Also copy
 .Pa bootaa64.efi



CVS commit: src/distrib/notes/evbarm

2020-09-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Sep 15 07:15:22 UTC 2020

Modified Files:
src/distrib/notes/evbarm: contents hardware upgrade

Log Message:
new dtb set needs reflecting in instructions


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/notes/evbarm/contents
cvs rdiff -u -r1.23 -r1.24 src/distrib/notes/evbarm/hardware
cvs rdiff -u -r1.5 -r1.6 src/distrib/notes/evbarm/upgrade

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

2020-09-15 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Sep 15 09:28:21 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: genassym.cf locore.S locore_el2.S start.S
src/sys/arch/aarch64/include: armreg.h

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/aarch64/genassym.cf
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/locore_el2.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/aarch64/start.S
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/aarch64/include/armreg.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

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:44:02 UTC 2020

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

Log Message:
all mips and powerpc and sh3 build now.
sparc64 seems ok.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/README.gcc9

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc9
diff -u src/external/gpl3/gcc/README.gcc9:1.14 src/external/gpl3/gcc/README.gcc9:1.15
--- src/external/gpl3/gcc/README.gcc9:1.14	Tue Sep 15 05:21:46 2020
+++ src/external/gpl3/gcc/README.gcc9	Tue Sep 15 08:44:02 2020
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc9,v 1.14 2020/09/15 05:21:46 mrg Exp $
+$NetBSD: README.gcc9,v 1.15 2020/09/15 08:44:02 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -51,16 +51,16 @@ i386		y	y	y	y		y		y	y	y
 ia64		y	y	y	y		y		y	N/A	y
 m68000		y	y	y	y		y		y	?	n
 m68k		y	y	y	y		y		y	y[11]	n
-mipseb		y	y	y	y		y[3]		n	n	n
-mipsel		y	y	y	y		y[3]		y	n	n
-mips64eb	y	y	y	y		y[3]		y	y	n
-mips64el	y	y	y	y		y[3]		n	n	n
-powerpc		y	y	y	y		y[3]		y	y	n
-powerpc64	y	y	y	y		y		?	N/A	n
-sh3eb		y	n	y	y		y		?	?	?
+mipseb		y	y	y	y		y		n	n	n
+mipsel		y	y	y	y		y		y	n	n
+mips64eb	y	y	y	y		y		y	y	n
+mips64el	y	y	y	y		y		n	n	n
+powerpc		y	y	y	y		y		y	y	n
+powerpc64	y	y	y	y		y		N/A	N/A	n
+sh3eb		y	y	y	y		y		?	?	?
 sh3el		y	y	y	y		y		y	y	n
 sparc		y	y	y	y		y		y	y	n
-sparc64		y	y	y	y		y		n	n	?
+sparc64		y	y	y	y		y		y	n	?
 vax		y	y	y	y		y		y	y	n
 x86_64		y	y	y	y		y		y	y	y
 riscv32		y	N/A	y	y		y		N/A	N/A	y	
@@ -70,8 +70,7 @@ coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
 architecture	tools	kernels	libgcc	native-gcc	make release	runs	atf
 
-[3]: consult cpu/platform table for full data
-[8]: prep and bebox floppies overflow; need to find if they are size limited
+[1]: kernels and boot programs, etc., don't build
 [10]: tests in lib/libc/sys are skipped; see port-alpha/55652
 [11]: at least there's no regression in kernel and lib/libc/{gen,sys}
 
@@ -91,7 +90,7 @@ earmv7:		 		 	 	y		y
 earmv7hf:	 		 	 	y		y
 
 		amiga		atari	cesfic	hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3	x68k
-m68k:		r		y	y	y		y		r		y		y		y		r 	y
+m68k:		y		y	y	y		y		y		y		y		y		y 	y
 
 		evbmips		emips		ews4800mips	mipsco		newsmips	sgimips
 mipseb:		y		y		y		y		y		y
@@ -104,11 +103,11 @@ mips64eb:	 		y		 
 mips64el:	y		y		y
 
 		amigappc	bebox	evbppc	ibmnws		macppc		mvmeppc		ofppc		prep		rs6000		sandpoint
-powerpc:	y		n[8]	y	y		y		y		y		n[8]		y		y
+powerpc:	y		y	y	y		y		y		y		y		y		y
 
 		evbppc		macppc		ofppc
-powerpc64:	y		?		?
+powerpc64:	y		n[1]		n[1]
 
 		dreamcast	evbsh3		hpcsh		landisk		mmeye
-sh3eb:		 		-		 		 		r
-sh3el:		r		-		-		y
+sh3eb:		 		y		 		 		y
+sh3el:		y		y		y		y



CVS commit: src/external/gpl3/gcc

2020-09-15 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 15 08:44:02 UTC 2020

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

Log Message:
all mips and powerpc and sh3 build now.
sparc64 seems ok.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/README.gcc9

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

2020-09-15 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Tue Sep 15 09:23:15 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: locore.S locore_el2.S start.S

Log Message:
fix aarch64eb MULTIPROCESSOR boot

- set endian of EL2,EL1 and EL0 at the beginning of start() and cpu_mpstart()
- drop_to_el1() keeps the endian setting


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/locore_el2.S
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/start.S

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.71 src/sys/arch/aarch64/aarch64/locore.S:1.72
--- src/sys/arch/aarch64/aarch64/locore.S:1.71	Sun Aug 16 10:08:42 2020
+++ src/sys/arch/aarch64/aarch64/locore.S	Tue Sep 15 09:23:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.71 2020/08/16 10:08:42 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.72 2020/09/15 09:23:15 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -38,7 +38,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.71 2020/08/16 10:08:42 skrll Exp $")
+RCSID("$NetBSD: locore.S,v 1.72 2020/09/15 09:23:15 ryo Exp $")
 
 #ifdef AARCH64_DEVICE_MEM_STRONGLY_ORDERED
 #define	MAIR_DEVICE_MEM		MAIR_DEVICE_nGnRnE
@@ -373,6 +373,30 @@ printcpu:
 #endif /* DEBUG_LOCORE */
 
 ENTRY_NP(cpu_mpstart)
+
+	mrs	x8, CurrentEL
+	lsr	x8, x8, #2
+	cmp	x8, #0x2
+	b.lo	1f
+
+	mrs	x8, sctlr_el2
+#ifdef __AARCH64EB__
+	orr	x8, x8, #SCTLR_EE	/* set: Big Endian */
+#else
+	bic	x8, x8, #SCTLR_EE	/* clear: Little Endian */
+#endif
+	msr	sctlr_el2, x8
+	isb
+1:
+	mrs	x8, sctlr_el1
+#ifdef __AARCH64EB__
+	orr	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* set: Big Endian */
+#else
+	bic	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* clear: Little Endian */
+#endif
+	msr	sctlr_el1, x8
+	isb
+
 	mrs	x3, mpidr_el1
 	ldr	x0, =(MPIDR_AFF0 | MPIDR_AFF1 | MPIDR_AFF2 | MPIDR_AFF3)
 	and	x3, x3, x0
@@ -925,12 +949,6 @@ mmu_enable:
 	ldr	x1, sctlr_set
 	orr	x0, x0, x1
 
-	ldr	x1, sctlr_ee
-#ifdef __AARCH64EB__
-	orr	x0, x0, x1	/* set: BigEndian */
-#else
-	bic	x0, x0, x1	/* clear: LittleEndian */
-#endif
 	msr	sctlr_el1, x0	/* enabling MMU! */
 	isb
 
@@ -985,8 +1003,6 @@ tcr_setting:
 #endif
 
 
-sctlr_ee:
-	.quad (SCTLR_EE | SCTLR_EOE)	/* Endianness of Exception and EL0 */
 sctlr_set:
 	.quad ( \
 	SCTLR_LSMAOE |  /* Load/Store Multiple Atomicity and Ordering */ \

Index: src/sys/arch/aarch64/aarch64/locore_el2.S
diff -u src/sys/arch/aarch64/aarch64/locore_el2.S:1.5 src/sys/arch/aarch64/aarch64/locore_el2.S:1.6
--- src/sys/arch/aarch64/aarch64/locore_el2.S:1.5	Sat Sep  5 17:49:26 2020
+++ src/sys/arch/aarch64/aarch64/locore_el2.S	Tue Sep 15 09:23:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_el2.S,v 1.5 2020/09/05 17:49:26 jakllsch Exp $	*/
+/*	$NetBSD: locore_el2.S,v 1.6 2020/09/15 09:23:15 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2012-2014 Andrew Turner
@@ -32,7 +32,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore_el2.S,v 1.5 2020/09/05 17:49:26 jakllsch Exp $")
+RCSID("$NetBSD: locore_el2.S,v 1.6 2020/09/15 09:23:15 ryo Exp $")
 
 /*
  * For use in #include "locore_el2.S".
@@ -75,9 +75,9 @@ in_el2:
 
 	/* Set the bits that need to be 1 in SCTLR_EL1. */
 	ldr	x2, .Lsctlr_res1
-#ifdef __AARCH64EB__
-	orr	x2, x2, #SCTLR_EE
-#endif
+	mrs	x1, sctlr_el1
+	and	x1, x1, #(SCTLR_EE | SCTLR_EOE)	/* keep SCTLR_EL1.{EE,E0E} */
+	orr	x2, x2, x1
 	msr	sctlr_el1, x2
 
 	/* Don't trap to EL2 on FP instructions. */

Index: src/sys/arch/aarch64/aarch64/start.S
diff -u src/sys/arch/aarch64/aarch64/start.S:1.9 src/sys/arch/aarch64/aarch64/start.S:1.10
--- src/sys/arch/aarch64/aarch64/start.S:1.9	Sat Sep  5 17:49:26 2020
+++ src/sys/arch/aarch64/aarch64/start.S	Tue Sep 15 09:23:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: start.S,v 1.9 2020/09/05 17:49:26 jakllsch Exp $	*/
+/*	$NetBSD: start.S,v 1.10 2020/09/15 09:23:15 ryo Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -33,7 +33,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: start.S,v 1.9 2020/09/05 17:49:26 jakllsch Exp $")
+RCSID("$NetBSD: start.S,v 1.10 2020/09/15 09:23:15 ryo Exp $")
 
 /*
  * Padding at start of kernel image to make room for 64-byte header
@@ -59,19 +59,18 @@ start:
 #endif
 	msr	sctlr_el2, x8
 	isb
-	b	2f
 
 1:
 	mrs	x8, sctlr_el1
 #ifdef __AARCH64EB__
-	orr	x8, x8, #SCTLR_EE	/* set: Big Endian */
+	orr	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* set: Big Endian */
 #else
-	bic	x8, x8, #SCTLR_EE	/* clear: Little Endian */
+	bic	x8, x8, #(SCTLR_EE | SCTLR_EOE)	/* clear: Little Endian */
 #endif
 	msr	sctlr_el1, x8
 	isb
 
-2:
+
 	adr	x9, start
 	ldr	x10, =start
 



CVS commit: src/tests/net/arp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 11:19:10 UTC 2020

Modified Files:
src/tests/net/arp: t_arp.sh

Log Message:
Don't check lifetime when testing published


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/tests/net/arp/t_arp.sh

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

Modified files:

Index: src/tests/net/arp/t_arp.sh
diff -u src/tests/net/arp/t_arp.sh:1.42 src/tests/net/arp/t_arp.sh:1.43
--- src/tests/net/arp/t_arp.sh:1.42	Sun Sep 13 14:36:32 2020
+++ src/tests/net/arp/t_arp.sh	Tue Sep 15 11:19:10 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: t_arp.sh,v 1.42 2020/09/13 14:36:32 roy Exp $
+#	$NetBSD: t_arp.sh,v 1.43 2020/09/15 11:19:10 roy Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -477,7 +477,7 @@ test_proxy_arp()
 		opts="pub proxy"
 	fi
 	# Always proxy only since migrating to lltable/llentry
-	title='permanent published \(proxy only\)'
+	title='published \(proxy only\)'
 
 	#
 	# Test#1: First setup an endpoint then create proxy arp entry



CVS commit: src/tests/net/arp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 11:19:10 UTC 2020

Modified Files:
src/tests/net/arp: t_arp.sh

Log Message:
Don't check lifetime when testing published


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/tests/net/arp/t_arp.sh

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



Re: GCC TSan (Re: CVS commit: src/tests/usr.bin)

2020-09-15 Thread Martin Husemann
On Tue, Sep 15, 2020 at 03:32:25PM +0200, Kamil Rytarowski wrote:
> I've tried to mark the TSan parts that need porting as explicit failure,
> soo we can reduce the risk of shipping unported runtime.

That risc is quite low as currently the runtime is apparently not buildable
on anything but amd64 ;-)

Indeed once we are able to build runtime components we should also
adjust the tested architectures. Would be great if we could easily query
such things, but it is not even easy to conditionalize the tests on gcc
9 or newer.

Martin


GCC TSan (Re: CVS commit: src/tests/usr.bin)

2020-09-15 Thread Kamil Rytarowski
On 15.09.2020 07:03, Martin Husemann wrote:
> On Mon, Sep 14, 2020 at 03:17:53PM +, Kamil Rytarowski wrote:
>> Enable TSan tests for GCC and >32bit address space environments
> 
> Since tsan does not work on all architectures, this is not a good idea.
> It would be better to code it with an explicit list of architectures
> supported.
> 
> Martin
> 

I've tried to mark the TSan parts that need porting as explicit failure,
soo we can reduce the risk of shipping unported runtime.

There are generally three such parts:

 - address space memory mappings
 - setjmp mapping of stack pointer
 - setjmp/longjmp assembly code

I noted that not all ATF TSan tests pass for GCC amd64. I suspect that
the runtime is still too old (even older than Clang-7 2 years ago, when
we added the ATF tests).

Another difference is that LLVM by default links the runtime statically
and GCC dynamically. There is a crash with dl_iterate_phdr(3). This is
possibly related to the crash with -pg.

GCC requires to deliver .spec files for static linking of sanitizers. We
need to generate libsanitizer.spec and install it to /usr/lib/. I will
have a look into it.

GCC9 also wants to install libasan_preinit.o, liblsan_preinit.o,
libtsan_preinit.o. I'm going to prepare appropriate build rules for them.



signature.asc
Description: OpenPGP digital signature


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

2020-09-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Sep 15 10:58:02 UTC 2020

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

Log Message:
Fix side effect of previous commit: skip xencons attachement only for
PVHVM guests. Should fix issue with console on PV dom0 reported by
kardel@ in private mail


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/xen/xen/hypervisor.c

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

Modified files:

Index: src/sys/arch/xen/xen/hypervisor.c
diff -u src/sys/arch/xen/xen/hypervisor.c:1.88 src/sys/arch/xen/xen/hypervisor.c:1.89
--- src/sys/arch/xen/xen/hypervisor.c:1.88	Wed Sep  9 16:46:06 2020
+++ src/sys/arch/xen/xen/hypervisor.c	Tue Sep 15 10:58:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.88 2020/09/09 16:46:06 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.89 2020/09/15 10:58:02 bouyer Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.88 2020/09/09 16:46:06 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.89 2020/09/15 10:58:02 bouyer Exp $");
 
 #include 
 #include 
@@ -676,7 +676,7 @@ hypervisor_attach(device_t parent, devic
 	config_found_ia(self, "xendevbus", _xenbus, hypervisor_print);
 #endif
 #if NXENCONS > 0
-	if (xencons_interface != 0) {
+	if (xencons_interface != 0 || vm_guest != VM_GUEST_XENPVHVM) {
 		memset(, 0, sizeof(hac));
 		hac.hac_xencons.xa_device = "xencons";
 		config_found_ia(self, "xendevbus", _xencons, hypervisor_print);



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

2020-09-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Sep 15 10:58:02 UTC 2020

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

Log Message:
Fix side effect of previous commit: skip xencons attachement only for
PVHVM guests. Should fix issue with console on PV dom0 reported by
kardel@ in private mail


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/xen/xen/hypervisor.c

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



CVS commit: src/usr.sbin/arp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 11:14:16 UTC 2020

Modified Files:
src/usr.sbin/arp: arp.c

Log Message:
arp: Permanence is from the llentry, not the route


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/arp/arp.c

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

Modified files:

Index: src/usr.sbin/arp/arp.c
diff -u src/usr.sbin/arp/arp.c:1.67 src/usr.sbin/arp/arp.c:1.68
--- src/usr.sbin/arp/arp.c:1.67	Tue Sep 15 10:11:15 2020
+++ src/usr.sbin/arp/arp.c	Tue Sep 15 11:14:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arp.c,v 1.67 2020/09/15 10:11:15 roy Exp $ */
+/*	$NetBSD: arp.c,v 1.68 2020/09/15 11:14:16 roy Exp $ */
 
 /*
  * Copyright (c) 1984, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1984, 19
 #if 0
 static char sccsid[] = "@(#)arp.c	8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: arp.c,v 1.67 2020/09/15 10:11:15 roy Exp $");
+__RCSID("$NetBSD: arp.c,v 1.68 2020/09/15 11:14:16 roy Exp $");
 #endif
 #endif /* not lint */
 
@@ -491,8 +491,6 @@ dump(uint32_t addr)
 (void)printf(" on %s", ifname);
 		}
 
-		if (rtm->rtm_rmx.rmx_expire == 0)
-			(void)printf(" permanent");
 		if (sina->sin_other & SIN_PROXY)
 			(void)printf(" published (proxy only)");
 		if (rtm->rtm_addrs & RTA_NETMASK) {



CVS commit: src/usr.sbin/arp

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 11:14:16 UTC 2020

Modified Files:
src/usr.sbin/arp: arp.c

Log Message:
arp: Permanence is from the llentry, not the route


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/usr.sbin/arp/arp.c

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



CVS commit: xsrc/external/mit/libX11/dist/src

2020-09-15 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Tue Sep 15 14:29:04 UTC 2020

Modified Files:
xsrc/external/mit/libX11/dist/src: CrGlCur.c

Log Message:
Dynamically load an unversioned libXcursor.

The version number is wrong for NetBSD (we have libXcursor.so.2 instead of
libXcursor.so.1) and this makes things fail.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/libX11/dist/src/CrGlCur.c

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

Modified files:

Index: xsrc/external/mit/libX11/dist/src/CrGlCur.c
diff -u xsrc/external/mit/libX11/dist/src/CrGlCur.c:1.1.1.4 xsrc/external/mit/libX11/dist/src/CrGlCur.c:1.2
--- xsrc/external/mit/libX11/dist/src/CrGlCur.c:1.1.1.4	Sat May 22 01:22:13 2010
+++ xsrc/external/mit/libX11/dist/src/CrGlCur.c	Tue Sep 15 14:29:04 2020
@@ -55,7 +55,7 @@ typedef void *XModuleType;
 #endif
 
 #ifndef LIBXCURSOR
-#define LIBXCURSOR "libXcursor.so.1"
+#define LIBXCURSOR "libXcursor.so"
 #endif
 
 static char libraryName[] = LIBXCURSOR;



CVS commit: xsrc/external/mit/libX11/dist/src

2020-09-15 Thread Nia Alarie
Module Name:xsrc
Committed By:   nia
Date:   Tue Sep 15 14:29:04 UTC 2020

Modified Files:
xsrc/external/mit/libX11/dist/src: CrGlCur.c

Log Message:
Dynamically load an unversioned libXcursor.

The version number is wrong for NetBSD (we have libXcursor.so.2 instead of
libXcursor.so.1) and this makes things fail.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/libX11/dist/src/CrGlCur.c

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



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

2020-09-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep 15 10:33:58 UTC 2020

Modified Files:
src/sys/arch/arm/fdt: acpi_fdt.c

Log Message:
If acpi_probe() falis, just panic now instead of failing mysteriously later.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/fdt/acpi_fdt.c

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



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

2020-09-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Sep 15 10:33:58 UTC 2020

Modified Files:
src/sys/arch/arm/fdt: acpi_fdt.c

Log Message:
If acpi_probe() falis, just panic now instead of failing mysteriously later.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/fdt/acpi_fdt.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/fdt/acpi_fdt.c
diff -u src/sys/arch/arm/fdt/acpi_fdt.c:1.14 src/sys/arch/arm/fdt/acpi_fdt.c:1.15
--- src/sys/arch/arm/fdt/acpi_fdt.c:1.14	Fri Jan 17 17:06:33 2020
+++ src/sys/arch/arm/fdt/acpi_fdt.c	Tue Sep 15 10:33:58 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fdt.c,v 1.14 2020/01/17 17:06:33 jmcneill Exp $ */
+/* $NetBSD: acpi_fdt.c,v 1.15 2020/09/15 10:33:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -30,7 +30,7 @@
 #include "opt_efi.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.14 2020/01/17 17:06:33 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.15 2020/09/15 10:33:58 jmcneill Exp $");
 
 #include 
 #include 
@@ -114,7 +114,7 @@ acpi_fdt_attach(device_t parent, device_
 	_fdt_power_funcs);
 
 	if (!acpi_probe())
-		aprint_error_dev(self, "failed to probe ACPI\n");
+		panic("ACPI subsystem failed to initialize");
 
 	memset(, 0, sizeof(aa));
 #if NPCI > 0



CVS commit: src/usr.bin/make/unit-tests

2020-09-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep 15 16:22:04 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: Makefile lint.mk

Log Message:
make(1): move flags for lint test into the test itself


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/lint.mk

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



CVS commit: src/sys/dev/ic

2020-09-15 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Sep 15 17:21:39 UTC 2020

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

Log Message:
max_devices is a 8bit value and zero is interpreted as 256. This value
can be reported by an mpt device emulated by VMware ESXi.


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

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

Modified files:

Index: src/sys/dev/ic/mpt_netbsd.c
diff -u src/sys/dev/ic/mpt_netbsd.c:1.36 src/sys/dev/ic/mpt_netbsd.c:1.37
--- src/sys/dev/ic/mpt_netbsd.c:1.36	Wed May  8 06:32:01 2019
+++ src/sys/dev/ic/mpt_netbsd.c	Tue Sep 15 17:21:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpt_netbsd.c,v 1.36 2019/05/08 06:32:01 cnst Exp $	*/
+/*	$NetBSD: mpt_netbsd.c,v 1.37 2020/09/15 17:21:39 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.36 2019/05/08 06:32:01 cnst Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.37 2020/09/15 17:21:39 mlelstv Exp $");
 
 #include "bio.h"
 
@@ -150,7 +150,7 @@ mpt_scsipi_attach(mpt_softc_t *mpt)
 	chan->chan_channel = 0;
 	chan->chan_flags = 0;
 	chan->chan_nluns = 8;
-	chan->chan_ntargets = mpt->mpt_max_devices;
+	chan->chan_ntargets = mpt->mpt_max_devices ? mpt->mpt_max_devices : 256;
 	chan->chan_id = mpt->mpt_ini_id;
 
 	/*



CVS commit: src/sys/dev/ic

2020-09-15 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Sep 15 17:21:39 UTC 2020

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

Log Message:
max_devices is a 8bit value and zero is interpreted as 256. This value
can be reported by an mpt device emulated by VMware ESXi.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/ic/mpt_netbsd.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/make/unit-tests

2020-09-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep 15 16:22:04 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: Makefile lint.mk

Log Message:
make(1): move flags for lint test into the test itself


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/lint.mk

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/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.142 src/usr.bin/make/unit-tests/Makefile:1.143
--- src/usr.bin/make/unit-tests/Makefile:1.142	Mon Sep 14 06:44:50 2020
+++ src/usr.bin/make/unit-tests/Makefile	Tue Sep 15 16:22:04 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.142 2020/09/14 06:44:50 rillig Exp $
+# $NetBSD: Makefile,v 1.143 2020/09/15 16:22:04 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -363,7 +363,6 @@ FLAGS.directive-ifmake=	first second
 FLAGS.doterror=		# none
 FLAGS.envfirst=		-e
 FLAGS.export=		# none
-FLAGS.lint=		-dL -k
 FLAGS.opt-ignore=	-i
 FLAGS.opt-keep-going=	-k
 FLAGS.opt-no-action=	-n

Index: src/usr.bin/make/unit-tests/lint.mk
diff -u src/usr.bin/make/unit-tests/lint.mk:1.2 src/usr.bin/make/unit-tests/lint.mk:1.3
--- src/usr.bin/make/unit-tests/lint.mk:1.2	Sat Aug  8 13:00:07 2020
+++ src/usr.bin/make/unit-tests/lint.mk	Tue Sep 15 16:22:04 2020
@@ -1,4 +1,4 @@
-# $NetBSD: lint.mk,v 1.2 2020/08/08 13:00:07 rillig Exp $
+# $NetBSD: lint.mk,v 1.3 2020/09/15 16:22:04 rillig Exp $
 #
 # Demonstrates stricter checks that are only enabled in the lint mode,
 # using the -dL option.
@@ -10,6 +10,8 @@
 # for a moment, but is continued after the wrongly-guessed end of the
 # variable, which echoes "y@:Q}".
 
+.MAKEFLAGS: -dL
+
 all: mod-loop-varname
 
 mod-loop-varname:



CVS commit: src/external/mit/xorg/lib/libX11

2020-09-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Sep 15 23:34:16 UTC 2020

Modified Files:
src/external/mit/xorg/lib/libX11: Makefile.libx11

Log Message:
libx11: Dynamically load unversioned libxcursor shared object

the version number is wrong for NetBSD, should be libXcursor.so.2


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/mit/xorg/lib/libX11/Makefile.libx11

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

Modified files:

Index: src/external/mit/xorg/lib/libX11/Makefile.libx11
diff -u src/external/mit/xorg/lib/libX11/Makefile.libx11:1.19 src/external/mit/xorg/lib/libX11/Makefile.libx11:1.20
--- src/external/mit/xorg/lib/libX11/Makefile.libx11:1.19	Mon Jul  8 23:06:15 2019
+++ src/external/mit/xorg/lib/libX11/Makefile.libx11	Tue Sep 15 23:34:16 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.libx11,v 1.19 2019/07/08 23:06:15 mrg Exp $
+#	$NetBSD: Makefile.libx11,v 1.20 2020/09/15 23:34:16 nia Exp $
 
 LIB=	X11
 .PATH:	${X11SRCDIR.${LIB}}/src
@@ -423,7 +423,7 @@ SETID_DEFINES=		-DHASSETUGID
 SHM_DEFINES=		-DHAS_SHM
 SOCK_DEFINES=		-DBSD44SOCKETS
 TRANS_INCLUDES=		-I${X11SRCDIR.xtrans}
-XCURSOR_DEFINES=	-DUSE_DYNAMIC_XCURSOR -DLIBXCURSOR=\"libXcursor.so.1\"
+XCURSOR_DEFINES=	-DUSE_DYNAMIC_XCURSOR -DLIBXCURSOR=\"libXcursor.so\"
 XDMAUTHDEFS=		-DHASXDMAUTH
 XF86BIGFONT_DEFINES=	-DXF86BIGFONT
 XKB_DEFINES=		-DXKB



CVS commit: src/external/mit/xorg/lib/libX11

2020-09-15 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Tue Sep 15 23:34:16 UTC 2020

Modified Files:
src/external/mit/xorg/lib/libX11: Makefile.libx11

Log Message:
libx11: Dynamically load unversioned libxcursor shared object

the version number is wrong for NetBSD, should be libXcursor.so.2


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/mit/xorg/lib/libX11/Makefile.libx11

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



CVS commit: src/sys/net

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 23:40:03 UTC 2020

Modified Files:
src/sys/net: nd.c

Log Message:
nd: give missed a default of ND_LLINFO_NOSTATE

It's impossible to miss from this state, where-as 0 is ND_LLINFO_INCOMPLETE
which we can miss from.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/net/nd.c

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

Modified files:

Index: src/sys/net/nd.c
diff -u src/sys/net/nd.c:1.3 src/sys/net/nd.c:1.4
--- src/sys/net/nd.c:1.3	Tue Sep 15 10:05:36 2020
+++ src/sys/net/nd.c	Tue Sep 15 23:40:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd.c,v 1.3 2020/09/15 10:05:36 roy Exp $	*/
+/*	$NetBSD: nd.c,v 1.4 2020/09/15 23:40:03 roy Exp $	*/
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd.c,v 1.3 2020/09/15 10:05:36 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd.c,v 1.4 2020/09/15 23:40:03 roy Exp $");
 
 #include 
 #include 
@@ -57,7 +57,7 @@ nd_timer(void *arg)
 	struct psref psref;
 	struct mbuf *m = NULL;
 	bool send_ns = false;
-	uint16_t missed = 0;
+	int16_t missed = ND_LLINFO_NOSTATE;
 	union l3addr taddr, *daddrp = NULL;
 
 	SOFTNET_KERNEL_LOCK_UNLESS_NET_MPSAFE();
@@ -203,7 +203,7 @@ out:
 		LLE_FREE_LOCKED(ln);
 	SOFTNET_KERNEL_UNLOCK_UNLESS_NET_MPSAFE();
 
-	if (missed)
+	if (missed != ND_LLINFO_NOSTATE)
 		nd->nd_missed(ifp, , missed, m);
 	if (ifp != NULL)
 		if_release(ifp, );



CVS commit: src/sys/net

2020-09-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 15 23:40:03 UTC 2020

Modified Files:
src/sys/net: nd.c

Log Message:
nd: give missed a default of ND_LLINFO_NOSTATE

It's impossible to miss from this state, where-as 0 is ND_LLINFO_INCOMPLETE
which we can miss from.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/net/nd.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

2020-09-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 16 04:07:32 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: genassym.cf interrupt.c locore.s
src/sys/arch/alpha/include: cpu.h intr.h types.h

Log Message:
Implement fast soft interrupts for Alpha.  It's not yet enabled, because
there is a bug lurking that causes problems when user space starts up,
so we'll stick with the slow path for now.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/alpha/genassym.cf
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/alpha/include/intr.h
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/alpha/include/types.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/alpha/alpha/genassym.cf
diff -u src/sys/arch/alpha/alpha/genassym.cf:1.25 src/sys/arch/alpha/alpha/genassym.cf:1.26
--- src/sys/arch/alpha/alpha/genassym.cf:1.25	Sat Sep  5 18:01:42 2020
+++ src/sys/arch/alpha/alpha/genassym.cf	Wed Sep 16 04:07:32 2020
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.25 2020/09/05 18:01:42 thorpej Exp $
+# $NetBSD: genassym.cf,v 1.26 2020/09/16 04:07:32 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -130,6 +130,7 @@ define	ALPHA_PSL_USERMODE	ALPHA_PSL_USER
 define	ALPHA_PSL_IPL_MASK	ALPHA_PSL_IPL_MASK
 define	ALPHA_PSL_IPL_0		ALPHA_PSL_IPL_0
 define	ALPHA_PSL_IPL_SOFT_LO	ALPHA_PSL_IPL_SOFT_LO
+define	ALPHA_PSL_IPL_SOFT_HI	ALPHA_PSL_IPL_SOFT_HI
 define	ALPHA_PSL_IPL_HIGH	ALPHA_PSL_IPL_HIGH
 
 # pte bits
@@ -189,4 +190,5 @@ define	SYS_exit		SYS_exit
 define	CPU_INFO_CURLWP		offsetof(struct cpu_info, ci_curlwp)
 define	CPU_INFO_IDLE_LWP	offsetof(struct cpu_info, ci_data.cpu_idlelwp)
 define	CPU_INFO_SSIR		offsetof(struct cpu_info, ci_ssir)
+define	CPU_INFO_MTX_COUNT	offsetof(struct cpu_info, ci_mtx_count)
 define	CPU_INFO_SIZEOF		sizeof(struct cpu_info)

Index: src/sys/arch/alpha/alpha/interrupt.c
diff -u src/sys/arch/alpha/alpha/interrupt.c:1.84 src/sys/arch/alpha/alpha/interrupt.c:1.85
--- src/sys/arch/alpha/alpha/interrupt.c:1.84	Sat Sep  5 18:01:42 2020
+++ src/sys/arch/alpha/alpha/interrupt.c	Wed Sep 16 04:07:32 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.84 2020/09/05 18:01:42 thorpej Exp $ */
+/* $NetBSD: interrupt.c,v 1.85 2020/09/16 04:07:32 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.84 2020/09/05 18:01:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.85 2020/09/16 04:07:32 thorpej Exp $");
 
 #include 
 #include 
@@ -450,47 +450,142 @@ badaddr_read(void *addr, size_t size, vo
 	return (rv);
 }
 
+#ifdef __HAVE_FAST_SOFTINTS
+
+#define	SOFTINT_CLOCK_MASK	__BIT(SOFTINT_CLOCK)
+#define	SOFTINT_BIO_MASK	__BIT(SOFTINT_BIO)
+#define	SOFTINT_NET_MASK	__BIT(SOFTINT_NET)
+#define	SOFTINT_SERIAL_MASK	__BIT(SOFTINT_SERIAL)
+
+#define	ALPHA_IPL1_SOFTINTS	(SOFTINT_CLOCK_MASK | SOFTINT_BIO_MASK)
+#define	ALPHA_IPL2_SOFTINTS	(SOFTINT_NET_MASK | SOFTINT_SERIAL_MASK)
+
+#define	ALPHA_ALL_SOFTINTS	(ALPHA_IPL1_SOFTINTS | ALPHA_IPL2_SOFTINTS)
+
+#define	SOFTINT_TO_IPL(si)		\
+	(ALPHA_PSL_IPL_SOFT_LO + ((ALPHA_IPL2_SOFTINTS >> (si)) & 1))
+
+#define	SOFTINTS_ELIGIBLE(ipl)		\
+	((ALPHA_ALL_SOFTINTS << ((ipl) << 1)) & ALPHA_ALL_SOFTINTS)
+
+/* Validate some assumptions the code makes. */
+__CTASSERT(SOFTINT_TO_IPL(SOFTINT_CLOCK) == ALPHA_PSL_IPL_SOFT_LO);
+__CTASSERT(SOFTINT_TO_IPL(SOFTINT_BIO) == ALPHA_PSL_IPL_SOFT_LO);
+__CTASSERT(SOFTINT_TO_IPL(SOFTINT_NET) == ALPHA_PSL_IPL_SOFT_HI);
+__CTASSERT(SOFTINT_TO_IPL(SOFTINT_SERIAL) == ALPHA_PSL_IPL_SOFT_HI);
+
+__CTASSERT(IPL_SOFTCLOCK == ALPHA_PSL_IPL_SOFT_LO);
+__CTASSERT(IPL_SOFTBIO == ALPHA_PSL_IPL_SOFT_LO);
+__CTASSERT(IPL_SOFTNET == ALPHA_PSL_IPL_SOFT_HI);
+__CTASSERT(IPL_SOFTSERIAL == ALPHA_PSL_IPL_SOFT_HI);
+
+__CTASSERT(SOFTINT_CLOCK_MASK & 0x3);
+__CTASSERT(SOFTINT_BIO_MASK & 0x3);
+__CTASSERT(SOFTINT_NET_MASK & 0xc);
+__CTASSERT(SOFTINT_SERIAL_MASK & 0xc);
+__CTASSERT(SOFTINT_COUNT == 4);
+
+__CTASSERT((ALPHA_ALL_SOFTINTS & ~0xfUL) == 0);
+__CTASSERT(SOFTINTS_ELIGIBLE(IPL_NONE) == ALPHA_ALL_SOFTINTS);
+__CTASSERT(SOFTINTS_ELIGIBLE(IPL_SOFTCLOCK) == ALPHA_IPL2_SOFTINTS);
+__CTASSERT(SOFTINTS_ELIGIBLE(IPL_SOFTBIO) == ALPHA_IPL2_SOFTINTS);
+__CTASSERT(SOFTINTS_ELIGIBLE(IPL_SOFTNET) == 0);
+__CTASSERT(SOFTINTS_ELIGIBLE(IPL_SOFTSERIAL) == 0);
+
 /*
- * spllower:
+ * softint_trigger:
  *
- *	Lower interrupt priority.  May need to check for software
- *	interrupts.
+ *	Trigger a soft interrupt.
  */
 void
-spllower(int ipl)
+softint_trigger(uintptr_t const machdep)
 {
+	/* No need for an atomic; called at splhigh(). */
+	KASSERT((alpha_pal_rdps() & ALPHA_PSL_IPL_MASK) == 

CVS commit: src/sys/arch/alpha

2020-09-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 16 04:07:32 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: genassym.cf interrupt.c locore.s
src/sys/arch/alpha/include: cpu.h intr.h types.h

Log Message:
Implement fast soft interrupts for Alpha.  It's not yet enabled, because
there is a bug lurking that causes problems when user space starts up,
so we'll stick with the slow path for now.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/alpha/genassym.cf
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/alpha/alpha/interrupt.c
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/alpha/include/intr.h
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/alpha/include/types.h

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