CVS commit: src/tests/sbin/ifconfig

2020-07-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 22 05:47:24 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Skip interfaces that are already UP before the test starts. We can
not change state of the test host this way, it breaks e.g. test systems
with the root filesystem on NFS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_updown.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/sbin/ifconfig/t_repeated_updown.sh
diff -u src/tests/sbin/ifconfig/t_repeated_updown.sh:1.3 src/tests/sbin/ifconfig/t_repeated_updown.sh:1.4
--- src/tests/sbin/ifconfig/t_repeated_updown.sh:1.3	Sat Jun 27 04:15:17 2020
+++ src/tests/sbin/ifconfig/t_repeated_updown.sh	Wed Jul 22 05:47:24 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_updown.sh,v 1.3 2020/06/27 04:15:17 jruoho Exp $
+# $NetBSD: t_repeated_updown.sh,v 1.4 2020/07/22 05:47:24 martin Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -42,14 +42,12 @@ repeated_updown_body() {
 
 	for i in $(ifconfig -l); do
 
-		state="up"
-		ifconfig -s $i
+		# skip all interfaces that are already marked UP
+		ifconfig $i | fgrep -q UP >/dev/null && continue
 
-		if [ $? -eq 1 ]; then
-			state="down"
-			ifconfig $i up
-			echo "Initialized $i up"
-		fi
+		state="down"
+		ifconfig $i up
+		echo "Initialized $i up"
 
 		while [ $n -gt 0 ]; do
 			ifconfig $i down



CVS commit: src

2020-07-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 22 01:24:40 UTC 2020

Modified Files:
src/lib/libpthread: pthread.c
src/sys/arch/acorn32/podulebus: esc.c escvar.h sfas.c sfasvar.h
src/sys/arch/arm/omap: omapl1x_timer.c
src/sys/arch/evbmips/adm5120: machdep.c
src/sys/arch/evbmips/alchemy: machdep.c
src/sys/arch/evbmips/atheros: machdep.c
src/sys/arch/evbmips/ingenic: machdep.c
src/sys/arch/evbmips/rasoc: machdep.c
src/sys/arch/ews4800mips/sbd: if_iee_sbdio.c
src/sys/arch/shark/shark: opms.c
src/sys/dev/ic: ath.c atppc.c
src/sys/dev/pci/ixgbe: ixgbe_vf.c
src/sys/net80211: ieee80211_proto.c
src/usr.bin/tip/aculib: ventel.c

Log Message:
s/reseting/resetting/


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/acorn32/podulebus/esc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/acorn32/podulebus/escvar.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/acorn32/podulebus/sfas.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/acorn32/podulebus/sfasvar.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/omapl1x_timer.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbmips/adm5120/machdep.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/evbmips/alchemy/machdep.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbmips/atheros/machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbmips/ingenic/machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbmips/rasoc/machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/ews4800mips/sbd/if_iee_sbdio.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/shark/shark/opms.c
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/ic/ath.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/atppc.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.35 -r1.36 src/sys/net80211/ieee80211_proto.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tip/aculib/ventel.c

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

Modified files:

Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.177 src/lib/libpthread/pthread.c:1.178
--- src/lib/libpthread/pthread.c:1.177	Sun Jun 14 21:31:11 2020
+++ src/lib/libpthread/pthread.c	Wed Jul 22 01:24:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.177 2020/06/14 21:31:11 ad Exp $	*/
+/*	$NetBSD: pthread.c,v 1.178 2020/07/22 01:24:39 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread.c,v 1.177 2020/06/14 21:31:11 ad Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.178 2020/07/22 01:24:39 msaitoh Exp $");
 
 #define	__EXPOSE_STACK	1
 
@@ -203,7 +203,7 @@ pthread__init(void)
 
 	/*
 	 * Allocate pthread_keys descriptors before
-	 * reseting __uselibcstub because otherwise
+	 * resetting __uselibcstub because otherwise
 	 * malloc() will call pthread_keys_create()
 	 * while pthread_keys descriptors are not
 	 * yet allocated.

Index: src/sys/arch/acorn32/podulebus/esc.c
diff -u src/sys/arch/acorn32/podulebus/esc.c:1.32 src/sys/arch/acorn32/podulebus/esc.c:1.33
--- src/sys/arch/acorn32/podulebus/esc.c:1.32	Fri Dec 27 09:41:48 2019
+++ src/sys/arch/acorn32/podulebus/esc.c	Wed Jul 22 01:24:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: esc.c,v 1.32 2019/12/27 09:41:48 msaitoh Exp $	*/
+/*	$NetBSD: esc.c,v 1.33 2020/07/22 01:24:39 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -86,7 +86,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: esc.c,v 1.32 2019/12/27 09:41:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esc.c,v 1.33 2020/07/22 01:24:39 msaitoh Exp $");
 
 #include 
 #include 
@@ -1102,7 +1102,7 @@ esc_midaction(struct esc_softc *dev, esc
 
 		case ESC_NS_RESET:
 			/*
-			 * We were reseting this SCSI-unit. Clean up the
+			 * We were resetting this SCSI-unit. Clean up the
 			 * nexus struct.
 			 */
 			dev->sc_led(dev, 0);

Index: src/sys/arch/acorn32/podulebus/escvar.h
diff -u src/sys/arch/acorn32/podulebus/escvar.h:1.8 src/sys/arch/acorn32/podulebus/escvar.h:1.9
--- src/sys/arch/acorn32/podulebus/escvar.h:1.8	Sat Oct 27 17:17:23 2012
+++ src/sys/arch/acorn32/podulebus/escvar.h	Wed Jul 22 01:24:39 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: escvar.h,v 1.8 2012/10/27 17:17:23 chs Exp $ */
+/* $NetBSD: escvar.h,v 1.9 2020/07/22 01:24:39 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1995 Daniel Widenfalk
@@ -130,7 +130,7 @@ struct nexus {
 #define ESC_NS_RESELECTED	10	/* We was reselected */
 #define ESC_NS_DONE		11	/* Done. Prephsase to FINISHED */
 #define ESC_NS_FINISHED		12	/* Realy done. Call scsi_done */
-#define ESC_NS_RESET		13	/* We are reseting this unit */
+#define ESC_NS_RESET		13	/* We are resetting this unit */
 
 /* SCSI nexus flags */
 #define ESC_NF_UNIT_BUSY	0x0001	/* Unit is not available */

Index: src/sys/arch/acorn32/podulebus/sfas.c
diff -u src/sys/arch/acorn32/podulebus/sfas.c:1.28 

CVS commit: src/usr.bin/make

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 23:47:50 UTC 2020

Modified Files:
src/usr.bin/make: var.c

Log Message:
make(1): remove parameter from ModifyWordCallback

Most modifiers don't need a variable context, and those that do already
get all their parameters in a custom Args struct.


To generate a diff of this commit:
cvs rdiff -u -r1.294 -r1.295 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.294 src/usr.bin/make/var.c:1.295
--- src/usr.bin/make/var.c:1.294	Tue Jul 21 23:22:45 2020
+++ src/usr.bin/make/var.c	Tue Jul 21 23:47:50 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.294 2020/07/21 23:22:45 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.295 2020/07/21 23:47:50 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.294 2020/07/21 23:22:45 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.295 2020/07/21 23:47:50 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.294 2020/07/21 23:22:45 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.295 2020/07/21 23:47:50 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1105,15 +1105,13 @@ SepBuf_Destroy(SepBuf *buf, Boolean free
 /* This callback for ModifyWords gets a single word from an expression and
  * typically adds a modification of this word to the buffer. It may also do
  * nothing or add several words. */
-typedef void (*ModifyWordsCallback)(GNode *ctxt, const char *word,
-SepBuf *buf, void *data);
+typedef void (*ModifyWordsCallback)(const char *word, SepBuf *buf, void *data);
 
 
 /* Callback for ModifyWords to implement the :H modifier.
  * Add the dirname of the given word to the buffer. */
 static void
-ModifyWord_Head(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
-		SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Head(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 const char *slash = strrchr(word, '/');
 if (slash != NULL)
@@ -1125,8 +1123,7 @@ ModifyWord_Head(GNode *ctx MAKE_ATTR_UNU
 /* Callback for ModifyWords to implement the :T modifier.
  * Add the basename of the given word to the buffer. */
 static void
-ModifyWord_Tail(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
-		SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Tail(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 const char *slash = strrchr(word, '/');
 const char *base = slash != NULL ? slash + 1 : word;
@@ -1136,8 +1133,7 @@ ModifyWord_Tail(GNode *ctx MAKE_ATTR_UNU
 /* Callback for ModifyWords to implement the :E modifier.
  * Add the filename suffix of the given word to the buffer, if it exists. */
 static void
-ModifyWord_Suffix(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
-		  SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Suffix(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 const char *dot = strrchr(word, '.');
 if (dot != NULL)
@@ -1147,8 +1143,7 @@ ModifyWord_Suffix(GNode *ctx MAKE_ATTR_U
 /* Callback for ModifyWords to implement the :R modifier.
  * Add the basename of the given word to the buffer. */
 static void
-ModifyWord_Root(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
-		SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Root(const char *word, SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 char *dot = strrchr(word, '.');
 size_t len = dot != NULL ? (size_t)(dot - word) : strlen(word);
@@ -1158,8 +1153,7 @@ ModifyWord_Root(GNode *ctx MAKE_ATTR_UNU
 /* Callback for ModifyWords to implement the :M modifier.
  * Place the word in the buffer if it matches the given pattern. */
 static void
-ModifyWord_Match(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
-		 SepBuf *buf, void *data)
+ModifyWord_Match(const char *word, SepBuf *buf, void *data)
 {
 const char *pattern = data;
 if (DEBUG(VAR))
@@ -1171,8 +1165,7 @@ ModifyWord_Match(GNode *ctx MAKE_ATTR_UN
 /* Callback for ModifyWords to implement the :N modifier.
  * Place the word in the buffer if it doesn't match the given pattern. */
 static void
-ModifyWord_NoMatch(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
-		   SepBuf *buf, void *data)
+ModifyWord_NoMatch(const char *word, SepBuf *buf, void *data)
 {
 const char *pattern = data;
 if (!Str_Match(word, pattern))
@@ -1278,13 +1271,14 @@ Str_SYSVSubst(SepBuf *buf, const char *p
 
 
 typedef struct {
+GNode *ctx;
 const char *lhs;
 const char *rhs;
 } ModifyWord_SYSVSubstArgs;
 
 /* Callback for ModifyWords to implement the :%.from=%.to modifier. */
 static void
-ModifyWord_SYSVSubst(GNode *ctx, const char *word, SepBuf *buf, void *data)
+ModifyWord_SYSVSubst(const char *word, SepBuf *buf, void *data)
 {
 const 

CVS commit: src/usr.bin/make

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 23:22:45 UTC 2020

Modified Files:
src/usr.bin/make: var.c

Log Message:
make(1): make implementation of the :C modifier simpler


To generate a diff of this commit:
cvs rdiff -u -r1.293 -r1.294 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.293 src/usr.bin/make/var.c:1.294
--- src/usr.bin/make/var.c:1.293	Tue Jul 21 21:32:55 2020
+++ src/usr.bin/make/var.c	Tue Jul 21 23:22:45 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.293 2020/07/21 21:32:55 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.294 2020/07/21 23:22:45 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.293 2020/07/21 21:32:55 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.294 2020/07/21 23:22:45 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.293 2020/07/21 21:32:55 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.294 2020/07/21 23:22:45 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1435,8 +1435,6 @@ ModifyWord_SubstRegex(GNode *ctx MAKE_AT
 	} else if (*rp == '&' ||
 		(*rp == '\\' && isdigit((unsigned char)rp[1]))) {
 		int n;
-		const char *subbuf;
-		int sublen;
 		char errstr[3];
 
 		if (*rp == '&') {
@@ -1452,20 +1450,16 @@ ModifyWord_SubstRegex(GNode *ctx MAKE_AT
 		}
 
 		if (n >= pat->nsub) {
-		Error("No subexpression %s", [0]);
-		subbuf = "";
-		sublen = 0;
+		Error("No subexpression %s", errstr);
 		} else if ((pat->matches[n].rm_so == -1) &&
 			   (pat->matches[n].rm_eo == -1)) {
-		Error("No match for subexpression %s", [0]);
-		subbuf = "";
-		sublen = 0;
+		Error("No match for subexpression %s", errstr);
 		} else {
-		subbuf = wp + pat->matches[n].rm_so;
-		sublen = pat->matches[n].rm_eo - pat->matches[n].rm_so;
+		const char *subbuf = wp + pat->matches[n].rm_so;
+		int sublen = pat->matches[n].rm_eo - pat->matches[n].rm_so;
+		SepBuf_AddBytes(buf, subbuf, sublen);
 		}
 
-		SepBuf_AddBytes(buf, subbuf, sublen);
 	} else {
 		SepBuf_AddBytes(buf, rp, 1);
 	}



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

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 23:19:46 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk

Log Message:
make(1): add test for :S,,sep

The empty string does not match anywhere.  In other implementations of
string replacement, an empty string matches at every position of the
source string.

This only works for the :S modifier.  The :C modifier does not allow an
empty search pattern.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/make/unit-tests/modmisc.exp
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/make/unit-tests/modmisc.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/modmisc.exp
diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.24 src/usr.bin/make/unit-tests/modmisc.exp:1.25
--- src/usr.bin/make/unit-tests/modmisc.exp:1.24	Tue Jul 21 21:34:41 2020
+++ src/usr.bin/make/unit-tests/modmisc.exp	Tue Jul 21 23:19:46 2020
@@ -17,11 +17,14 @@ C:
 S:empty
 C:empty
 @:
+mod-S:
 :a b b c:
 :a b b c:
 : b c:
 :a c:
 :x__ 3 x__ 3:
+12345
+mod-C:
 :a b b c:
 :a b b c:
 : b c:

Index: src/usr.bin/make/unit-tests/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.19 src/usr.bin/make/unit-tests/modmisc.mk:1.20
--- src/usr.bin/make/unit-tests/modmisc.mk:1.19	Tue Jul 21 21:34:41 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk	Tue Jul 21 23:19:46 2020
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.19 2020/07/21 21:34:41 rillig Exp $
+# $Id: modmisc.mk,v 1.20 2020/07/21 23:19:46 rillig Exp $
 #
 # miscellaneous modifier tests
 
@@ -67,13 +67,16 @@ undefvar:
 	@echo @:${:U:@var@empty@}
 
 mod-S:
+	@echo $@:
 	@echo :${:Ua b b c:S,a b,,:Q}:
 	@echo :${:Ua b b c:S,a b,,1:Q}:
 	@echo :${:Ua b b c:S,a b,,W:Q}:
 	@echo :${:Ua b b c:S,b,,g:Q}:
 	@echo :${:U1 2 3 1 2 3:S,1 2,___,Wg:S,_,x,:Q}:
+	@echo ${:U12345:S,,sep,g:Q}
 
 mod-C:
+	@echo $@:
 	@echo :${:Ua b b c:C,a b,,:Q}:
 	@echo :${:Ua b b c:C,a b,,1:Q}:
 	@echo :${:Ua b b c:C,a b,,W:Q}:



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

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 21:34:41 UTC 2020

Modified Files:
src/usr.bin/make/unit-tests: modmisc.exp modmisc.mk

Log Message:
make(1): add test for :Q and .newline


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/unit-tests/modmisc.exp
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/unit-tests/modmisc.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/modmisc.exp
diff -u src/usr.bin/make/unit-tests/modmisc.exp:1.23 src/usr.bin/make/unit-tests/modmisc.exp:1.24
--- src/usr.bin/make/unit-tests/modmisc.exp:1.23	Mon Jul 20 19:53:40 2020
+++ src/usr.bin/make/unit-tests/modmisc.exp	Tue Jul 21 21:34:41 2020
@@ -83,4 +83,7 @@ mod-assign-nested: else2e2
 mod-assign-nested: then3t3
 mod-assign-nested: else4e4
 mod-tu-space: A   B
+mod-Q: new
+
+line
 exit status 0

Index: src/usr.bin/make/unit-tests/modmisc.mk
diff -u src/usr.bin/make/unit-tests/modmisc.mk:1.18 src/usr.bin/make/unit-tests/modmisc.mk:1.19
--- src/usr.bin/make/unit-tests/modmisc.mk:1.18	Mon Jul 20 19:03:25 2020
+++ src/usr.bin/make/unit-tests/modmisc.mk	Tue Jul 21 21:34:41 2020
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.18 2020/07/20 19:03:25 rillig Exp $
+# $Id: modmisc.mk,v 1.19 2020/07/21 21:34:41 rillig Exp $
 #
 # miscellaneous modifier tests
 
@@ -22,6 +22,7 @@ all:	mod-C-limits
 all:	mod-assign
 all:	mod-assign-nested
 all:	mod-tu-space
+all:	mod-Q
 
 modsysv:
 	@echo "The answer is ${libfoo.a:L:libfoo.a=42}"
@@ -172,3 +173,6 @@ mod-tu-space:
 	# as a single string, not as a list of words. Therefore,
 	# the adjacent spaces are preserved.
 	@echo $@: ${a   b:L:tu:Q}
+
+mod-Q:
+	@echo $@: new${.newline:Q}${.newline:Q}line



CVS commit: src/usr.bin/make

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 21:32:55 UTC 2020

Modified Files:
src/usr.bin/make: var.c

Log Message:
make(1): only ask for newline if :Q actually needs it

This simple change reduces the binary size of var.o by 96 bytes (Clang,
x86_64). Given that the code is still the same, just in a different
order, this is a bit surprising.


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.292 src/usr.bin/make/var.c:1.293
--- src/usr.bin/make/var.c:1.292	Tue Jul 21 21:13:24 2020
+++ src/usr.bin/make/var.c	Tue Jul 21 21:32:55 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.292 2020/07/21 21:13:24 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.293 2020/07/21 21:32:55 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.292 2020/07/21 21:13:24 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.293 2020/07/21 21:32:55 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.292 2020/07/21 21:13:24 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.293 2020/07/21 21:32:55 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1971,19 +1971,15 @@ ParseModifierPart(GNode *ctxt, const cha
 static char *
 VarQuote(char *str, Boolean quoteDollar)
 {
-Buffer  	  buf;
-const char	*newline;
-size_t nlen;
-
-if ((newline = Shell_GetNewline()) == NULL)
-	newline = "\\\n";
-nlen = strlen(newline);
-
+Buffer buf;
 Buf_Init(, 0);
 
 for (; *str != '\0'; str++) {
 	if (*str == '\n') {
-	Buf_AddBytes(, nlen, newline);
+	const char *newline = Shell_GetNewline();
+	if (newline == NULL)
+		newline = "\\\n";
+	Buf_AddBytes(, strlen(newline), newline);
 	continue;
 	}
 	if (isspace((unsigned char)*str) || ismeta((unsigned char)*str))



CVS commit: src/usr.bin/make

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 21:13:24 UTC 2020

Modified Files:
src/usr.bin/make: make.h var.c

Log Message:
make(1): clean up various things in var.c


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/usr.bin/make/make.h
cvs rdiff -u -r1.291 -r1.292 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.110 src/usr.bin/make/make.h:1.111
--- src/usr.bin/make/make.h:1.110	Sat Jul 18 21:37:38 2020
+++ src/usr.bin/make/make.h	Tue Jul 21 21:13:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.110 2020/07/18 21:37:38 sjg Exp $	*/
+/*	$NetBSD: make.h,v 1.111 2020/07/21 21:13:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -423,6 +423,8 @@ extern char	*progname;	/* The program na
 extern char	*makeDependfile; /* .depend */
 extern char	**savedEnv;	 /* if we replaced environ this will be non-NULL */
 
+extern int	makelevel;
+
 /*
  * We cannot vfork() in a child of vfork().
  * Most systems do not enforce this but some do.

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.291 src/usr.bin/make/var.c:1.292
--- src/usr.bin/make/var.c:1.291	Tue Jul 21 20:56:56 2020
+++ src/usr.bin/make/var.c	Tue Jul 21 21:13:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.291 2020/07/21 20:56:56 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.292 2020/07/21 21:13:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.291 2020/07/21 20:56:56 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.292 2020/07/21 21:13:24 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.291 2020/07/21 20:56:56 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.292 2020/07/21 21:13:24 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -88,8 +88,7 @@ __RCSID("$NetBSD: var.c,v 1.291 2020/07/
  * Interface:
  *	Var_Set		Set the value of a variable in the given
  *			context. The variable is created if it doesn't
- *			yet exist. The value and variable name need not
- *			be preserved.
+ *			yet exist.
  *
  *	Var_Append	Append more characters to an existing variable
  *			in the given context. The variable needn't
@@ -103,8 +102,7 @@ __RCSID("$NetBSD: var.c,v 1.291 2020/07/
  *			NULL if the variable is undefined.
  *
  *	Var_Subst 	Substitute either a single variable or all
- *			variables in a string, using the given context as
- *			the top-most one.
+ *			variables in a string, using the given context.
  *
  *	Var_Parse 	Parse a variable expansion from a string and
  *			return the result and the number of characters
@@ -128,8 +126,8 @@ __RCSID("$NetBSD: var.c,v 1.291 2020/07/
 #endif
 #include
 #include
-#include
 #include
+#include
 #include
 
 #include"make.h"
@@ -138,7 +136,6 @@ __RCSID("$NetBSD: var.c,v 1.291 2020/07/
 #include"job.h"
 #include"metachar.h"
 
-extern int makelevel;
 /*
  * This lets us tell if we have replaced the original environ
  * (which we cannot free).
@@ -154,7 +151,7 @@ char var_Error[] = "";
 
 /*
  * Similar to var_Error, but returned when the 'VARE_UNDEFERR' flag for
- * Var_Parse is not set. Why not just use a constant? Well, gcc likes
+ * Var_Parse is not set. Why not just use a constant? Well, GCC likes
  * to condense identical string instances...
  */
 static char varNoError[] = "";
@@ -163,27 +160,26 @@ static char varNoError[] = "";
  * Traditionally we consume $$ during := like any other expansion.
  * Other make's do not.
  * This knob allows controlling the behavior.
- * FALSE for old behavior.
- * TRUE for new compatible.
+ * FALSE to consume $$ during := assignment.
+ * TRUE to preserve $$ during := assignment.
  */
 #define SAVE_DOLLARS ".MAKE.SAVE_DOLLARS"
 static Boolean save_dollars = TRUE;
 
 /*
  * Internally, variables are contained in four different contexts.
- *	1) the environment. They may not be changed. If an environment
- *	variable is appended-to, the result is placed in the global
+ *	1) the environment. They cannot be changed. If an environment
+ *	variable is appended to, the result is placed in the global
  *	context.
  *	2) the global context. Variables set in the Makefile are located in
- *	the global context. It is the penultimate context searched when
- *	substituting.
+ *	the global context.
  *	3) the command-line context. All variables set on the command line
  *	   are placed in this context. They are UNALTERABLE once placed here.
  *	4) the local context. Each target has associated with it a context
  *	   list. On this list are located the structures describing such
  *	   local variables as $(@) and $(*)
  * The four 

CVS commit: src/usr.bin/make

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 20:56:56 UTC 2020

Modified Files:
src/usr.bin/make: var.c

Log Message:
make(1): use consistent and descriptive names for callback functions


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.290 src/usr.bin/make/var.c:1.291
--- src/usr.bin/make/var.c:1.290	Tue Jul 21 20:08:44 2020
+++ src/usr.bin/make/var.c	Tue Jul 21 20:56:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.290 2020/07/21 20:08:44 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.291 2020/07/21 20:56:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.290 2020/07/21 20:08:44 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.291 2020/07/21 20:56:56 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.290 2020/07/21 20:08:44 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.291 2020/07/21 20:56:56 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -262,33 +262,6 @@ typedef struct {
  * several space-separated words). */
 } Var_Parse_State;
 
-/* struct passed as 'void *' to VarSubstitute() for ":S/lhs/rhs/" */
-typedef struct {
-const char	*lhs;
-size_t	lhsLen;
-const char	*rhs;
-size_t	rhsLen;
-VarPatternFlags pflags;
-} VarSubstituteArgs;
-
-/* struct passed as 'void *' to VarLoopExpand() for ":@tvar@str@" */
-typedef struct {
-char	*tvar;		/* name of temporary variable */
-char	*str;		/* string to expand */
-VarEvalFlags eflags;
-} VarLoop;
-
-#ifndef NO_REGEX
-/* struct passed as 'void *' to VarRESubstitute() for ":C///" */
-typedef struct {
-regex_t	   re;
-int		   nsub;
-regmatch_t 	  *matches;
-char 	  *replace;
-VarPatternFlags pflags;
-} VarREPattern;
-#endif
-
 #define BROPEN	'{'
 #define BRCLOSE	'}'
 #define PROPEN	'('
@@ -1135,18 +1108,18 @@ SepBuf_Destroy(SepBuf *buf, Boolean free
 }
 
 
-/* This callback for VarModify gets a single word from an expression and
+/* This callback for ModifyWords gets a single word from an expression and
  * typically adds a modification of this word to the buffer. It may also do
  * nothing or add several words. */
-typedef void (*VarModifyCallback)(GNode *ctxt, const char *word, SepBuf *buf,
-  void *data);
+typedef void (*ModifyWordsCallback)(GNode *ctxt, const char *word,
+SepBuf *buf, void *data);
 
 
-/* Callback function for VarModify to implement the :H modifier.
+/* Callback for ModifyWords to implement the :H modifier.
  * Add the dirname of the given word to the buffer. */
 static void
-VarHead(GNode *ctx MAKE_ATTR_UNUSED, const char *word, SepBuf *buf,
-	void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Head(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
+		SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 const char *slash = strrchr(word, '/');
 if (slash != NULL)
@@ -1155,44 +1128,44 @@ VarHead(GNode *ctx MAKE_ATTR_UNUSED, con
 	SepBuf_AddBytes(buf, ".", 1);
 }
 
-/* Callback function for VarModify to implement the :T modifier.
+/* Callback for ModifyWords to implement the :T modifier.
  * Add the basename of the given word to the buffer. */
 static void
-VarTail(GNode *ctx MAKE_ATTR_UNUSED, const char *word, SepBuf *buf,
-	void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Tail(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
+		SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 const char *slash = strrchr(word, '/');
 const char *base = slash != NULL ? slash + 1 : word;
 SepBuf_AddBytes(buf, base, strlen(base));
 }
 
-/* Callback function for VarModify to implement the :E modifier.
+/* Callback for ModifyWords to implement the :E modifier.
  * Add the filename suffix of the given word to the buffer, if it exists. */
 static void
-VarSuffix(GNode *ctx MAKE_ATTR_UNUSED, const char *word, SepBuf *buf,
-	  void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Suffix(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
+		  SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 const char *dot = strrchr(word, '.');
 if (dot != NULL)
 	SepBuf_AddBytes(buf, dot + 1, strlen(dot + 1));
 }
 
-/* Callback function for VarModify to implement the :R modifier.
- * Add the filename basename of the given word to the buffer. */
+/* Callback for ModifyWords to implement the :R modifier.
+ * Add the basename of the given word to the buffer. */
 static void
-VarRoot(GNode *ctx MAKE_ATTR_UNUSED, const char *word, SepBuf *buf,
-	void *dummy MAKE_ATTR_UNUSED)
+ModifyWord_Root(GNode *ctx MAKE_ATTR_UNUSED, const char *word,
+		SepBuf *buf, void *dummy MAKE_ATTR_UNUSED)
 {
 char *dot = strrchr(word, '.');
 size_t len = dot != NULL ? (size_t)(dot - word) : 

CVS commit: src/usr.bin/make

2020-07-21 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jul 21 20:08:44 UTC 2020

Modified Files:
src/usr.bin/make: var.c

Log Message:
make(1): remove unnecessary VarSelectWords_t struct


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/usr.bin/make/var.c

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

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.289 src/usr.bin/make/var.c:1.290
--- src/usr.bin/make/var.c:1.289	Mon Jul 20 21:33:13 2020
+++ src/usr.bin/make/var.c	Tue Jul 21 20:08:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.289 2020/07/20 21:33:13 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.290 2020/07/21 20:08:44 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.289 2020/07/20 21:33:13 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.290 2020/07/21 20:08:44 rillig Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.289 2020/07/20 21:33:13 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.290 2020/07/21 20:08:44 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -289,12 +289,6 @@ typedef struct {
 } VarREPattern;
 #endif
 
-/* struct passed to VarSelectWords() for ":[start..end]" */
-typedef struct {
-int		start;		/* first word to select */
-int		end;		/* last word to select */
-} VarSelectWords_t;
-
 #define BROPEN	'{'
 #define BRCLOSE	'}'
 #define PROPEN	'('
@@ -1565,7 +1559,7 @@ VarLoopExpand(GNode *ctx, const char *wo
  */
 static char *
 VarSelectWords(GNode *ctx MAKE_ATTR_UNUSED, Var_Parse_State *vpstate,
-	   const char *str, VarSelectWords_t *seldata)
+	   const char *str, int first, int last)
 {
 SepBuf buf;
 char **av;			/* word list */
@@ -1592,21 +1586,21 @@ VarSelectWords(GNode *ctx MAKE_ATTR_UNUS
  * the positive equivalents (-1 gets converted to argc, -2 gets
  * converted to (argc-1), etc.).
  */
-if (seldata->start < 0)
-	seldata->start = ac + seldata->start + 1;
-if (seldata->end < 0)
-	seldata->end = ac + seldata->end + 1;
+if (first < 0)
+	first += ac + 1;
+if (last < 0)
+	last += ac + 1;
 
 /*
  * We avoid scanning more of the list than we need to.
  */
-if (seldata->start > seldata->end) {
-	start = MIN(ac, seldata->start) - 1;
-	end = MAX(0, seldata->end - 1);
+if (first > last) {
+	start = MIN(ac, first) - 1;
+	end = MAX(0, last - 1);
 	step = -1;
 } else {
-	start = MAX(0, seldata->start - 1);
-	end = MIN(ac, seldata->end);
+	start = MAX(0, first - 1);
+	end = MIN(ac, last);
 	step = 1;
 }
 
@@ -2763,19 +2757,18 @@ ApplyModifier_Words(ApplyModifiersState 
  * We expect estr to contain a single integer for :[N], or two integers
  * separated by ".." for :[start..end].
  */
-VarSelectWords_t seldata = { 0, 0 };
-
 char *ep;
-seldata.start = strtol(estr, , 0);
+int first = strtol(estr, , 0);
+int last;
 if (ep == estr)		/* Found junk instead of a number */
 	goto bad_modifier;
 
 if (ep[0] == '\0') {	/* Found only one integer in :[N] */
-	seldata.end = seldata.start;
+	last = first;
 } else if (ep[0] == '.' && ep[1] == '.' && ep[2] != '\0') {
 	/* Expecting another integer after ".." */
 	ep += 2;
-	seldata.end = strtol(ep, , 0);
+	last = strtol(ep, , 0);
 	if (ep[0] != '\0')	/* Found junk after ".." */
 	goto bad_modifier;
 } else
@@ -2785,7 +2778,7 @@ ApplyModifier_Words(ApplyModifiersState 
  * Now seldata is properly filled in, but we still have to check for 0 as
  * a special case.
  */
-if (seldata.start == 0 && seldata.end == 0) {
+if (first == 0 && last == 0) {
 	/* ":[0]" or perhaps ":[0..0]" */
 	st->parsestate.oneBigWord = TRUE;
 	st->newStr = st->nstr;
@@ -2793,11 +2786,11 @@ ApplyModifier_Words(ApplyModifiersState 
 }
 
 /* ":[0..N]" or ":[N..0]" */
-if (seldata.start == 0 || seldata.end == 0)
+if (first == 0 || last == 0)
 	goto bad_modifier;
 
 /* Normal case: select the words described by seldata. */
-st->newStr = VarSelectWords(st->ctxt, >parsestate, st->nstr, );
+st->newStr = VarSelectWords(st->ctxt, >parsestate, st->nstr, first, last);
 
 ok:
 st->termc = *st->cp;



CVS commit: src/sys/rump/net/lib/libnetcan

2020-07-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jul 21 18:38:18 UTC 2020

Modified Files:
src/sys/rump/net/lib/libnetcan: netcan_component.c

Log Message:
Remove spurious call to canloopinit() in an attempt to fix kern/55489

This attempt at fixing is a result of IRC discussions with martin@ and
riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libnetcan/netcan_component.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/rump/net/lib/libnetcan/netcan_component.c
diff -u src/sys/rump/net/lib/libnetcan/netcan_component.c:1.2 src/sys/rump/net/lib/libnetcan/netcan_component.c:1.3
--- src/sys/rump/net/lib/libnetcan/netcan_component.c:1.2	Sat May 27 21:02:56 2017
+++ src/sys/rump/net/lib/libnetcan/netcan_component.c	Tue Jul 21 18:38:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: netcan_component.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $	*/
+/*	$NetBSD: netcan_component.c,v 1.3 2020/07/21 18:38:18 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netcan_component.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netcan_component.c,v 1.3 2020/07/21 18:38:18 pgoyette Exp $");
 
 #include 
 #include 
@@ -44,9 +44,3 @@ RUMP_COMPONENT(RUMP_COMPONENT_NET)
 	domain_attach();
 	rump_netisr_register(NETISR_CAN, canintr);
 }
-
-void  canloopinit(void);
-RUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
-{
-	canloopinit();
-}



CVS commit: src/share/mk

2020-07-21 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jul 21 14:42:44 UTC 2020

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

Log Message:
Switch x68k to HAVE_XORG_SERVER_VER=120.

Confirmed both color "Graph" VRAM and mono "Text" VRAM servers on XM6i.


To generate a diff of this commit:
cvs rdiff -u -r1.1201 -r1.1202 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.1201 src/share/mk/bsd.own.mk:1.1202
--- src/share/mk/bsd.own.mk:1.1201	Mon Jul 20 14:24:13 2020
+++ src/share/mk/bsd.own.mk	Tue Jul 21 14:42:44 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1201 2020/07/20 14:24:13 tsutsui Exp $
+#	$NetBSD: bsd.own.mk,v 1.1202 2020/07/21 14:42:44 tsutsui Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1520,8 +1520,7 @@ X11SRCDIR.${_proto}proto?=		${X11SRCDIRM
 ${MACHINE} == "mac68k"	|| \
 ${MACHINE} == "netwinder"	|| \
 ${MACHINE} == "sgimips"	|| \
-${MACHINE} == "vax"		|| \
-${MACHINE} == "x68k"
+${MACHINE} == "vax"
 HAVE_XORG_SERVER_VER?=110
 .else
 HAVE_XORG_SERVER_VER?=120



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSPosix

2020-07-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 21 14:11:39 UTC 2020

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c

Log Message:
mdnsd: starting and stopping are informational messages


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c

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

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.13
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12	Wed Apr 11 18:34:18 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Tue Jul 21 14:11:39 2020
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
 
 ParseCmdLinArgs(argc, argv);
 
-LogMsg("%s starting", mDNSResponderVersionString);
+LogInfo("%s starting", mDNSResponderVersionString);
 
 err = mDNS_Init(, , gRRCache, RR_CACHE_SIZE, mDNS_Init_AdvertiseLocalAddresses,
 mDNS_StatusCallback, mDNS_Init_NoInitCallbackContext);
@@ -200,7 +200,7 @@ int main(int argc, char **argv)
 if (mStatus_NoError == err)
 err = MainLoop();
 
-LogMsg("%s stopping", mDNSResponderVersionString);
+LogInfo("%s stopping", mDNSResponderVersionString);
 
 mDNS_Close();
 



CVS commit: src/external/apache2/mDNSResponder/dist

2020-07-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 21 14:04:07 UTC 2020

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: mDNSPosix.c
src/external/apache2/mDNSResponder/dist/mDNSShared: PlatformCommon.c

Log Message:
mdnsd: Treat EADDRNOTAVAIL as a transient error


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c

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

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.16 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.17
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.16	Mon Nov 19 08:14:28 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c	Tue Jul 21 14:04:07 2020
@@ -195,8 +195,9 @@ mDNSexport mStatus mDNSPlatformSendUDP(c
 {
 static int MessageCount = 0;
 // Don't report EHOSTDOWN (i.e. ARP failure), ENETDOWN, or no route to host for unicast destinations
-if (!mDNSAddressIsAllDNSLinkGroup(dst))
+if (!mDNSAddressIsAllDNSLinkGroup(dst)) {
 if (errno == EHOSTDOWN || errno == ENETDOWN || errno == EHOSTUNREACH || errno == ENETUNREACH) return(mStatus_TransientErr);
+	} else if (errno == EADDRNOTAVAIL) return(mStatus_TransientErr);
 
 if (MessageCount < 1000)
 {

Index: src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.5 src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.6
--- src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.5	Wed May  2 12:12:13 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c	Tue Jul 21 14:04:07 2020
@@ -70,7 +70,11 @@ mDNSexport void mDNSPlatformSourceAddrFo
 else return;
 
 if ((connect(sock, , inner_len)) < 0)
-{ LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno)); goto exit; }
+{
+if (errno != EADDRNOTAVAIL)
+	LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno));
+	goto exit;
+}
 
 if ((getsockname(sock, , )) < 0)
 { LogMsg("mDNSPlatformSourceAddrForDest: getsockname failed errno %d (%s)", errno, strerror(errno)); goto exit; }



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

2020-07-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jul 21 13:37:19 UTC 2020

Modified Files:
src/sys/arch/alpha/alpha: db_instruction.h

Log Message:
Sort op_mskqh, op_insqh, and op_extqh.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/alpha/db_instruction.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/db_instruction.h
diff -u src/sys/arch/alpha/alpha/db_instruction.h:1.9 src/sys/arch/alpha/alpha/db_instruction.h:1.10
--- src/sys/arch/alpha/alpha/db_instruction.h:1.9	Mon Feb  6 02:14:10 2012
+++ src/sys/arch/alpha/alpha/db_instruction.h	Tue Jul 21 13:37:18 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: db_instruction.h,v 1.9 2012/02/06 02:14:10 matt Exp $ */
+/* $NetBSD: db_instruction.h,v 1.10 2020/07/21 13:37:18 thorpej Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -357,9 +357,9 @@ typedef union {
 #define	op_msklh	0x62
 #define	op_inslh	0x67
 #define	op_extlh	0x6a
-#define	op_extqh	0x7a
-#define	op_insqh	0x77
 #define	op_mskqh	0x72
+#define	op_insqh	0x77
+#define	op_extqh	0x7a
 
 		/* MUL, "function" opcodes (bits 5..11)  */
 



CVS commit: src/external/bsd/wpa/dist/wpa_supplicant

2020-07-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 21 13:18:58 UTC 2020

Modified Files:
src/external/bsd/wpa/dist/wpa_supplicant: events.c wpa_supplicant.c
wpa_supplicant_i.h

Log Message:
wpa_supplicant: Matching unspecified interfaces should not log driver fails

If there is no matching interface given, but interface matching is enabled
then all interfaces on the system will try to be initialized.

Non wireless interfaces will fail and the loopback device will be one
of these, so just log a diagnostic rather than an error.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/wpa/dist/wpa_supplicant/events.c
cvs rdiff -u -r1.10 -r1.11 \
src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h

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

Modified files:

Index: src/external/bsd/wpa/dist/wpa_supplicant/events.c
diff -u src/external/bsd/wpa/dist/wpa_supplicant/events.c:1.7 src/external/bsd/wpa/dist/wpa_supplicant/events.c:1.8
--- src/external/bsd/wpa/dist/wpa_supplicant/events.c:1.7	Fri Jan  4 21:22:21 2019
+++ src/external/bsd/wpa/dist/wpa_supplicant/events.c	Tue Jul 21 13:18:58 2020
@@ -4825,8 +4825,6 @@ void wpa_supplicant_event_global(void *c
 			return;
 		wpa_s = wpa_supplicant_add_iface(ctx, wpa_i, NULL);
 		os_free(wpa_i);
-		if (wpa_s)
-			wpa_s->matched = 1;
 	}
 #endif /* CONFIG_MATCH_IFACE */
 

Index: src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c
diff -u src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c:1.10 src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c:1.11
--- src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c:1.10	Fri Jan  4 21:22:21 2019
+++ src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.c	Tue Jul 21 13:18:58 2020
@@ -5298,6 +5298,8 @@ next_driver:
 	wpa_s->drv_priv = wpa_drv_init(wpa_s, wpa_s->ifname);
 	if (wpa_s->drv_priv == NULL) {
 		const char *pos;
+		int level;
+
 		pos = driver ? os_strchr(driver, ',') : NULL;
 		if (pos) {
 			wpa_dbg(wpa_s, MSG_DEBUG, "Failed to initialize "
@@ -5305,7 +5307,14 @@ next_driver:
 			driver = pos + 1;
 			goto next_driver;
 		}
-		wpa_msg(wpa_s, MSG_ERROR, "Failed to initialize driver "
+
+#ifdef CONFIG_MATCH_IFACE
+		if (wpa_s->matched == WPA_IFACE_MATCHEDNULL)
+			level = MSG_DEBUG;
+		else
+#endif
+			level = MSG_ERROR;
+		wpa_msg(wpa_s, level, "Failed to initialize driver "
 			"interface");
 		return -1;
 	}
@@ -5451,6 +5460,9 @@ static int wpa_supplicant_init_iface(str
 		return -1;
 	}
 	os_strlcpy(wpa_s->ifname, iface->ifname, sizeof(wpa_s->ifname));
+#ifdef CONFIG_MATCH_IFACE
+	wpa_s->matched = iface->matched;
+#endif
 
 	if (iface->bridge_ifname) {
 		if (os_strlen(iface->bridge_ifname) >=
@@ -5829,6 +5841,10 @@ struct wpa_interface * wpa_supplicant_ma
 			if (!iface)
 return NULL;
 			*iface = *miface;
+			if (!miface->ifname)
+iface->matched = WPA_IFACE_MATCHEDNULL;
+			else
+iface->matched = WPA_IFACE_MATCHED;
 			iface->ifname = ifname;
 			return iface;
 		}
@@ -5863,8 +5879,6 @@ static int wpa_supplicant_match_existing
 		if (iface) {
 			wpa_s = wpa_supplicant_add_iface(global, iface, NULL);
 			os_free(iface);
-			if (wpa_s)
-wpa_s->matched = 1;
 		}
 	}
 

Index: src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h
diff -u src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h:1.4 src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h:1.5
--- src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h:1.4	Fri Jan  4 21:22:21 2019
+++ src/external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant_i.h	Tue Jul 21 13:18:58 2020
@@ -118,6 +118,17 @@ struct wpa_interface {
 	 * interface that is not a network interface.
 	 */
 	int p2p_mgmt;
+
+#ifdef CONFIG_MATCH_IFACE
+	/**
+	 * matched - Interface was matched rather than specified
+	 *
+	 */
+	int matched;
+#define WPA_IFACE_NOTMATCHED	0
+#define WPA_IFACE_MATCHEDNULL	1
+#define WPA_IFACE_MATCHED	2
+#endif /* CONFIG_MATCH_IFACE */
 };
 
 /**



CVS commit: src/external/bsd/wpa/dist/wpa_supplicant

2020-07-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 21 12:19:52 UTC 2020

Modified Files:
src/external/bsd/wpa/dist/wpa_supplicant: op_classes.c

Log Message:
wpa_supplicant: Don't report an error when there are no op classes to add

Instead, log a diagnostic so that noise to the user is reduced.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/wpa/dist/wpa_supplicant/op_classes.c

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

Modified files:

Index: src/external/bsd/wpa/dist/wpa_supplicant/op_classes.c
diff -u src/external/bsd/wpa/dist/wpa_supplicant/op_classes.c:1.1.1.1 src/external/bsd/wpa/dist/wpa_supplicant/op_classes.c:1.2
--- src/external/bsd/wpa/dist/wpa_supplicant/op_classes.c:1.1.1.1	Fri Jan  4 19:29:15 2019
+++ src/external/bsd/wpa/dist/wpa_supplicant/op_classes.c	Tue Jul 21 12:19:52 2020
@@ -309,9 +309,13 @@ size_t wpas_supp_op_class_ie(struct wpa_
 	}
 
 	*ie_len = wpabuf_len(buf) - 2;
-	if (*ie_len < 2 || wpabuf_len(buf) > len) {
+	if (*ie_len < 2) {
+		wpa_printf(MSG_DEBUG,
+			   "No supported operating classes IE to add");
+		res = 0;
+	} else if (wpabuf_len(buf) > len) {
 		wpa_printf(MSG_ERROR,
-			   "Failed to add supported operating classes IE");
+			   "Supported operating classes IE exceed length");
 		res = 0;
 	} else {
 		os_memcpy(pos, wpabuf_head(buf), wpabuf_len(buf));



CVS commit: src/external/bsd/wpa/dist/src/drivers

2020-07-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jul 21 10:34:16 UTC 2020

Modified Files:
src/external/bsd/wpa/dist/src/drivers: driver_bsd.c

Log Message:
wpa_supplicant: don't log SIOCG80211 errors during interface setup

Unless debugging.
wpa_supplicant will log it failed to initialized the driver for the
interface anyway so this just silences some noise for users.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c

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

Modified files:

Index: src/external/bsd/wpa/dist/src/drivers/driver_bsd.c
diff -u src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.36 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.37
--- src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.36	Wed Jan 29 12:05:08 2020
+++ src/external/bsd/wpa/dist/src/drivers/driver_bsd.c	Tue Jul 21 10:34:16 2020
@@ -137,7 +137,9 @@ bsd_get80211(void *priv, struct ieee8021
 	ireq->i_data = arg;
 
 	if (ioctl(drv->global->sock, SIOCG80211, ireq) < 0) {
-		wpa_printf(MSG_ERROR, "ioctl[SIOCG80211, op=%u, "
+		int level = drv->if_removed ? MSG_DEBUG : MSG_ERROR;
+
+		wpa_printf(level, "ioctl[SIOCG80211, op=%u, "
 			   "arg_len=%u]: %s", op, arg_len, strerror(errno));
 		return -1;
 	}
@@ -1467,6 +1469,9 @@ wpa_driver_bsd_init(void *ctx, const cha
 	drv->global = priv;
 	os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
 
+	/* Set the interface as removed until proven to work. */
+	drv->if_removed = 1;
+
 	if (!GETPARAM(drv, IEEE80211_IOC_ROAMING, drv->prev_roaming)) {
 		wpa_printf(MSG_DEBUG, "%s: failed to get roaming state: %s",
 			__func__, strerror(errno));
@@ -1490,6 +1495,9 @@ wpa_driver_bsd_init(void *ctx, const cha
 	if (bsd_get_iface_flags(drv) < 0)
 		goto fail;
 
+	/* Proven to work, lets go! */
+	drv->if_removed = 0;
+
 	drv->opmode = get80211opmode(drv);
 	dl_list_add(>global->ifaces, >list);
 



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

2020-07-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 21 06:39:31 UTC 2020

Modified Files:
src/sys/arch/amiga/amiga: locore.s

Log Message:
Align tmpstk to 4-byte boundary in the same manner as mac68k.

However, unfortunately, this does not fix strange crashes of GCC8-compiled
kernel, for which I cannot even enter DDB nor obtain crash dump.

We need further investigation...


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/amiga/amiga/locore.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/amiga/amiga/locore.s
diff -u src/sys/arch/amiga/amiga/locore.s:1.158 src/sys/arch/amiga/amiga/locore.s:1.159
--- src/sys/arch/amiga/amiga/locore.s:1.158	Fri Jun 19 07:43:37 2020
+++ src/sys/arch/amiga/amiga/locore.s	Tue Jul 21 06:39:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.158 2020/06/19 07:43:37 rin Exp $	*/
+/*	$NetBSD: locore.s,v 1.159 2020/07/21 06:39:31 rin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -1447,6 +1447,7 @@ ENTRY_NOPROFILE(fpeaemu60)
 
 	.data
 	.space	PAGE_SIZE
+	.align	4
 ASLOCAL(tmpstk)
 
 GLOBAL(mmutype)



CVS commit: src/sys/arch/mac68k/mac68k

2020-07-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jul 21 06:10:26 UTC 2020

Modified Files:
src/sys/arch/mac68k/mac68k: intr.c locore.s via.c

Log Message:
For GCC8, do not omit frame pointer for intr_dispatch() and via1_intr()
(-fomit-frame-pointer is enabled for -O and higher for GCC8).

This is required by rtclock_intr() which unwinds stack frame of caller!

XX
We need to get rid of this hackest hack for rtclock_intr(). This problem
was discussed back in 2014:

http://mail-index.netbsd.org/port-mac68k/2014/08/15/msg000595.html
http://mail-index.netbsd.org/port-mac68k/2014/08/17/msg000600.html
http://mail-index.netbsd.org/port-mac68k/2014/08/17/msg000601.html

However, unfortunately, the problem has been left untouched until today.

The patch attached in the third message works around the problem. But,
it adds hard-coded magic numbers to intr_dispatch() and via1_intr().
For real fix, we should probably reconsider whole interrupt handling.

Anyway, now kernel compiled by GCC8 works fine as far as I can see.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mac68k/mac68k/intr.c
cvs rdiff -u -r1.172 -r1.173 src/sys/arch/mac68k/mac68k/locore.s
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/mac68k/mac68k/via.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/mac68k/mac68k/intr.c
diff -u src/sys/arch/mac68k/mac68k/intr.c:1.30 src/sys/arch/mac68k/mac68k/intr.c:1.31
--- src/sys/arch/mac68k/mac68k/intr.c:1.30	Tue Feb 19 00:34:50 2019
+++ src/sys/arch/mac68k/mac68k/intr.c	Tue Jul 21 06:10:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.30 2019/02/19 00:34:50 mrg Exp $	*/
+/*	$NetBSD: intr.c,v 1.31 2020/07/21 06:10:26 rin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.30 2019/02/19 00:34:50 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.31 2020/07/21 06:10:26 rin Exp $");
 
 #include 
 #include 
@@ -206,6 +206,13 @@ intr_disestablish(int ipl)
  *
  * XXX Note: see the warning in intr_establish()
  */
+#if __GNUC_PREREQ__(8, 0)
+/*
+ * XXX rtclock_intr() requires this for unwinding stack frame.
+ */
+#pragma GCC push_options
+#pragma GCC optimize "-fno-omit-frame-pointer"
+#endif
 void
 intr_dispatch(int evec)		/* format | vector offset */
 {
@@ -225,6 +232,9 @@ intr_dispatch(int evec)		/* format | vec
 	(void)(*intr_func[ipl])(intr_arg[ipl]);
 	idepth--;
 }
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC pop_options
+#endif
 
 /*
  * Default interrupt handler:  do nothing.

Index: src/sys/arch/mac68k/mac68k/locore.s
diff -u src/sys/arch/mac68k/mac68k/locore.s:1.172 src/sys/arch/mac68k/mac68k/locore.s:1.173
--- src/sys/arch/mac68k/mac68k/locore.s:1.172	Tue Jul 21 05:45:38 2020
+++ src/sys/arch/mac68k/mac68k/locore.s	Tue Jul 21 06:10:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.172 2020/07/21 05:45:38 rin Exp $	*/
+/*	$NetBSD: locore.s,v 1.173 2020/07/21 06:10:26 rin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -794,6 +794,7 @@ ENTRY_NOPROFILE(rtclock_intr)
 	movw	_C_LABEL(ipl2psl_table)+IPL_CLOCK*2,%sr
 	| raise SPL to splclock()
 	movl	%a6@,%a1		| unwind to frame in intr_dispatch
+	| XXX FIXME
 	lea	%a1@(28),%a1		| push pointer to interrupt frame
 	movl	%a1,%sp@-			| 28 = 16 for regs in intrhand,
 	|+ 4 for args to intr_dispatch

Index: src/sys/arch/mac68k/mac68k/via.c
diff -u src/sys/arch/mac68k/mac68k/via.c:1.75 src/sys/arch/mac68k/mac68k/via.c:1.76
--- src/sys/arch/mac68k/mac68k/via.c:1.75	Sun Dec 11 12:18:03 2005
+++ src/sys/arch/mac68k/mac68k/via.c	Tue Jul 21 06:10:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: via.c,v 1.75 2005/12/11 12:18:03 christos Exp $	*/
+/*	$NetBSD: via.c,v 1.76 2020/07/21 06:10:26 rin Exp $	*/
 
 /*-
  * Copyright (C) 1993	Allen K. Briggs, Chris P. Caputo,
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: via.c,v 1.75 2005/12/11 12:18:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via.c,v 1.76 2020/07/21 06:10:26 rin Exp $");
 
 #include "opt_mac68k.h"
 
@@ -239,6 +239,13 @@ via_set_modem(int onoff)
 		via_reg(VIA1, vBufA) &= ~DA1O_vSync;
 }
 
+#if __GNUC_PREREQ__(8, 0)
+/*
+ * XXX rtclock_intr() requires this for unwinding stack frame.
+ */
+#pragma GCC push_options
+#pragma GCC optimize "-fno-omit-frame-pointer"
+#endif
 void
 via1_intr(void *intr_arg)
 {
@@ -269,6 +276,9 @@ via1_intr(void *intr_arg)
 		++bitnum;
 	} while (intbits >= mask);
 }
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC pop_options
+#endif
 
 void
 via2_intr(void *intr_arg)



CVS commit: src/sys/arch/mips

2020-07-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Jul 21 06:01:10 UTC 2020

Modified Files:
src/sys/arch/mips/cavium: octeon_cpunode.c
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
Support "boot -1" to start an MP kernel in uniprocessor mode.
Sort sys/* includes while here.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/cavium/octeon_cpunode.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mips/mips/cpu_subr.c

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

Modified files:

Index: src/sys/arch/mips/cavium/octeon_cpunode.c
diff -u src/sys/arch/mips/cavium/octeon_cpunode.c:1.15 src/sys/arch/mips/cavium/octeon_cpunode.c:1.16
--- src/sys/arch/mips/cavium/octeon_cpunode.c:1.15	Sun Jul 19 08:58:35 2020
+++ src/sys/arch/mips/cavium/octeon_cpunode.c	Tue Jul 21 06:01:10 2020
@@ -29,7 +29,7 @@
 #define __INTR_PRIVATE
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: octeon_cpunode.c,v 1.15 2020/07/19 08:58:35 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_cpunode.c,v 1.16 2020/07/21 06:01:10 simonb Exp $");
 
 #include "locators.h"
 #include "cpunode.h"
@@ -37,10 +37,11 @@ __KERNEL_RCSID(0, "$NetBSD: octeon_cpuno
 #include "opt_ddb.h"
 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 
 #include 
@@ -294,6 +295,12 @@ cpu_cpunode_attach(device_t parent, devi
 		return;
 	}
 #ifdef MULTIPROCESSOR
+	if ((boothowto & RB_MD1) != 0) {
+		aprint_naive("\n");
+		aprint_normal(": multiprocessor boot disabled\n");
+		return;
+	}
+
 	if (!kcpuset_isset(cpus_booted, cpunum)) {
 		aprint_naive(" disabled\n");
 		aprint_normal(" disabled (unresponsive)\n");

Index: src/sys/arch/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.55 src/sys/arch/mips/mips/cpu_subr.c:1.56
--- src/sys/arch/mips/mips/cpu_subr.c:1.55	Mon Jul 20 14:59:57 2020
+++ src/sys/arch/mips/mips/cpu_subr.c	Tue Jul 21 06:01:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.55 2020/07/20 14:59:57 jmcneill Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.56 2020/07/21 06:01:10 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.55 2020/07/20 14:59:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.56 2020/07/21 06:01:10 simonb Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -38,19 +38,20 @@ __KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v
 #include "opt_multiprocessor.h"
 
 #include 
-#include 
-#include 
 #include 
+#include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
-#include 
-#include 
-#include 
+#include 
 #include 
-#include 
-#include 
 
 #include 
 
@@ -973,6 +974,9 @@ cpu_boot_secondary_processors(void)
 	CPU_INFO_ITERATOR cii;
 	struct cpu_info *ci;
 
+	if ((boothowto & RB_MD1) != 0)
+		return;
+
 	for (CPU_INFO_FOREACH(cii, ci)) {
 		if (CPU_IS_PRIMARY(ci))
 			continue;