CVS commit: src/tests/usr.bin/indent

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 22:45:34 UTC 2021

Modified Files:
src/tests/usr.bin/indent: comment-line-end.0 comment-line-end.0.stdout
token-lparen.0 token-lparen.0.stdout

Log Message:
tests/indent: add more tests with ')(', found bug in '//'


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/comment-line-end.0 \
src/tests/usr.bin/indent/comment-line-end.0.stdout
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/token-lparen.0
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/token-lparen.0.stdout

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/indent/comment-line-end.0
diff -u src/tests/usr.bin/indent/comment-line-end.0:1.7 src/tests/usr.bin/indent/comment-line-end.0:1.8
--- src/tests/usr.bin/indent/comment-line-end.0:1.7	Fri Sep 24 16:29:31 2021
+++ src/tests/usr.bin/indent/comment-line-end.0	Thu Sep 30 22:45:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: comment-line-end.0,v 1.7 2021/09/24 16:29:31 rillig Exp $ */
+/* $NetBSD: comment-line-end.0,v 1.8 2021/09/30 22:45:34 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -33,4 +33,12 @@ foo(); // C++ comment
 bar();
 }
 
+void
+comment_at_end_of_function(void)
+{
+if (cond)
+	statement();
+// comment
+}
+
 // end-of-line comment at the end of the file
Index: src/tests/usr.bin/indent/comment-line-end.0.stdout
diff -u src/tests/usr.bin/indent/comment-line-end.0.stdout:1.7 src/tests/usr.bin/indent/comment-line-end.0.stdout:1.8
--- src/tests/usr.bin/indent/comment-line-end.0.stdout:1.7	Fri Sep 24 16:29:31 2021
+++ src/tests/usr.bin/indent/comment-line-end.0.stdout	Thu Sep 30 22:45:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: comment-line-end.0.stdout,v 1.7 2021/09/24 16:29:31 rillig Exp $ */
+/* $NetBSD: comment-line-end.0.stdout,v 1.8 2021/09/30 22:45:34 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -37,6 +37,17 @@ c99_comment(void)
 	bar();
 }
 
+void
+comment_at_end_of_function(void)
+{
+	if (cond)
+		statement();
+/* $ FIXME: The next line is indented with tab-space, should be tab. */
+	 // comment
+ 
+/* $ FIXME: The above line has 1 trailing space. */
+}
+
 // end-of-line comment at the end of the file
 
 /* $ FIXME: the extra empty line above this line is wrong. */

Index: src/tests/usr.bin/indent/token-lparen.0
diff -u src/tests/usr.bin/indent/token-lparen.0:1.2 src/tests/usr.bin/indent/token-lparen.0:1.3
--- src/tests/usr.bin/indent/token-lparen.0:1.2	Tue Sep 28 06:57:48 2021
+++ src/tests/usr.bin/indent/token-lparen.0	Thu Sep 30 22:45:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: token-lparen.0,v 1.2 2021/09/28 06:57:48 rillig Exp $ */
+/* $NetBSD: token-lparen.0,v 1.3 2021/09/30 22:45:34 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -27,6 +27,17 @@ function(void)
 {
 other_function();
 other_function("first", 2, "last argument"[4]);
+
+if (false)(void)x;
+if (false)(func)(arg);
+if (false)(cond)?123:456;
+
+/* C99 compound literal */
+origin = (struct point){0,0};
+
+/* GCC statement expression */
+/* expr = ({if(expr)debug();expr;}); */
+/* $ XXX: Generates wrong 'Error@36: Unbalanced parens'. */
 }
 
 int array[] = {

Index: src/tests/usr.bin/indent/token-lparen.0.stdout
diff -u src/tests/usr.bin/indent/token-lparen.0.stdout:1.4 src/tests/usr.bin/indent/token-lparen.0.stdout:1.5
--- src/tests/usr.bin/indent/token-lparen.0.stdout:1.4	Thu Sep 30 21:48:12 2021
+++ src/tests/usr.bin/indent/token-lparen.0.stdout	Thu Sep 30 22:45:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: token-lparen.0.stdout,v 1.4 2021/09/30 21:48:12 rillig Exp $ */
+/* $NetBSD: token-lparen.0.stdout,v 1.5 2021/09/30 22:45:34 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -27,6 +27,21 @@ function(void)
 {
 	other_function();
 	other_function("first", 2, "last argument"[4]);
+
+	if (false)
+		(void)x;
+	if (false)
+		(func)(arg);
+	if (false)
+		(cond) ? 123 : 456;
+
+	/* C99 compound literal */
+	origin = (struct point){
+		0, 0
+	};
+
+	/* GCC statement expression */
+	/* expr = ({if(expr)debug();expr;}); */
 }
 
 int array[] = {



CVS commit: src/tests/usr.bin/indent

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 22:45:34 UTC 2021

Modified Files:
src/tests/usr.bin/indent: comment-line-end.0 comment-line-end.0.stdout
token-lparen.0 token-lparen.0.stdout

Log Message:
tests/indent: add more tests with ')(', found bug in '//'


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/comment-line-end.0 \
src/tests/usr.bin/indent/comment-line-end.0.stdout
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/token-lparen.0
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/token-lparen.0.stdout

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



CVS commit: othersrc/external/bsd/bufgap/dist

2021-09-30 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu Sep 30 22:16:57 UTC 2021

Modified Files:
othersrc/external/bsd/bufgap/dist: gap.h main.c

Log Message:
make the test program  print the current version when invoked with -V


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.h
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/main.c

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

Modified files:

Index: othersrc/external/bsd/bufgap/dist/gap.h
diff -u othersrc/external/bsd/bufgap/dist/gap.h:1.1 othersrc/external/bsd/bufgap/dist/gap.h:1.2
--- othersrc/external/bsd/bufgap/dist/gap.h:1.1	Thu Sep 30 22:01:03 2021
+++ othersrc/external/bsd/bufgap/dist/gap.h	Thu Sep 30 22:16:57 2021
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef GAP_H_
-#define GAP_H_	20210920
+#define GAP_H_	20210930
 
 #include 
 

Index: othersrc/external/bsd/bufgap/dist/main.c
diff -u othersrc/external/bsd/bufgap/dist/main.c:1.2 othersrc/external/bsd/bufgap/dist/main.c:1.3
--- othersrc/external/bsd/bufgap/dist/main.c:1.2	Thu Sep 30 22:01:03 2021
+++ othersrc/external/bsd/bufgap/dist/main.c	Thu Sep 30 22:16:57 2021
@@ -29,6 +29,10 @@
 
 #include "gap.h"
 
+#define STRINGIFY(x)	#x
+
+#define GAP_VERSION_STRING(x)	STRINGIFY(x)
+
  /* print stats for current position */
 static int
 printstats(gap_t *gap)
@@ -70,7 +74,12 @@ main(int argc, char **argv)
 	int	 ok;
 	int	 i;
 
-	while ((i = getopt(argc, argv, "")) != -1) {
+	while ((i = getopt(argc, argv, "V")) != -1) {
+		switch(i) {
+		case 'V':
+			printf("%s: gap version: " GAP_VERSION_STRING(GAP_H_) "\n", *argv);
+			exit(EXIT_SUCCESS);
+		}
 	}
 	gap = gap_new();
 	while ((s = fgetln(stdin, )) != NULL) {



CVS commit: othersrc/external/bsd/bufgap/dist

2021-09-30 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu Sep 30 22:16:57 UTC 2021

Modified Files:
othersrc/external/bsd/bufgap/dist: gap.h main.c

Log Message:
make the test program  print the current version when invoked with -V


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/gap.h
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/bufgap/dist/main.c

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



CVS commit: othersrc/external/bsd/bufgap/dist

2021-09-30 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu Sep 30 22:11:59 UTC 2021

Modified Files:
othersrc/external/bsd/bufgap/dist: libgap.3

Log Message:
Update the date for this man page

Also add the explanation for the string parameters to gap_exec_string()


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/libgap.3

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

Modified files:

Index: othersrc/external/bsd/bufgap/dist/libgap.3
diff -u othersrc/external/bsd/bufgap/dist/libgap.3:1.1 othersrc/external/bsd/bufgap/dist/libgap.3:1.2
--- othersrc/external/bsd/bufgap/dist/libgap.3:1.1	Thu Sep 30 22:01:03 2021
+++ othersrc/external/bsd/bufgap/dist/libgap.3	Thu Sep 30 22:11:59 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: libgap.3,v 1.1 2021/09/30 22:01:03 agc Exp $
+.\" $NetBSD: libgap.3,v 1.2 2021/09/30 22:11:59 agc Exp $
 .\"
 .\" Copyright (c) 2021 Alistair Crooks 
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 24, 2020
+.Dd September 30, 2021
 .Dt LIBGAP 3
 .Os
 .Sh NAME
@@ -353,6 +353,26 @@ command in the
 .Xr vi 1
 editor.
 .Ed
+The list of verbs for
+.Fo gap_exec_string
+.Fc
+is as follows
+.Bl -tag -width XXXLHSRHSXXX
+.It Dv lhs?
+Return the contents of the buffer gap to the left of the pointer as a byte array.
+The number of bytes is returned in the area pointed to by
+.Fa *n
+.It Dv name?
+Return the contents of the filename associated with the buffer gap as
+a byte array.
+.It Dv rhs?
+Return the contents of the buffer gap to the right of the pointer as a byte array.
+The number of bytes is returned in the area pointed to by
+.Fa *n
+.Ed
+The caller is responsible for calling
+.Xr free 3
+to release the storage allocated for these byte arrays.
 .Sh SEE ALSO
 .Xr agcre 1 ,
 .Xr vi 1



CVS commit: othersrc/external/bsd/bufgap/dist

2021-09-30 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu Sep 30 22:11:59 UTC 2021

Modified Files:
othersrc/external/bsd/bufgap/dist: libgap.3

Log Message:
Update the date for this man page

Also add the explanation for the string parameters to gap_exec_string()


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/bufgap/dist/libgap.3

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



CVS commit: othersrc/external/bsd/bufgap

2021-09-30 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu Sep 30 22:01:04 UTC 2021

Modified Files:
othersrc/external/bsd/bufgap: Makefile
othersrc/external/bsd/bufgap/dist: main.c
Added Files:
othersrc/external/bsd/bufgap/bin: 1.data 1.expected 1.in 2.data
2.expected 2.in 3.expected 3.in 4.expected 4.in 5.expected 5.in
6.expected 6.in 7.expected 7.in Makefile
othersrc/external/bsd/bufgap/dist: Makefile TODO agcre-embed.c
agcre-embed.h gap.c gap.h libgap.3
othersrc/external/bsd/bufgap/lib: Makefile shlib_version
Removed Files:
othersrc/external/bsd/bufgap/bufgap: Makefile
othersrc/external/bsd/bufgap/dist: bufgap bufgap.1 bufgap.3 bufgap.c
bufgap.h defs.h
othersrc/external/bsd/bufgap/libbufgap: Makefile config.h shlib_version

Log Message:
Update buffer gap routines to the latest API and functionality - 20210930.

The API has been consolidated around 4 functions:

1. gap_new() - returns a new (opaque) buffer gap structure
2. gap_dispose() - dispose of a previously allocated buffer gap structure
3. gap_exec() - perform operations on the buffer gap which expect an
   integer return value
4. gap_exec_string() - perform operations on the buffer gap which return a byte
   array (typically return buffer contents, or the buffer name)

All of the "verbs" are described in the libgap.3 manual page, found in the
dist directory. The main.c test program, again found in the dist directory,
gives 7 worked examples of how to use the functionality to achieve desired ends,
and there are 7 test input files, along with expected results, which are
provided as a regression test suite - accessible using "make t" from the top
level directory.

The buffer gap routines use a copy of the embedded agcre regexp library to
provide bounded (non-exponential time) results for regexp searching forwards
and backwards - for more information, see the agcre directory at the same level
as this code, or the source code in dist/agcre-embed.[ch].

Also move to a more usual reachover infrastructure


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/bufgap/Makefile
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/bufgap/bin/1.data \
othersrc/external/bsd/bufgap/bin/1.expected \
othersrc/external/bsd/bufgap/bin/1.in \
othersrc/external/bsd/bufgap/bin/2.data \
othersrc/external/bsd/bufgap/bin/2.expected \
othersrc/external/bsd/bufgap/bin/2.in \
othersrc/external/bsd/bufgap/bin/3.expected \
othersrc/external/bsd/bufgap/bin/3.in \
othersrc/external/bsd/bufgap/bin/4.expected \
othersrc/external/bsd/bufgap/bin/4.in \
othersrc/external/bsd/bufgap/bin/5.expected \
othersrc/external/bsd/bufgap/bin/5.in \
othersrc/external/bsd/bufgap/bin/6.expected \
othersrc/external/bsd/bufgap/bin/6.in \
othersrc/external/bsd/bufgap/bin/7.expected \
othersrc/external/bsd/bufgap/bin/7.in \
othersrc/external/bsd/bufgap/bin/Makefile
cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/bufgap/bufgap/Makefile
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/bufgap/dist/Makefile \
othersrc/external/bsd/bufgap/dist/TODO \
othersrc/external/bsd/bufgap/dist/agcre-embed.c \
othersrc/external/bsd/bufgap/dist/agcre-embed.h \
othersrc/external/bsd/bufgap/dist/gap.c \
othersrc/external/bsd/bufgap/dist/gap.h \
othersrc/external/bsd/bufgap/dist/libgap.3
cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/bufgap/dist/bufgap \
othersrc/external/bsd/bufgap/dist/defs.h
cvs rdiff -u -r1.3 -r0 othersrc/external/bsd/bufgap/dist/bufgap.1 \
othersrc/external/bsd/bufgap/dist/bufgap.c
cvs rdiff -u -r1.4 -r0 othersrc/external/bsd/bufgap/dist/bufgap.3
cvs rdiff -u -r1.2 -r0 othersrc/external/bsd/bufgap/dist/bufgap.h
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/bufgap/dist/main.c
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/bufgap/lib/Makefile \
othersrc/external/bsd/bufgap/lib/shlib_version
cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/bsd/bufgap/libbufgap/Makefile \
othersrc/external/bsd/bufgap/libbufgap/config.h \
othersrc/external/bsd/bufgap/libbufgap/shlib_version

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



CVS commit: src

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 21:48:12 UTC 2021

Modified Files:
src/tests/usr.bin/indent: declarations.0.stdout parens.0.stdout
token-lparen.0.stdout
src/usr.bin/indent: indent.c

Log Message:
indent: remove space between ')' and '(' in declarations


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/declarations.0.stdout
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/parens.0.stdout
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/token-lparen.0.stdout
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/indent/indent.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/indent/declarations.0.stdout
diff -u src/tests/usr.bin/indent/declarations.0.stdout:1.4 src/tests/usr.bin/indent/declarations.0.stdout:1.5
--- src/tests/usr.bin/indent/declarations.0.stdout:1.4	Sun Sep 26 18:52:16 2021
+++ src/tests/usr.bin/indent/declarations.0.stdout	Thu Sep 30 21:48:12 2021
@@ -1,8 +1,8 @@
-/*	$NetBSD: declarations.0.stdout,v 1.4 2021/09/26 18:52:16 rillig Exp $	*/
+/*	$NetBSD: declarations.0.stdout,v 1.5 2021/09/30 21:48:12 rillig Exp $	*/
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0.stdout 334480 2018-06-01 09:58:44Z pstef $ */
 /* See r303570 */
 
-typedef void (*voidptr) (int *);
+typedef void (*voidptr)(int *);
 
 static const struct {
 	double		x;
@@ -23,7 +23,7 @@ typedef struct Complex {
 
 void
 t1(char *a, int b,
-   void (*fn) (void))
+   void (*fn)(void))
 {
 }
 
@@ -33,7 +33,7 @@ t2(char *x, int y)
 	int		a, b, c;
 	int
 		   *d, *e, *f;
-	int		(*g) (), (*h) (), (*i) ();
+	int		(*g)(), (*h)(), (*i)();
 	int		j, k, l;
 	int		m
 		   ,n

Index: src/tests/usr.bin/indent/parens.0.stdout
diff -u src/tests/usr.bin/indent/parens.0.stdout:1.1 src/tests/usr.bin/indent/parens.0.stdout:1.2
--- src/tests/usr.bin/indent/parens.0.stdout:1.1	Thu Apr  4 15:27:35 2019
+++ src/tests/usr.bin/indent/parens.0.stdout	Thu Sep 30 21:48:12 2021
@@ -1,12 +1,12 @@
-/*	$NetBSD: parens.0.stdout,v 1.1 2019/04/04 15:27:35 kamil Exp $	*/
+/*	$NetBSD: parens.0.stdout,v 1.2 2021/09/30 21:48:12 rillig Exp $	*/
 /* $FreeBSD: head/usr.bin/indent/tests/parens.0.stdout 334583 2018-06-03 19:05:20Z pstef $ */
-typedef void (*xxx) (int,
-			 char);
+typedef void (*xxx)(int,
+			char);
 
-typedef char (*) (int *,
-			  unsigned *,
-			  char,
-			  float *);
+typedef char (*)(int *,
+			 unsigned *,
+			 char,
+			 float *);
 
 void
 test(void)

Index: src/tests/usr.bin/indent/token-lparen.0.stdout
diff -u src/tests/usr.bin/indent/token-lparen.0.stdout:1.3 src/tests/usr.bin/indent/token-lparen.0.stdout:1.4
--- src/tests/usr.bin/indent/token-lparen.0.stdout:1.3	Thu Sep 30 20:58:26 2021
+++ src/tests/usr.bin/indent/token-lparen.0.stdout	Thu Sep 30 21:48:12 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: token-lparen.0.stdout,v 1.3 2021/09/30 20:58:26 rillig Exp $ */
+/* $NetBSD: token-lparen.0.stdout,v 1.4 2021/09/30 21:48:12 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -18,8 +18,7 @@
 /* This is the maximum supported number of parentheses. */
 int zero = (((0)));
 
-/* $ XXX: The space between the parentheses is unusual. */
-void (*action) (void);
+void (*action)(void);
 
 #define macro(arg) ((arg) + 1)
 

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.95 src/usr.bin/indent/indent.c:1.96
--- src/usr.bin/indent/indent.c:1.95	Thu Sep 30 21:38:43 2021
+++ src/usr.bin/indent/indent.c	Thu Sep 30 21:48:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.95 2021/09/30 21:38:43 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.96 2021/09/30 21:48:12 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.95 2021/09/30 21:38:43 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.96 2021/09/30 21:48:12 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -598,6 +598,8 @@ want_blank_before_lparen(void)
 {
 if (!ps.want_blank)
 	return false;
+if (ps.last_token == rparen)
+	return false;
 if (ps.last_token != ident && ps.last_token != funcname)
 	return true;
 if (opt.proc_calls_space)



CVS commit: src

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 21:48:12 UTC 2021

Modified Files:
src/tests/usr.bin/indent: declarations.0.stdout parens.0.stdout
token-lparen.0.stdout
src/usr.bin/indent: indent.c

Log Message:
indent: remove space between ')' and '(' in declarations


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/declarations.0.stdout
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/parens.0.stdout
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/indent/token-lparen.0.stdout
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/indent/indent.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/indent

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 21:38:43 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: untangle want_blank_before_lparen

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/usr.bin/indent/indent.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/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.94 src/usr.bin/indent/indent.c:1.95
--- src/usr.bin/indent/indent.c:1.94	Thu Sep 30 21:33:55 2021
+++ src/usr.bin/indent/indent.c	Thu Sep 30 21:38:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.94 2021/09/30 21:33:55 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.95 2021/09/30 21:38:43 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.94 2021/09/30 21:33:55 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.95 2021/09/30 21:38:43 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -596,11 +596,15 @@ process_newline(void)
 static bool
 want_blank_before_lparen(void)
 {
-return ps.want_blank &&
-	   ((ps.last_token != ident && ps.last_token != funcname) ||
-	opt.proc_calls_space ||
-	(ps.keyword == kw_sizeof ? opt.blank_after_sizeof :
-	 ps.keyword != kw_0 && ps.keyword != kw_offsetof));
+if (!ps.want_blank)
+	return false;
+if (ps.last_token != ident && ps.last_token != funcname)
+	return true;
+if (opt.proc_calls_space)
+	return true;
+if (ps.keyword == kw_sizeof)
+	return opt.blank_after_sizeof;
+return ps.keyword != kw_0 && ps.keyword != kw_offsetof;
 }
 
 static void



CVS commit: src/usr.bin/indent

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 21:38:43 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: untangle want_blank_before_lparen

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/usr.bin/indent/indent.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/indent

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 21:33:55 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: extract want_blank_before_lparen

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/usr.bin/indent/indent.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/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.93 src/usr.bin/indent/indent.c:1.94
--- src/usr.bin/indent/indent.c:1.93	Thu Sep 30 20:58:26 2021
+++ src/usr.bin/indent/indent.c	Thu Sep 30 21:33:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.93 2021/09/30 20:58:26 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.94 2021/09/30 21:33:55 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.93 2021/09/30 20:58:26 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.94 2021/09/30 21:33:55 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -593,6 +593,16 @@ process_newline(void)
 ++line_no;			/* keep track of input line number */
 }
 
+static bool
+want_blank_before_lparen(void)
+{
+return ps.want_blank &&
+	   ((ps.last_token != ident && ps.last_token != funcname) ||
+	opt.proc_calls_space ||
+	(ps.keyword == kw_sizeof ? opt.blank_after_sizeof :
+	 ps.keyword != kw_0 && ps.keyword != kw_offsetof));
+}
+
 static void
 process_lparen_or_lbracket(int dec_ind, bool tabs_to_var, bool sp_sw)
 {
@@ -608,11 +618,7 @@ process_lparen_or_lbracket(int dec_ind, 
 	/* function pointer declarations */
 	indent_declaration(dec_ind, tabs_to_var);
 	ps.dumped_decl_indent = true;
-} else if (ps.want_blank &&
-	((ps.last_token != ident && ps.last_token != funcname) ||
-	opt.proc_calls_space ||
-	(ps.keyword == kw_sizeof ? opt.blank_after_sizeof :
-	ps.keyword != kw_0 && ps.keyword != kw_offsetof)))
+} else if (want_blank_before_lparen())
 	*code.e++ = ' ';
 ps.want_blank = false;
 *code.e++ = token.s[0];



CVS commit: src/usr.bin/indent

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 21:33:55 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: extract want_blank_before_lparen

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/usr.bin/indent/indent.c

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



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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 21:19:16 UTC 2021

Modified Files:
src/sys/arch/aarch64/aarch64: genassym.cf locore.S pmap.c

Log Message:
Ensure TCR_EPD0 is set on entry to pmap_activate and ensure it is set as
early as possible for APs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/genassym.cf
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/genassym.cf
diff -u src/sys/arch/aarch64/aarch64/genassym.cf:1.34 src/sys/arch/aarch64/aarch64/genassym.cf:1.35
--- src/sys/arch/aarch64/aarch64/genassym.cf:1.34	Sat Sep 18 12:25:06 2021
+++ src/sys/arch/aarch64/aarch64/genassym.cf	Thu Sep 30 21:19:16 2021
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.34 2021/09/18 12:25:06 jmcneill Exp $
+# $NetBSD: genassym.cf,v 1.35 2021/09/30 21:19:16 skrll Exp $
 #-
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -137,6 +137,7 @@ define	TCR_IRGN0_NC		TCR_IRGN0_NC
 define	TCR_IRGN0_WB_WA		TCR_IRGN0_WB_WA
 define	TCR_IRGN0_WT		TCR_IRGN0_WT
 define	TCR_IRGN0_WB		TCR_IRGN0_WB
+define	TCR_EPD0		TCR_EPD0
 define	TCR_T0SZ		TCR_T0SZ
 
 define	EFAULT			EFAULT

Index: src/sys/arch/aarch64/aarch64/locore.S
diff -u src/sys/arch/aarch64/aarch64/locore.S:1.79 src/sys/arch/aarch64/aarch64/locore.S:1.80
--- src/sys/arch/aarch64/aarch64/locore.S:1.79	Mon Aug 30 22:24:39 2021
+++ src/sys/arch/aarch64/aarch64/locore.S	Thu Sep 30 21:19:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.79 2021/08/30 22:24:39 jmcneill Exp $	*/
+/*	$NetBSD: locore.S,v 1.80 2021/09/30 21:19:16 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -38,7 +38,7 @@
 #include 
 #include "assym.h"
 
-RCSID("$NetBSD: locore.S,v 1.79 2021/08/30 22:24:39 jmcneill Exp $")
+RCSID("$NetBSD: locore.S,v 1.80 2021/09/30 21:19:16 skrll Exp $")
 
 #ifdef AARCH64_DEVICE_MEM_STRONGLY_ORDERED
 #define	MAIR_DEVICE_MEM		MAIR_DEVICE_nGnRnE
@@ -468,7 +468,27 @@ ENTRY_NP(cpu_mpstart)
 
 mp_vstart:
 	hint	0x24		/* bti j */
+
 	CPU_DPRINTREG("PC   = ", x20)
+	CPU_DPRINTREG("SP   = ", sp)
+
+	CPU_DPRINTSREG("TTBR0= ", ttbr0_el1)
+	CPU_DPRINTSREG("TTBR1= ", ttbr1_el1)
+
+	/* Set SP to VA */
+	adrl	x0, kern_vtopdiff
+	ldr	x0, [x0]
+	add	sp, sp, x0
+
+	/* stop using TTBR0 - CPU_DPRINT{,REG,SREG} no longer after this */
+	mrs	x0, tcr_el1
+	orr	x0, x0, #TCR_EPD0
+	msr	tcr_el1, x0
+	isb
+
+	tlbi	vmalle1is
+	dsb	ish
+	isb
 
 	/* set exception vector */
 	adrl	x0, _C_LABEL(el1_vectors)

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.115 src/sys/arch/aarch64/aarch64/pmap.c:1.116
--- src/sys/arch/aarch64/aarch64/pmap.c:1.115	Sun Sep 26 09:58:13 2021
+++ src/sys/arch/aarch64/aarch64/pmap.c	Thu Sep 30 21:19:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.115 2021/09/26 09:58:13 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.116 2021/09/30 21:19:16 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.115 2021/09/26 09:58:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.116 2021/09/30 21:19:16 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -1426,6 +1426,8 @@ pmap_activate(struct lwp *l)
 	UVMHIST_CALLARGS(pmaphist, "lwp=%p asid=%d (pid=%d)", l, pm->pm_asid,
 	l->l_proc->p_pid, 0);
 
+	KASSERT((reg_tcr_el1_read() & TCR_EPD0) != 0);
+
 	if (pm == pmap_kernel())
 		return;
 	if (l != curlwp)



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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 21:19:16 UTC 2021

Modified Files:
src/sys/arch/aarch64/aarch64: genassym.cf locore.S pmap.c

Log Message:
Ensure TCR_EPD0 is set on entry to pmap_activate and ensure it is set as
early as possible for APs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/genassym.cf
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/aarch64/aarch64/pmap.c

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



CVS commit: src

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 20:58:26 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token-lparen.0.stdout
src/usr.bin/indent: indent.c

Log Message:
indent: add space between ',' and '[' in C99 initializations


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/token-lparen.0.stdout
cvs rdiff -u -r1.92 -r1.93 src/usr.bin/indent/indent.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/indent/token-lparen.0.stdout
diff -u src/tests/usr.bin/indent/token-lparen.0.stdout:1.2 src/tests/usr.bin/indent/token-lparen.0.stdout:1.3
--- src/tests/usr.bin/indent/token-lparen.0.stdout:1.2	Tue Sep 28 06:57:48 2021
+++ src/tests/usr.bin/indent/token-lparen.0.stdout	Thu Sep 30 20:58:26 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: token-lparen.0.stdout,v 1.2 2021/09/28 06:57:48 rillig Exp $ */
+/* $NetBSD: token-lparen.0.stdout,v 1.3 2021/09/30 20:58:26 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -31,6 +31,6 @@ function(void)
 }
 
 int array[] = {
-/* $ FIXME: Add space after comma */
-	1, 2,[2] = 3,[3] = 4,
+/* $ This is the rare situation where there is a space before '['. */
+	1, 2, [2] = 3, [3] = 4,
 };

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.92 src/usr.bin/indent/indent.c:1.93
--- src/usr.bin/indent/indent.c:1.92	Mon Sep 27 20:09:55 2021
+++ src/usr.bin/indent/indent.c	Thu Sep 30 20:58:26 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.92 2021/09/27 20:09:55 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.93 2021/09/30 20:58:26 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 
 #include 
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.92 2021/09/27 20:09:55 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.93 2021/09/30 20:58:26 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -602,9 +602,8 @@ process_lparen_or_lbracket(int dec_ind, 
 	nitems(ps.paren_indents));
 	ps.p_l_follow--;
 }
-if (*token.s == '[')
-	/* not a function pointer declaration or a function call */;
-else if (ps.in_decl && !ps.block_init && !ps.dumped_decl_indent &&
+if (token.s[0] == '(' && ps.in_decl
+	&& !ps.block_init && !ps.dumped_decl_indent &&
 	ps.procname[0] == '\0' && ps.paren_level == 0) {
 	/* function pointer declarations */
 	indent_declaration(dec_ind, tabs_to_var);



CVS commit: src

2021-09-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Sep 30 20:58:26 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token-lparen.0.stdout
src/usr.bin/indent: indent.c

Log Message:
indent: add space between ',' and '[' in C99 initializations


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/token-lparen.0.stdout
cvs rdiff -u -r1.92 -r1.93 src/usr.bin/indent/indent.c

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



CVS commit: src

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 20:02:55 UTC 2021

Modified Files:
src/distrib/sets/lists/base: ad.riscv
src/share/mk: bsd.own.mk
src/sys/arch/riscv: Makefile
Added Files:
src/sys/arch/riscv/stand: Makefile Makefile.inc

Log Message:
efiboot: Build and install bootriscv64.efi for riscv64 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/base/ad.riscv
cvs rdiff -u -r1.1262 -r1.1263 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/riscv/stand/Makefile \
src/sys/arch/riscv/stand/Makefile.inc

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

Modified files:

Index: src/distrib/sets/lists/base/ad.riscv
diff -u src/distrib/sets/lists/base/ad.riscv:1.21 src/distrib/sets/lists/base/ad.riscv:1.22
--- src/distrib/sets/lists/base/ad.riscv:1.21	Fri Jul  3 16:43:50 2015
+++ src/distrib/sets/lists/base/ad.riscv	Thu Sep 30 20:02:54 2021
@@ -1,3 +1,4 @@
-# $NetBSD: ad.riscv,v 1.21 2015/07/03 16:43:50 matt Exp $
+# $NetBSD: ad.riscv,v 1.22 2021/09/30 20:02:54 jmcneill Exp $
 ./libexec/ld.elf_so-rv32			base-compat-shlib	compat,pic,arch64
 ./usr/libexec/ld.elf_so-rv32			base-compat-shlib	compat,pic,arch64
+./usr/mdec/bootriscv64.efi			base-sysutil-bin	uefi,arch64

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1262 src/share/mk/bsd.own.mk:1.1263
--- src/share/mk/bsd.own.mk:1.1262	Sun Sep 26 15:52:40 2021
+++ src/share/mk/bsd.own.mk	Thu Sep 30 20:02:54 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1262 2021/09/26 15:52:40 maya Exp $
+#	$NetBSD: bsd.own.mk,v 1.1263 2021/09/30 20:02:54 jmcneill Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -153,7 +153,8 @@ HAVE_ACPI=	no
 ${MACHINE_ARCH} == "x86_64" || \
 ${MACHINE_ARCH} == "ia64" || \
 !empty(MACHINE_ARCH:Mearmv7*) || \
-!empty(MACHINE_ARCH:Maarch64*)
+!empty(MACHINE_ARCH:Maarch64*) || \
+${MACHINE_ARCH} == "riscv64"
 HAVE_UEFI=	yes
 .else
 HAVE_UEFI=	no

Index: src/sys/arch/riscv/Makefile
diff -u src/sys/arch/riscv/Makefile:1.1 src/sys/arch/riscv/Makefile:1.2
--- src/sys/arch/riscv/Makefile:1.1	Fri Sep 19 17:36:25 2014
+++ src/sys/arch/riscv/Makefile	Thu Sep 30 20:02:54 2021
@@ -1,5 +1,5 @@
-# $NetBSD: Makefile,v 1.1 2014/09/19 17:36:25 matt Exp $
+# $NetBSD: Makefile,v 1.2 2021/09/30 20:02:54 jmcneill Exp $
 
-SUBDIR=	include
+SUBDIR=	include stand
 
-.include 
+.include 

Added files:

Index: src/sys/arch/riscv/stand/Makefile
diff -u /dev/null src/sys/arch/riscv/stand/Makefile:1.1
--- /dev/null	Thu Sep 30 20:02:55 2021
+++ src/sys/arch/riscv/stand/Makefile	Thu Sep 30 20:02:55 2021
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile,v 1.1 2021/09/30 20:02:55 jmcneill Exp $
+
+.include 
+
+.if ${HAVE_UEFI:Uno} == "yes"
+. if ${MACHINE_ARCH} == "riscv64"
+SUBDIR+= ../../../stand/efiboot/bootriscv64
+. endif
+.endif
+
+.include 
Index: src/sys/arch/riscv/stand/Makefile.inc
diff -u /dev/null src/sys/arch/riscv/stand/Makefile.inc:1.1
--- /dev/null	Thu Sep 30 20:02:55 2021
+++ src/sys/arch/riscv/stand/Makefile.inc	Thu Sep 30 20:02:55 2021
@@ -0,0 +1,4 @@
+#	$NetBSD: Makefile.inc,v 1.1 2021/09/30 20:02:55 jmcneill Exp $
+
+BINDIR?=	/usr/mdec
+FILESDIR?=	/usr/mdec



CVS commit: src

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 20:02:55 UTC 2021

Modified Files:
src/distrib/sets/lists/base: ad.riscv
src/share/mk: bsd.own.mk
src/sys/arch/riscv: Makefile
Added Files:
src/sys/arch/riscv/stand: Makefile Makefile.inc

Log Message:
efiboot: Build and install bootriscv64.efi for riscv64 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/base/ad.riscv
cvs rdiff -u -r1.1262 -r1.1263 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/riscv/stand/Makefile \
src/sys/arch/riscv/stand/Makefile.inc

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



CVS commit: src/doc

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:12:04 UTC 2021

Modified Files:
src/doc: CHANGES

Log Message:
gnu-efi: Import version 3.0.14.


To generate a diff of this commit:
cvs rdiff -u -r1.2834 -r1.2835 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2834 src/doc/CHANGES:1.2835
--- src/doc/CHANGES:1.2834	Mon Sep 27 17:04:12 2021
+++ src/doc/CHANGES	Thu Sep 30 19:12:04 2021
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2834 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2835 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -429,3 +429,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	libfido2: Import 1.8.0 [christos 20210924]
 	pam-u2f: Import pam u2f 1.2.0 [christos 20210924]
 	OpenSSH: Import 8.8. [christos 20210927]
+	gnu-efi: Import version 3.0.14. [jmcneill 20210930]



CVS commit: src/doc

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:12:04 UTC 2021

Modified Files:
src/doc: CHANGES

Log Message:
gnu-efi: Import version 3.0.14.


To generate a diff of this commit:
cvs rdiff -u -r1.2834 -r1.2835 src/doc/CHANGES

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



CVS commit: src/doc

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:11:22 UTC 2021

Modified Files:
src/doc: 3RDPARTY

Log Message:
gnu-efi: updated to 3.0.14


To generate a diff of this commit:
cvs rdiff -u -r1.1817 -r1.1818 src/doc/3RDPARTY

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



CVS commit: src/doc

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:11:22 UTC 2021

Modified Files:
src/doc: 3RDPARTY

Log Message:
gnu-efi: updated to 3.0.14


To generate a diff of this commit:
cvs rdiff -u -r1.1817 -r1.1818 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1817 src/doc/3RDPARTY:1.1818
--- src/doc/3RDPARTY:1.1817	Mon Sep 27 17:04:12 2021
+++ src/doc/3RDPARTY	Thu Sep 30 19:11:22 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1817 2021/09/27 17:04:12 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1818 2021/09/30 19:11:22 jmcneill Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1672,8 +1672,8 @@ License:BSD-like (3-clause)
 Location:   usr.bin/nc
 
 Package:	gnu-efi
-Version:	3.0.8
-Current Vers:	3.0.8
+Version:	3.0.14
+Current Vers:	3.0.14
 Maintainer:	https://sourceforge.net/projects/gnu-efi/
 Archive Site:	https://sourceforge.net/projects/gnu-efi/
 Home Page:	https://sourceforge.net/projects/gnu-efi/



CVS commit: src/sys/external/bsd/gnu-efi/dist

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:09:10 UTC 2021

Modified Files:
src/sys/external/bsd/gnu-efi/dist/gnuefi: reloc_riscv64.c
src/sys/external/bsd/gnu-efi/dist/inc/riscv64: efibind.h

Log Message:
gnu-efi: riscv64 build fixes for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h

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

Modified files:

Index: src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c
diff -u src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c:1.2
--- src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c:1.1.1.1	Thu Sep 30 18:50:09 2021
+++ src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c	Thu Sep 30 19:09:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: reloc_riscv64.c,v 1.1.1.1 2021/09/30 18:50:09 jmcneill Exp $	*/
+/*	$NetBSD: reloc_riscv64.c,v 1.2 2021/09/30 19:09:10 jmcneill Exp $	*/
 
 // SPDX-License-Identifier: GPL-2.0+
 /* reloc_riscv.c - position independent ELF shared object relocator
@@ -40,12 +40,19 @@
 
 #include 
 
+#ifdef __NetBSD__
+#include 
+#include 
+#else
 #include 
+#endif
 
 #define Elf_Dyn		Elf64_Dyn
 #define Elf_Rela	Elf64_Rela
 #define ELF_R_TYPE	ELF64_R_TYPE
 
+EFI_STATUS EFIAPI _relocate(long, Elf_Dyn *);
+
 EFI_STATUS EFIAPI _relocate(long ldbase, Elf_Dyn *dyn)
 {
 	long relsz = 0, relent = 0;

Index: src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h
diff -u src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h:1.2
--- src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h:1.1.1.1	Thu Sep 30 18:50:09 2021
+++ src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h	Thu Sep 30 19:09:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: efibind.h,v 1.1.1.1 2021/09/30 18:50:09 jmcneill Exp $	*/
+/*	$NetBSD: efibind.h,v 1.2 2021/09/30 19:09:10 jmcneill Exp $	*/
 
 /*
  * Copright (C) 2014 - 2015 Linaro Ltd.
@@ -17,7 +17,11 @@
  * either version 2 of the License, or (at your option) any later version.
  */
 
+#if defined(__NetBSD__)
+#include 
+#else
 #include 
+#endif
 
 //
 // Basic EFI types of various widths



CVS commit: src/sys/external/bsd/gnu-efi/dist

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:09:10 UTC 2021

Modified Files:
src/sys/external/bsd/gnu-efi/dist/gnuefi: reloc_riscv64.c
src/sys/external/bsd/gnu-efi/dist/inc/riscv64: efibind.h

Log Message:
gnu-efi: riscv64 build fixes for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/gnu-efi/dist/gnuefi/reloc_riscv64.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h

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



CVS commit: src/sys/external/bsd/gnu-efi/dist

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:02:48 UTC 2021

Modified Files:
src/sys/external/bsd/gnu-efi/dist/inc: efiapi.h efilib.h efistdarg.h
src/sys/external/bsd/gnu-efi/dist/inc/aarch64: efibind.h
efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/arm: efibind.h efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/ia32: efibind.h efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/ia64: efibind.h efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/mips64el: efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/x86_64: efibind.h
efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/lib: dpath.c hand.c misc.c print.c
Removed Files:
src/sys/external/bsd/gnu-efi/dist/inc: efishellparm.h
src/sys/external/bsd/gnu-efi/dist/lib: lib.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h \
src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/inc/efilib.h
cvs rdiff -u -r1.1.1.1 -r0 \
src/sys/external/bsd/gnu-efi/dist/inc/efishellparm.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h \
src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h \
src/sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/ia32/efisetjmp_arch.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/inc/ia64/efibind.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/ia64/efisetjmp_arch.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efisetjmp_arch.h
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efibind.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efisetjmp_arch.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/lib/dpath.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/gnu-efi/dist/lib/hand.c \
src/sys/external/bsd/gnu-efi/dist/lib/print.c
cvs rdiff -u -r1.1.1.2 -r0 src/sys/external/bsd/gnu-efi/dist/lib/lib.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/lib/misc.c

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

Modified files:

Index: src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h
diff -u src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.3 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.4
--- src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.3	Thu Aug 16 18:22:05 2018
+++ src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h	Thu Sep 30 19:02:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: efiapi.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $	*/
+/*	$NetBSD: efiapi.h,v 1.4 2021/09/30 19:02:47 jmcneill Exp $	*/
 
 #ifndef _EFI_API_H
 #define _EFI_API_H
@@ -344,6 +344,18 @@ EFI_STATUS
 #define EFI_IMAGE_MACHINE_AARCH64   0xAA64
 #endif
 
+#if !defined(EFI_IMAGE_MACHINE_RISCV32)
+#define EFI_IMAGE_MACHINE_RISCV32   0x5032
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_RISCV64)
+#define EFI_IMAGE_MACHINE_RISCV64   0x5064
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_RISCV128)
+#define EFI_IMAGE_MACHINE_RISCV128  0x5128
+#endif
+
 // Image Entry prototype
 
 typedef 
@@ -578,7 +590,7 @@ EFI_STATUS
 IN EFI_TPL  NotifyTpl,
 IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
 IN const VOID   *NotifyContext OPTIONAL,
-IN const EFI_GUID   EventGroup OPTIONAL,
+IN const EFI_GUID   *EventGroup OPTIONAL,
 OUT EFI_EVENT   *Event
 );
 
@@ -929,6 +941,9 @@ typedef struct _EFI_BOOT_SERVICES {
 #define	HCDP_TABLE_GUID\
 { 0xf951938d, 0x620b, 0x42ef, {0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98} }
 
+#define EFI_DTB_TABLE_GUID \
+{ 0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0} }
+
 typedef struct _EFI_CONFIGURATION_TABLE {
 EFI_GUIDVendorGuid;
 VOID*VendorTable;
Index: src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h
diff -u src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h:1.3 src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h:1.4
--- src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h:1.3	Thu Aug 16 18:22:05 2018
+++ src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h	Thu Sep 30 19:02:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: efistdarg.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $	*/
+/*	$NetBSD: efistdarg.h,v 1.4 2021/09/30 19:02:47 jmcneill Exp $	*/
 
 #ifndef _EFISTDARG_H_
 #define _EFISTDARG_H_
@@ -21,7 +21,7 @@ Revision History
 
 --*/
 
-#ifndef GNU_EFI_USE_EXTERNAL_STDARG
+#if !defined(GNU_EFI_USE_EXTERNAL_STDARG) && !defined(_MSC_VER)
 #ifdef 

CVS commit: src/sys/external/bsd/gnu-efi/dist

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 19:02:48 UTC 2021

Modified Files:
src/sys/external/bsd/gnu-efi/dist/inc: efiapi.h efilib.h efistdarg.h
src/sys/external/bsd/gnu-efi/dist/inc/aarch64: efibind.h
efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/arm: efibind.h efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/ia32: efibind.h efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/ia64: efibind.h efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/mips64el: efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/inc/x86_64: efibind.h
efisetjmp_arch.h
src/sys/external/bsd/gnu-efi/dist/lib: dpath.c hand.c misc.c print.c
Removed Files:
src/sys/external/bsd/gnu-efi/dist/inc: efishellparm.h
src/sys/external/bsd/gnu-efi/dist/lib: lib.h

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h \
src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/inc/efilib.h
cvs rdiff -u -r1.1.1.1 -r0 \
src/sys/external/bsd/gnu-efi/dist/inc/efishellparm.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h \
src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h \
src/sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/ia32/efisetjmp_arch.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/inc/ia64/efibind.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/ia64/efisetjmp_arch.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efisetjmp_arch.h
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efibind.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efisetjmp_arch.h
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/gnu-efi/dist/lib/dpath.c
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/gnu-efi/dist/lib/hand.c \
src/sys/external/bsd/gnu-efi/dist/lib/print.c
cvs rdiff -u -r1.1.1.2 -r0 src/sys/external/bsd/gnu-efi/dist/lib/lib.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/gnu-efi/dist/lib/misc.c

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



CVS import: src/sys/external/bsd/gnu-efi/dist

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 18:50:10 UTC 2021

Update of /cvsroot/src/sys/external/bsd/gnu-efi/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv24030

Log Message:
Import gnu-efi-3.0.14

Status:

Vendor Tag: GNU_EFI
Release Tags:   gnu-efi-3_0_14

U src/sys/external/bsd/gnu-efi/dist/README.gnuefi
U src/sys/external/bsd/gnu-efi/dist/ChangeLog
U src/sys/external/bsd/gnu-efi/dist/Makefile
U src/sys/external/bsd/gnu-efi/dist/README.efilib
U src/sys/external/bsd/gnu-efi/dist/Make.rules
U src/sys/external/bsd/gnu-efi/dist/README.git
U src/sys/external/bsd/gnu-efi/dist/README.elilo
U src/sys/external/bsd/gnu-efi/dist/.gitignore
U src/sys/external/bsd/gnu-efi/dist/Make.defaults
U src/sys/external/bsd/gnu-efi/dist/inc/efisetjmp.h
U src/sys/external/bsd/gnu-efi/dist/inc/efierr.h
U src/sys/external/bsd/gnu-efi/dist/inc/efitcp.h
U src/sys/external/bsd/gnu-efi/dist/inc/eficon.h
U src/sys/external/bsd/gnu-efi/dist/inc/efinet.h
U src/sys/external/bsd/gnu-efi/dist/inc/efipciio.h
U src/sys/external/bsd/gnu-efi/dist/inc/Makefile
U src/sys/external/bsd/gnu-efi/dist/inc/inc.mak
U src/sys/external/bsd/gnu-efi/dist/inc/efigpt.h
U src/sys/external/bsd/gnu-efi/dist/inc/pci22.h
U src/sys/external/bsd/gnu-efi/dist/inc/efi_nii.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiser.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiui.h
U src/sys/external/bsd/gnu-efi/dist/inc/efilink.h
N src/sys/external/bsd/gnu-efi/dist/inc/lib.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiprot.h
U src/sys/external/bsd/gnu-efi/dist/inc/efirtlib.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiip.h
U src/sys/external/bsd/gnu-efi/dist/inc/efidevp.h
U src/sys/external/bsd/gnu-efi/dist/inc/efipart.h
C src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h
C src/sys/external/bsd/gnu-efi/dist/inc/efilib.h
U src/sys/external/bsd/gnu-efi/dist/inc/efidebug.h
N src/sys/external/bsd/gnu-efi/dist/inc/efishell.h
U src/sys/external/bsd/gnu-efi/dist/inc/efi_pxe.h
C src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h
U src/sys/external/bsd/gnu-efi/dist/inc/efifs.h
U src/sys/external/bsd/gnu-efi/dist/inc/efipoint.h
U src/sys/external/bsd/gnu-efi/dist/inc/libsmbios.h
U src/sys/external/bsd/gnu-efi/dist/inc/romload.h
N src/sys/external/bsd/gnu-efi/dist/inc/eficonex.h
U src/sys/external/bsd/gnu-efi/dist/inc/efidef.h
U src/sys/external/bsd/gnu-efi/dist/inc/efishellintf.h
U src/sys/external/bsd/gnu-efi/dist/inc/make.inf
U src/sys/external/bsd/gnu-efi/dist/inc/efi.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiudp.h
U src/sys/external/bsd/gnu-efi/dist/inc/makefile.hdr
U src/sys/external/bsd/gnu-efi/dist/inc/efipxebc.h
U src/sys/external/bsd/gnu-efi/dist/inc/eficompiler.h
N src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efisetjmp_arch.h
N src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efilibplat.h
N src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia64/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia64/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia64/efibind.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia64/salproc.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia64/pe.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/eficonsplit.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/vgaclass.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/adapterdebug.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/legacyboot.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/efivar.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/intload.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/readme.txt
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/make.inf
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/makefile.hdr
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/piflash64.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/efidbg.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/ia64/eficontext.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia32/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia32/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia32/pe.h
C src/sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/arm/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efilibplat.h
U src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efibind.h
U src/sys/external/bsd/gnu-efi/dist/inc/x86_64/pe.h
U src/sys/external/bsd/gnu-efi/dist/gnuefi/elf_x86_64_efi.lds
U 

CVS import: src/sys/external/bsd/gnu-efi/dist

2021-09-30 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Sep 30 18:50:10 UTC 2021

Update of /cvsroot/src/sys/external/bsd/gnu-efi/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv24030

Log Message:
Import gnu-efi-3.0.14

Status:

Vendor Tag: GNU_EFI
Release Tags:   gnu-efi-3_0_14

U src/sys/external/bsd/gnu-efi/dist/README.gnuefi
U src/sys/external/bsd/gnu-efi/dist/ChangeLog
U src/sys/external/bsd/gnu-efi/dist/Makefile
U src/sys/external/bsd/gnu-efi/dist/README.efilib
U src/sys/external/bsd/gnu-efi/dist/Make.rules
U src/sys/external/bsd/gnu-efi/dist/README.git
U src/sys/external/bsd/gnu-efi/dist/README.elilo
U src/sys/external/bsd/gnu-efi/dist/.gitignore
U src/sys/external/bsd/gnu-efi/dist/Make.defaults
U src/sys/external/bsd/gnu-efi/dist/inc/efisetjmp.h
U src/sys/external/bsd/gnu-efi/dist/inc/efierr.h
U src/sys/external/bsd/gnu-efi/dist/inc/efitcp.h
U src/sys/external/bsd/gnu-efi/dist/inc/eficon.h
U src/sys/external/bsd/gnu-efi/dist/inc/efinet.h
U src/sys/external/bsd/gnu-efi/dist/inc/efipciio.h
U src/sys/external/bsd/gnu-efi/dist/inc/Makefile
U src/sys/external/bsd/gnu-efi/dist/inc/inc.mak
U src/sys/external/bsd/gnu-efi/dist/inc/efigpt.h
U src/sys/external/bsd/gnu-efi/dist/inc/pci22.h
U src/sys/external/bsd/gnu-efi/dist/inc/efi_nii.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiser.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiui.h
U src/sys/external/bsd/gnu-efi/dist/inc/efilink.h
N src/sys/external/bsd/gnu-efi/dist/inc/lib.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiprot.h
U src/sys/external/bsd/gnu-efi/dist/inc/efirtlib.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiip.h
U src/sys/external/bsd/gnu-efi/dist/inc/efidevp.h
U src/sys/external/bsd/gnu-efi/dist/inc/efipart.h
C src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h
C src/sys/external/bsd/gnu-efi/dist/inc/efilib.h
U src/sys/external/bsd/gnu-efi/dist/inc/efidebug.h
N src/sys/external/bsd/gnu-efi/dist/inc/efishell.h
U src/sys/external/bsd/gnu-efi/dist/inc/efi_pxe.h
C src/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h
U src/sys/external/bsd/gnu-efi/dist/inc/efifs.h
U src/sys/external/bsd/gnu-efi/dist/inc/efipoint.h
U src/sys/external/bsd/gnu-efi/dist/inc/libsmbios.h
U src/sys/external/bsd/gnu-efi/dist/inc/romload.h
N src/sys/external/bsd/gnu-efi/dist/inc/eficonex.h
U src/sys/external/bsd/gnu-efi/dist/inc/efidef.h
U src/sys/external/bsd/gnu-efi/dist/inc/efishellintf.h
U src/sys/external/bsd/gnu-efi/dist/inc/make.inf
U src/sys/external/bsd/gnu-efi/dist/inc/efi.h
U src/sys/external/bsd/gnu-efi/dist/inc/efiudp.h
U src/sys/external/bsd/gnu-efi/dist/inc/makefile.hdr
U src/sys/external/bsd/gnu-efi/dist/inc/efipxebc.h
U src/sys/external/bsd/gnu-efi/dist/inc/eficompiler.h
N src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efisetjmp_arch.h
N src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efilibplat.h
N src/sys/external/bsd/gnu-efi/dist/inc/riscv64/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia64/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia64/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia64/efibind.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia64/salproc.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia64/pe.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/eficonsplit.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/vgaclass.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/adapterdebug.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/legacyboot.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/efivar.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/intload.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/readme.txt
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/make.inf
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/makefile.hdr
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/piflash64.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/efidbg.h
U src/sys/external/bsd/gnu-efi/dist/inc/protocol/ia64/eficontext.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia32/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia32/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h
U src/sys/external/bsd/gnu-efi/dist/inc/ia32/pe.h
C src/sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/arm/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efilibplat.h
U src/sys/external/bsd/gnu-efi/dist/inc/mips64el/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h
C src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efisetjmp_arch.h
U src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efilibplat.h
C src/sys/external/bsd/gnu-efi/dist/inc/x86_64/efibind.h
U src/sys/external/bsd/gnu-efi/dist/inc/x86_64/pe.h
U src/sys/external/bsd/gnu-efi/dist/gnuefi/elf_x86_64_efi.lds
U 

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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 18:33:28 UTC 2021

Modified Files:
src/sys/arch/aarch64/include: types.h

Log Message:
Make tlb_asid_t unsigned int as pmap_tlb.c expects tlb_asid_t to be able to
hold ASID_MAX + 1.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/include/types.h

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

Modified files:

Index: src/sys/arch/aarch64/include/types.h
diff -u src/sys/arch/aarch64/include/types.h:1.18 src/sys/arch/aarch64/include/types.h:1.19
--- src/sys/arch/aarch64/include/types.h:1.18	Wed Mar 24 05:00:24 2021
+++ src/sys/arch/aarch64/include/types.h	Thu Sep 30 18:33:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.18 2021/03/24 05:00:24 simonb Exp $ */
+/* $NetBSD: types.h,v 1.19 2021/09/30 18:33:28 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@ typedef __uint32_t register32_t;
 #define PRIxREGISTER	PRIx64
 #define PRIxREGISTER32	PRIx32
 
-typedef unsigned short	tlb_asid_t;
+typedef unsigned int	tlb_asid_t;
 
 #if defined(_KERNEL)
 #define LBL_X19	0



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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 18:33:28 UTC 2021

Modified Files:
src/sys/arch/aarch64/include: types.h

Log Message:
Make tlb_asid_t unsigned int as pmap_tlb.c expects tlb_asid_t to be able to
hold ASID_MAX + 1.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/include/types.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

2021-09-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Sep 30 15:54:55 UTC 2021

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

Log Message:
Print CPUID_PBE (Pending Break Enable) with "PBE".


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 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

2021-09-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Sep 30 15:54:55 UTC 2021

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

Log Message:
Print CPUID_PBE (Pending Break Enable) with "PBE".


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 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.177 src/sys/arch/x86/include/specialreg.h:1.178
--- src/sys/arch/x86/include/specialreg.h:1.177	Sat Jul 10 17:08:37 2021
+++ src/sys/arch/x86/include/specialreg.h	Thu Sep 30 15:54:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.177 2021/07/10 17:08:37 msaitoh Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.178 2021/09/30 15:54:55 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -213,7 +213,7 @@
 	"\21" "PAT"	"\22" "PSE36"	"\23" "PN"	"\24" "CLFLUSH" \
 	"\25" "B20"	"\26" "DS"	"\27" "ACPI"	"\30" "MMX" \
 	"\31" "FXSR"	"\32" "SSE"	"\33" "SSE2"	"\34" "SS" \
-	"\35" "HTT"	"\36" "TM"	"\37" "IA64"	"\40" "SBF"
+	"\35" "HTT"	"\36" "TM"	"\37" "IA64"	"\40" "PBE"
 
 /* Blacklists of CPUID flags - used to mask certain features */
 #ifdef XENPV



CVS commit: src/lib/libc/resolv

2021-09-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 30 12:35:55 UTC 2021

Modified Files:
src/lib/libc/resolv: res_init.c res_private.h

Log Message:
kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.
An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/resolv/res_init.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/resolv/res_private.h

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



CVS commit: src/lib/libc/resolv

2021-09-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 30 12:35:55 UTC 2021

Modified Files:
src/lib/libc/resolv: res_init.c res_private.h

Log Message:
kqueue(2) file descriptors are not inherited across fork(2). A
process that that calls getaddrinfo(3) will end up cacheing the
kqueue(2) file descriptor in its res_state structure. If that
process fork(2)s and calls getaddrinfo(3) again might end up closing
that cached file descriptor which can end up pointing to a different
file object than the kqueue(2) original one. To fix this, associate
the kqueue(2) file descriptor with the process id that created it,
and don't close(2) it if it is being closed from a different process.
An alternative fix would be to attach the resolver to a fork(2) hook
to cleanup the res_state, but handling it internally in the resolver
is less intrusive. This was discovered by Dima Veselov when using
the FreeRADIUS package.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libc/resolv/res_init.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/resolv/res_private.h

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

Modified files:

Index: src/lib/libc/resolv/res_init.c
diff -u src/lib/libc/resolv/res_init.c:1.31 src/lib/libc/resolv/res_init.c:1.32
--- src/lib/libc/resolv/res_init.c:1.31	Wed Apr 19 18:21:07 2017
+++ src/lib/libc/resolv/res_init.c	Thu Sep 30 08:35:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_init.c,v 1.31 2017/04/19 22:21:07 christos Exp $	*/
+/*	$NetBSD: res_init.c,v 1.32 2021/09/30 12:35:55 christos Exp $	*/
 
 /*
  * Copyright (c) 1985, 1989, 1993
@@ -72,7 +72,7 @@
 static const char sccsid[] = "@(#)res_init.c	8.1 (Berkeley) 6/7/93";
 static const char rcsid[] = "Id: res_init.c,v 1.26 2008/12/11 09:59:00 marka Exp";
 #else
-__RCSID("$NetBSD: res_init.c,v 1.31 2017/04/19 22:21:07 christos Exp $");
+__RCSID("$NetBSD: res_init.c,v 1.32 2021/09/30 12:35:55 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -190,6 +190,21 @@ res_ninit(res_state statp) {
 	return (__res_vinit(statp, 0));
 }
 
+static int
+__res_kqinit(res_state statp)
+{
+	struct kevent kc;
+	struct __res_state_ext *ext = statp->_u._ext.ext;
+
+	ext->kq = kqueue1(O_CLOEXEC);
+	ext->kqpid = getpid();
+	EV_SET(, ext->resfd, EVFILT_VNODE,
+	EV_ADD|EV_ENABLE|EV_CLEAR, NOTE_DELETE|NOTE_WRITE| NOTE_EXTEND|
+	NOTE_ATTRIB|NOTE_LINK|NOTE_RENAME|NOTE_REVOKE, 0, 0);
+	(void)kevent(ext->kq, , 1, NULL, 0, );
+	return ext->kq;
+}
+
 /*% This function has to be reachable by res_data.c but not publically. */
 int
 __res_vinit(res_state statp, int preinit) {
@@ -346,7 +361,6 @@ __res_vinit(res_state statp, int preinit
 	nserv = 0;
 	if ((fp = fopen(__res_conf_name, "re")) != NULL) {
 	struct stat st;
-	struct kevent kc;
 
 	/* read the config file */
 	while (fgets(buf, (int)sizeof(buf), fp) != NULL) {
@@ -500,11 +514,7 @@ __res_vinit(res_state statp, int preinit
 	if (fstat(statp->_u._ext.ext->resfd, ) != -1)
 		__res_conf_time = statp->_u._ext.ext->res_conf_time =
 			st.st_mtimespec;
-	statp->_u._ext.ext->kq = kqueue1(O_CLOEXEC);
-	EV_SET(, statp->_u._ext.ext->resfd, EVFILT_VNODE,
-		EV_ADD|EV_ENABLE|EV_CLEAR, NOTE_DELETE|NOTE_WRITE| NOTE_EXTEND|
-		NOTE_ATTRIB|NOTE_LINK|NOTE_RENAME|NOTE_REVOKE, 0, 0);
-	(void)kevent(statp->_u._ext.ext->kq, , 1, NULL, 0, );
+	__res_kqinit(statp);
 	} else {
 	statp->_u._ext.ext->kq = -1;
 	statp->_u._ext.ext->resfd = -1;
@@ -573,6 +583,9 @@ res_check(res_state statp, struct timesp
 		struct kevent ke;
 		if (statp->_u._ext.ext->kq == -1)
 			goto out;
+		if (statp->_u._ext.ext->kqpid != getpid() &&
+		__res_kqinit(statp) == -1)
+			goto out;
 
 		switch (kevent(statp->_u._ext.ext->kq, NULL, 0, , 1, )) {
 		case 0:
@@ -812,13 +825,14 @@ res_nclose(res_state statp)
 void
 res_ndestroy(res_state statp)
 {
+	struct __res_state_ext *ext = statp->_u._ext.ext;
 	res_nclose(statp);
-	if (statp->_u._ext.ext != NULL) {
-		if (statp->_u._ext.ext->kq != -1)
-			(void)close(statp->_u._ext.ext->kq);
-		if (statp->_u._ext.ext->resfd != -1)
-			(void)close(statp->_u._ext.ext->resfd);
-		free(statp->_u._ext.ext);
+	if (ext != NULL) {
+		if (ext->kq != -1 && ext->kqpid == getpid())
+			(void)close(ext->kq);
+		if (ext->resfd != -1)
+			(void)close(ext->resfd);
+		free(ext);
 		statp->_u._ext.ext = NULL;
 	}
 	if (statp->_rnd != NULL) {

Index: src/lib/libc/resolv/res_private.h
diff -u src/lib/libc/resolv/res_private.h:1.3 src/lib/libc/resolv/res_private.h:1.4
--- src/lib/libc/resolv/res_private.h:1.3	Sat Oct 24 13:24:01 2009
+++ src/lib/libc/resolv/res_private.h	Thu Sep 30 08:35:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_private.h,v 1.3 2009/10/24 17:24:01 christos Exp $	*/
+/*	$NetBSD: res_private.h,v 1.4 2021/09/30 12:35:55 christos Exp $	*/
 
 #ifndef res_private_h
 #define res_private_h
@@ -16,6 +16,7 @@ struct __res_state_ext {
 	char nsuffix2[64];
 	struct timespec res_conf_time;
 	

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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 10:19:52 UTC 2021

Modified Files:
src/sys/arch/arm/marvell: dove.c

Log Message:
Drive-by KNF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/dove.c

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

Modified files:

Index: src/sys/arch/arm/marvell/dove.c
diff -u src/sys/arch/arm/marvell/dove.c:1.2 src/sys/arch/arm/marvell/dove.c:1.3
--- src/sys/arch/arm/marvell/dove.c:1.2	Mon Aug 30 00:04:30 2021
+++ src/sys/arch/arm/marvell/dove.c	Thu Sep 30 10:19:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dove.c,v 1.2 2021/08/30 00:04:30 rin Exp $	*/
+/*	$NetBSD: dove.c,v 1.3 2021/09/30 10:19:52 skrll Exp $	*/
 /*
  * Copyright (c) 2016 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dove.c,v 1.2 2021/08/30 00:04:30 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dove.c,v 1.3 2021/09/30 10:19:52 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -483,7 +483,7 @@ dove_dfs_slow(struct dove_pmu_softc *sc,
 {
 	uint32_t control, status, psw, pmucr;
 	int rv;
-uint32_t cause0, cause1, cause2;
+	uint32_t cause0, cause1, cause2;
 
 	status = READ_PMUREG(sc, DOVE_PMU_CPUSDFSSR);
 	status &= DOVE_PMU_CPUSDFSSR_CPUSLOWMODESTTS_MASK;
@@ -491,7 +491,7 @@ uint32_t cause0, cause1, cause2;
 	(!slow && status == DOVE_PMU_CPUSDFSSR_CPUSLOWMODESTTS_TURBO))
 		return 0;
 
-cause0 = READ_PMUREG(sc, DOVE_PMU_PMUICR);
+	cause0 = READ_PMUREG(sc, DOVE_PMU_PMUICR);
 	/*
 	 * 1. Disable the CPU FIQ and IRQ interrupts.
 	 */
@@ -525,7 +525,7 @@ cause0 = READ_PMUREG(sc, DOVE_PMU_PMUICR
 	 *core.
 	 */
 	pmucr = bus_space_read_4(sc->sc_iot, sc->sc_pmh, DOVE_PMU_PMUCR);
-cause1 = READ_PMUREG(sc, DOVE_PMU_PMUICR);
+	cause1 = READ_PMUREG(sc, DOVE_PMU_PMUICR);
 	bus_space_write_4(sc->sc_iot, sc->sc_pmh, DOVE_PMU_PMUCR,
 	pmucr | DOVE_PMU_PMUCR_MASKFIQ | DOVE_PMU_PMUCR_MASKIRQ);
 
@@ -539,7 +539,7 @@ cause1 = READ_PMUREG(sc, DOVE_PMU_PMUICR
 	 * 6. Use the WFI instruction (Wait for Interrupt), to place the CPU
 	 *in Sleep mode.
 	 */
-cause2 = READ_PMUREG(sc, DOVE_PMU_PMUICR);
+	cause2 = READ_PMUREG(sc, DOVE_PMU_PMUICR);
 	__asm("wfi");
 
 	status = READ_PMUREG(sc, DOVE_PMU_CPUSDFSSR);



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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 10:19:52 UTC 2021

Modified Files:
src/sys/arch/arm/marvell: dove.c

Log Message:
Drive-by KNF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/dove.c

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



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

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 07:49:09 UTC 2021

Modified Files:
src/sys/arch/arm/gemini: gemini_intr.h

Log Message:
More catching up with spl changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/gemini/gemini_intr.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/arm/gemini

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 07:49:09 UTC 2021

Modified Files:
src/sys/arch/arm/gemini: gemini_intr.h

Log Message:
More catching up with spl changes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/gemini/gemini_intr.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/arm/gemini/gemini_intr.h
diff -u src/sys/arch/arm/gemini/gemini_intr.h:1.2 src/sys/arch/arm/gemini/gemini_intr.h:1.3
--- src/sys/arch/arm/gemini/gemini_intr.h:1.2	Fri Oct 24 16:17:08 2008
+++ src/sys/arch/arm/gemini/gemini_intr.h	Thu Sep 30 07:49:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: gemini_intr.h,v 1.2 2008/10/24 16:17:08 matt Exp $	*/
+/*	$NetBSD: gemini_intr.h,v 1.3 2021/09/30 07:49:09 skrll Exp $	*/
 
 #ifndef _ARM_GEMINI_INTR_H_
 #define _ARM_GEMINI_INTR_H_
@@ -7,6 +7,11 @@
 
 #ifndef _LOCORE
 void	gemini_irq_handler(void *);
+
+#define	_splraise	pic_splraise
+#define	_spllower	pic_spllower
+#define	splx		pic_splx
+
 #include 
 #endif	/* _LOCORE */
 



CVS commit: src/sys/kern

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 07:15:02 UTC 2021

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

Log Message:
Some platforms need sys/cpu.h for curlwp so #include it


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/kern_hook.c

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



CVS commit: src/sys/kern

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 07:15:02 UTC 2021

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

Log Message:
Some platforms need sys/cpu.h for curlwp so #include it


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/kern_hook.c

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

Modified files:

Index: src/sys/kern/kern_hook.c
diff -u src/sys/kern/kern_hook.c:1.10 src/sys/kern/kern_hook.c:1.11
--- src/sys/kern/kern_hook.c:1.10	Thu Sep 30 07:14:09 2021
+++ src/sys/kern/kern_hook.c	Thu Sep 30 07:15:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_hook.c,v 1.10 2021/09/30 07:14:09 skrll Exp $	*/
+/*	$NetBSD: kern_hook.c,v 1.11 2021/09/30 07:15:02 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,10 +31,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.10 2021/09/30 07:14:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.11 2021/09/30 07:15:02 skrll Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/kern

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 07:14:10 UTC 2021

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/kern_hook.c

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

Modified files:

Index: src/sys/kern/kern_hook.c
diff -u src/sys/kern/kern_hook.c:1.9 src/sys/kern/kern_hook.c:1.10
--- src/sys/kern/kern_hook.c:1.9	Thu Sep 30 01:26:07 2021
+++ src/sys/kern/kern_hook.c	Thu Sep 30 07:14:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_hook.c,v 1.9 2021/09/30 01:26:07 yamaguchi Exp $	*/
+/*	$NetBSD: kern_hook.c,v 1.10 2021/09/30 07:14:09 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,16 +31,16 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.9 2021/09/30 01:26:07 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.10 2021/09/30 07:14:09 skrll Exp $");
 
 #include 
-#include 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
+#include 
 
 /*
  * A generic linear hook.



CVS commit: src/sys/kern

2021-09-30 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 30 07:14:10 UTC 2021

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

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/kern_hook.c

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