CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:49:22 UTC 2023

Modified Files:
src/etc/rc.d: ip6addrctl

Log Message:
Don't use obsolete test(1) -a option/operator - use sh && instead.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/ip6addrctl

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



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:49:22 UTC 2023

Modified Files:
src/etc/rc.d: ip6addrctl

Log Message:
Don't use obsolete test(1) -a option/operator - use sh && instead.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/rc.d/ip6addrctl

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

Modified files:

Index: src/etc/rc.d/ip6addrctl
diff -u src/etc/rc.d/ip6addrctl:1.7 src/etc/rc.d/ip6addrctl:1.8
--- src/etc/rc.d/ip6addrctl:1.7	Tue Sep  8 12:52:18 2020
+++ src/etc/rc.d/ip6addrctl	Mon Dec 25 07:49:22 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ip6addrctl,v 1.7 2020/09/08 12:52:18 martin Exp $
+# $NetBSD: ip6addrctl,v 1.8 2023/12/25 07:49:22 kre Exp $
 # FreeBSD: head/etc/rc.d/ip6addrctl 270836 2014-08-30 07:08:10Z hrs
 #
 
@@ -58,7 +58,7 @@ ip6addrctl_start()
 	# install the policy of the address selection algorithm.
 	case "${ip6addrctl_policy}" in
 	[Aa][Uu][Tt][Oo])
-		if [ -r "${config_file}" -a -s "${config_file}" ]; then
+		if [ -r "${config_file}" ] && [ -s "${config_file}" ]; then
 			${IP6ADDRCTL_CMD} flush >/dev/null 2>&1
 			${IP6ADDRCTL_CMD} install "${config_file}"
 		else



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:46:12 UTC 2023

Modified Files:
src/etc/rc.d: certctl_init

Log Message:
Whitespace:  8 spaces -> tab


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/certctl_init

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

Modified files:

Index: src/etc/rc.d/certctl_init
diff -u src/etc/rc.d/certctl_init:1.2 src/etc/rc.d/certctl_init:1.3
--- src/etc/rc.d/certctl_init:1.2	Mon Dec 25 07:43:03 2023
+++ src/etc/rc.d/certctl_init	Mon Dec 25 07:46:12 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: certctl_init,v 1.2 2023/12/25 07:43:03 kre Exp $
+# $NetBSD: certctl_init,v 1.3 2023/12/25 07:46:12 kre Exp $
 #
 # PROVIDE: certctl_init
 # REQUIRE: mountcritremote
@@ -39,7 +39,7 @@ certctl_init()
 	{ [ -e "$certsdir" ] && ! [ -d "$certsdir" ] ; } ||
 	( [ -d "$certsdir" ] &&
 		find -f "$certsdir" -- -maxdepth 0 -type d -empty -exit 1 )
-then
+	then
 		return
 	fi
 



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:46:12 UTC 2023

Modified Files:
src/etc/rc.d: certctl_init

Log Message:
Whitespace:  8 spaces -> tab


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/certctl_init

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



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:43:03 UTC 2023

Modified Files:
src/etc/rc.d: certctl_init

Log Message:
No longer use obsolete test(1) -a option/operator, use sh && instead.

While here a couple of minor formatting improvements - in general it
is always a good idea to surround sh operator chars (like '>' '(' ...)
with white space, to guard against thet possibility that some other (or
later enhanced) sh might have additional operators which happen to be
the character string used.

I don't understand while the final part of the condition for not doing
anything needs to run in a subshell, but that can stay for now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/certctl_init

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

Modified files:

Index: src/etc/rc.d/certctl_init
diff -u src/etc/rc.d/certctl_init:1.1 src/etc/rc.d/certctl_init:1.2
--- src/etc/rc.d/certctl_init:1.1	Wed Sep 27 00:24:13 2023
+++ src/etc/rc.d/certctl_init	Mon Dec 25 07:43:03 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: certctl_init,v 1.1 2023/09/27 00:24:13 riastradh Exp $
+# $NetBSD: certctl_init,v 1.2 2023/12/25 07:43:03 kre Exp $
 #
 # PROVIDE: certctl_init
 # REQUIRE: mountcritremote
@@ -36,10 +36,9 @@ certctl_init()
 	# directory, or is a directory but is nonempty, then we're not
 	# in the first boot's initial configuration.  So do nothing.
 	if [ -h "$certsdir" ] ||
-	[ -e "$certsdir" -a ! -d "$certsdir" ] ||
-	([ -d "$certsdir" ] &&
-		find -f "$certsdir" -- \
-		-maxdepth 0 -type d -empty -exit 1)
+	{ [ -e "$certsdir" ] && ! [ -d "$certsdir" ] ; } ||
+	( [ -d "$certsdir" ] &&
+		find -f "$certsdir" -- -maxdepth 0 -type d -empty -exit 1 )
 then
 		return
 	fi



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:43:03 UTC 2023

Modified Files:
src/etc/rc.d: certctl_init

Log Message:
No longer use obsolete test(1) -a option/operator, use sh && instead.

While here a couple of minor formatting improvements - in general it
is always a good idea to surround sh operator chars (like '>' '(' ...)
with white space, to guard against thet possibility that some other (or
later enhanced) sh might have additional operators which happen to be
the character string used.

I don't understand while the final part of the condition for not doing
anything needs to run in a subshell, but that can stay for now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/certctl_init

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



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:39:59 UTC 2023

Modified Files:
src/etc/rc.d: securelevel

Log Message:
No longer use obsolete test "-a" option - use sh && instead.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/etc/rc.d/securelevel

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

Modified files:

Index: src/etc/rc.d/securelevel
diff -u src/etc/rc.d/securelevel:1.8 src/etc/rc.d/securelevel:1.9
--- src/etc/rc.d/securelevel:1.8	Tue Dec 29 17:06:10 2009
+++ src/etc/rc.d/securelevel	Mon Dec 25 07:39:59 2023
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: securelevel,v 1.8 2009/12/29 17:06:10 elad Exp $
+# $NetBSD: securelevel,v 1.9 2023/12/25 07:39:59 kre Exp $
 #
 
 # PROVIDE: securelevel
@@ -25,7 +25,7 @@ securelevel_start()
 		exit 1
 	fi
 
-	if [ -n "$securelevel" -a "$securelevel" != "$osecurelevel" ]; then
+	if [ -n "$securelevel" ] && [ "$securelevel" != "$osecurelevel" ]; then
 		if [ "$securelevel" -lt "$osecurelevel" ]; then
 			echo "Can't lower securelevel."
 			exit 1



CVS commit: src/etc/rc.d

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 07:39:59 UTC 2023

Modified Files:
src/etc/rc.d: securelevel

Log Message:
No longer use obsolete test "-a" option - use sh && instead.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/etc/rc.d/securelevel

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



CVS commit: src/bin/sh

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 04:52:38 UTC 2023

Modified Files:
src/bin/sh: eval.c

Log Message:
PR bin/57773

Fix a bug reported by Jarle Fredrik Greipsland in PR bin/57773,
where a substring expansion where the substring to be removed from
a variable expansion is itself a var expansion where the value
contains one (or more) of sh's CTLxxx chars - the pattern had
CTLESC inserted, the string to be matched against did not.  Fail.
We fix that by always inserting CTLESC in var assign expansions.
See the PR for all the gory details.

Thanks for the PR.

XXX pullup to everything.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/bin/sh/eval.c

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



CVS commit: src/bin/sh

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 04:52:38 UTC 2023

Modified Files:
src/bin/sh: eval.c

Log Message:
PR bin/57773

Fix a bug reported by Jarle Fredrik Greipsland in PR bin/57773,
where a substring expansion where the substring to be removed from
a variable expansion is itself a var expansion where the value
contains one (or more) of sh's CTLxxx chars - the pattern had
CTLESC inserted, the string to be matched against did not.  Fail.
We fix that by always inserting CTLESC in var assign expansions.
See the PR for all the gory details.

Thanks for the PR.

XXX pullup to everything.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/bin/sh/eval.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.190 src/bin/sh/eval.c:1.191
--- src/bin/sh/eval.c:1.190	Sat Jun 24 05:17:02 2023
+++ src/bin/sh/eval.c	Mon Dec 25 04:52:38 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.190 2023/06/24 05:17:02 msaitoh Exp $	*/
+/*	$NetBSD: eval.c,v 1.191 2023/12/25 04:52:38 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.190 2023/06/24 05:17:02 msaitoh Exp $");
+__RCSID("$NetBSD: eval.c,v 1.191 2023/12/25 04:52:38 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -932,7 +932,8 @@ evalcommand(union node *cmd, int flgs, s
 		line_number = argp->narg.lineno;
 		if (!isassignment(argp->narg.text))
 			break;
-		expandarg(argp, , EXP_VARTILDE);
+		/* EXP_CASE handles CTL* chars in expansions properly */
+		expandarg(argp, , EXP_VARTILDE | EXP_CASE);
 	}
 	*varlist.lastp = NULL;
 



CVS commit: src/bin/sh

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 02:28:47 UTC 2023

Modified Files:
src/bin/sh: expand.c

Log Message:
Correct a bizarre piece of source formatting that crept in by
accident several years ago (change a space into newline tab).

NFC


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/bin/sh/expand.c

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

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.142 src/bin/sh/expand.c:1.143
--- src/bin/sh/expand.c:1.142	Mon Mar  6 05:54:34 2023
+++ src/bin/sh/expand.c	Mon Dec 25 02:28:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.142 2023/03/06 05:54:34 kre Exp $	*/
+/*	$NetBSD: expand.c,v 1.143 2023/12/25 02:28:47 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c	8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.142 2023/03/06 05:54:34 kre Exp $");
+__RCSID("$NetBSD: expand.c,v 1.143 2023/12/25 02:28:47 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -465,7 +465,8 @@ exptilde(const char *p, int flag)
 	if (home == NULL) {
 		CTRACE(DBG_EXPAND, (": returning unused \"%s\"\n", startp));
 		return startp;
-	} while ((c = *home++) != '\0') {
+	}
+	while ((c = *home++) != '\0') {
 		if ((quotes && NEEDESC(c)) || ISCTL(c))
 			STPUTC(CTLESC, expdest);
 		STPUTC(c, expdest);



CVS commit: src/bin/sh

2023-12-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec 25 02:28:47 UTC 2023

Modified Files:
src/bin/sh: expand.c

Log Message:
Correct a bizarre piece of source formatting that crept in by
accident several years ago (change a space into newline tab).

NFC


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/bin/sh/expand.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

2023-12-24 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Dec 24 16:48:30 UTC 2023

Modified Files:
src/usr.bin/make: compat.c make.1
src/usr.bin/make/unit-tests: shell-sh.mk

Log Message:
Compat_RunCommand call Shell_Init is shellPath is NULL

Since .SHELL is potentially used in compat mode as well,
the man page description should not imply it is only used in jobs mode.

Remove path="sh" from shell-sh unit-test - and it would have detected
this bug.

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/usr.bin/make/compat.c
cvs rdiff -u -r1.371 -r1.372 src/usr.bin/make/make.1
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/shell-sh.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/compat.c
diff -u src/usr.bin/make/compat.c:1.248 src/usr.bin/make/compat.c:1.249
--- src/usr.bin/make/compat.c:1.248	Tue Dec 19 19:33:39 2023
+++ src/usr.bin/make/compat.c	Sun Dec 24 16:48:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.248 2023/12/19 19:33:39 rillig Exp $	*/
+/*	$NetBSD: compat.c,v 1.249 2023/12/24 16:48:30 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -91,7 +91,7 @@
 #include "pathnames.h"
 
 /*	"@(#)compat.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: compat.c,v 1.248 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.249 2023/12/24 16:48:30 sjg Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -275,11 +275,9 @@ Compat_RunCommand(const char *cmdp, GNod
 			silent = !DEBUG(LOUD);
 		else if (*cmd == '-')
 			errCheck = false;
-		else if (*cmd == '+') {
+		else if (*cmd == '+')
 			doIt = true;
-			if (shellName == NULL)	/* we came here from jobs */
-Shell_Init();
-		} else if (!ch_isspace(*cmd))
+		else if (!ch_isspace(*cmd))
 			/* Ignore whitespace for compatibility with gnu make */
 			break;
 		cmd++;
@@ -302,6 +300,9 @@ Compat_RunCommand(const char *cmdp, GNod
 
 	DEBUG1(JOB, "Execute: '%s'\n", cmd);
 
+	if (useShell && shellPath == NULL)
+		Shell_Init();		/* we need shellPath */
+
 	if (useShell) {
 		static const char *shargv[5];
 

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.371 src/usr.bin/make/make.1:1.372
--- src/usr.bin/make/make.1:1.371	Sun Sep 10 21:52:36 2023
+++ src/usr.bin/make/make.1	Sun Dec 24 16:48:30 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.371 2023/09/10 21:52:36 rillig Exp $
+.\"	$NetBSD: make.1,v 1.372 2023/12/24 16:48:30 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd September 9, 2023
+.Dd December 24, 2023
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -2522,7 +2522,7 @@ set the read-only attribute on the globa
 .It Ic .SHELL
 Sets the shell that
 .Nm
-uses to execute commands in jobs mode.
+uses to execute commands.
 The sources are a set of
 .Ar field\| Ns Cm \&= Ns Ar value
 pairs.

Index: src/usr.bin/make/unit-tests/shell-sh.mk
diff -u src/usr.bin/make/unit-tests/shell-sh.mk:1.1 src/usr.bin/make/unit-tests/shell-sh.mk:1.2
--- src/usr.bin/make/unit-tests/shell-sh.mk:1.1	Sat Oct  3 14:39:36 2020
+++ src/usr.bin/make/unit-tests/shell-sh.mk	Sun Dec 24 16:48:30 2023
@@ -1,9 +1,9 @@
-# $NetBSD: shell-sh.mk,v 1.1 2020/10/03 14:39:36 rillig Exp $
+# $NetBSD: shell-sh.mk,v 1.2 2023/12/24 16:48:30 sjg Exp $
 #
 # Tests for using a bourne shell for running the commands.
 # This is the default shell, so there's nothing surprising.
 
-.SHELL: name="sh" path="sh"
+.SHELL: name="sh"
 
 all:
 	: normal



CVS commit: src/usr.bin/make

2023-12-24 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Dec 24 16:48:30 UTC 2023

Modified Files:
src/usr.bin/make: compat.c make.1
src/usr.bin/make/unit-tests: shell-sh.mk

Log Message:
Compat_RunCommand call Shell_Init is shellPath is NULL

Since .SHELL is potentially used in compat mode as well,
the man page description should not imply it is only used in jobs mode.

Remove path="sh" from shell-sh unit-test - and it would have detected
this bug.

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/usr.bin/make/compat.c
cvs rdiff -u -r1.371 -r1.372 src/usr.bin/make/make.1
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/shell-sh.mk

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



CVS commit: src/sys

2023-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Dec 24 16:12:55 UTC 2023

Modified Files:
src/sys/arch/arm/rockchip: rk_eqos.c
src/sys/dev/acpi: eqos_acpi.c
src/sys/dev/ic: dwc_eqos.c

Log Message:
eqos(4): MP improvements

Remove the non-MP-safe scaffolding and pass MP safe flags for callout
and interrupt handlers.

Where we had #ifndef EQOS_MPSAFE splnet(), we also had EQOS_LOCK,
which implies splnet, so just remove the conditional splnet.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/rockchip/rk_eqos.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/eqos_acpi.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ic/dwc_eqos.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/rockchip/rk_eqos.c
diff -u src/sys/arch/arm/rockchip/rk_eqos.c:1.1 src/sys/arch/arm/rockchip/rk_eqos.c:1.2
--- src/sys/arch/arm/rockchip/rk_eqos.c:1.1	Tue Aug 23 05:40:46 2022
+++ src/sys/arch/arm/rockchip/rk_eqos.c	Sun Dec 24 16:12:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rk_eqos.c,v 1.1 2022/08/23 05:40:46 ryo Exp $	*/
+/*	$NetBSD: rk_eqos.c,v 1.2 2023/12/24 16:12:54 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2022 Ryo Shimizu 
@@ -25,10 +25,9 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-#include "opt_net_mpsafe.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rk_eqos.c,v 1.1 2022/08/23 05:40:46 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_eqos.c,v 1.2 2023/12/24 16:12:54 skrll Exp $");
 
 #include 
 #include 
@@ -392,12 +391,7 @@ rk_eqos_attach(device_t parent, device_t
 	if (eqos_attach(sc) != 0)
 		return;
 
-#ifdef NET_MPSAFE
-#define FDT_INTR_FLAGS	FDT_INTR_MPSAFE
-#else
-#define FDT_INTR_FLAGS	0
-#endif
-	if (fdtbus_intr_establish_xname(phandle, 0, IPL_NET, FDT_INTR_FLAGS,
+	if (fdtbus_intr_establish_xname(phandle, 0, IPL_NET, FDT_INTR_MPSAFE,
 	eqos_intr, sc, device_xname(self)) == NULL) {
 		aprint_error_dev(self, "failed to establish interrupt on %s\n",
 		intrstr);

Index: src/sys/dev/acpi/eqos_acpi.c
diff -u src/sys/dev/acpi/eqos_acpi.c:1.1 src/sys/dev/acpi/eqos_acpi.c:1.2
--- src/sys/dev/acpi/eqos_acpi.c:1.1	Mon Jan  3 17:19:41 2022
+++ src/sys/dev/acpi/eqos_acpi.c	Sun Dec 24 16:12:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: eqos_acpi.c,v 1.1 2022/01/03 17:19:41 jmcneill Exp $ */
+/* $NetBSD: eqos_acpi.c,v 1.2 2023/12/24 16:12:54 skrll Exp $ */
 
 /*-
  * Copyright (c) 2022 Jared McNeill 
@@ -26,10 +26,8 @@
  * SUCH DAMAGE.
  */
 
-#include "opt_net_mpsafe.h"
-
 #include 
-__KERNEL_RCSID(0, "$NetBSD: eqos_acpi.c,v 1.1 2022/01/03 17:19:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eqos_acpi.c,v 1.2 2023/12/24 16:12:54 skrll Exp $");
 
 #include 
 #include 
@@ -52,12 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: eqos_acpi.c,
 #include 
 #include 
 
-#ifdef NET_MPSAFE
-#define	EQOS_INTR_MPSAFE	true
-#else
-#define	EQOS_INTR_MPSAFE	false
-#endif
-
 #define	CSR_RATE_RGMII		12500
 
 static const struct device_compatible_entry compat_data[] = {
@@ -132,7 +124,7 @@ eqos_acpi_attach(device_t parent, device
 		goto done;
 
 ih = acpi_intr_establish(self, (uint64_t)(uintptr_t)handle, IPL_NET,
-	EQOS_INTR_MPSAFE, eqos_intr, sc, device_xname(self));
+	true, eqos_intr, sc, device_xname(self));
 	if (ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt\n");
 		goto done;

Index: src/sys/dev/ic/dwc_eqos.c
diff -u src/sys/dev/ic/dwc_eqos.c:1.34 src/sys/dev/ic/dwc_eqos.c:1.35
--- src/sys/dev/ic/dwc_eqos.c:1.34	Mon Nov 13 15:07:19 2023
+++ src/sys/dev/ic/dwc_eqos.c	Sun Dec 24 16:12:55 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_eqos.c,v 1.34 2023/11/13 15:07:19 msaitoh Exp $ */
+/* $NetBSD: dwc_eqos.c,v 1.35 2023/12/24 16:12:55 skrll Exp $ */
 
 /*-
  * Copyright (c) 2022 Jared McNeill 
@@ -35,10 +35,8 @@
  *	Add detach function.
  */
 
-#include "opt_net_mpsafe.h"
-
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.34 2023/11/13 15:07:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.35 2023/12/24 16:12:55 skrll Exp $");
 
 #include 
 #include 
@@ -84,12 +82,7 @@ unsigned int eqos_debug;	/* Default valu
 #define	DPRINTF(FLAG, FORMAT, ...)	((void)0)
 #endif
 
-#ifdef NET_MPSAFE
-#define	EQOS_MPSAFE		1
 #define	CALLOUT_FLAGS		CALLOUT_MPSAFE
-#else
-#define	CALLOUT_FLAGS		0
-#endif
 
 #define	DESC_BOUNDARY		((sizeof(bus_size_t) > 4) ? (1ULL << 32) : 0)
 #define	DESC_ALIGN		sizeof(struct eqos_dma_desc)
@@ -462,19 +455,12 @@ eqos_tick(void *softc)
 {
 	struct eqos_softc * const sc = softc;
 	struct mii_data * const mii = >sc_mii;
-#ifndef EQOS_MPSAFE
-	int s = splnet();
-#endif
 
 	EQOS_LOCK(sc);
 	mii_tick(mii);
 	if (sc->sc_running)
 		callout_schedule(>sc_stat_ch, hz);
 	EQOS_UNLOCK(sc);
-
-#ifndef EQOS_MPSAFE
-	splx(s);
-#endif
 }
 
 static uint32_t
@@ -493,7 +479,7 @@ static void
 eqos_setup_rxfilter(struct eqos_softc *sc)
 {
 	struct ethercom *ec = >sc_ec;
-	struct ifnet *ifp = 

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

2023-12-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Dec 24 11:42:35 UTC 2023

Modified Files:
src/sys/arch/evbarm/armadillo: armadillo9_machdep.c

Log Message:
Use %ld format specifier for physmem to fix VERBOSE_INIT_ARM build option.

Use epcom_kgdb_attach() instead of com_kgdb_attach() to fix KGDB build option.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/evbarm/armadillo/armadillo9_machdep.c

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



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

2023-12-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Dec 24 11:42:35 UTC 2023

Modified Files:
src/sys/arch/evbarm/armadillo: armadillo9_machdep.c

Log Message:
Use %ld format specifier for physmem to fix VERBOSE_INIT_ARM build option.

Use epcom_kgdb_attach() instead of com_kgdb_attach() to fix KGDB build option.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/evbarm/armadillo/armadillo9_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/armadillo/armadillo9_machdep.c
diff -u src/sys/arch/evbarm/armadillo/armadillo9_machdep.c:1.38 src/sys/arch/evbarm/armadillo/armadillo9_machdep.c:1.39
--- src/sys/arch/evbarm/armadillo/armadillo9_machdep.c:1.38	Sun Jul  3 19:58:42 2022
+++ src/sys/arch/evbarm/armadillo/armadillo9_machdep.c	Sun Dec 24 11:42:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: armadillo9_machdep.c,v 1.38 2022/07/03 19:58:42 andvar Exp $	*/
+/*	$NetBSD: armadillo9_machdep.c,v 1.39 2023/12/24 11:42:35 andvar Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -110,7 +110,7 @@
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.38 2022/07/03 19:58:42 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.39 2023/12/24 11:42:35 andvar Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_console.h"
@@ -544,7 +544,7 @@ initarm(void *arg)
 
 #ifdef VERBOSE_INIT_ARM
 	/* Tell the user about the memory */
-	printf("physmemory: %d pages at 0x%08lx -> 0x%08lx\n", physmem,
+	printf("physmemory: %ld pages at 0x%08lx -> 0x%08lx\n", physmem,
 	physical_start, physical_end - 1);
 #endif
 
@@ -903,7 +903,7 @@ consinit(void)
 #if KGDB
 #if NEPCOM > 0
 	if (strcmp(kgdb_devname, "epcom") == 0) {
-		com_kgdb_attach(_bs_tag, kgdb_devaddr, kgdb_devrate,
+		epcom_kgdb_attach(_bs_tag, kgdb_devaddr, kgdb_devrate,
 			kgdb_devmode);
 	}
 #endif	/* NEPCOM > 0 */