CVS commit: src

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 23:21:34 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_193.c msg_193.exp msg_249.c
msg_249.exp
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: warn about unreachable null statements

This warning flags the second semicolon of 'return;;' as being
unreachable.  It does not warn about these superfluous semicolons in
general though.

Seen in usr.bin/make/bmake_malloc.c.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/xlint/lint1/msg_193.c
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/msg_193.exp
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_249.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_249.exp
cvs rdiff -u -r1.378 -r1.379 src/usr.bin/xlint/lint1/cgram.y

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_193.c
diff -u src/tests/usr.bin/xlint/lint1/msg_193.c:1.15 src/tests/usr.bin/xlint/lint1/msg_193.c:1.16
--- src/tests/usr.bin/xlint/lint1/msg_193.c:1.15	Sat Jan 15 22:12:35 2022
+++ src/tests/usr.bin/xlint/lint1/msg_193.c	Sat Jan 15 23:21:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_193.c,v 1.15 2022/01/15 22:12:35 rillig Exp $	*/
+/*	$NetBSD: msg_193.c,v 1.16 2022/01/15 23:21:34 rillig Exp $	*/
 # 3 "msg_193.c"
 
 // Test for message: statement not reached [193]
@@ -658,12 +658,27 @@ lint_annotation_NOTREACHED(void)
 }
 
 /*
- * Since at least 2002, lint does not detect a double semicolon.  See
- * cgram.y, expression_statement, T_SEMI.
+ * Since at least 2002 and before cgram.y 1.379 from 2022-01-16, lint did not
+ * detect a double semicolon.  See cgram.y, expression_statement, T_SEMI.
  */
 int
-test_empty_statement(int x)
+test_null_statement(void)
 {
-	/* TODO: expect+1: warning: statement not reachable [193] */
-	return x > 0 ? x : -x;;
+	/*
+	 * The following 2 semicolons are superfluous but lint doesn't warn
+	 * about them.  Probably it should.  A null statement as part of a
+	 * block-list has no use.
+	 */
+	;;
+
+	/*
+	 * A stand-alone null statement, on the other hand, has its purpose.
+	 * Without it, the 'for' loop would not be complete.  The NetBSD
+	 * style is to use 'continue;' instead of a simple ';'.
+	 */
+	for (int i = 0; i < 10; i++)
+		;
+
+	/* expect+1: warning: statement not reached [193] */
+	return 0;;
 }

Index: src/tests/usr.bin/xlint/lint1/msg_193.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_193.exp:1.14 src/tests/usr.bin/xlint/lint1/msg_193.exp:1.15
--- src/tests/usr.bin/xlint/lint1/msg_193.exp:1.14	Sun Aug 15 21:51:56 2021
+++ src/tests/usr.bin/xlint/lint1/msg_193.exp	Sat Jan 15 23:21:34 2022
@@ -87,3 +87,4 @@ msg_193.c(597): warning: statement not r
 msg_193.c(606): warning: statement not reached [193]
 msg_193.c(627): warning: statement not reached [193]
 msg_193.c(655): warning: statement not reached [193]
+msg_193.c(683): warning: statement not reached [193]

Index: src/tests/usr.bin/xlint/lint1/msg_249.c
diff -u src/tests/usr.bin/xlint/lint1/msg_249.c:1.8 src/tests/usr.bin/xlint/lint1/msg_249.c:1.9
--- src/tests/usr.bin/xlint/lint1/msg_249.c:1.8	Sat Jul 10 17:35:54 2021
+++ src/tests/usr.bin/xlint/lint1/msg_249.c	Sat Jan 15 23:21:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_249.c,v 1.8 2021/07/10 17:35:54 rillig Exp $	*/
+/*	$NetBSD: msg_249.c,v 1.9 2022/01/15 23:21:34 rillig Exp $	*/
 # 3 "msg_249.c"
 
 // Test for message: syntax error '%s' [249]
@@ -28,6 +28,7 @@ int recover_from_rbrace;
 void
 function(void)
 {
+	/* expect+2: warning: statement not reached [193] */
 	if (0)
 		;
 	);			/* expect: syntax error ')' */

Index: src/tests/usr.bin/xlint/lint1/msg_249.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_249.exp:1.6 src/tests/usr.bin/xlint/lint1/msg_249.exp:1.7
--- src/tests/usr.bin/xlint/lint1/msg_249.exp:1.6	Sat Jul 10 11:22:19 2021
+++ src/tests/usr.bin/xlint/lint1/msg_249.exp	Sat Jan 15 23:21:34 2022
@@ -1,4 +1,5 @@
 msg_249.c(10): error: syntax error '"' [249]
 msg_249.c(19): error: syntax error '"' [249]
-msg_249.c(33): error: syntax error ')' [249]
-msg_249.c(58): error: syntax error 'member without type' [249]
+msg_249.c(33): warning: statement not reached [193]
+msg_249.c(34): error: syntax error ')' [249]
+msg_249.c(59): error: syntax error 'member without type' [249]

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.378 src/usr.bin/xlint/lint1/cgram.y:1.379
--- src/usr.bin/xlint/lint1/cgram.y:1.378	Sun Dec 26 18:16:41 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Jan 15 23:21:34 2022
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.378 2021/12/26 18:16:41 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.379 2022/01/15 23:21:34 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.378 

CVS commit: src

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 23:21:34 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_193.c msg_193.exp msg_249.c
msg_249.exp
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: warn about unreachable null statements

This warning flags the second semicolon of 'return;;' as being
unreachable.  It does not warn about these superfluous semicolons in
general though.

Seen in usr.bin/make/bmake_malloc.c.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/xlint/lint1/msg_193.c
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/msg_193.exp
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_249.c
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_249.exp
cvs rdiff -u -r1.378 -r1.379 src/usr.bin/xlint/lint1/cgram.y

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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 22:18:04 UTC 2022

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

Log Message:
make: remove extra semicolon after statement

Lint will complain about this very soon.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.572 -r1.573 src/usr.bin/make/main.c

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

Modified files:

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.572 src/usr.bin/make/main.c:1.573
--- src/usr.bin/make/main.c:1.572	Sat Jan 15 19:34:07 2022
+++ src/usr.bin/make/main.c	Sat Jan 15 22:18:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.572 2022/01/15 19:34:07 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.573 2022/01/15 22:18:04 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.572 2022/01/15 19:34:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.573 2022/01/15 22:18:04 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -1715,7 +1715,7 @@ Cmd_Exec(const char *cmd, char **error)
 	if (pipe(pipefds) == -1) {
 		*error = str_concat3(
 		"Couldn't create pipe for \"", cmd, "\"");
-		return bmake_strdup("");;
+		return bmake_strdup("");
 	}
 
 	Var_ReexportVars();



CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 22:18:04 UTC 2022

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

Log Message:
make: remove extra semicolon after statement

Lint will complain about this very soon.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.572 -r1.573 src/usr.bin/make/main.c

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/xlint/lint1

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 22:12:35 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_193.c

Log Message:
tests/lint: demonstrate undetected double semicolon

In a statement-list like 'return 0;;', the second semicolon is a
separate, unreachable statement.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/msg_193.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_193.c
diff -u src/tests/usr.bin/xlint/lint1/msg_193.c:1.14 src/tests/usr.bin/xlint/lint1/msg_193.c:1.15
--- src/tests/usr.bin/xlint/lint1/msg_193.c:1.14	Sun Aug 15 21:51:56 2021
+++ src/tests/usr.bin/xlint/lint1/msg_193.c	Sat Jan 15 22:12:35 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_193.c,v 1.14 2021/08/15 21:51:56 rillig Exp $	*/
+/*	$NetBSD: msg_193.c,v 1.15 2022/01/15 22:12:35 rillig Exp $	*/
 # 3 "msg_193.c"
 
 // Test for message: statement not reached [193]
@@ -656,3 +656,14 @@ lint_annotation_NOTREACHED(void)
 		/* NOTREACHED */
 		suppressed();
 }
+
+/*
+ * Since at least 2002, lint does not detect a double semicolon.  See
+ * cgram.y, expression_statement, T_SEMI.
+ */
+int
+test_empty_statement(int x)
+{
+	/* TODO: expect+1: warning: statement not reachable [193] */
+	return x > 0 ? x : -x;;
+}



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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 22:12:35 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_193.c

Log Message:
tests/lint: demonstrate undetected double semicolon

In a statement-list like 'return 0;;', the second semicolon is a
separate, unreachable statement.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/msg_193.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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 20:16:55 UTC 2022

Modified Files:
src/usr.bin/make/unit-tests: varmod-ifelse.mk

Log Message:
tests/make: fix comment in test


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-ifelse.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/varmod-ifelse.mk
diff -u src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.17 src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.18
--- src/usr.bin/make/unit-tests/varmod-ifelse.mk:1.17	Fri Jun 11 13:01:28 2021
+++ src/usr.bin/make/unit-tests/varmod-ifelse.mk	Sat Jan 15 20:16:55 2022
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-ifelse.mk,v 1.17 2021/06/11 13:01:28 rillig Exp $
+# $NetBSD: varmod-ifelse.mk,v 1.18 2022/01/15 20:16:55 rillig Exp $
 #
 # Tests for the ${cond:?then:else} variable modifier, which evaluates either
 # the then-expression or the else-expression, depending on the condition.
@@ -11,9 +11,9 @@
 # TODO: Implementation
 
 # The variable name of the expression is expanded and then taken as the
-# condition.  In this case it becomes:
+# condition.  In the below example it becomes:
 #
-#	variable expression == "variable expression"
+#	variable expression == "literal"
 #
 # This confuses the parser, which expects an operator instead of the bare
 # word "expression".  If the name were expanded lazily, everything would be



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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 20:16:55 UTC 2022

Modified Files:
src/usr.bin/make/unit-tests: varmod-ifelse.mk

Log Message:
tests/make: fix comment in test


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-ifelse.mk

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



CVS commit: src/doc/roadmaps

2022-01-15 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sat Jan 15 19:38:05 UTC 2022

Modified Files:
src/doc/roadmaps: desktop

Log Message:
desktop: update some details

The default WM was changed to ctwm by nia@ some time ago, remove that
item. While here, update the list of DEs that are available for NetBSD
via pkgsrc.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/doc/roadmaps/desktop

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

Modified files:

Index: src/doc/roadmaps/desktop
diff -u src/doc/roadmaps/desktop:1.5 src/doc/roadmaps/desktop:1.6
--- src/doc/roadmaps/desktop:1.5	Fri Jul 20 01:40:30 2018
+++ src/doc/roadmaps/desktop	Sat Jan 15 19:38:05 2022
@@ -1,4 +1,4 @@
-$NetBSD: desktop,v 1.5 2018/07/20 01:40:30 maya Exp $
+$NetBSD: desktop,v 1.6 2022/01/15 19:38:05 gutteridge Exp $
 
 NetBSD Desktop Roadmap
 ==
@@ -6,8 +6,9 @@ NetBSD Desktop Roadmap
 This roadmap deals with desktop support. Note that "desktop support"
 means several quite different things:
- issues pertaining to running the Windows-like Linux desktops
- (e.g. GNOME, KDE, Mate, Trinity, as well as other similar things
- like LXDE) on NetBSD in more or less their current form;
+ (e.g., GNOME, KDE, MATE, Xfce, LXQt, LXDE, DeforaOS, as well as
+ others not presently successfully packaged, like Cinnamon, Lumina,
+ and Trinity) on NetBSD in more or less their current form;
- issues pertaining to running these systems with NetBSD
  infrastructure, for better system integration and to avoid
  depending on unpopular packages like dbus and policykit;
@@ -51,50 +52,35 @@ into one of the following three broad ca
 
 The following elements, projects, and goals are relatively near-term:
 
- 1. Don't ship twm as the default X window manager
- 2. Making removable media work using GNOME/KDE infrastructure
- 3. Making wireless config work using GNOME/KDE infrastructure
- 4. Sane font handling
- 5. Get Eclipse running properly from pkgsrc
- 6. Better printer management
- 7. Work out a long-term plan for compositing, Wayland, and graphics
+ 1. Making removable media work using GNOME/KDE infrastructure
+ 2. Making wireless config work using GNOME/KDE infrastructure
+ 3. Sane font handling
+ 4. Get Eclipse running properly from pkgsrc
+ 5. Better printer management
+ 6. Work out a long-term plan for compositing, Wayland, and graphics
 architecture issues
 
 The following elements, projects, and goals are longer-term:
 
- 8. Publish/subscribe sockets or IPC
- 9. Better native RPC library and tools
- 10. Native removable media handling
- 11. Native wireless config
- 12. User switching and secure attention key
- 13. wscons graphics
+ 7. Publish/subscribe sockets or IPC
+ 8. Better native RPC library and tools
+ 9. Native removable media handling
+ 10. Native wireless config
+ 11. User switching and secure attention key
+ 12. wscons graphics
 
 The following elements, projects, and goals are rather blue-sky so far:
 
- 14. Something akin to ARexx
- 15. A more Unix-oriented root window/desktop basis 
- 16. Full console virtualization
+ 13. Something akin to ARexx
+ 14. A more Unix-oriented root window/desktop basis 
+ 15. Full console virtualization
 
 
 Explanations
 
 
 
- 1. Don't ship twm as the default X window manager
-
-It's embarrassing that in 2016 we were still shipping twm as the
-default window system config. Heck, it was embarrassing in 2006. The
-work needed to move to ctwm has been largely done (by youri) and at
-least some of it committed, but this still (as of January 2017) isn't
-enabled by default.
-
-  - As of January 2017 nobody is actively working on this.
-  - It would be silly at this point to release 8.0 without it, so
-ideally someone will step up to get it finished and enabled.
-  - Contact: XXX please fill in
-
-
- 2. Making removable media work using GNOME/KDE infrastructure
+ 1. Making removable media work using GNOME/KDE infrastructure
 
 Ideally when you insert a USB stick it mounts automatically, like with
 GNOME and KDE on Linux. I believe this is not currently working. It
@@ -103,14 +89,14 @@ broken, but hal got deprecated and I'm n
 (XXX: someone please clarify.)
 
 
- 3. Making wireless config work using GNOME/KDE infrastructure
+ 2. Making wireless config work using GNOME/KDE infrastructure
 
 Ideally it would be possible to configure your wireless networking
 using the GNOME/KDE/etc. tools. I believe this does not work either.
 (XXX: someone please clarify.)
 
 
- 4. Sane font handling
+ 3. Sane font handling
 
 See "System-level font handling in Unix" on the wiki projects page.
 
@@ -119,7 +105,7 @@ See "System-level font handling in Unix"
   - Contact: dholland
 
 
- 5. Get Eclipse running properly from pkgsrc
+ 4. Get Eclipse running properly from pkgsrc
 
 As of last report Eclipse was bodgily packaged (this may not be
 fixable) and didn't 

CVS commit: src/doc/roadmaps

2022-01-15 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sat Jan 15 19:38:05 UTC 2022

Modified Files:
src/doc/roadmaps: desktop

Log Message:
desktop: update some details

The default WM was changed to ctwm by nia@ some time ago, remove that
item. While here, update the list of DEs that are available for NetBSD
via pkgsrc.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/doc/roadmaps/desktop

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



CVS commit: src/sys/dev/dkwedge

2022-01-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan 15 19:34:11 UTC 2022

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
dk(4): Omit redundant microoptimization around cv_broadcast.

cv_broadcast already has a fast path for the no-waiter case.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.109 src/sys/dev/dkwedge/dk.c:1.110
--- src/sys/dev/dkwedge/dk.c:1.109	Mon Oct 18 11:40:56 2021
+++ src/sys/dev/dkwedge/dk.c	Sat Jan 15 19:34:11 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.109 2021/10/18 11:40:56 simonb Exp $	*/
+/*	$NetBSD: dk.c,v 1.110 2022/01/15 19:34:11 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.109 2021/10/18 11:40:56 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.110 2022/01/15 19:34:11 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dkwedge.h"
@@ -89,12 +89,9 @@ struct dkwedge_softc {
 	kmutex_t	sc_iolock;
 	kcondvar_t	sc_dkdrn;
 	u_int		sc_iopend;	/* I/Os pending */
-	int		sc_flags;	/* flags (sc_iolock) */
 	int		sc_mode;	/* parent open mode */
 };
 
-#define	DK_F_WAIT_DRAIN		0x0001	/* waiting for I/O to drain */
-
 static void	dkstart(struct dkwedge_softc *);
 static void	dkiodone(struct buf *);
 static void	dkrestart(void *);
@@ -194,10 +191,8 @@ dkwedge_wait_drain(struct dkwedge_softc 
 {
 
 	mutex_enter(>sc_iolock);
-	while (sc->sc_iopend != 0) {
-		sc->sc_flags |= DK_F_WAIT_DRAIN;
+	while (sc->sc_iopend != 0)
 		cv_wait(>sc_dkdrn, >sc_iolock);
-	}
 	mutex_exit(>sc_iolock);
 }
 
@@ -1341,11 +1336,8 @@ dkstart(struct dkwedge_softc *sc)
 	while ((bp = bufq_peek(sc->sc_bufq)) != NULL) {
 		if (sc->sc_state != DKW_STATE_RUNNING) {
 			(void) bufq_get(sc->sc_bufq);
-			if (sc->sc_iopend-- == 1 &&
-			(sc->sc_flags & DK_F_WAIT_DRAIN) != 0) {
-sc->sc_flags &= ~DK_F_WAIT_DRAIN;
+			if (--sc->sc_iopend == 0)
 cv_broadcast(>sc_dkdrn);
-			}
 			mutex_exit(>sc_iolock);
 			bp->b_error = ENXIO;
 			bp->b_resid = bp->b_bcount;
@@ -1430,10 +1422,8 @@ dkiodone(struct buf *bp)
 	putiobuf(bp);
 
 	mutex_enter(>sc_iolock);
-	if (sc->sc_iopend-- == 1 && (sc->sc_flags & DK_F_WAIT_DRAIN) != 0) {
-		sc->sc_flags &= ~DK_F_WAIT_DRAIN;
+	if (--sc->sc_iopend == 0)
 		cv_broadcast(>sc_dkdrn);
-	}
 
 	disk_unbusy(>sc_dk, obp->b_bcount - obp->b_resid,
 	obp->b_flags & B_READ);



CVS commit: src/sys/dev/dkwedge

2022-01-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan 15 19:34:11 UTC 2022

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
dk(4): Omit redundant microoptimization around cv_broadcast.

cv_broadcast already has a fast path for the no-waiter case.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/dkwedge/dk.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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 19:34:07 UTC 2022

Modified Files:
src/usr.bin/make: cond.c main.c meta.c

Log Message:
make: replace Var_Value with Var_Exists where applicable

The latter function already existed in 1993, no idea why it was not
used.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/usr.bin/make/cond.c
cvs rdiff -u -r1.571 -r1.572 src/usr.bin/make/main.c
cvs rdiff -u -r1.191 -r1.192 src/usr.bin/make/meta.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/cond.c
diff -u src/usr.bin/make/cond.c:1.325 src/usr.bin/make/cond.c:1.326
--- src/usr.bin/make/cond.c:1.325	Fri Jan 14 18:25:22 2022
+++ src/usr.bin/make/cond.c	Sat Jan 15 19:34:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.325 2022/01/14 18:25:22 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.326 2022/01/15 19:34:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.325 2022/01/14 18:25:22 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.326 2022/01/15 19:34:07 rillig Exp $");
 
 /*
  * Conditional expressions conform to this grammar:
@@ -290,10 +290,7 @@ ParseFuncArg(CondParser *par, const char
 static bool
 FuncDefined(const char *var)
 {
-	FStr value = Var_Value(SCOPE_CMDLINE, var);
-	bool result = value.str != NULL;
-	FStr_Done();
-	return result;
+	return Var_Exists(SCOPE_CMDLINE, var);
 }
 
 /* See if the given target is requested to be made. */

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.571 src/usr.bin/make/main.c:1.572
--- src/usr.bin/make/main.c:1.571	Sat Jan 15 19:05:23 2022
+++ src/usr.bin/make/main.c	Sat Jan 15 19:34:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.571 2022/01/15 19:05:23 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.572 2022/01/15 19:34:07 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.571 2022/01/15 19:05:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.572 2022/01/15 19:34:07 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -1018,17 +1018,14 @@ static void
 HandlePWD(const struct stat *curdir_st)
 {
 	char *pwd;
-	FStr prefix, makeobjdir;
+	FStr makeobjdir;
 	struct stat pwd_st;
 
 	if (ignorePWD || (pwd = getenv("PWD")) == NULL)
 		return;
 
-	prefix = Var_Value(SCOPE_CMDLINE, "MAKEOBJDIRPREFIX");
-	if (prefix.str != NULL) {
-		FStr_Done();
+	if (Var_Exists(SCOPE_CMDLINE, "MAKEOBJDIRPREFIX"))
 		return;
-	}
 
 	makeobjdir = Var_Value(SCOPE_CMDLINE, "MAKEOBJDIR");
 	if (makeobjdir.str != NULL && strchr(makeobjdir.str, '$') != NULL)

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.191 src/usr.bin/make/meta.c:1.192
--- src/usr.bin/make/meta.c:1.191	Sat Jan 15 19:05:23 2022
+++ src/usr.bin/make/meta.c	Sat Jan 15 19:34:07 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.191 2022/01/15 19:05:23 rillig Exp $ */
+/*  $NetBSD: meta.c,v 1.192 2022/01/15 19:34:07 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -591,7 +591,6 @@ meta_mode_init(const char *make_mode)
 {
 static bool once = false;
 const char *cp;
-FStr value;
 
 useMeta = true;
 useFilemon = true;
@@ -648,21 +647,9 @@ meta_mode_init(const char *make_mode)
 /*
  * We ignore any paths that match ${.MAKE.META.IGNORE_PATTERNS}
  */
-value = Var_Value(SCOPE_GLOBAL, MAKE_META_IGNORE_PATTERNS);
-if (value.str != NULL) {
-	metaIgnorePatterns = true;
-	FStr_Done();
-}
-value = Var_Value(SCOPE_GLOBAL, MAKE_META_IGNORE_FILTER);
-if (value.str != NULL) {
-	metaIgnoreFilter = true;
-	FStr_Done();
-}
-value = Var_Value(SCOPE_GLOBAL, MAKE_META_CMP_FILTER);
-if (value.str != NULL) {
-	metaCmpFilter = true;
-	FStr_Done();
-}
+metaIgnorePatterns = Var_Exists(SCOPE_GLOBAL, MAKE_META_IGNORE_PATTERNS);
+metaIgnoreFilter = Var_Exists(SCOPE_GLOBAL, MAKE_META_IGNORE_FILTER);
+metaCmpFilter = Var_Exists(SCOPE_GLOBAL, MAKE_META_CMP_FILTER);
 }
 
 /*



CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 19:34:07 UTC 2022

Modified Files:
src/usr.bin/make: cond.c main.c meta.c

Log Message:
make: replace Var_Value with Var_Exists where applicable

The latter function already existed in 1993, no idea why it was not
used.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/usr.bin/make/cond.c
cvs rdiff -u -r1.571 -r1.572 src/usr.bin/make/main.c
cvs rdiff -u -r1.191 -r1.192 src/usr.bin/make/meta.c

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



CVS commit: src/sys/miscfs/fdesc

2022-01-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan 15 19:33:59 UTC 2022

Modified Files:
src/sys/miscfs/fdesc: fdesc_vnops.c

Log Message:
sys/fs/fdesc: Delete silly vnop #define aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/miscfs/fdesc/fdesc_vnops.c

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

Modified files:

Index: src/sys/miscfs/fdesc/fdesc_vnops.c
diff -u src/sys/miscfs/fdesc/fdesc_vnops.c:1.138 src/sys/miscfs/fdesc/fdesc_vnops.c:1.139
--- src/sys/miscfs/fdesc/fdesc_vnops.c:1.138	Tue Jun 29 22:40:53 2021
+++ src/sys/miscfs/fdesc/fdesc_vnops.c	Sat Jan 15 19:33:58 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdesc_vnops.c,v 1.138 2021/06/29 22:40:53 dholland Exp $	*/
+/*	$NetBSD: fdesc_vnops.c,v 1.139 2022/01/15 19:33:58 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.138 2021/06/29 22:40:53 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.139 2022/01/15 19:33:58 riastradh Exp $");
 
 #include 
 #include 
@@ -75,11 +75,7 @@ FD_STDIN, FD_STDOUT, FD_STDERR must be a
 #endif
 
 int	fdesc_lookup(void *);
-#define	fdesc_create	genfs_eopnotsupp
-#define	fdesc_mknod	genfs_eopnotsupp
 int	fdesc_open(void *);
-#define	fdesc_close	genfs_nullop
-#define	fdesc_access	genfs_nullop
 int	fdesc_getattr(void *);
 int	fdesc_setattr(void *);
 int	fdesc_read(void *);
@@ -87,32 +83,14 @@ int	fdesc_write(void *);
 int	fdesc_ioctl(void *);
 int	fdesc_poll(void *);
 int	fdesc_kqfilter(void *);
-#define	fdesc_mmap	genfs_eopnotsupp
-#define	fdesc_fcntl	genfs_fcntl
-#define	fdesc_fsync	genfs_nullop
-#define	fdesc_seek	genfs_seek
-#define	fdesc_remove	genfs_eopnotsupp
 int	fdesc_link(void *);
-#define	fdesc_rename	genfs_eopnotsupp
-#define	fdesc_mkdir	genfs_eopnotsupp
-#define	fdesc_rmdir	genfs_eopnotsupp
 int	fdesc_symlink(void *);
 int	fdesc_readdir(void *);
 int	fdesc_readlink(void *);
-#define	fdesc_abortop	genfs_abortop
 int	fdesc_inactive(void *);
 int	fdesc_reclaim(void *);
-#define	fdesc_lock	genfs_lock
-#define	fdesc_unlock	genfs_unlock
-#define	fdesc_bmap	genfs_eopnotsupp
-#define	fdesc_strategy	genfs_badop
 int	fdesc_print(void *);
 int	fdesc_pathconf(void *);
-#define	fdesc_islocked	genfs_islocked
-#define	fdesc_advlock	genfs_einval
-#define	fdesc_bwrite	genfs_eopnotsupp
-#define fdesc_revoke	genfs_revoke
-#define fdesc_putpages	genfs_null_putpages
 
 static int fdesc_attr(int, struct vattr *, kauth_cred_t);
 
@@ -121,11 +99,11 @@ const struct vnodeopv_entry_desc fdesc_v
 	{ _default_desc, vn_default_error },
 	{ _parsepath_desc, genfs_parsepath },	/* parsepath */
 	{ _lookup_desc, fdesc_lookup },		/* lookup */
-	{ _create_desc, fdesc_create },		/* create */
-	{ _mknod_desc, fdesc_mknod },		/* mknod */
+	{ _create_desc, genfs_eopnotsupp },		/* create */
+	{ _mknod_desc, genfs_eopnotsupp },		/* mknod */
 	{ _open_desc, fdesc_open },			/* open */
-	{ _close_desc, fdesc_close },		/* close */
-	{ _access_desc, fdesc_access },		/* access */
+	{ _close_desc, genfs_nullop },		/* close */
+	{ _access_desc, genfs_nullop },		/* access */
 	{ _accessx_desc, genfs_accessx },		/* accessx */
 	{ _getattr_desc, fdesc_getattr },		/* getattr */
 	{ _setattr_desc, fdesc_setattr },		/* setattr */
@@ -134,34 +112,34 @@ const struct vnodeopv_entry_desc fdesc_v
 	{ _fallocate_desc, genfs_eopnotsupp },	/* fallocate */
 	{ _fdiscard_desc, genfs_eopnotsupp },	/* fdiscard */
 	{ _ioctl_desc, fdesc_ioctl },		/* ioctl */
-	{ _fcntl_desc, fdesc_fcntl },		/* fcntl */
+	{ _fcntl_desc, genfs_fcntl },		/* fcntl */
 	{ _poll_desc, fdesc_poll },			/* poll */
 	{ _kqfilter_desc, fdesc_kqfilter },		/* kqfilter */
-	{ _revoke_desc, fdesc_revoke },		/* revoke */
-	{ _mmap_desc, fdesc_mmap },			/* mmap */
-	{ _fsync_desc, fdesc_fsync },		/* fsync */
-	{ _seek_desc, fdesc_seek },			/* seek */
-	{ _remove_desc, fdesc_remove },		/* remove */
+	{ _revoke_desc, genfs_revoke },		/* revoke */
+	{ _mmap_desc, genfs_eopnotsupp },		/* mmap */
+	{ _fsync_desc, genfs_nullop },		/* fsync */
+	{ _seek_desc, genfs_seek },			/* seek */
+	{ _remove_desc, genfs_eopnotsupp },		/* remove */
 	{ _link_desc, fdesc_link },			/* link */
-	{ _rename_desc, fdesc_rename },		/* rename */
-	{ _mkdir_desc, fdesc_mkdir },		/* mkdir */
-	{ _rmdir_desc, fdesc_rmdir },		/* rmdir */
+	{ _rename_desc, genfs_eopnotsupp },		/* rename */
+	{ _mkdir_desc, genfs_eopnotsupp },		/* mkdir */
+	{ _rmdir_desc, genfs_eopnotsupp },		/* rmdir */
 	{ _symlink_desc, fdesc_symlink },		/* symlink */
 	{ _readdir_desc, fdesc_readdir },		/* readdir */
 	{ _readlink_desc, fdesc_readlink },		/* readlink */
-	{ _abortop_desc, fdesc_abortop },		/* abortop */
+	{ _abortop_desc, genfs_abortop },		/* abortop */
 	{ _inactive_desc, fdesc_inactive },		/* inactive */
 	{ _reclaim_desc, fdesc_reclaim },		/* reclaim */
-	{ _lock_desc, fdesc_lock },			/* lock */
-	{ _unlock_desc, fdesc_unlock },		/* 

CVS commit: src/sys/miscfs/fdesc

2022-01-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jan 15 19:33:59 UTC 2022

Modified Files:
src/sys/miscfs/fdesc: fdesc_vnops.c

Log Message:
sys/fs/fdesc: Delete silly vnop #define aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/miscfs/fdesc/fdesc_vnops.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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 19:13:08 UTC 2022

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

Log Message:
make: use islower for parsing directives

None of the directives has an uppercase letter, so there is no need to
test for it.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/usr.bin/make/make.h
cvs rdiff -u -r1.650 -r1.651 src/usr.bin/make/parse.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.288 src/usr.bin/make/make.h:1.289
--- src/usr.bin/make/make.h:1.288	Sun Jan  9 18:59:27 2022
+++ src/usr.bin/make/make.h	Sat Jan 15 19:13:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.288 2022/01/09 18:59:27 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.289 2022/01/15 19:13:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -874,6 +874,8 @@ ch_isalpha(char ch) { return isalpha((un
 MAKE_INLINE bool MAKE_ATTR_USE
 ch_isdigit(char ch) { return isdigit((unsigned char)ch) != 0; }
 MAKE_INLINE bool MAKE_ATTR_USE
+ch_islower(char ch) { return islower((unsigned char)ch) != 0; }
+MAKE_INLINE bool MAKE_ATTR_USE
 ch_isspace(char ch) { return isspace((unsigned char)ch) != 0; }
 MAKE_INLINE bool MAKE_ATTR_USE
 ch_isupper(char ch) { return isupper((unsigned char)ch) != 0; }

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.650 src/usr.bin/make/parse.c:1.651
--- src/usr.bin/make/parse.c:1.650	Sat Jan 15 18:34:41 2022
+++ src/usr.bin/make/parse.c	Sat Jan 15 19:13:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.650 2022/01/15 18:34:41 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.651 2022/01/15 19:13:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.650 2022/01/15 18:34:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.651 2022/01/15 19:13:08 rillig Exp $");
 
 /*
  * A file being read.
@@ -2636,7 +2636,7 @@ ParseDirective(char *line)
 	}
 
 	dir.start = cp;
-	while (ch_isalpha(*cp) || *cp == '-')
+	while (ch_islower(*cp) || *cp == '-')
 		cp++;
 	dir.end = cp;
 



CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 19:13:08 UTC 2022

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

Log Message:
make: use islower for parsing directives

None of the directives has an uppercase letter, so there is no need to
test for it.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/usr.bin/make/make.h
cvs rdiff -u -r1.650 -r1.651 src/usr.bin/make/parse.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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 19:05:23 UTC 2022

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

Log Message:
make: remove unnecessary functions for expanding variable names

In meta mode, the affected variable patterns do not contain a '$'.

Outside of meta mode, Global_SetExpand was only called a single time, so
inline that call.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.570 -r1.571 src/usr.bin/make/main.c
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/make/meta.c
cvs rdiff -u -r1.238 -r1.239 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.1001 -r1.1002 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.



CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 19:05:23 UTC 2022

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

Log Message:
make: remove unnecessary functions for expanding variable names

In meta mode, the affected variable patterns do not contain a '$'.

Outside of meta mode, Global_SetExpand was only called a single time, so
inline that call.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.570 -r1.571 src/usr.bin/make/main.c
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/make/meta.c
cvs rdiff -u -r1.238 -r1.239 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.1001 -r1.1002 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/main.c
diff -u src/usr.bin/make/main.c:1.570 src/usr.bin/make/main.c:1.571
--- src/usr.bin/make/main.c:1.570	Sat Jan 15 18:34:41 2022
+++ src/usr.bin/make/main.c	Sat Jan 15 19:05:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.570 2022/01/15 18:34:41 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.571 2022/01/15 19:05:23 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.570 2022/01/15 18:34:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.571 2022/01/15 19:05:23 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -452,7 +452,7 @@ MainParseArg(char c, const char *argvalu
 	case 'D':
 		if (argvalue[0] == '\0')
 			return false;
-		Global_SetExpand(argvalue, "1");
+		Var_SetExpand(SCOPE_GLOBAL, argvalue, "1");
 		Global_Append(MAKEFLAGS, "-D");
 		Global_Append(MAKEFLAGS, argvalue);
 		break;

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.190 src/usr.bin/make/meta.c:1.191
--- src/usr.bin/make/meta.c:1.190	Sat Jan 15 18:34:41 2022
+++ src/usr.bin/make/meta.c	Sat Jan 15 19:05:23 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.190 2022/01/15 18:34:41 rillig Exp $ */
+/*  $NetBSD: meta.c,v 1.191 2022/01/15 19:05:23 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1268,8 +1268,8 @@ meta_oodate(GNode *gn, bool oodate)
 
 			if (lastpid > 0) {
 			/* We need to remember these. */
-			Global_SetExpand(lcwd_vname, lcwd);
-			Global_SetExpand(ldir_vname, latestdir);
+			Global_Set(lcwd_vname, lcwd);
+			Global_Set(ldir_vname, latestdir);
 			}
 			snprintf(lcwd_vname, sizeof lcwd_vname, LCWD_VNAME_FMT, pid);
 			snprintf(ldir_vname, sizeof ldir_vname, LDIR_VNAME_FMT, pid);
@@ -1302,8 +1302,8 @@ meta_oodate(GNode *gn, bool oodate)
 		/* Process according to record type. */
 		switch (buf[0]) {
 		case 'X':		/* eXit */
-		Var_DeleteExpand(SCOPE_GLOBAL, lcwd_vname);
-		Var_DeleteExpand(SCOPE_GLOBAL, ldir_vname);
+		Var_Delete(SCOPE_GLOBAL, lcwd_vname);
+		Var_Delete(SCOPE_GLOBAL, ldir_vname);
 		lastpid = 0;	/* no need to save ldir_vname */
 		break;
 
@@ -1315,9 +1315,9 @@ meta_oodate(GNode *gn, bool oodate)
 			child = atoi(p);
 			if (child > 0) {
 			snprintf(cldir, sizeof cldir, LCWD_VNAME_FMT, child);
-			Global_SetExpand(cldir, lcwd);
+			Global_Set(cldir, lcwd);
 			snprintf(cldir, sizeof cldir, LDIR_VNAME_FMT, child);
-			Global_SetExpand(cldir, latestdir);
+			Global_Set(cldir, latestdir);
 #ifdef DEBUG_META_MODE
 			if (DEBUG(META))
 debug_printf(
@@ -1333,8 +1333,8 @@ meta_oodate(GNode *gn, bool oodate)
 		/* Update lcwd and latest directory. */
 		strlcpy(latestdir, p, sizeof latestdir);
 		strlcpy(lcwd, p, sizeof lcwd);
-		Global_SetExpand(lcwd_vname, lcwd);
-		Global_SetExpand(ldir_vname, lcwd);
+		Global_Set(lcwd_vname, lcwd);
+		Global_Set(ldir_vname, lcwd);
 #ifdef DEBUG_META_MODE
 		DEBUG4(META, "%s: %d: cwd=%s ldir=%s\n",
 			   fname, lineno, cwd, lcwd);

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.238 src/usr.bin/make/nonints.h:1.239
--- src/usr.bin/make/nonints.h:1.238	Sat Jan 15 18:34:41 2022
+++ src/usr.bin/make/nonints.h	Sat Jan 15 19:05:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.238 2022/01/15 18:34:41 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.239 2022/01/15 19:05:23 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -296,7 +296,6 @@ typedef enum VarExportMode {
 } VarExportMode;
 
 void Var_Delete(GNode *, const char *);
-void Var_DeleteExpand(GNode *, const char *);
 void Var_Undef(const char *);
 void Var_Set(GNode *, const char *, const char *);
 void Var_SetExpand(GNode *, const char *, const char *);
@@ -319,7 +318,6 @@ void Var_ExportVars(const char *);
 void Var_UnExport(bool, const char *);
 
 void Global_Set(const char *, const char *);
-void Global_SetExpand(const char *, const char *);
 void Global_Append(const char *, const char *);
 void 

CVS commit: src/sys/arch/sparc64/doc

2022-01-15 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sat Jan 15 18:45:13 UTC 2022

Modified Files:
src/sys/arch/sparc64/doc: TODO

Log Message:
sun4v: update TODO with T2000 device configuration state


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc64/doc/TODO

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/sparc64/doc/TODO
diff -u src/sys/arch/sparc64/doc/TODO:1.46 src/sys/arch/sparc64/doc/TODO:1.47
--- src/sys/arch/sparc64/doc/TODO:1.46	Wed Jan  5 16:01:54 2022
+++ src/sys/arch/sparc64/doc/TODO	Sat Jan 15 18:45:13 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO,v 1.46 2022/01/05 16:01:54 andvar Exp $ */
+/* $NetBSD: TODO,v 1.47 2022/01/15 18:45:13 palle Exp $ */
 
 Things to be done:
 
@@ -21,6 +21,7 @@ sun4v:
 		 the 'sh MAKEDEV all' command hangs.
 	 T2000 ldom with 8 VCPU and 4GB:
 	   - crashes in /sbin/init doing an access() call where %o0 is corrupted (zero)
+	   - device pci/ebus/com failes to enable interrupts (hv_intr_settarget() fails returning 6)
 	 S7 ldom with 8 VCPU and 16GB (primary ldom is Solaris 11.4 SRU33):
 	   - same status as T5 ldom
 - 64-bit kernel support



CVS commit: src/sys/arch/sparc64/doc

2022-01-15 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sat Jan 15 18:45:13 UTC 2022

Modified Files:
src/sys/arch/sparc64/doc: TODO

Log Message:
sun4v: update TODO with T2000 device configuration state


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc64/doc/TODO

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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 18:34:41 UTC 2022

Modified Files:
src/usr.bin/make: arch.c main.c meta.c nonints.h parse.c var.c

Log Message:
make: merge duplicate code for expanding variable expressions

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/usr.bin/make/arch.c
cvs rdiff -u -r1.569 -r1.570 src/usr.bin/make/main.c
cvs rdiff -u -r1.189 -r1.190 src/usr.bin/make/meta.c
cvs rdiff -u -r1.237 -r1.238 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.649 -r1.650 src/usr.bin/make/parse.c
cvs rdiff -u -r1.1000 -r1.1001 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/arch.c
diff -u src/usr.bin/make/arch.c:1.209 src/usr.bin/make/arch.c:1.210
--- src/usr.bin/make/arch.c:1.209	Wed Dec 15 12:58:01 2021
+++ src/usr.bin/make/arch.c	Sat Jan 15 18:34:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.209 2021/12/15 12:58:01 rillig Exp $	*/
+/*	$NetBSD: arch.c,v 1.210 2022/01/15 18:34:41 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -126,7 +126,7 @@
 #include "config.h"
 
 /*	"@(#)arch.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: arch.c,v 1.209 2021/12/15 12:58:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.210 2022/01/15 18:34:41 rillig Exp $");
 
 typedef struct List ArchList;
 typedef struct ListNode ArchListNode;
@@ -236,12 +236,8 @@ Arch_ParseArchive(char **pp, GNodeList *
 	}
 
 	spec[cp++ - spec] = '\0';
-	if (expandLib) {
-		char *expanded;
-		(void)Var_Subst(lib.str, scope, VARE_UNDEFERR, );
-		/* TODO: handle errors */
-		lib = FStr_InitOwn(expanded);
-	}
+	if (expandLib)
+		Var_Expand(, scope, VARE_UNDEFERR);
 
 	for (;;) {
 		/*
@@ -317,13 +313,10 @@ Arch_ParseArchive(char **pp, GNodeList *
 		 */
 		if (doSubst) {
 			char *fullName;
-			char *p, *expandedMem;
+			char *p;
 			const char *unexpandedMem = mem.str;
 
-			(void)Var_Subst(mem.str, scope, VARE_UNDEFERR,
-			);
-			/* TODO: handle errors */
-			mem = FStr_InitOwn(expandedMem);
+			Var_Expand(, scope, VARE_UNDEFERR);
 
 			/*
 			 * Now form an archive spec and recurse to deal with

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.569 src/usr.bin/make/main.c:1.570
--- src/usr.bin/make/main.c:1.569	Mon Jan 10 20:32:28 2022
+++ src/usr.bin/make/main.c	Sat Jan 15 18:34:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.569 2022/01/10 20:32:28 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.570 2022/01/15 18:34:41 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.569 2022/01/10 20:32:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.570 2022/01/15 18:34:41 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -743,14 +743,7 @@ SetVarObjdir(bool writable, const char *
 		return false;
 	}
 
-	/* expand variable substitutions */
-	if (strchr(path.str, '$') != 0) {
-		char *expanded;
-		(void)Var_Subst(path.str, SCOPE_GLOBAL, VARE_WANTRES, );
-		/* TODO: handle errors */
-		FStr_Done();
-		path = FStr_InitOwn(expanded);
-	}
+	Var_Expand(, SCOPE_GLOBAL, VARE_WANTRES);
 
 	(void)Main_SetObjdir(writable, "%s%s", path.str, suffix);
 

Index: src/usr.bin/make/meta.c
diff -u src/usr.bin/make/meta.c:1.189 src/usr.bin/make/meta.c:1.190
--- src/usr.bin/make/meta.c:1.189	Sat Jan 15 09:08:57 2022
+++ src/usr.bin/make/meta.c	Sat Jan 15 18:34:41 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.189 2022/01/15 09:08:57 rillig Exp $ */
+/*  $NetBSD: meta.c,v 1.190 2022/01/15 18:34:41 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -327,15 +327,14 @@ is_submake(const char *cmd, GNode *gn)
 static const char *p_make = NULL;
 static size_t p_len;
 char *mp = NULL;
-const char *cp, *cp2;
+const char *cp2;
 bool rc = false;
 
 if (p_make == NULL) {
 	p_make = Var_Value(gn, ".MAKE").str;
 	p_len = strlen(p_make);
 }
-cp = strchr(cmd, '$');
-if (cp != NULL) {
+if (strchr(cmd, '$') != NULL) {
 	(void)Var_Subst(cmd, gn, VARE_WANTRES, );
 	/* TODO: handle errors */
 	cmd = mp;
@@ -382,13 +381,7 @@ printCMD(const char *ucmd, FILE *fp, GNo
 {
 FStr xcmd = FStr_InitRefer(ucmd);
 
-if (strchr(ucmd, '$') != NULL) {
-	char *expanded;
-	(void)Var_Subst(ucmd, gn, VARE_WANTRES, );
-	/* TODO: handle errors */
-	xcmd = FStr_InitOwn(expanded);
-}
-
+Var_Expand(, gn, VARE_WANTRES);
 fprintf(fp, "CMD %s\n", xcmd.str);
 FStr_Done();
 }

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.237 src/usr.bin/make/nonints.h:1.238
--- src/usr.bin/make/nonints.h:1.237	Sun Jan  9 18:49:28 2022
+++ src/usr.bin/make/nonints.h	Sat Jan 15 18:34:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.237 2022/01/09 

CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 18:34:41 UTC 2022

Modified Files:
src/usr.bin/make: arch.c main.c meta.c nonints.h parse.c var.c

Log Message:
make: merge duplicate code for expanding variable expressions

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/usr.bin/make/arch.c
cvs rdiff -u -r1.569 -r1.570 src/usr.bin/make/main.c
cvs rdiff -u -r1.189 -r1.190 src/usr.bin/make/meta.c
cvs rdiff -u -r1.237 -r1.238 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.649 -r1.650 src/usr.bin/make/parse.c
cvs rdiff -u -r1.1000 -r1.1001 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.



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 18:02:33 UTC 2022

Modified Files:
src/sys/dev/acpi: sdhc_acpi.c

Log Message:
32-bit build fix


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/acpi/sdhc_acpi.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/acpi/sdhc_acpi.c
diff -u src/sys/dev/acpi/sdhc_acpi.c:1.18 src/sys/dev/acpi/sdhc_acpi.c:1.19
--- src/sys/dev/acpi/sdhc_acpi.c:1.18	Sat Jan 15 15:54:40 2022
+++ src/sys/dev/acpi/sdhc_acpi.c	Sat Jan 15 18:02:33 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $	*/
+/*	$NetBSD: sdhc_acpi.c,v 1.19 2022/01/15 18:02:33 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.19 2022/01/15 18:02:33 jmcneill Exp $");
 
 #include 
 #include 
@@ -381,8 +381,8 @@ sdhc_acpi_rockchip_bus_clock(struct sdhc
 	}
 
 	aprint_debug_dev(sc->sc_dev,
-	"eMMC Set Card Clock DSM returned %lu Hz\n", actfreq);
-	if (actfreq == 0) {
+	"eMMC Set Card Clock DSM returned %" PRIu64 " Hz\n", actfreq);
+	if (actfreq == 0 && freq != 0) {
 		return EINVAL;
 	}
 



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 18:02:33 UTC 2022

Modified Files:
src/sys/dev/acpi: sdhc_acpi.c

Log Message:
32-bit build fix


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

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



CVS commit: src/share/man/man9

2022-01-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jan 15 17:54:01 UTC 2022

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

Log Message:
whitespace fix


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/pfil.9

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

Modified files:

Index: src/share/man/man9/pfil.9
diff -u src/share/man/man9/pfil.9:1.39 src/share/man/man9/pfil.9:1.40
--- src/share/man/man9/pfil.9:1.39	Sat Jan 15 15:37:15 2022
+++ src/share/man/man9/pfil.9	Sat Jan 15 17:54:01 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfil.9,v 1.39 2022/01/15 15:37:15 christos Exp $
+.\"	$NetBSD: pfil.9,v 1.40 2022/01/15 17:54:01 wiz Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -98,13 +98,13 @@ then the
 function returns
 .Dv NULL .
 Packet filters use the
-.Fn pfil_head_get 
+.Fn pfil_head_get
 function specifying the data link
 .Fa type
 and the
 .Fa key
 to look up the filtering point with which they register themselves.
-The 
+The
 .Fa key
 is unique to the filtering point.
 The data link
@@ -129,7 +129,7 @@ The head is looked up using the
 function, which takes the data link
 .Fa type
 and the
-.Fa key 
+.Fa key
 that the packet filter expects.
 Filters may provide an argument to be passed to the filter when
 invoked on a packet.



CVS commit: src/share/man/man9

2022-01-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jan 15 17:54:01 UTC 2022

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

Log Message:
whitespace fix


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/pfil.9

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/xlint/lint2

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 17:33:42 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint2: emit.ln output_sorted.ln

Log Message:
tests/lint: fix comments


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint2/emit.ln
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint2/output_sorted.ln

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

Modified files:

Index: src/tests/usr.bin/xlint/lint2/emit.ln
diff -u src/tests/usr.bin/xlint/lint2/emit.ln:1.4 src/tests/usr.bin/xlint/lint2/emit.ln:1.5
--- src/tests/usr.bin/xlint/lint2/emit.ln:1.4	Sat Sep  4 18:34:17 2021
+++ src/tests/usr.bin/xlint/lint2/emit.ln	Sat Jan 15 17:33:42 2022
@@ -1,4 +1,4 @@
-# $NetBSD: emit.ln,v 1.4 2021/09/04 18:34:17 rillig Exp $
+# $NetBSD: emit.ln,v 1.5 2022/01/15 17:33:42 rillig Exp $
 #
 # Test emitting a lint library file.
 
@@ -15,8 +15,8 @@ S emit.c
 106 d 0.106 t 11defined_int I
 
 # Referring to an anonymous tagged type forces the source file to be listed as
-# part of the library.  If it weren't listed, the diagnostics from lint2 were
-# not able to refer to the location where this type has been defined.
+# part of the library.  If it weren't listed, the diagnostics from lint2 would
+# not be able to refer to the location where this type has been defined.
 97 d 0.97 e 21extern_anonymous_enum eT395.0.0
 
 # Function declarations, as opposed to function definitions, are not part of a

Index: src/tests/usr.bin/xlint/lint2/output_sorted.ln
diff -u src/tests/usr.bin/xlint/lint2/output_sorted.ln:1.1 src/tests/usr.bin/xlint/lint2/output_sorted.ln:1.2
--- src/tests/usr.bin/xlint/lint2/output_sorted.ln:1.1	Sat Aug 28 19:45:18 2021
+++ src/tests/usr.bin/xlint/lint2/output_sorted.ln	Sat Jan 15 17:33:42 2022
@@ -1,7 +1,8 @@
-# $NetBSD: output_sorted.ln,v 1.1 2021/08/28 19:45:18 rillig Exp $
+# $NetBSD: output_sorted.ln,v 1.2 2022/01/15 17:33:42 rillig Exp $
 #
 # Test whether the output is sorted by symbol name.
-# As of 2021-08-28, the output is sorted by hashcode, which looks random.
+# Before main2.c 1.21 from 2021-08-28, the output was sorted by hashcode,
+# which looked random.  Since then, the output is sorted by symbol name.
 
 0 s output_sorted.c
 S output_sorted.c



CVS commit: src/tests/usr.bin/xlint/lint2

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 17:33:42 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint2: emit.ln output_sorted.ln

Log Message:
tests/lint: fix comments


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint2/emit.ln
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint2/output_sorted.ln

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/base

2022-01-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan 15 16:05:19 UTC 2022

Added Files:
src/distrib/sets/lists/base: md.playstation2

Log Message:
Add sysinst catalog files


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.6 src/distrib/sets/lists/base/md.playstation2

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

Added files:

Index: src/distrib/sets/lists/base/md.playstation2
diff -u /dev/null src/distrib/sets/lists/base/md.playstation2:1.6
--- /dev/null	Sat Jan 15 16:05:19 2022
+++ src/distrib/sets/lists/base/md.playstation2	Sat Jan 15 16:05:19 2022
@@ -0,0 +1,5 @@
+# $NetBSD: md.playstation2,v 1.6 2022/01/15 16:05:19 martin Exp $
+./usr/share/sysinst/catalog/sysinstmsgs.de	base-util-share
+./usr/share/sysinst/catalog/sysinstmsgs.es	base-util-share
+./usr/share/sysinst/catalog/sysinstmsgs.fr	base-util-share
+./usr/share/sysinst/catalog/sysinstmsgs.pl	base-util-share



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

2022-01-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan 15 16:05:19 UTC 2022

Added Files:
src/distrib/sets/lists/base: md.playstation2

Log Message:
Add sysinst catalog files


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.6 src/distrib/sets/lists/base/md.playstation2

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



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 15:54:40 UTC 2022

Modified Files:
src/sys/dev/acpi: sdhc_acpi.c

Log Message:
acpi: sdhc: Read caps2 even if sdhci-caps{,-mask} doesn't touch the bits

SDHC_FLAG_HOSTCAPS means that the driver has to supply both caps and caps2
values.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/acpi/sdhc_acpi.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/acpi/sdhc_acpi.c
diff -u src/sys/dev/acpi/sdhc_acpi.c:1.17 src/sys/dev/acpi/sdhc_acpi.c:1.18
--- src/sys/dev/acpi/sdhc_acpi.c:1.17	Sat Jan 15 14:49:43 2022
+++ src/sys/dev/acpi/sdhc_acpi.c	Sat Jan 15 15:54:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $	*/
+/*	$NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.18 2022/01/15 15:54:40 jmcneill Exp $");
 
 #include 
 #include 
@@ -252,12 +252,10 @@ sdhc_acpi_attach(device_t parent, device
 		SDHC_CAPABILITIES);
 		sc->sc.sc_caps &= ~(caps_mask & 0x);
 		sc->sc.sc_caps |= (caps & 0x);
-		if (((caps | caps_mask) >> 32) != 0) {
-			sc->sc.sc_caps2 = bus_space_read_4(sc->sc_memt,
-			sc->sc_memh, SDHC_CAPABILITIES2);
-			sc->sc.sc_caps2 &= ~(caps_mask >> 32);
-			sc->sc.sc_caps2 |= (caps >> 32);
-		}
+		sc->sc.sc_caps2 = bus_space_read_4(sc->sc_memt,
+		sc->sc_memh, SDHC_CAPABILITIES2);
+		sc->sc.sc_caps2 &= ~(caps_mask >> 32);
+		sc->sc.sc_caps2 |= (caps >> 32);
 		sc->sc.sc_flags |= SDHC_FLAG_HOSTCAPS;
 	}
 



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 15:54:40 UTC 2022

Modified Files:
src/sys/dev/acpi: sdhc_acpi.c

Log Message:
acpi: sdhc: Read caps2 even if sdhci-caps{,-mask} doesn't touch the bits

SDHC_FLAG_HOSTCAPS means that the driver has to supply both caps and caps2
values.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/acpi/sdhc_acpi.c

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



CVS commit: src/share/man/man9

2022-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 15 15:37:15 UTC 2022

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

Log Message:
PR/56629: Andreas Gustafsson: Update documentation about the filter head
maintainance functions.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man9/pfil.9

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

Modified files:

Index: src/share/man/man9/pfil.9
diff -u src/share/man/man9/pfil.9:1.38 src/share/man/man9/pfil.9:1.39
--- src/share/man/man9/pfil.9:1.38	Wed Jan 17 03:34:15 2018
+++ src/share/man/man9/pfil.9	Sat Jan 15 10:37:15 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfil.9,v 1.38 2018/01/17 08:34:15 uwe Exp $
+.\"	$NetBSD: pfil.9,v 1.39 2022/01/15 15:37:15 christos Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -24,13 +24,13 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 17, 2018
+.Dd January 15, 2022
 .Dt PFIL 9
 .Os
 .Sh NAME
 .Nm pfil ,
-.Nm pfil_head_register ,
-.Nm pfil_head_unregister ,
+.Nm pfil_head_create ,
+.Nm pfil_head_destroy ,
 .Nm pfil_head_get ,
 .Nm pfil_hook_get ,
 .Nm pfil_add_hook ,
@@ -46,32 +46,32 @@
 .In sys/mbuf.h
 .In net/if.h
 .In net/pfil.h
+.Ft pfil_head_t *
+.Fn pfil_head_create "int type" "void *key"
 .Ft int
-.Fn pfil_head_register "struct pfil_head *ph"
-.Ft int
-.Fn pfil_head_unregister "struct pfil_head *ph"
-.Ft struct pfil_head *
-.Fn pfil_head_get "int af" "u_long dlt"
+.Fn pfil_head_destroy "pfil_head_t *ph"
+.Ft pfil_head_t *
+.Fn pfil_head_get "int type" "void *key"
 .Ft struct packet_filter_hook *
-.Fn pfil_hook_get "int dir" "struct pfil_head *ph"
+.Fn pfil_hook_get "int dir" "pfil_head_t *ph"
 .Ft int
-.Fn pfil_add_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *ph"
+.Fn pfil_add_hook "pfil_func_t func" "void *arg" "int flags" "pfil_head_t *ph"
 .Ft int
-.Fn pfil_remove_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *ph"
+.Fn pfil_remove_hook "pfil_func_t func" "void *arg" "int flags" "pfil_head_t *ph"
 .Ft int
 .Fn (*func) "void *arg" "struct mbuf **mp" "struct ifnet *" "int dir"
 .Ft int
-.Fn pfil_run_hooks "struct pfil_head *ph" "struct mbuf **mp" "struct ifnet *ifp" "int dir"
+.Fn pfil_run_hooks "pfil_head_t *ph" "struct mbuf **mp" "struct ifnet *ifp" "int dir"
 .Ft int
-.Fn pfil_add_ihook "void (*ifunc)()" "void *arg" "int flags" "struct pfil_head *ph"
+.Fn pfil_add_ihook "pfil_ifunc_t ifunc" "void *arg" "int flags" "pfil_head_t *ph"
 .Ft int
-.Fn pfil_remove_ihook "void (*ifunc)()" "void *arg" "int flags" "struct pfil_head *ph"
+.Fn pfil_remove_ihook "pfil_ifunc_t ifunc" "void *arg" "int flags" "pfil_head_t *ph"
 .Ft void
 .Fn (*ifunc) "void *arg" "unsigned long cmd" "void *ptr"
 .Ft void
-.Fn pfil_run_addrhooks "struct pfil_head *ph" "unsigned long" "struct ifaddr *ifa"
+.Fn pfil_run_addrhooks "pfil_head_t *ph" "unsigned long" "struct ifaddr *ifa"
 .Ft void
-.Fn pfil_run_ifhooks "struct pfil_head *ph" "unsigned long" "struct ifnet *ifp"
+.Fn pfil_run_ifhooks "pfil_head_t *ph" "unsigned long" "struct ifnet *ifp"
 .Sh DESCRIPTION
 The
 .Nm
@@ -80,25 +80,42 @@ incoming or outgoing packet for a partic
 These hooks may be used to implement a firewall or perform packet
 transformations.
 .Pp
-Packet filtering points are registered with
-.Fn pfil_head_register .
-Filtering points are identified by a key
-.Vt ( void * )
-and a data link type
+Packet filtering points are created with
+.Fn pfil_head_create .
+Filtering points are identified by a
+data link
 .Vt ( int )
-in the
-.Vt pfil_head
-structure.
-Packet filters use the key and data link type to look up the filtering
-point with which they register themselves.
-The key is unique to the filtering point.
-The data link type is a
+.Fa type
+and a
+.Vt ( void * )
+.Fa key .
+If a packet filtering point already exists for that data link
+.Fa type
+and
+.Fa key
+then the
+.Fn pfil_head_create
+function returns
+.Dv NULL .
+Packet filters use the
+.Fn pfil_head_get 
+function specifying the data link
+.Fa type
+and the
+.Fa key
+to look up the filtering point with which they register themselves.
+The 
+.Fa key
+is unique to the filtering point.
+The data link
+.Fa type
+is a
 .Xr bpf 4
 .Dv DLT_ Ns Ar type
 constant indicating what kind of header is present on the packet
 at the filtering point.
-Filtering points may be unregistered with the
-.Fn pfil_head_unregister
+Filtering points may be destroyed with the
+.Fn pfil_head_destroy
 function.
 .Pp
 Packet filters register/unregister themselves with a filtering point
@@ -109,8 +126,11 @@ and
 functions, respectively.
 The head is looked up using the
 .Fn pfil_head_get
-function, which takes the key and data link type that the packet filter
-expects.
+function, which takes the data link
+.Fa type
+and the
+.Fa key 
+that the packet filter expects.
 Filters may provide an argument to be 

CVS commit: src/share/man/man9

2022-01-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 15 15:37:15 UTC 2022

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

Log Message:
PR/56629: Andreas Gustafsson: Update documentation about the filter head
maintainance functions.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man9/pfil.9

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



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:49:43 UTC 2022

Modified Files:
src/sys/dev/acpi: sdhc_acpi.c

Log Message:
acpi: sdhc: Add support for RK356x eMMC controller.

RK356x has a DesignWare eMMC controller that is somewhat SDHCI compliant,
with one major problem -- the clock divisor doesn't actually work. To
change the clock card on Rockchip SoCs, the clock frequency needs to be
adjusted in the Clock & Reset Unit (CRU) directly.

The RK356x UEFI implementation introduces a DSM that allows drivers to
request firmware assistance in setting the card clock rate, for instances
like this where the divisor is broken.

>From the UEFI README:

  Function 1: Set Card Clock

  The _DSM control method parameters for the Set Card Clock function are
  as follows:

  Arguments

   * Arg0: UUID = 434addb0-8ff3-49d5-a724-95844b79ad1f
   * Arg1: Revision = 0
   * Arg2: Function Index = 1
   * Arg3: Target card clock rate in Hz.

  Return

   The actual card clock rate in Hz. Will be less than or equal to the
   target clock rate. Returns 0 if the target clock rate could not be set.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/acpi/sdhc_acpi.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/acpi/sdhc_acpi.c
diff -u src/sys/dev/acpi/sdhc_acpi.c:1.16 src/sys/dev/acpi/sdhc_acpi.c:1.17
--- src/sys/dev/acpi/sdhc_acpi.c:1.16	Tue Jan 11 22:32:44 2022
+++ src/sys/dev/acpi/sdhc_acpi.c	Sat Jan 15 14:49:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc_acpi.c,v 1.16 2022/01/11 22:32:44 jmcneill Exp $	*/
+/*	$NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.16 2022/01/11 22:32:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.17 2022/01/15 14:49:43 jmcneill Exp $");
 
 #include 
 #include 
@@ -45,6 +45,14 @@ __KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,
 #define	SDHC_ESDHC_FLAGS	\
 (SDHC_FLAG_HAVE_DVS|SDHC_FLAG_NO_PWR0|SDHC_FLAG_32BIT_ACCESS|SDHC_FLAG_ENHANCED)
 
+/* Rockchip eMMC device-specific method (_DSM) - 434addb0-8ff3-49d5-a724-95844b79ad1f */
+static UINT8 sdhc_acpi_rockchip_dsm_uuid[ACPI_UUID_LENGTH] = {
+	0xb0, 0xdd, 0x4a, 0x43, 0xf3, 0x8f, 0xd5, 0x49,
+	0xa7, 0x24, 0x95, 0x84, 0x4b, 0x79, 0xad, 0x1f
+};
+#define	ROCKCHIP_DSM_REV			0
+#define	ROCKCHIP_DSM_FUNC_SET_CARD_CLOCK	1
+
 #define _COMPONENT	ACPI_RESOURCE_COMPONENT
 ACPI_MODULE_NAME	("sdhc_acpi")
 
@@ -59,6 +67,7 @@ struct sdhc_acpi_softc {
 	bus_space_handle_t sc_memh;
 	bus_size_t sc_memsize;
 	void *sc_ih;
+	ACPI_HANDLE sc_handle;
 
 	ACPI_HANDLE sc_crs, sc_srs;
 	ACPI_BUFFER sc_crs_buffer;
@@ -70,6 +79,9 @@ CFATTACH_DECL_NEW(sdhc_acpi, sizeof(stru
 static void	sdhc_acpi_intel_emmc_hw_reset(struct sdhc_softc *,
 		struct sdhc_host *);
 
+static int	sdhc_acpi_rockchip_bus_clock(struct sdhc_softc *,
+		int);
+
 static const struct sdhc_acpi_slot {
 	const char *hid;
 	const char *uid;
@@ -93,6 +105,11 @@ static const struct sdhc_acpi_slot {
 	 .flags = SDHC_ESDHC_FLAGS },
 	{ .hid = "NXP0003",  .uid = "1", .type = SLOT_TYPE_EMMC,
 	 .flags = SDHC_ESDHC_FLAGS },
+	{ .hid = "RKCP0D40",		 .type = SLOT_TYPE_SD,
+	 .flags = SDHC_FLAG_32BIT_ACCESS |
+		  SDHC_FLAG_8BIT_MODE |
+		  SDHC_FLAG_USE_ADMA2 |
+		  SDHC_FLAG_SINGLE_POWER_WRITE },
 
 	/* Generic IDs last */
 	{ .hid = "PNP0D40",		 .type = SLOT_TYPE_SD },
@@ -149,16 +166,25 @@ sdhc_acpi_attach(device_t parent, device
 	ACPI_STATUS rv;
 	ACPI_INTEGER clock_freq;
 	ACPI_INTEGER caps, caps_mask;
+	ACPI_INTEGER funcs;
 
 	sc->sc.sc_dev = self;
 	sc->sc.sc_dmat = aa->aa_dmat;
 	sc->sc.sc_host = NULL;
 	sc->sc_memt = aa->aa_memt;
+	sc->sc_handle = aa->aa_node->ad_handle;
 
 	slot = sdhc_acpi_find_slot(aa->aa_node->ad_devinfo);
 	if (slot->type == SLOT_TYPE_EMMC)
 		sc->sc.sc_vendor_hw_reset = sdhc_acpi_intel_emmc_hw_reset;
 
+	rv = acpi_dsm_query(sc->sc_handle, sdhc_acpi_rockchip_dsm_uuid, 
+	ROCKCHIP_DSM_REV, );
+	if (ACPI_SUCCESS(rv) &&
+	ISSET(funcs, __BIT(ROCKCHIP_DSM_FUNC_SET_CARD_CLOCK))) {
+		sc->sc.sc_vendor_bus_clock = sdhc_acpi_rockchip_bus_clock;
+	}
+
 	rv = acpi_resource_parse(self, aa->aa_node->ad_handle, "_CRS",
 	, _resource_parse_ops_default);
 	if (ACPI_FAILURE(rv))
@@ -330,3 +356,37 @@ sdhc_acpi_intel_emmc_hw_reset(struct sdh
 
 	mutex_exit(plock);
 }
+
+static int
+sdhc_acpi_rockchip_bus_clock(struct sdhc_softc *sc, int freq)
+{
+	struct sdhc_acpi_softc *asc = (struct sdhc_acpi_softc *)sc;
+	ACPI_STATUS rv;
+	ACPI_OBJECT targetfreq;
+	ACPI_OBJECT arg3;
+	ACPI_INTEGER actfreq;
+
+	targetfreq.Integer.Type = ACPI_TYPE_INTEGER;
+	targetfreq.Integer.Value = freq * 1000;
+	arg3.Package.Type = ACPI_TYPE_PACKAGE;
+	arg3.Package.Count = 1;
+	arg3.Package.Elements = 
+
+	rv = acpi_dsm_integer(asc->sc_handle, sdhc_acpi_rockchip_dsm_uuid,
+	

CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:49:43 UTC 2022

Modified Files:
src/sys/dev/acpi: sdhc_acpi.c

Log Message:
acpi: sdhc: Add support for RK356x eMMC controller.

RK356x has a DesignWare eMMC controller that is somewhat SDHCI compliant,
with one major problem -- the clock divisor doesn't actually work. To
change the clock card on Rockchip SoCs, the clock frequency needs to be
adjusted in the Clock & Reset Unit (CRU) directly.

The RK356x UEFI implementation introduces a DSM that allows drivers to
request firmware assistance in setting the card clock rate, for instances
like this where the divisor is broken.

>From the UEFI README:

  Function 1: Set Card Clock

  The _DSM control method parameters for the Set Card Clock function are
  as follows:

  Arguments

   * Arg0: UUID = 434addb0-8ff3-49d5-a724-95844b79ad1f
   * Arg1: Revision = 0
   * Arg2: Function Index = 1
   * Arg3: Target card clock rate in Hz.

  Return

   The actual card clock rate in Hz. Will be less than or equal to the
   target clock rate. Returns 0 if the target clock rate could not be set.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/acpi/sdhc_acpi.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/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:40:33 UTC 2022

Modified Files:
src/sys/dev/acpi: acpi_util.h

Log Message:
acpi: Add helper for querying DSM function 0.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/acpi_util.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/acpi/acpi_util.h
diff -u src/sys/dev/acpi/acpi_util.h:1.12 src/sys/dev/acpi/acpi_util.h:1.13
--- src/sys/dev/acpi/acpi_util.h:1.12	Sun Jan  9 14:28:23 2022
+++ src/sys/dev/acpi/acpi_util.h	Sat Jan 15 14:40:33 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.h,v 1.12 2022/01/09 14:28:23 jmcneill Exp $ */
+/*	$NetBSD: acpi_util.h,v 1.13 2022/01/15 14:40:33 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -108,6 +108,8 @@ ACPI_STATUS	 acpi_dsm_typed(ACPI_HANDLE,
 ACPI_STATUS	 acpi_dsm_integer(ACPI_HANDLE, uint8_t *, ACPI_INTEGER,
 			ACPI_INTEGER, const ACPI_OBJECT *,
 			ACPI_INTEGER *);
+ACPI_STATUS	 acpi_dsm_query(ACPI_HANDLE, uint8_t *, ACPI_INTEGER,
+			ACPI_INTEGER *);
 
 ACPI_STATUS	 acpi_claim_childdevs(device_t, struct acpi_devnode *);
 



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:40:33 UTC 2022

Modified Files:
src/sys/dev/acpi: acpi_util.h

Log Message:
acpi: Add helper for querying DSM function 0.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/acpi_util.h

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



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:40:22 UTC 2022

Modified Files:
src/sys/dev/acpi: acpi_util.c

Log Message:
acpi: Add helper for querying DSM function 0.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/acpi/acpi_util.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/acpi/acpi_util.c
diff -u src/sys/dev/acpi/acpi_util.c:1.30 src/sys/dev/acpi/acpi_util.c:1.31
--- src/sys/dev/acpi/acpi_util.c:1.30	Sun Jan  9 14:28:23 2022
+++ src/sys/dev/acpi/acpi_util.c	Sat Jan 15 14:40:22 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.c,v 1.30 2022/01/09 14:28:23 jmcneill Exp $ */
+/*	$NetBSD: acpi_util.c,v 1.31 2022/01/15 14:40:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2021 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.30 2022/01/09 14:28:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.31 2022/01/15 14:40:22 jmcneill Exp $");
 
 #include 
 #include 
@@ -1117,6 +1117,38 @@ acpi_dsm(ACPI_HANDLE handle, uint8_t *uu
 }
 
 ACPI_STATUS
+acpi_dsm_query(ACPI_HANDLE handle, uint8_t *uuid, ACPI_INTEGER rev,
+ACPI_INTEGER *ret)
+{
+	ACPI_OBJECT *obj;
+	ACPI_STATUS status;
+	uint8_t *data;
+	u_int n;
+
+	status = acpi_dsm(handle, uuid, rev, 0, NULL, );
+	if (ACPI_FAILURE(status)) {
+		return status;
+	}
+
+	if (obj->Type == ACPI_TYPE_INTEGER) {
+		*ret = obj->Integer.Value;
+	} else if (obj->Type == ACPI_TYPE_BUFFER &&
+		   obj->Buffer.Length <= 8) {
+		*ret = 0;
+		data = (uint8_t *)obj->Buffer.Pointer;
+		for (n = 0; n < obj->Buffer.Length; n++) {
+			*ret |= (uint64_t)data[n] << (n * 8);
+		}
+	} else {
+		status = AE_TYPE;
+	}
+
+	ACPI_FREE(obj);
+
+	return status;
+}
+
+ACPI_STATUS
 acpi_claim_childdevs(device_t dev, struct acpi_devnode *devnode)
 {
 	struct acpi_devnode *ad;



CVS commit: src/sys/dev/acpi

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:40:22 UTC 2022

Modified Files:
src/sys/dev/acpi: acpi_util.c

Log Message:
acpi: Add helper for querying DSM function 0.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/acpi/acpi_util.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/sdmmc

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:33:36 UTC 2022

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
sdhc: High speed support capability flag applies to eMMC too.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/sdmmc/sdhc.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/sdmmc

2022-01-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 15 14:33:36 UTC 2022

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
sdhc: High speed support capability flag applies to eMMC too.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.112 src/sys/dev/sdmmc/sdhc.c:1.113
--- src/sys/dev/sdmmc/sdhc.c:1.112	Wed Nov 10 16:53:28 2021
+++ src/sys/dev/sdmmc/sdhc.c	Sat Jan 15 14:33:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.112 2021/11/10 16:53:28 msaitoh Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.113 2022/01/15 14:33:36 jmcneill Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.112 2021/11/10 16:53:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.113 2022/01/15 14:33:36 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -620,7 +620,8 @@ adma_done:
 	if (ISSET(sc->sc_flags, SDHC_FLAG_8BIT_MODE))
 		saa.saa_caps |= SMC_CAPS_8BIT_MODE;
 	if (ISSET(caps, SDHC_HIGH_SPEED_SUPP))
-		saa.saa_caps |= SMC_CAPS_SD_HIGHSPEED;
+		saa.saa_caps |= SMC_CAPS_SD_HIGHSPEED |
+SMC_CAPS_MMC_HIGHSPEED;
 	if (ISSET(caps2, SDHC_SDR104_SUPP))
 		saa.saa_caps |= SMC_CAPS_UHS_SDR104 |
 SMC_CAPS_UHS_SDR50 |



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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 14:22:03 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: c11_generic_expression.c
c11_generic_expression.exp c99_init_designator.c
c99_init_designator.exp d_c99_bool.c d_c99_bool.exp
d_c99_bool_strict.c d_c99_bool_strict.exp d_c99_complex_split.c
d_c99_complex_split.exp d_c99_init.c d_c99_init.exp
d_constant_conv1.c d_constant_conv1.exp d_constant_conv2.c
d_constant_conv2.exp d_cvt_constant.c d_cvt_constant.exp
d_decl_old_style_arguments.c d_decl_old_style_arguments.exp
d_fold_test.c d_fold_test.exp d_gcc_compound_statements1.c
d_gcc_compound_statements1.exp d_incorrect_array_size.c
d_incorrect_array_size.exp d_init_array_using_string.c
d_init_array_using_string.exp d_init_pop_member.c
d_init_pop_member.exp d_lint_assert.c d_lint_assert.exp
d_long_double_int.c d_long_double_int.exp d_pr_22119.c
d_pr_22119.exp d_return_type.c d_return_type.exp
d_struct_init_nested.c d_struct_init_nested.exp d_type_conv1.c
d_type_conv1.exp d_type_conv2.c d_type_conv2.exp d_type_conv3.c
d_type_conv3.exp decl_struct_member.c decl_struct_member.exp emit.c
emit.exp emit.exp-ln expr_range.c expr_range.exp feat_stacktrace.c
feat_stacktrace.exp gcc_attribute_aligned.c
gcc_attribute_aligned.exp gcc_bit_field_types.c
gcc_bit_field_types.exp lex_floating.c lex_floating.exp op_colon.c
op_colon.exp stmt_for.c stmt_for.exp

Log Message:
tests/lint: expect complete messages in feature tests

Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart.  Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/tests/usr.bin/xlint/lint1/c11_generic_expression.c \
src/tests/usr.bin/xlint/lint1/decl_struct_member.exp
cvs rdiff -u -r1.8 -r1.9 \
src/tests/usr.bin/xlint/lint1/c11_generic_expression.exp \
src/tests/usr.bin/xlint/lint1/d_c99_complex_split.c \
src/tests/usr.bin/xlint/lint1/d_init_array_using_string.exp \
src/tests/usr.bin/xlint/lint1/d_init_pop_member.c \
src/tests/usr.bin/xlint/lint1/d_struct_init_nested.exp
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/c99_init_designator.c \
src/tests/usr.bin/xlint/lint1/c99_init_designator.exp \
src/tests/usr.bin/xlint/lint1/emit.exp \
src/tests/usr.bin/xlint/lint1/expr_range.exp \
src/tests/usr.bin/xlint/lint1/feat_stacktrace.c \
src/tests/usr.bin/xlint/lint1/feat_stacktrace.exp \
src/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c \
src/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.exp \
src/tests/usr.bin/xlint/lint1/lex_floating.c \
src/tests/usr.bin/xlint/lint1/lex_floating.exp \
src/tests/usr.bin/xlint/lint1/op_colon.c \
src/tests/usr.bin/xlint/lint1/op_colon.exp \
src/tests/usr.bin/xlint/lint1/stmt_for.c \
src/tests/usr.bin/xlint/lint1/stmt_for.exp
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/d_c99_bool.c \
src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_c99_bool.exp \
src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c \
src/tests/usr.bin/xlint/lint1/d_struct_init_nested.c
cvs rdiff -u -r1.35 -r1.36 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.32 -r1.33 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp
cvs rdiff -u -r1.2 -r1.3 \
src/tests/usr.bin/xlint/lint1/d_c99_complex_split.exp \
src/tests/usr.bin/xlint/lint1/d_constant_conv1.exp \
src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.exp \
src/tests/usr.bin/xlint/lint1/d_pr_22119.c \
src/tests/usr.bin/xlint/lint1/d_return_type.exp
cvs rdiff -u -r1.39 -r1.40 src/tests/usr.bin/xlint/lint1/d_c99_init.c
cvs rdiff -u -r1.29 -r1.30 src/tests/usr.bin/xlint/lint1/d_c99_init.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_constant_conv1.c \
src/tests/usr.bin/xlint/lint1/d_constant_conv2.c \
src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.c \
src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp \
src/tests/usr.bin/xlint/lint1/d_incorrect_array_size.c \
src/tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp \
src/tests/usr.bin/xlint/lint1/d_pr_22119.exp \
src/tests/usr.bin/xlint/lint1/d_return_type.c \
src/tests/usr.bin/xlint/lint1/d_type_conv1.c \
src/tests/usr.bin/xlint/lint1/d_type_conv2.c \
src/tests/usr.bin/xlint/lint1/expr_range.c \

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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 14:22:03 UTC 2022

Modified Files:
src/tests/usr.bin/xlint/lint1: c11_generic_expression.c
c11_generic_expression.exp c99_init_designator.c
c99_init_designator.exp d_c99_bool.c d_c99_bool.exp
d_c99_bool_strict.c d_c99_bool_strict.exp d_c99_complex_split.c
d_c99_complex_split.exp d_c99_init.c d_c99_init.exp
d_constant_conv1.c d_constant_conv1.exp d_constant_conv2.c
d_constant_conv2.exp d_cvt_constant.c d_cvt_constant.exp
d_decl_old_style_arguments.c d_decl_old_style_arguments.exp
d_fold_test.c d_fold_test.exp d_gcc_compound_statements1.c
d_gcc_compound_statements1.exp d_incorrect_array_size.c
d_incorrect_array_size.exp d_init_array_using_string.c
d_init_array_using_string.exp d_init_pop_member.c
d_init_pop_member.exp d_lint_assert.c d_lint_assert.exp
d_long_double_int.c d_long_double_int.exp d_pr_22119.c
d_pr_22119.exp d_return_type.c d_return_type.exp
d_struct_init_nested.c d_struct_init_nested.exp d_type_conv1.c
d_type_conv1.exp d_type_conv2.c d_type_conv2.exp d_type_conv3.c
d_type_conv3.exp decl_struct_member.c decl_struct_member.exp emit.c
emit.exp emit.exp-ln expr_range.c expr_range.exp feat_stacktrace.c
feat_stacktrace.exp gcc_attribute_aligned.c
gcc_attribute_aligned.exp gcc_bit_field_types.c
gcc_bit_field_types.exp lex_floating.c lex_floating.exp op_colon.c
op_colon.exp stmt_for.c stmt_for.exp

Log Message:
tests/lint: expect complete messages in feature tests

Previously, the tests contained many comments like /* expect: 123 */,
which were useless to a casual reader since nobody is expected to learn
lint's message IDs by heart.  Replace these with the complete
diagnostics, to show what lint is complaining about.

The tests named msg_*.c have been left unmodified since they mention the
full message text in their header comment.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/tests/usr.bin/xlint/lint1/c11_generic_expression.c \
src/tests/usr.bin/xlint/lint1/decl_struct_member.exp
cvs rdiff -u -r1.8 -r1.9 \
src/tests/usr.bin/xlint/lint1/c11_generic_expression.exp \
src/tests/usr.bin/xlint/lint1/d_c99_complex_split.c \
src/tests/usr.bin/xlint/lint1/d_init_array_using_string.exp \
src/tests/usr.bin/xlint/lint1/d_init_pop_member.c \
src/tests/usr.bin/xlint/lint1/d_struct_init_nested.exp
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/c99_init_designator.c \
src/tests/usr.bin/xlint/lint1/c99_init_designator.exp \
src/tests/usr.bin/xlint/lint1/emit.exp \
src/tests/usr.bin/xlint/lint1/expr_range.exp \
src/tests/usr.bin/xlint/lint1/feat_stacktrace.c \
src/tests/usr.bin/xlint/lint1/feat_stacktrace.exp \
src/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.c \
src/tests/usr.bin/xlint/lint1/gcc_attribute_aligned.exp \
src/tests/usr.bin/xlint/lint1/lex_floating.c \
src/tests/usr.bin/xlint/lint1/lex_floating.exp \
src/tests/usr.bin/xlint/lint1/op_colon.c \
src/tests/usr.bin/xlint/lint1/op_colon.exp \
src/tests/usr.bin/xlint/lint1/stmt_for.c \
src/tests/usr.bin/xlint/lint1/stmt_for.exp
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/d_c99_bool.c \
src/tests/usr.bin/xlint/lint1/d_init_pop_member.exp
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_c99_bool.exp \
src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c \
src/tests/usr.bin/xlint/lint1/d_struct_init_nested.c
cvs rdiff -u -r1.35 -r1.36 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.32 -r1.33 \
src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp
cvs rdiff -u -r1.2 -r1.3 \
src/tests/usr.bin/xlint/lint1/d_c99_complex_split.exp \
src/tests/usr.bin/xlint/lint1/d_constant_conv1.exp \
src/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.exp \
src/tests/usr.bin/xlint/lint1/d_pr_22119.c \
src/tests/usr.bin/xlint/lint1/d_return_type.exp
cvs rdiff -u -r1.39 -r1.40 src/tests/usr.bin/xlint/lint1/d_c99_init.c
cvs rdiff -u -r1.29 -r1.30 src/tests/usr.bin/xlint/lint1/d_c99_init.exp
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_constant_conv1.c \
src/tests/usr.bin/xlint/lint1/d_constant_conv2.c \
src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.c \
src/tests/usr.bin/xlint/lint1/d_decl_old_style_arguments.exp \
src/tests/usr.bin/xlint/lint1/d_incorrect_array_size.c \
src/tests/usr.bin/xlint/lint1/d_incorrect_array_size.exp \
src/tests/usr.bin/xlint/lint1/d_pr_22119.exp \
src/tests/usr.bin/xlint/lint1/d_return_type.c \
src/tests/usr.bin/xlint/lint1/d_type_conv1.c \
src/tests/usr.bin/xlint/lint1/d_type_conv2.c \
src/tests/usr.bin/xlint/lint1/expr_range.c \

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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 12:35:18 UTC 2022

Modified Files:
src/usr.bin/make/unit-tests: directive-for.mk directive-include.mk
varmod-indirect.mk varmod-order.mk varname-dot-suffixes.mk
Added Files:
src/usr.bin/make/unit-tests: check-expect.lua

Log Message:
tests/make: ensure that the 'expect' comments in tests are correct

Based on tests/usr.bin/xlint/check-expect.lua.

For now, this extra check needs to be run manually.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/check-expect.lua
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/directive-for.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-include.mk \
src/usr.bin/make/unit-tests/varmod-indirect.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-order.mk
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varname-dot-suffixes.mk

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

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 12:35:18 UTC 2022

Modified Files:
src/usr.bin/make/unit-tests: directive-for.mk directive-include.mk
varmod-indirect.mk varmod-order.mk varname-dot-suffixes.mk
Added Files:
src/usr.bin/make/unit-tests: check-expect.lua

Log Message:
tests/make: ensure that the 'expect' comments in tests are correct

Based on tests/usr.bin/xlint/check-expect.lua.

For now, this extra check needs to be run manually.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/check-expect.lua
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/unit-tests/directive-for.mk
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/directive-include.mk \
src/usr.bin/make/unit-tests/varmod-indirect.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-order.mk
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/varname-dot-suffixes.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/directive-for.mk
diff -u src/usr.bin/make/unit-tests/directive-for.mk:1.12 src/usr.bin/make/unit-tests/directive-for.mk:1.13
--- src/usr.bin/make/unit-tests/directive-for.mk:1.12	Sat Jan  8 10:22:03 2022
+++ src/usr.bin/make/unit-tests/directive-for.mk	Sat Jan 15 12:35:18 2022
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for.mk,v 1.12 2022/01/08 10:22:03 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.13 2022/01/15 12:35:18 rillig Exp $
 #
 # Tests for the .for directive.
 #
@@ -157,10 +157,10 @@ var=	outer
 
 
 # An empty list of variables to the left of the 'in' is a parse error.
-.for in value			# expect: no iteration variables in for
+.for in value			# expect+0: no iteration variables in for
 # XXX: The loop body is evaluated once, even with the parse error above.
-.  error			# expect: Missing argument for ".error"
-.endfor# expect: for-less endfor
+.  error			# expect+0: Missing argument for ".error"
+.endfor# expect+0: for-less endfor
 
 # An empty list of iteration values to the right of the 'in' is accepted.
 # Unlike in the shell, it is not a parse error.
@@ -184,7 +184,7 @@ var=	outer
 # is processed.
 .for var in value
 .  if 0
-.endfor# expect: 1 open conditional
+.endfor# expect+0: 1 open conditional
 
 # If there are no iteration values, the loop body is not processed, and the
 # check for mismatched conditionals is not performed.
@@ -200,8 +200,8 @@ var=	outer
 .if 0
 .  for var in value		# does not need a corresponding .endfor
 .endif
-.endfor# expect: for-less endfor
-.endif# expect: if-less endif
+.endfor# expect+0: for-less endfor
+.endif# expect+0: if-less endif
 
 
 # When a .for without the corresponding .endfor occurs in an active branch of
@@ -209,7 +209,7 @@ var=	outer
 # without looking at any other directives.
 .if 1
 .  for var in value
-.endif			# expect: if-less endif
+.endif			# expect+0: if-less endif
 .  endfor			# no 'for-less endfor'
 .endif# no 'if-less endif'
 

Index: src/usr.bin/make/unit-tests/directive-include.mk
diff -u src/usr.bin/make/unit-tests/directive-include.mk:1.10 src/usr.bin/make/unit-tests/directive-include.mk:1.11
--- src/usr.bin/make/unit-tests/directive-include.mk:1.10	Fri Jan  7 08:20:00 2022
+++ src/usr.bin/make/unit-tests/directive-include.mk	Sat Jan 15 12:35:18 2022
@@ -1,4 +1,4 @@
-# $NetBSD: directive-include.mk,v 1.10 2022/01/07 08:20:00 rillig Exp $
+# $NetBSD: directive-include.mk,v 1.11 2022/01/15 12:35:18 rillig Exp $
 #
 # Tests for the .include directive, which includes another file.
 
@@ -62,7 +62,7 @@ include /dev/null /dev/null
 include
 
 # XXX: trailing whitespace in diagnostic, missing quotes around filename
-### expect+1: Could not find
+### TODO: expect+1: Could not find
 # The following include directive behaves differently, depending on whether
 # the current file has a slash or is a relative filename.  In the first case,
 # make opens the directory of the current file and tries to read from it,
Index: src/usr.bin/make/unit-tests/varmod-indirect.mk
diff -u src/usr.bin/make/unit-tests/varmod-indirect.mk:1.10 src/usr.bin/make/unit-tests/varmod-indirect.mk:1.11
--- src/usr.bin/make/unit-tests/varmod-indirect.mk:1.10	Sat Jan  8 20:21:34 2022
+++ src/usr.bin/make/unit-tests/varmod-indirect.mk	Sat Jan 15 12:35:18 2022
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-indirect.mk,v 1.10 2022/01/08 20:21:34 rillig Exp $
+# $NetBSD: varmod-indirect.mk,v 1.11 2022/01/15 12:35:18 rillig Exp $
 #
 # Tests for indirect variable modifiers, such as in ${VAR:${M_modifiers}}.
 # These can be used for very basic purposes like converting a string to either
@@ -15,7 +15,7 @@
 # The following expression generates a parse error since its indirect
 # modifier contains more than a sole variable expression.
 #
-# expect+1: Unknown modifier '$'
+# expect+1: Unknown modifier "${"
 .if ${value:L:${:US}${:U,value,replacement,}} != 

CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:59:40 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Add Some definitions from AMD APM:

 - CPUID Fn8001 %ecx bit 30 AddrMaskExt.
 - CPUID Fn8008 %ebx bit 13 INT_WBINVD.
 - CPUID Fn8008 %ebx bit 19 IbrsSameMode.
 - CPUID Fn8008 %ebx bit 20 EferLmsleUnsupported.
 - CPUID Fn8008 %ebx bit 28 PSFD.
 - CPUID Fn8008 %edx bit 30 as "B30". Not documented.
 - CPUID Fn801f %eax bit  8 SecureTSC.
 - CPUID Fn801f %eax bit 24 VmsaRegProt.
 - Tested by nonaka@.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.185 src/sys/arch/x86/include/specialreg.h:1.186
--- src/sys/arch/x86/include/specialreg.h:1.185	Sat Jan 15 10:09:15 2022
+++ src/sys/arch/x86/include/specialreg.h	Sat Jan 15 10:59:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.185 2022/01/15 10:09:15 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.186 2022/01/15 10:59:40 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -730,6 +730,7 @@
 #define CPUID_PTSC	  __BIT(27)	/* PerfTsc */
 #define CPUID_L2IPERFC	  __BIT(28)	/* L2I performance counter Extension */
 #define CPUID_MWAITX	  __BIT(29)	/* MWAITX/MONITORX support */
+#define CPUID_ADDRMASKEXT __BIT(30)	/* Breakpoint Addressing Mask ext. */
 
 #define CPUID_AMD_FLAGS4	"\20"	\
 	"\1" "LAHF"	"\2" "CMPLEGACY" "\3" "SVM"	"\4" "EAPIC"	\
@@ -740,7 +741,7 @@
 	"\21" "FMA4"	"\22" "TCE"	"\23" "B18"	"\24" "NodeID"	\
 	"\25" "B20"	"\26" "TBM"	"\27" "TopoExt"	"\30" "PCExtC"	\
 	"\31" "PCExtNB"	"\32" "StrmPM"	"\33" "DBExt"	"\34" "PerfTsc"	\
-	"\35" "L2IPERFC" "\36" "MWAITX"	"\37" "B30"	"\40" "B31"
+	"\35" "L2IPERFC" "\36" "MWAITX"	"\37" "AddrMaskExt" "\40" "B31"
 
 /*
  * Advanced Power Management.
@@ -788,22 +789,29 @@
 #define CPUID_CAPEX_MCOMMIT	   __BIT(8)  /* MCOMMIT instruction */
 #define CPUID_CAPEX_WBNOINVD	   __BIT(9)  /* WBNOINVD instruction */
 #define CPUID_CAPEX_IBPB	   __BIT(12) /* Speculation Control IBPB */
+#define CPUID_CAPEX_INT_WBINVD	   __BIT(13) /* Interruptable WB[NO]INVD */
 #define CPUID_CAPEX_IBRS	   __BIT(14) /* Speculation Control IBRS */
 #define CPUID_CAPEX_STIBP	   __BIT(15) /* Speculation Control STIBP */
 #define CPUID_CAPEX_IBRS_ALWAYSON  __BIT(16) /* IBRS always on mode */
 #define CPUID_CAPEX_STIBP_ALWAYSON __BIT(17) /* STIBP always on mode */
 #define CPUID_CAPEX_PREFER_IBRS	   __BIT(18) /* IBRS preferred */
+#define CPUID_CAPEX_IBRS_SAMEMODE  __BIT(19) /* IBRS same speculation limits */
+#define CPUID_CAPEX_EFER_LSMSLE_UN __BIT(20) /* EFER.LMSLE is unsupported */
 #define CPUID_CAPEX_SSBD	   __BIT(24) /* Speculation Control SSBD */
 #define CPUID_CAPEX_VIRT_SSBD	   __BIT(25) /* Virt Spec Control SSBD */
 #define CPUID_CAPEX_SSB_NO	   __BIT(26) /* SSBD not required */
+#define CPUID_CAPEX_PSFD	   __BIT(28) /* Predictive Store Froward Dis */
 
 #define CPUID_CAPEX_FLAGS	"\20"	   \
 	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			   \
 	"\5RDPRU"			"\7B6"   \
 	"\11MCOMMIT"	"\12WBNOINVD"	"\13B10"			   \
-	"\15IBPB"	"\16B13"	"\17IBRS"	"\20STIBP"	   \
-	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"	"\24B19"   \
-	"\31SSBD"	"\32VIRT_SSBD"	"\33SSB_NO"
+	"\15IBPB"	"\16INT_WBINVD"	"\17IBRS"	"\20STIBP"	   \
+	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"		   \
+			"\24IBRS_SAMEMODE" \
+	"\25EFER_LSMSLE_UN"		   \
+	"\31SSBD"	"\32VIRT_SSBD"	"\33SSB_NO"			   \
+	"\35PSFD"
 
 /* %ecx */
 #define CPUID_CAPEX_PerfTscSize	__BITS(17,16)
@@ -833,6 +841,7 @@
 #define CPUID_AMD_SVM_V_VMSAVE_VMLOAD __BIT(15) /* Virtual VM{SAVE/LOAD} */
 #define CPUID_AMD_SVM_vGIF	  __BIT(16) /* Virtualized GIF */
 #define CPUID_AMD_SVM_GMET	  __BIT(17) /* Guest Mode Execution Trap */
+#define CPUID_AMD_SVM_SSSCHECK	  __BIT(19)  /* Shadow Stack restrictions */
 #define CPUID_AMD_SVM_SPEC_CTRL	  __BIT(20) /* SPEC_CTRL virtualization */
 #define CPUID_AMD_SVM_TLBICTL	  __BIT(24) /* TLB Intercept Control */
 
@@ -843,9 +852,10 @@
 	"\11" "B08"	"\12" "B09"	"\13" "PauseFilter" "\14" "B11"	\
 	"\15" "PFThreshold" "\16" "AVIC" "\17" "B14"			\
 		"\20" "V_VMSAVE_VMLOAD"	\
-	"\21" "VGIF"	"\22" "GMET"	\
+	"\21" "VGIF"	"\22" "GMET"			"\24SSSCHECK"	\
 	"\25" "SPEC_CTRL"		\
-	"\31" "TLBICTL"
+	"\31" "TLBICTL"			\
+	"\35B28"
 
 /*
  * AMD Cache Topology Information.
@@ -872,6 +882,7 @@
 #define CPUID_AMD_ENCMEM_SEVES	__BIT(3)   /* SEV Encrypted State */
 #define CPUID_AMD_ENCMEM_SEV_SNP __BIT(4)  /* Secure Nested Paging */
 #define CPUID_AMD_ENCMEM_VMPL	__BIT(5)   /* Virtual Machine Privilege Lvl */
+#define CPUID_AMD_ENCMEM_SECTSC	__BIT(8)   /* Secure TSC */
 #define CPUID_AMD_ENCMEM_HECC	__BIT(10) 

CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:59:40 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Add Some definitions from AMD APM:

 - CPUID Fn8001 %ecx bit 30 AddrMaskExt.
 - CPUID Fn8008 %ebx bit 13 INT_WBINVD.
 - CPUID Fn8008 %ebx bit 19 IbrsSameMode.
 - CPUID Fn8008 %ebx bit 20 EferLmsleUnsupported.
 - CPUID Fn8008 %ebx bit 28 PSFD.
 - CPUID Fn8008 %edx bit 30 as "B30". Not documented.
 - CPUID Fn801f %eax bit  8 SecureTSC.
 - CPUID Fn801f %eax bit 24 VmsaRegProt.
 - Tested by nonaka@.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/sys/fs/udf

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:55:53 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_direct.c udf_strat_rmw.c

Log Message:
s/adressing/addressing/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/udf/udf_strat_rmw.c

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



CVS commit: src/sys/fs/udf

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:55:53 UTC 2022

Modified Files:
src/sys/fs/udf: udf_strat_direct.c udf_strat_rmw.c

Log Message:
s/adressing/addressing/


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/fs/udf/udf_strat_direct.c
cvs rdiff -u -r1.29 -r1.30 src/sys/fs/udf/udf_strat_rmw.c

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

Modified files:

Index: src/sys/fs/udf/udf_strat_direct.c
diff -u src/sys/fs/udf/udf_strat_direct.c:1.14 src/sys/fs/udf/udf_strat_direct.c:1.15
--- src/sys/fs/udf/udf_strat_direct.c:1.14	Tue May 24 09:55:57 2016
+++ src/sys/fs/udf/udf_strat_direct.c	Sat Jan 15 10:55:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_direct.c,v 1.14 2016/05/24 09:55:57 reinoud Exp $ */
+/* $NetBSD: udf_strat_direct.c,v 1.15 2022/01/15 10:55:53 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.14 2016/05/24 09:55:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.15 2022/01/15 10:55:53 msaitoh Exp $");
 #endif /* not lint */
 
 
@@ -347,7 +347,7 @@ udf_queue_buf_direct(struct udf_strat_ar
 	 * Translate new mappings in lmapping to pmappings and try to
 	 * conglomerate extents to reduce the number of writes.
 	 *
-	 * pmapping to contain lb_nums as used for disc adressing.
+	 * pmapping to contain lb_nums as used for disc addressing.
 	 */
 	pmapping = ump->la_pmapping;
 	sectors  = (buf->b_bcount + sector_size -1) / sector_size;

Index: src/sys/fs/udf/udf_strat_rmw.c
diff -u src/sys/fs/udf/udf_strat_rmw.c:1.29 src/sys/fs/udf/udf_strat_rmw.c:1.30
--- src/sys/fs/udf/udf_strat_rmw.c:1.29	Sat Aug 21 09:59:46 2021
+++ src/sys/fs/udf/udf_strat_rmw.c	Sat Jan 15 10:55:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_rmw.c,v 1.29 2021/08/21 09:59:46 andvar Exp $ */
+/* $NetBSD: udf_strat_rmw.c,v 1.30 2022/01/15 10:55:53 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.29 2021/08/21 09:59:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.30 2022/01/15 10:55:53 msaitoh Exp $");
 #endif /* not lint */
 
 
@@ -956,7 +956,7 @@ udf_queuebuf_rmw(struct udf_strat_args *
 
 	/*
 	 * Translate new mappings in lmapping to pmappings.
-	 * pmapping to contain lb_nums as used for disc adressing.
+	 * pmapping to contain lb_nums as used for disc addressing.
 	 */
 	pmapping = ump->la_pmapping;
 	sectors  = (buf->b_bcount + sector_size -1) / sector_size;



CVS commit: src/sys/arch/evbppc/obs405

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:55:06 UTC 2022

Modified Files:
src/sys/arch/evbppc/obs405: obs600_machdep.c

Log Message:
s/adressing/addressing/


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbppc/obs405/obs600_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/evbppc/obs405

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:55:06 UTC 2022

Modified Files:
src/sys/arch/evbppc/obs405: obs600_machdep.c

Log Message:
s/adressing/addressing/


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbppc/obs405/obs600_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/evbppc/obs405/obs600_machdep.c
diff -u src/sys/arch/evbppc/obs405/obs600_machdep.c:1.16 src/sys/arch/evbppc/obs405/obs600_machdep.c:1.17
--- src/sys/arch/evbppc/obs405/obs600_machdep.c:1.16	Tue Aug  3 09:25:44 2021
+++ src/sys/arch/evbppc/obs405/obs600_machdep.c	Sat Jan 15 10:55:06 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: obs600_machdep.c,v 1.16 2021/08/03 09:25:44 rin Exp $	*/
+/*	$NetBSD: obs600_machdep.c,v 1.17 2022/01/15 10:55:06 msaitoh Exp $	*/
 /*	Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $	*/
 
 /*
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: obs600_machdep.c,v 1.16 2021/08/03 09:25:44 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obs600_machdep.c,v 1.17 2022/01/15 10:55:06 msaitoh Exp $");
 
 #include "opt_ddb.h"
 
@@ -275,7 +275,7 @@ read_eeprom(int len, char *buf)
 	IIC0_WRITE(IIC_MDCNTL,
 	IIC0_READ(IIC_MDCNTL) | IIC_MDCNTL_FMDB | IIC_MDCNTL_FSDB);
 
-	/* 7-bit adressing */
+	/* 7-bit addressing */
 	IIC0_WRITE(IIC_HMADR, 0);
 	IIC0_WRITE(IIC_LMADR, I2C_EEPROM_ADDR << 1);
 



CVS commit: src/common/lib/libc/string

2022-01-15 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Jan 15 10:38:56 UTC 2022

Modified Files:
src/common/lib/libc/string: memset2.c

Log Message:
fix typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/string/memset2.c

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

Modified files:

Index: src/common/lib/libc/string/memset2.c
diff -u src/common/lib/libc/string/memset2.c:1.10 src/common/lib/libc/string/memset2.c:1.11
--- src/common/lib/libc/string/memset2.c:1.10	Mon Apr 19 01:12:10 2021
+++ src/common/lib/libc/string/memset2.c	Sat Jan 15 10:38:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: memset2.c,v 1.10 2021/04/19 01:12:10 simonb Exp $	*/
+/*	$NetBSD: memset2.c,v 1.11 2022/01/15 10:38:56 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: memset2.c,v 1.10 2021/04/19 01:12:10 simonb Exp $");
+__RCSID("$NetBSD: memset2.c,v 1.11 2022/01/15 10:38:56 andvar Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -95,7 +95,7 @@ memset(void *addr, int c, size_t len)
 
 	/*
 	 * Pad out the fill byte (v) across a memword_t.
-	 * The conditional at the end prevents GCC from complaing about
+	 * The conditional at the end prevents GCC from complaining about
 	 * shift count >= width of type 
 	 */
 	fill = (unsigned char)c;
@@ -183,13 +183,13 @@ memset(void *addr, int c, size_t len)
 		/*
 		 * We want to clear  leading bytes in the word.
 		 * On big/little endian, these are the most/least significant
-		 * bits, respectively,  But as we want the mask of the bytes to
+		 * bits, respectively.  But as we want the mask of the bytes to
 		 * keep, we have to complement the mask.  So after we shift,
 		 * the keep_mask will only have bits set for the bytes we won't
 		 * be filling.
 		 *
 		 * But the keep_mask could already have bytes to preserve
-		 * if the amount to fill was less than the amount of traiing
+		 * if the amount to fill was less than the amount of trailing
 		 * space in the first word.
 		 */
 #if BYTE_ORDER == BIG_ENDIAN



CVS commit: src/common/lib/libc/string

2022-01-15 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Jan 15 10:38:56 UTC 2022

Modified Files:
src/common/lib/libc/string: memset2.c

Log Message:
fix typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/string/memset2.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/mips/mips

2022-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 15 10:32:32 UTC 2022

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

Log Message:
Add 'mach cpuinfo' support


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/mips/mips/db_interface.c

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

Modified files:

Index: src/sys/arch/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.95 src/sys/arch/mips/mips/db_interface.c:1.96
--- src/sys/arch/mips/mips/db_interface.c:1.95	Sat Jan 15 08:56:41 2022
+++ src/sys/arch/mips/mips/db_interface.c	Sat Jan 15 10:32:32 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.95 2022/01/15 08:56:41 skrll Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.96 2022/01/15 10:32:32 skrll Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.95 2022/01/15 08:56:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.96 2022/01/15 10:32:32 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_multiprocessor.h"
@@ -88,8 +88,10 @@ static void db_mach_cpu_cmd(db_expr_t, b
 #endif
 
 void db_cp0dump_cmd(db_expr_t, bool, db_expr_t, const char *);
+void db_cpuinfo_cmd(db_expr_t, bool, db_expr_t, const char *);
 void db_kvtophys_cmd(db_expr_t, bool, db_expr_t, const char *);
 void db_tlbdump_cmd(db_expr_t, bool, db_expr_t, const char *);
+
 #ifdef MIPS64_XLS
 void db_mfcr_cmd(db_expr_t, bool, db_expr_t, const char *);
 void db_mtcr_cmd(db_expr_t, bool, db_expr_t, const char *);
@@ -570,6 +572,66 @@ db_cp0dump_cmd(db_expr_t addr, bool have
 	}
 }
 
+
+static void
+show_cpuinfo(struct cpu_info *kci)
+{
+	struct cpu_info cpuinfobuf;
+	cpuid_t cpuid;
+	int i;
+
+	db_read_bytes((db_addr_t)kci, sizeof(cpuinfobuf), (char *));
+
+	struct cpu_info *ci = 
+	cpuid = ci->ci_cpuid;
+	db_printf("cpu_info=%p, cpu_name=%s\n", kci, ci->ci_cpuname);
+	db_printf("%p cpu[%lu].ci_cpuid = %lu\n",
+	>ci_cpuid, cpuid, ci->ci_cpuid);
+	db_printf("%p cpu[%lu].ci_curlwp= %p\n",
+	>ci_curlwp, cpuid, ci->ci_curlwp);
+	for (i = 0; i < SOFTINT_COUNT; i++) {
+		db_printf("%p cpu[%lu].ci_softlwps[%d]   = %p\n",
+		>ci_softlwps[i], cpuid, i, ci->ci_softlwps[i]);
+	}
+	db_printf("%p cpu[%lu].ci_want_resched  = %d\n",
+	>ci_want_resched, cpuid, ci->ci_want_resched);
+	db_printf("%p cpu[%lu].ci_cpl   = %d\n",
+	>ci_cpl, cpuid, ci->ci_cpl);
+	db_printf("%p cpu[%lu].ci_softints  = 0x%08x\n",
+	>ci_softints, cpuid, ci->ci_softints);
+	db_printf("%p cpu[%lu].ci_idepth= %u\n",
+	>ci_idepth, cpuid, ci->ci_idepth);
+}
+
+void
+db_cpuinfo_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
+const char *modif)
+{
+#ifdef MULTIPROCESSOR
+	CPU_INFO_ITERATOR cii;
+	struct cpu_info *ci;
+	bool showall = false;
+
+	if (modif != NULL) {
+		for (; *modif != '\0'; modif++) {
+			switch (*modif) {
+			case 'a':
+showall = true;
+break;
+			}
+		}
+	}
+
+	if (showall) {
+		for (CPU_INFO_FOREACH(cii, ci)) {
+			show_cpuinfo(ci);
+		}
+	} else
+#endif /* MULTIPROCESSOR */
+		show_cpuinfo(curcpu());
+}
+
+
 #if (MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) > 0
 static void
 db_watch_cmd(db_expr_t address, bool have_addr, db_expr_t count,
@@ -827,6 +889,10 @@ const struct db_command db_machine_comma
 	{ DDB_ADD_CMD("cp0",	db_cp0dump_cmd,	0,
 		"Dump CP0 registers.",
 		NULL, NULL) },
+	{ DDB_ADD_CMD("cpuinfo", db_cpuinfo_cmd,	0,
+			"Displays the cpuinfo",
+		NULL, NULL)
+	},
 	{ DDB_ADD_CMD("kvtop",	db_kvtophys_cmd,	0,
 		"Print the physical address for a given kernel virtual address",
 		"address",



CVS commit: src/sys/arch/mips/mips

2022-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 15 10:32:32 UTC 2022

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

Log Message:
Add 'mach cpuinfo' support


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/mips/mips/db_interface.c

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



CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:09:15 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Whitespace. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.184 src/sys/arch/x86/include/specialreg.h:1.185
--- src/sys/arch/x86/include/specialreg.h:1.184	Sat Jan 15 09:58:23 2022
+++ src/sys/arch/x86/include/specialreg.h	Sat Jan 15 10:09:15 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.184 2022/01/15 09:58:23 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.185 2022/01/15 10:09:15 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -781,28 +781,28 @@
  */
 
 /* %ebx */
-#define CPUID_CAPEX_CLZERO	__BIT(0)	/* CLZERO instruction */
-#define CPUID_CAPEX_IRPERF	__BIT(1)	/* InstRetCntMsr */
-#define CPUID_CAPEX_XSAVEERPTR	__BIT(2)	/* RstrFpErrPtrs by XRSTOR */
-#define CPUID_CAPEX_RDPRU	__BIT(4)	/* RDPRU instruction */
-#define CPUID_CAPEX_MCOMMIT	__BIT(8)	/* MCOMMIT instruction */
-#define CPUID_CAPEX_WBNOINVD	__BIT(9)	/* WBNOINVD instruction */
-#define CPUID_CAPEX_IBPB	__BIT(12)	/* Speculation Control IBPB */
-#define CPUID_CAPEX_IBRS	__BIT(14)	/* Speculation Control IBRS */
-#define CPUID_CAPEX_STIBP	__BIT(15)	/* Speculation Control STIBP */
-#define CPUID_CAPEX_IBRS_ALWAYSON __BIT(16)	/* IBRS always on mode */
-#define CPUID_CAPEX_STIBP_ALWAYSON __BIT(17)	/* STIBP always on mode */
-#define CPUID_CAPEX_PREFER_IBRS	__BIT(18)	/* IBRS preferred */
-#define CPUID_CAPEX_SSBD	__BIT(24)	/* Speculation Control SSBD */
-#define CPUID_CAPEX_VIRT_SSBD	__BIT(25)	/* Virt Spec Control SSBD */
-#define CPUID_CAPEX_SSB_NO	__BIT(26)	/* SSBD not required */
-
-#define CPUID_CAPEX_FLAGS	"\20"	 \
-	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			 \
-	"\5RDPRU"			"\7B6" \
-	"\11MCOMMIT"	"\12WBNOINVD"	"\13B10"			 \
-	"\15IBPB"	"\16B13"	"\17IBRS"	"\20STIBP"	 \
-	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"	"\24B19" \
+#define CPUID_CAPEX_CLZERO	   __BIT(0)  /* CLZERO instruction */
+#define CPUID_CAPEX_IRPERF	   __BIT(1)  /* InstRetCntMsr */
+#define CPUID_CAPEX_XSAVEERPTR	   __BIT(2)  /* RstrFpErrPtrs by XRSTOR */
+#define CPUID_CAPEX_RDPRU	   __BIT(4)  /* RDPRU instruction */
+#define CPUID_CAPEX_MCOMMIT	   __BIT(8)  /* MCOMMIT instruction */
+#define CPUID_CAPEX_WBNOINVD	   __BIT(9)  /* WBNOINVD instruction */
+#define CPUID_CAPEX_IBPB	   __BIT(12) /* Speculation Control IBPB */
+#define CPUID_CAPEX_IBRS	   __BIT(14) /* Speculation Control IBRS */
+#define CPUID_CAPEX_STIBP	   __BIT(15) /* Speculation Control STIBP */
+#define CPUID_CAPEX_IBRS_ALWAYSON  __BIT(16) /* IBRS always on mode */
+#define CPUID_CAPEX_STIBP_ALWAYSON __BIT(17) /* STIBP always on mode */
+#define CPUID_CAPEX_PREFER_IBRS	   __BIT(18) /* IBRS preferred */
+#define CPUID_CAPEX_SSBD	   __BIT(24) /* Speculation Control SSBD */
+#define CPUID_CAPEX_VIRT_SSBD	   __BIT(25) /* Virt Spec Control SSBD */
+#define CPUID_CAPEX_SSB_NO	   __BIT(26) /* SSBD not required */
+
+#define CPUID_CAPEX_FLAGS	"\20"	   \
+	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			   \
+	"\5RDPRU"			"\7B6"   \
+	"\11MCOMMIT"	"\12WBNOINVD"	"\13B10"			   \
+	"\15IBPB"	"\16B13"	"\17IBRS"	"\20STIBP"	   \
+	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"	"\24B19"   \
 	"\31SSBD"	"\32VIRT_SSBD"	"\33SSB_NO"
 
 /* %ecx */



CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 10:09:15 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Whitespace. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 09:58:23 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Move CPUID_CAPEX_FLAGS next to %eax because it's for %eax.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.183 src/sys/arch/x86/include/specialreg.h:1.184
--- src/sys/arch/x86/include/specialreg.h:1.183	Sat Jan 15 09:55:13 2022
+++ src/sys/arch/x86/include/specialreg.h	Sat Jan 15 09:58:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.183 2022/01/15 09:55:13 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.184 2022/01/15 09:58:23 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -797,11 +797,6 @@
 #define CPUID_CAPEX_VIRT_SSBD	__BIT(25)	/* Virt Spec Control SSBD */
 #define CPUID_CAPEX_SSB_NO	__BIT(26)	/* SSBD not required */
 
-/* %ecx */
-#define CPUID_CAPEX_PerfTscSize	__BITS(17,16)
-#define CPUID_CAPEX_ApicIdSize	__BITS(15,12)
-#define CPUID_CAPEX_NC		__BITS(7,0)
-
 #define CPUID_CAPEX_FLAGS	"\20"	 \
 	"\1CLZERO"	"\2IRPERF"	"\3XSAVEERPTR"			 \
 	"\5RDPRU"			"\7B6" \
@@ -810,6 +805,11 @@
 	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"	"\24B19" \
 	"\31SSBD"	"\32VIRT_SSBD"	"\33SSB_NO"
 
+/* %ecx */
+#define CPUID_CAPEX_PerfTscSize	__BITS(17,16)
+#define CPUID_CAPEX_ApicIdSize	__BITS(15,12)
+#define CPUID_CAPEX_NC		__BITS(7,0)
+
 /*
  * AMD SVM Revision and Feature.
  * CPUID Fn8000_000a



CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 09:58:23 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Move CPUID_CAPEX_FLAGS next to %eax because it's for %eax.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 09:55:14 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
No functional change.

 - Modify comment. Add comment. Fix typo. Mainly taken from dragonfly.
 - Use __BIT().


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.182 src/sys/arch/x86/include/specialreg.h:1.183
--- src/sys/arch/x86/include/specialreg.h:1.182	Fri Jan 14 15:46:41 2022
+++ src/sys/arch/x86/include/specialreg.h	Sat Jan 15 09:55:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.182 2022/01/14 15:46:41 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.183 2022/01/15 09:55:13 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -97,29 +97,29 @@
 /*
  * CR4
  */
-#define CR4_VME		0x0001 /* virtual 8086 mode extension enable */
-#define CR4_PVI		0x0002 /* protected mode virtual interrupt enable */
-#define CR4_TSD		0x0004 /* restrict RDTSC instruction to cpl 0 */
-#define CR4_DE		0x0008 /* debugging extension */
-#define CR4_PSE		0x0010 /* large (4MB) page size enable */
-#define CR4_PAE		0x0020 /* physical address extension enable */
-#define CR4_MCE		0x0040 /* machine check enable */
-#define CR4_PGE		0x0080 /* page global enable */
-#define CR4_PCE		0x0100 /* enable RDPMC instruction for all cpls */
-#define CR4_OSFXSR	0x0200 /* enable fxsave/fxrestor and SSE */
-#define CR4_OSXMMEXCPT	0x0400 /* enable unmasked SSE exceptions */
-#define CR4_UMIP	0x0800 /* user-mode instruction prevention */
+#define CR4_VME		0x0001 /* Virtual 8086 mode extension enable */
+#define CR4_PVI		0x0002 /* Protected mode virtual interrupt enable */
+#define CR4_TSD		0x0004 /* Restrict RDTSC instruction to cpl 0 */
+#define CR4_DE		0x0008 /* Debugging extension */
+#define CR4_PSE		0x0010 /* Large (4MB) page size enable */
+#define CR4_PAE		0x0020 /* Physical address extension enable */
+#define CR4_MCE		0x0040 /* Machine check enable */
+#define CR4_PGE		0x0080 /* Page global enable */
+#define CR4_PCE		0x0100 /* Enable RDPMC instruction for all cpls */
+#define CR4_OSFXSR	0x0200 /* Enable fxsave/fxrestor and SSE */
+#define CR4_OSXMMEXCPT	0x0400 /* Enable unmasked SSE exceptions */
+#define CR4_UMIP	0x0800 /* User Mode Instruction Prevention */
 #define CR4_LA57	0x1000 /* 57-bit linear addresses */
-#define CR4_VMXE	0x2000 /* enable VMX operations */
-#define CR4_SMXE	0x4000 /* enable SMX operations */
-#define CR4_FSGSBASE	0x0001 /* enable *FSBASE and *GSBASE instructions */
-#define CR4_PCIDE	0x0002 /* enable Process Context IDentifiers */
-#define CR4_OSXSAVE	0x0004 /* enable xsave and xrestore */
-#define CR4_SMEP	0x0010 /* enable SMEP support */
-#define CR4_SMAP	0x0020 /* enable SMAP support */
-#define CR4_PKE		0x0040 /* enable Protection Keys for user pages */
-#define CR4_CET		0x0080 /* enable CET */
-#define CR4_PKS		0x0100 /* enable Protection Keys for kern pages */
+#define CR4_VMXE	0x2000 /* Enable VMX operations */
+#define CR4_SMXE	0x4000 /* Enable SMX operations */
+#define CR4_FSGSBASE	0x0001 /* Enable *FSBASE and *GSBASE instructions */
+#define CR4_PCIDE	0x0002 /* Enable Process Context IDentifiers */
+#define CR4_OSXSAVE	0x0004 /* Enable xsave and xrestore */
+#define CR4_SMEP	0x0010 /* Enable SMEP support */
+#define CR4_SMAP	0x0020 /* Enable SMAP support */
+#define CR4_PKE		0x0040 /* Enable Protection Keys for user pages */
+#define CR4_CET		0x0080 /* Enable CET */
+#define CR4_PKS		0x0100 /* Enable Protection Keys for kern pages */
 
 /*
  * Extended Control Register XCR0
@@ -172,17 +172,17 @@
 #define XSAVE_MAX_COMPONENT XSAVE_Hi16_ZMM
 
 /*
- * CPUID "features" bits
+ * "features" bits.
+ * CPUID Fn0001
  */
-
-/* Fn0001 %edx features */
+/* %edx */
 #define CPUID_FPU	0x0001	/* processor has an FPU? */
 #define CPUID_VME	0x0002	/* has virtual mode (%cr4's VME/PVI) */
 #define CPUID_DE	0x0004	/* has debugging extension */
 #define CPUID_PSE	0x0008	/* has 4MB page size extension */
 #define CPUID_TSC	0x0010	/* has time stamp counter */
 #define CPUID_MSR	0x0020	/* has model specific registers */
-#define CPUID_PAE	0x0040	/* has phys address extension */
+#define CPUID_PAE	0x0040	/* has physical address extension */
 #define CPUID_MCE	0x0080	/* has machine check exception */
 #define CPUID_CX8	0x0100	/* has CMPXCHG8B instruction */
 #define CPUID_APIC	0x0200	/* has enabled APIC */
@@ -193,17 +193,17 @@
 #define CPUID_CMOV	0x8000	/* has CMOVcc instruction */
 #define CPUID_PAT	0x0001	/* Page 

CVS commit: src/sys/arch/x86/include

2022-01-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jan 15 09:55:14 UTC 2022

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
No functional change.

 - Modify comment. Add comment. Fix typo. Mainly taken from dragonfly.
 - Use __BIT().


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 09:08:57 UTC 2022

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

Log Message:
make: remove trailing whitespace in meta.c


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/usr.bin/make/meta.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/meta.c
diff -u src/usr.bin/make/meta.c:1.188 src/usr.bin/make/meta.c:1.189
--- src/usr.bin/make/meta.c:1.188	Fri Jan 14 18:43:23 2022
+++ src/usr.bin/make/meta.c	Sat Jan 15 09:08:57 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: meta.c,v 1.188 2022/01/14 18:43:23 sjg Exp $ */
+/*  $NetBSD: meta.c,v 1.189 2022/01/15 09:08:57 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1096,7 +1096,7 @@ meta_filter_cmd(Buffer *buf, GNode *gn, 
 Var_Subst(buf->data, gn, VARE_WANTRES, );
 return s;
 }
-
+
 static int
 meta_cmd_cmp(GNode *gn, char *a, char *b)
 {



CVS commit: src/usr.bin/make

2022-01-15 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 15 09:08:57 UTC 2022

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

Log Message:
make: remove trailing whitespace in meta.c


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/usr.bin/make/meta.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/mips/mips

2022-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 15 08:56:41 UTC 2022

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

Log Message:
sort


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/mips/mips/db_interface.c

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

Modified files:

Index: src/sys/arch/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.94 src/sys/arch/mips/mips/db_interface.c:1.95
--- src/sys/arch/mips/mips/db_interface.c:1.94	Sun May 23 23:22:55 2021
+++ src/sys/arch/mips/mips/db_interface.c	Sat Jan 15 08:56:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.94 2021/05/23 23:22:55 dholland Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.95 2022/01/15 08:56:41 skrll Exp $	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.94 2021/05/23 23:22:55 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.95 2022/01/15 08:56:41 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_multiprocessor.h"
@@ -87,9 +87,9 @@ static void db_unwatch_cmd(db_expr_t, bo
 static void db_mach_cpu_cmd(db_expr_t, bool, db_expr_t, const char *);
 #endif
 
-void db_tlbdump_cmd(db_expr_t, bool, db_expr_t, const char *);
-void db_kvtophys_cmd(db_expr_t, bool, db_expr_t, const char *);
 void db_cp0dump_cmd(db_expr_t, bool, db_expr_t, const char *);
+void db_kvtophys_cmd(db_expr_t, bool, db_expr_t, const char *);
+void db_tlbdump_cmd(db_expr_t, bool, db_expr_t, const char *);
 #ifdef MIPS64_XLS
 void db_mfcr_cmd(db_expr_t, bool, db_expr_t, const char *);
 void db_mtcr_cmd(db_expr_t, bool, db_expr_t, const char *);



CVS commit: src/sys/arch/mips/mips

2022-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 15 08:56:41 UTC 2022

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

Log Message:
sort


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/mips/mips/db_interface.c

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



CVS commit: src/sys/arch

2022-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 15 08:14:37 UTC 2022

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

Log Message:
Remove unnecessary brackets


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/aarch64/include/pmap.h
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/arm/include/arm32/pmap.h

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

Modified files:

Index: src/sys/arch/aarch64/include/pmap.h
diff -u src/sys/arch/aarch64/include/pmap.h:1.50 src/sys/arch/aarch64/include/pmap.h:1.51
--- src/sys/arch/aarch64/include/pmap.h:1.50	Fri Jan 14 07:21:53 2022
+++ src/sys/arch/aarch64/include/pmap.h	Sat Jan 15 08:14:37 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.50 2022/01/14 07:21:53 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.51 2022/01/15 08:14:37 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 #define	PMAP_TLB_NEED_SHOOTDOWN		1
 #endif
 
-#define	PMAP_TLB_FLUSH_ASID_ON_RESET	(true)
+#define	PMAP_TLB_FLUSH_ASID_ON_RESET	true
 
 /* Maximum number of ASIDs. Some CPUs have less.*/
 #define	PMAP_TLB_NUM_PIDS		65536

Index: src/sys/arch/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.171 src/sys/arch/arm/include/arm32/pmap.h:1.172
--- src/sys/arch/arm/include/arm32/pmap.h:1.171	Sat Oct 16 07:04:36 2021
+++ src/sys/arch/arm/include/arm32/pmap.h	Sat Jan 15 08:14:37 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.171 2021/10/16 07:04:36 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.172 2022/01/15 08:14:37 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -89,7 +89,7 @@
 #if PMAP_TLB_MAX > 1
 #define	PMAP_TLB_NEED_SHOOTDOWN		1
 #endif
-#define	PMAP_TLB_FLUSH_ASID_ON_RESET	(arm_has_tlbiasid_p)
+#define	PMAP_TLB_FLUSH_ASID_ON_RESET	arm_has_tlbiasid_p
 #define	PMAP_TLB_NUM_PIDS		256
 #define	cpu_set_tlb_info(ci, ti)((void)((ci)->ci_tlb_info = (ti)))
 #if PMAP_TLB_MAX > 1



CVS commit: src/sys/arch

2022-01-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 15 08:14:37 UTC 2022

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

Log Message:
Remove unnecessary brackets


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/aarch64/include/pmap.h
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/arm/include/arm32/pmap.h

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