Re: CVS commit: src/sys/arch

2024-01-12 Thread Izumi Tsutsui
> No, that definitely wasn't intentional!  I've just reverted
> that.  Does that need a pullup for netbsd-10 ?

Thanks for your confirmation.

I have another fix to make GENERIC boot on my 3/60
(disable more several pseudo-devices to shrink binary)
so I'll handle a pullup request with your fix.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch

2024-01-12 Thread Simon Burge
Hi Tsutsui,

Izumi Tsutsui wrote:

> simonb@ wrote:
>
> > cvs rdiff -u -r1.187 -r1.188 src/sys/arch/sun3/conf/GENERIC
>
> >>  # Veriexec
> >>  # include "dev/veriexec.config"
> >> +
> >> +no obmem0 at mainbus? # XX
>
> Is this intentional!?

No, that definitely wasn't intentional!  I've just reverted
that.  Does that need a pullup for netbsd-10 ?

Cheers,
Simon.


CVS commit: src/sys/arch/sun3/conf

2024-01-12 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jan 13 05:31:29 UTC 2024

Modified Files:
src/sys/arch/sun3/conf: GENERIC

Log Message:
Revert mistaken "no obmem0" that I added when enabling UFS_DIRHASH.

Thanks tsutsui@ for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/sun3/conf/GENERIC

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/sun3/conf/GENERIC
diff -u src/sys/arch/sun3/conf/GENERIC:1.190 src/sys/arch/sun3/conf/GENERIC:1.191
--- src/sys/arch/sun3/conf/GENERIC:1.190	Sun Feb 12 14:50:42 2023
+++ src/sys/arch/sun3/conf/GENERIC	Sat Jan 13 05:31:29 2024
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.190 2023/02/12 14:50:42 abs Exp $
+# $NetBSD: GENERIC,v 1.191 2024/01/13 05:31:29 simonb Exp $
 #
 # GENERIC machine description file
 # 
@@ -25,7 +25,7 @@ include 	"arch/sun3/conf/std.sun3"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.190 $"
+#ident		"GENERIC-$Revision: 1.191 $"
 
 makeoptions	COPTS="-Os -fno-unwind-tables -fno-omit-frame-pointer"
 	# Bootloader has size limit (~2MB). -fno-omit-frame-pointer is
@@ -295,7 +295,5 @@ pseudo-device 	swwdog			# software watch
 # Veriexec
 # include "dev/veriexec.config"
 
-no obmem0 at mainbus?			# XX
-
 # Pull in optional local configuration - always at end
 cinclude	"arch/sun3/conf/GENERIC.local"



CVS commit: src/sys/arch/sun3/conf

2024-01-12 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Jan 13 05:31:29 UTC 2024

Modified Files:
src/sys/arch/sun3/conf: GENERIC

Log Message:
Revert mistaken "no obmem0" that I added when enabling UFS_DIRHASH.

Thanks tsutsui@ for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/sun3/conf/GENERIC

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



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

2024-01-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 13 01:23:39 UTC 2024

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: inline simple grammar rules


To generate a diff of this commit:
cvs rdiff -u -r1.481 -r1.482 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/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.481 src/usr.bin/xlint/lint1/cgram.y:1.482
--- src/usr.bin/xlint/lint1/cgram.y:1.481	Fri Jan 12 08:33:39 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Sat Jan 13 01:23:39 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.481 2024/01/12 08:33:39 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.482 2024/01/13 01:23:39 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.481 2024/01/12 08:33:39 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.482 2024/01/13 01:23:39 rillig Exp $");
 #endif
 
 #include 
@@ -328,7 +328,6 @@ is_either(const char *s, const char *a, 
 %type		struct_or_union_specifier
 %type		struct_or_union
 %type			braced_member_declaration_list
-/* No type for member_declaration_lbrace. */
 %type			member_declaration_list_with_rbrace
 %type			member_declaration_list
 %type			member_declaration
@@ -339,7 +338,6 @@ is_either(const char *s, const char *a, 
 %type		enum_specifier
 /* No type for enum. */
 %type			enum_declaration
-/* No type for enum_decl_lbrace. */
 %type			enums_with_opt_comma
 %type			enumerator_list
 %type			enumerator
@@ -361,7 +359,6 @@ is_either(const char *s, const char *a, 
 %type			direct_param_declarator
 %type			direct_notype_param_declarator
 %type		param_list
-/* No type for id_list_lparen. */
 %type		array_size_opt
 %type			identifier_list
 %type		type_name
@@ -378,7 +375,6 @@ is_either(const char *s, const char *a, 
 /* No type for initializer_list. */
 /* No type for initializer_list_item. */
 /* No type for designation. */
-/* No type for begin_designation. */
 /* No type for designator_list. */
 /* No type for designator. */
 /* No type for static_assert_declaration. */
@@ -406,7 +402,6 @@ is_either(const char *s, const char *a, 
 /* No type for while_expr. */
 /* No type for do_statement. */
 /* No type for do. */
-%type		do_while_expr
 /* No type for for_start. */
 /* No type for for_exprs. */
 /* No type for jump_statement. */
@@ -1040,14 +1035,10 @@ struct_or_union:
 ;
 
 braced_member_declaration_list:	/* see C99 6.7.2.1 */
-	member_declaration_lbrace member_declaration_list_with_rbrace {
-		$$ = $2;
-	}
-;
-
-member_declaration_lbrace:	/* see C99 6.7.2.1 */
 	T_LBRACE {
 		set_symtyp(FVFT);
+	} member_declaration_list_with_rbrace {
+		$$ = $3;
 	}
 ;
 
@@ -1194,15 +1185,11 @@ enum:/* helper for C99 6.7.2.2 */
 ;
 
 enum_declaration:		/* helper for C99 6.7.2.2 */
-	enum_decl_lbrace enums_with_opt_comma T_RBRACE {
-		$$ = $2;
-	}
-;
-
-enum_decl_lbrace:		/* helper for C99 6.7.2.2 */
 	T_LBRACE {
 		set_symtyp(FVFT);
 		enumval = 0;
+	} enums_with_opt_comma T_RBRACE {
+		$$ = $3;
 	}
 ;
 
@@ -1437,17 +1424,13 @@ direct_notype_param_declarator:
 ;
 
 param_list:
-	id_list_lparen identifier_list T_RPAREN {
-		$$ = (struct parameter_list){ .first = $2 };
-	}
-|	abstract_decl_param_list
-;
-
-id_list_lparen:
 	T_LPAREN {
 		block_level++;
 		begin_declaration_level(DLK_PROTO_PARAMS);
+	} identifier_list T_RPAREN {
+		$$ = (struct parameter_list){ .first = $3 };
 	}
+|	abstract_decl_param_list
 ;
 
 array_size_opt:
@@ -1679,7 +1662,9 @@ initializer_list_item:		/* helper */
 ;
 
 designation:			/* C99 6.7.8 "Initialization" */
-	begin_designation designator_list T_ASSIGN
+	/* empty */ {
+		begin_designation();
+	} designator_list T_ASSIGN
 |	identifier T_COLON {
 		/* GCC style struct or union member name in initializer */
 		gnuism(315);
@@ -1688,12 +1673,6 @@ designation:			/* C99 6.7.8 "Initializat
 	}
 ;
 
-begin_designation:		/* lint-specific helper */
-	/* empty */ {
-		begin_designation();
-	}
-;
-
 designator_list:		/* C99 6.7.8 "Initialization" */
 	designator
 |	designator_list designator
@@ -1933,8 +1912,8 @@ iteration_statement:		/* C99 6.8.5 */
 		clear_warning_flags();
 		stmt_while_expr_stmt();
 	}
-|	do_statement do_while_expr {
-		stmt_do_while_expr($2);
+|	do_statement T_WHILE T_LPAREN expression T_RPAREN T_SEMI {
+		stmt_do_while_expr($4);
 		suppress_fallthrough = false;
 	}
 |	do error {
@@ -1974,12 +1953,6 @@ do:/* see C99 6.8.5 */
 	}
 ;
 
-do_while_expr:			/* see C99 6.8.5 */
-	T_WHILE T_LPAREN expression T_RPAREN T_SEMI {
-		$$ = $3;
-	}
-;
-
 for_start:			/* see C99 6.8.5 */
 	T_FOR T_LPAREN {
 		begin_declaration_level(DLK_AUTO);



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

2024-01-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan 13 01:23:39 UTC 2024

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: inline simple grammar rules


To generate a diff of this commit:
cvs rdiff -u -r1.481 -r1.482 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/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 00:44:42 UTC 2024

Modified Files:
src/sys/arch/m68k/include: fcode.h m68k.h
src/sys/arch/m68k/m68k: regdump.c support.s
src/sys/arch/sun2/sun2: machdep.h

Log Message:
Make getsfc() and getdfc() inlines; it's slightly smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/m68k/include/fcode.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/regdump.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/m68k/support.s
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sun2/sun2/machdep.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/m68k/include/fcode.h
diff -u src/sys/arch/m68k/include/fcode.h:1.1 src/sys/arch/m68k/include/fcode.h:1.2
--- src/sys/arch/m68k/include/fcode.h:1.1	Wed Dec 27 17:35:35 2023
+++ src/sys/arch/m68k/include/fcode.h	Sat Jan 13 00:44:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: fcode.h,v 1.1 2023/12/27 17:35:35 thorpej Exp $	*/
+/*	$NetBSD: fcode.h,v 1.2 2024/01/13 00:44:42 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -67,4 +67,28 @@
 #define	FC_SUPERP	6	/* supervisor program space */
 #define	FC_CPU		7	/* CPU space */
 
+#ifdef _KERNEL
+
+static inline int
+getdfc(void)
+{
+	int rv;
+
+	__asm volatile("movc %%dfc,%0" : "=d" (rv));
+
+	return rv;
+}
+
+static inline int
+getsfc(void)
+{
+	int rv;
+
+	__asm volatile("movc %%sfc,%0" : "=d" (rv));
+
+	return rv;
+}
+
+#endif /* _KERNEL */
+
 #endif /* _M68K_FCODE_H_ */

Index: src/sys/arch/m68k/include/m68k.h
diff -u src/sys/arch/m68k/include/m68k.h:1.26 src/sys/arch/m68k/include/m68k.h:1.27
--- src/sys/arch/m68k/include/m68k.h:1.26	Tue Sep 26 14:33:55 2023
+++ src/sys/arch/m68k/include/m68k.h	Sat Jan 13 00:44:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k.h,v 1.26 2023/09/26 14:33:55 tsutsui Exp $	*/
+/*	$NetBSD: m68k.h,v 1.27 2024/01/13 00:44:42 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -103,10 +103,6 @@ void	copypage040(void *fromaddr, void *t
 void	copypage(void *fromaddr, void *toaddr);
 void	zeropage(void *addr);
 
-/* support.s */
-int	getdfc(void);
-int	getsfc(void);
-
 /* switch_subr.s */
 void	lwp_trampoline(void);
 void	m68881_save(struct fpframe *);

Index: src/sys/arch/m68k/m68k/regdump.c
diff -u src/sys/arch/m68k/m68k/regdump.c:1.15 src/sys/arch/m68k/m68k/regdump.c:1.16
--- src/sys/arch/m68k/m68k/regdump.c:1.15	Thu Aug  3 08:16:31 2023
+++ src/sys/arch/m68k/m68k/regdump.c	Sat Jan 13 00:44:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: regdump.c,v 1.15 2023/08/03 08:16:31 mrg Exp $	*/
+/*	$NetBSD: regdump.c,v 1.16 2024/01/13 00:44:42 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.15 2023/08/03 08:16:31 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.16 2024/01/13 00:44:42 thorpej Exp $");
 
 #include 
 #include 
@@ -47,6 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: regdump.c,v 
 #include 
 
 #include 
+#include 
 #include 
 #include 
 

Index: src/sys/arch/m68k/m68k/support.s
diff -u src/sys/arch/m68k/m68k/support.s:1.8 src/sys/arch/m68k/m68k/support.s:1.9
--- src/sys/arch/m68k/m68k/support.s:1.8	Thu Aug  1 13:42:52 2013
+++ src/sys/arch/m68k/m68k/support.s	Sat Jan 13 00:44:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: support.s,v 1.8 2013/08/01 13:42:52 matt Exp $	*/
+/*	$NetBSD: support.s,v 1.9 2024/01/13 00:44:42 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -65,14 +65,3 @@ ENTRY(longjmp)
 	movl	(%a0),(%sp)
 	moveq	#1,%d0
 	rts
-
-/*
- * fetch registers for debugger
- */
-ENTRY_NOPROFILE(getsfc)
-	movc	%sfc,%d0
-	rts
-
-ENTRY_NOPROFILE(getdfc)
-	movc	%dfc,%d0
-	rts

Index: src/sys/arch/sun2/sun2/machdep.h
diff -u src/sys/arch/sun2/sun2/machdep.h:1.15 src/sys/arch/sun2/sun2/machdep.h:1.16
--- src/sys/arch/sun2/sun2/machdep.h:1.15	Fri Jan 12 23:46:52 2024
+++ src/sys/arch/sun2/sun2/machdep.h	Sat Jan 13 00:44:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.h,v 1.15 2024/01/12 23:46:52 thorpej Exp $	*/
+/*	$NetBSD: machdep.h,v 1.16 2024/01/13 00:44:42 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -112,9 +112,6 @@ void	dumpsys(void);
 
 int 	fpu_emulate(struct trapframe *, struct fpframe *, ksiginfo_t *);
 
-int 	getdfc(void);
-int 	getsfc(void);
-
 void	initfpu(void);
 
 void	set_clk_mode(int, int);



CVS commit: src/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 00:44:42 UTC 2024

Modified Files:
src/sys/arch/m68k/include: fcode.h m68k.h
src/sys/arch/m68k/m68k: regdump.c support.s
src/sys/arch/sun2/sun2: machdep.h

Log Message:
Make getsfc() and getdfc() inlines; it's slightly smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/m68k/include/fcode.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/regdump.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/m68k/support.s
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sun2/sun2/machdep.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/sun3/sun3

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 00:43:31 UTC 2024

Modified Files:
src/sys/arch/sun3/sun3: pmap.c

Log Message:
Fix a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/sun3/sun3/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/sun3/sun3/pmap.c
diff -u src/sys/arch/sun3/sun3/pmap.c:1.177 src/sys/arch/sun3/sun3/pmap.c:1.178
--- src/sys/arch/sun3/sun3/pmap.c:1.177	Wed Dec 27 17:35:37 2023
+++ src/sys/arch/sun3/sun3/pmap.c	Sat Jan 13 00:43:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.177 2023/12/27 17:35:37 thorpej Exp $	*/
+/*	$NetBSD: pmap.c,v 1.178 2024/01/13 00:43:31 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.177 2023/12/27 17:35:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.178 2024/01/13 00:43:31 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
@@ -1690,7 +1690,7 @@ pmap_bootstrap(vaddr_t nextva)
 	 * the job using hardware-dependent tricks...
 	 */
 #ifdef	DIAGNOSTIC
-	/* Note: PROM setcxsegmap function needs sfc=dfs=FC_CONTROL */
+	/* Note: PROM setcxsegmap function needs sfc=dfc=FC_CONTROL */
 	if ((getsfc() != FC_CONTROL) || (getdfc() != FC_CONTROL)) {
 		mon_printf("pmap_bootstrap: bad dfc or sfc\n");
 		sunmon_abort();



CVS commit: src/sys/arch/sun3/sun3

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 00:43:31 UTC 2024

Modified Files:
src/sys/arch/sun3/sun3: pmap.c

Log Message:
Fix a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/arch/sun3/sun3/pmap.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

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 00:21:51 UTC 2024

Modified Files:
src/sys/arch/sun2/sun2: locore.s
src/sys/arch/sun3/sun3: locore.s
src/sys/arch/sun3/sun3x: locore.s

Log Message:
G/C unreferenced copies of _spl() and _splraise().


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sun3/sun3x/locore.s

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

Modified files:

Index: src/sys/arch/sun2/sun2/locore.s
diff -u src/sys/arch/sun2/sun2/locore.s:1.32 src/sys/arch/sun2/sun2/locore.s:1.33
--- src/sys/arch/sun2/sun2/locore.s:1.32	Fri Jan 12 23:46:52 2024
+++ src/sys/arch/sun2/sun2/locore.s	Sat Jan 13 00:21:51 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.32 2024/01/12 23:46:52 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.33 2024/01/13 00:21:51 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -552,32 +552,6 @@ Ldorte:
 
 /* loadustp, ptest_addr */
 
-/*
- * Set processor priority level calls.  Most are implemented with
- * inline asm expansions.  However, we need one instantiation here
- * in case some non-optimized code makes external references.
- * Most places will use the inlined functions param.h supplies.
- */
-
-ENTRY(_spl)
-	clrl	%d0
-	movw	%sr,%d0
-	movl	%sp@(4),%d1
-	movw	%d1,%sr
-	rts
-
-ENTRY(_splraise)
-	clrl	%d0
-	movw	%sr,%d0
-	movl	%d0,%d1
-	andl	#PSL_HIGHIPL,%d1 	| old &= PSL_HIGHIPL
-	cmpl	%sp@(4),%d1		| (old - new)
-	bge	Lsplr
-	movl	%sp@(4),%d1
-	movw	%d1,%sr
-Lsplr:
-	rts
-
 #ifdef DIAGNOSTIC
 | Message for 68881 save/restore panic
 Lsr0: 

Index: src/sys/arch/sun3/sun3/locore.s
diff -u src/sys/arch/sun3/sun3/locore.s:1.104 src/sys/arch/sun3/sun3/locore.s:1.105
--- src/sys/arch/sun3/sun3/locore.s:1.104	Fri Jan 12 23:46:53 2024
+++ src/sys/arch/sun3/sun3/locore.s	Sat Jan 13 00:21:51 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.104 2024/01/12 23:46:53 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.105 2024/01/13 00:21:51 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -622,32 +622,6 @@ ENTRY(DCIU)
 /* loadustp, ptest_addr */
 
 /*
- * Set processor priority level calls.  Most are implemented with
- * inline asm expansions.  However, we need one instantiation here
- * in case some non-optimized code makes external references.
- * Most places will use the inlined functions param.h supplies.
- */
-
-ENTRY(_spl)
-	clrl	%d0
-	movw	%sr,%d0
-	movl	%sp@(4),%d1
-	movw	%d1,%sr
-	rts
-
-ENTRY(_splraise)
-	clrl	%d0
-	movw	%sr,%d0
-	movl	%d0,%d1
-	andl	#PSL_HIGHIPL,%d1	| old &= PSL_HIGHIPL
-	cmpl	%sp@(4),%d1		| (old - new)
-	bge	Lsplr
-	movl	%sp@(4),%d1
-	movw	%d1,%sr
-Lsplr:
-	rts
-
-/*
  * _delay(unsigned N)
  * Delay for at least (N/256) microseconds.
  * This routine depends on the variable:  delay_divisor

Index: src/sys/arch/sun3/sun3x/locore.s
diff -u src/sys/arch/sun3/sun3x/locore.s:1.72 src/sys/arch/sun3/sun3x/locore.s:1.73
--- src/sys/arch/sun3/sun3x/locore.s:1.72	Fri Jan 12 23:46:53 2024
+++ src/sys/arch/sun3/sun3x/locore.s	Sat Jan 13 00:21:51 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.72 2024/01/12 23:46:53 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.73 2024/01/13 00:21:51 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -626,32 +626,6 @@ ENTRY(ptest_addr)
 	rts
 
 /*
- * Set processor priority level calls.  Most are implemented with
- * inline asm expansions.  However, we need one instantiation here
- * in case some non-optimized code makes external references.
- * Most places will use the inlined functions param.h supplies.
- */
-
-ENTRY(_spl)
-	clrl	%d0
-	movw	%sr,%d0
-	movl	%sp@(4),%d1
-	movw	%d1,%sr
-	rts
-
-ENTRY(_splraise)
-	clrl	%d0
-	movw	%sr,%d0
-	movl	%d0,%d1
-	andl	#PSL_HIGHIPL,%d1 	| old &= PSL_HIGHIPL
-	cmpl	%sp@(4),%d1		| (old - new)
-	bge	Lsplr
-	movl	%sp@(4),%d1
-	movw	%d1,%sr
-Lsplr:
-	rts
-
-/*
  * _delay(unsigned N)
  * Delay for at least (N/256) microseconds.
  * This routine depends on the variable:  delay_divisor



CVS commit: src/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 00:21:51 UTC 2024

Modified Files:
src/sys/arch/sun2/sun2: locore.s
src/sys/arch/sun3/sun3: locore.s
src/sys/arch/sun3/sun3x: locore.s

Log Message:
G/C unreferenced copies of _spl() and _splraise().


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sun3/sun3x/locore.s

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



CVS commit: src/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Jan 12 23:46:53 UTC 2024

Modified Files:
src/sys/arch/m68k/include: frame.h
src/sys/arch/sun2/sun2: locore.s machdep.h
src/sys/arch/sun3/sun3: locore.s machdep.h sunmon.c
src/sys/arch/sun3/sun3x: locore.s

Log Message:
We only need one copy of getvbr() and setvbr().


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sun2/sun2/machdep.h
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sun3/sun3/machdep.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sun3/sun3/sunmon.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/sun3/sun3x/locore.s

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

Modified files:

Index: src/sys/arch/m68k/include/frame.h
diff -u src/sys/arch/m68k/include/frame.h:1.33 src/sys/arch/m68k/include/frame.h:1.34
--- src/sys/arch/m68k/include/frame.h:1.33	Tue Sep 26 14:33:55 2023
+++ src/sys/arch/m68k/include/frame.h	Fri Jan 12 23:46:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.33 2023/09/26 14:33:55 tsutsui Exp $	*/
+/*	$NetBSD: frame.h,v 1.34 2024/01/12 23:46:52 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -243,6 +243,22 @@ do {	\
 #define	ATOMIC_CAS_CHECK(cfp)	/* nothing */
 #endif /* __mc68010__ */
 
+static inline void **
+getvbr(void)
+{
+	void **vbr;
+
+	__asm volatile("movc %%vbr,%0" : "=r" (vbr));
+
+	return vbr;
+}
+
+static inline void
+setvbr(void **vbr)
+{
+	__asm volatile("movc %0,%%vbr" : : "r" (vbr));
+}
+
 #endif	/* _KERNEL */
 
 #endif	/* _M68K_FRAME_H_ */

Index: src/sys/arch/sun2/sun2/locore.s
diff -u src/sys/arch/sun2/sun2/locore.s:1.31 src/sys/arch/sun2/sun2/locore.s:1.32
--- src/sys/arch/sun2/sun2/locore.s:1.31	Fri Jan 12 23:36:29 2024
+++ src/sys/arch/sun2/sun2/locore.s	Fri Jan 12 23:46:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.31 2024/01/12 23:36:29 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.32 2024/01/12 23:46:52 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -550,18 +550,6 @@ Ldorte:
 #undef FPCOPROC
 #include 
 
-ENTRY(getvbr)
-	movc	%vbr,%d0
-#ifdef __ELF__
-	movl	%d0, %a0
-#endif /* __ELF__ */
-	rts
-
-ENTRY(setvbr)
-	movl	%sp@(4),%d0
-	movc	%d0,%vbr
-	rts
-
 /* loadustp, ptest_addr */
 
 /*

Index: src/sys/arch/sun2/sun2/machdep.h
diff -u src/sys/arch/sun2/sun2/machdep.h:1.14 src/sys/arch/sun2/sun2/machdep.h:1.15
--- src/sys/arch/sun2/sun2/machdep.h:1.14	Fri Jan 12 23:36:29 2024
+++ src/sys/arch/sun2/sun2/machdep.h	Fri Jan 12 23:46:52 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.h,v 1.14 2024/01/12 23:36:29 thorpej Exp $	*/
+/*	$NetBSD: machdep.h,v 1.15 2024/01/12 23:46:52 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -115,14 +115,10 @@ int 	fpu_emulate(struct trapframe *, str
 int 	getdfc(void);
 int 	getsfc(void);
 
-void**	getvbr(void);
-
 void	initfpu(void);
 
 void	set_clk_mode(int, int);
 
-void	setvbr(void **);
-
 void	g0_entry(void);
 void	g4_entry(void);
 

Index: src/sys/arch/sun3/sun3/locore.s
diff -u src/sys/arch/sun3/sun3/locore.s:1.103 src/sys/arch/sun3/sun3/locore.s:1.104
--- src/sys/arch/sun3/sun3/locore.s:1.103	Fri Jan 12 23:36:29 2024
+++ src/sys/arch/sun3/sun3/locore.s	Fri Jan 12 23:46:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.103 2024/01/12 23:36:29 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.104 2024/01/12 23:46:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -619,15 +619,6 @@ ENTRY(DCIU)
 /* ICPL, ICPP, DCPL, DCPP, DCPA, DCFL, DCFP */
 /* PCIA, ecacheon, ecacheoff */
 
-ENTRY(getvbr)
-	movc	%vbr,%a0
-	rts
-
-ENTRY(setvbr)
-	movl	%sp@(4),%d0
-	movc	%d0,%vbr
-	rts
-
 /* loadustp, ptest_addr */
 
 /*

Index: src/sys/arch/sun3/sun3/machdep.h
diff -u src/sys/arch/sun3/sun3/machdep.h:1.40 src/sys/arch/sun3/sun3/machdep.h:1.41
--- src/sys/arch/sun3/sun3/machdep.h:1.40	Fri Jan 12 23:36:30 2024
+++ src/sys/arch/sun3/sun3/machdep.h	Fri Jan 12 23:46:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.h,v 1.40 2024/01/12 23:36:30 thorpej Exp $	*/
+/*	$NetBSD: machdep.h,v 1.41 2024/01/12 23:46:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -114,7 +114,6 @@ void	enable_video(int);
 
 int	fpu_emulate(struct trapframe *, struct fpframe *, ksiginfo_t *);
 
-void**	getvbr(void);
 int	getcrp(struct mmu_rootptr *);
 
 void	initfpu(void);
@@ -127,8 +126,6 @@ void	netintr(void);
 
 void	obio_init(void);
 
-void	setvbr(void **);
-
 void	sunmon_abort(void);
 void	sunmon_halt(void);
 void	sunmon_init(void);

Index: src/sys/arch/sun3/sun3/sunmon.c
diff -u src/sys/arch/sun3/sun3/sunmon.c:1.22 src/sys/arch/sun3/sun3/sunmon.c:1.23
--- src/sys/arch/sun3/sun3/sunmon.c:1.22	Thu Sep 10 02:03:44 2020
+++ src/sys/arch/sun3/sun3/sunmon.c	Fri Jan 12 23:46:53 2024

CVS commit: src/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Jan 12 23:46:53 UTC 2024

Modified Files:
src/sys/arch/m68k/include: frame.h
src/sys/arch/sun2/sun2: locore.s machdep.h
src/sys/arch/sun3/sun3: locore.s machdep.h sunmon.c
src/sys/arch/sun3/sun3x: locore.s

Log Message:
We only need one copy of getvbr() and setvbr().


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sun2/sun2/machdep.h
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sun3/sun3/machdep.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sun3/sun3/sunmon.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/sun3/sun3x/locore.s

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



CVS commit: src/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Jan 12 23:36:30 UTC 2024

Modified Files:
src/sys/arch/luna68k/luna68k: isr.c locore.s
src/sys/arch/m68k/include: psl.h
src/sys/arch/mvme68k/mvme68k: locore.s
src/sys/arch/news68k/include: cpu.h
src/sys/arch/news68k/news68k: locore.s
src/sys/arch/next68k/next68k: locore.s
src/sys/arch/sun2/sun2: locore.s machdep.h
src/sys/arch/sun3/sun3: locore.s machdep.h
src/sys/arch/sun3/sun3x: locore.s
src/sys/arch/sun68k/include: intr.h
src/sys/arch/sun68k/sun68k: isr.c
src/sys/arch/virt68k/virt68k: locore.s

Log Message:
Make getsr() an inline in  and G/C all of the now-redudant
copies.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/luna68k/isr.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/include/psl.h
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/mvme68k/mvme68k/locore.s
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/next68k/next68k/locore.s
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sun2/sun2/machdep.h
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/sun3/sun3/machdep.h
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/sun3/sun3x/locore.s
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun68k/include/intr.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun68k/sun68k/isr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/virt68k/virt68k/locore.s

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

Modified files:

Index: src/sys/arch/luna68k/luna68k/isr.c
diff -u src/sys/arch/luna68k/luna68k/isr.c:1.25 src/sys/arch/luna68k/luna68k/isr.c:1.26
--- src/sys/arch/luna68k/luna68k/isr.c:1.25	Fri Apr  2 12:11:41 2021
+++ src/sys/arch/luna68k/luna68k/isr.c	Fri Jan 12 23:36:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: isr.c,v 1.25 2021/04/02 12:11:41 rin Exp $	*/
+/*	$NetBSD: isr.c,v 1.26 2024/01/12 23:36:29 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.25 2021/04/02 12:11:41 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.26 2024/01/12 23:36:29 thorpej Exp $");
 
 /*
  * Link and dispatch interrupts.
@@ -56,8 +56,6 @@ extern	void (*vectab[])(void);
 extern	void badtrap(void);
 extern	void intrhand_vectored(void);
 
-extern	int getsr(void);	/* in locore.s */
-
 void
 isrinit(void)
 {

Index: src/sys/arch/luna68k/luna68k/locore.s
diff -u src/sys/arch/luna68k/luna68k/locore.s:1.74 src/sys/arch/luna68k/luna68k/locore.s:1.75
--- src/sys/arch/luna68k/luna68k/locore.s:1.74	Tue Jan  9 07:28:25 2024
+++ src/sys/arch/luna68k/luna68k/locore.s	Fri Jan 12 23:36:29 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.74 2024/01/09 07:28:25 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.75 2024/01/12 23:36:29 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -777,11 +777,6 @@ ENTRY(ecacheon)
 ENTRY(ecacheoff)
 	rts
 
-ENTRY(getsr)
-	moveq	#0,%d0
-	movw	%sr,%d0
-	rts
-
 /*
  * _delay(u_int N)
  *

Index: src/sys/arch/m68k/include/psl.h
diff -u src/sys/arch/m68k/include/psl.h:1.16 src/sys/arch/m68k/include/psl.h:1.17
--- src/sys/arch/m68k/include/psl.h:1.16	Fri Jan 27 23:29:14 2023
+++ src/sys/arch/m68k/include/psl.h	Fri Jan 12 23:36:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.16 2023/01/27 23:29:14 tsutsui Exp $	*/
+/*	$NetBSD: psl.h,v 1.17 2024/01/12 23:36:29 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -75,12 +75,22 @@
  * spl functions; platform-specific code must define spl0 and splx().
  */
 
+static inline int
+getsr(void)
+{
+	int sr;
+
+	__asm volatile("clrl %0; movew %%sr,%0" : "=" (sr));
+
+	return sr;
+}
+
 static __inline int
 _spl(int s)
 {
 	int sr;
 
-	__asm volatile ("movew %%sr,%0; movew %1,%%sr" :
+	__asm volatile ("clrl %0; movew %%sr,%0; movew %1,%%sr" :
 	"=" (sr) : "di" (s) : "memory");
 
 	return sr;
@@ -91,10 +101,10 @@ _splraise(int level)
 {
 	int sr;
 
-	__asm volatile("movw %%sr,%0" : "=d" (sr));
+	__asm volatile("clrl %0; movew %%sr,%0" : "=" (sr));
 
 	if ((uint16_t)level >= PSL_HIGHIPL || (uint16_t)level > (uint16_t)sr)
-		__asm volatile("movw %0,%%sr" :: "di" (level) : "memory");
+		__asm volatile("movew %0,%%sr" : : "di" (level) : "memory");
 
 	return sr;
 }

Index: src/sys/arch/mvme68k/mvme68k/locore.s
diff -u src/sys/arch/mvme68k/mvme68k/locore.s:1.124 src/sys/arch/mvme68k/mvme68k/locore.s:1.125
--- src/sys/arch/mvme68k/mvme68k/locore.s:1.124	Fri Jan 12 01:53:57 2024
+++ src/sys/arch/mvme68k/mvme68k/locore.s	Fri Jan 12 23:36:29 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.124 2024/01/12 01:53:57 thorpej Exp $	*/
+/*	$NetBSD: 

CVS commit: src/sys/arch

2024-01-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Jan 12 23:36:30 UTC 2024

Modified Files:
src/sys/arch/luna68k/luna68k: isr.c locore.s
src/sys/arch/m68k/include: psl.h
src/sys/arch/mvme68k/mvme68k: locore.s
src/sys/arch/news68k/include: cpu.h
src/sys/arch/news68k/news68k: locore.s
src/sys/arch/next68k/next68k: locore.s
src/sys/arch/sun2/sun2: locore.s machdep.h
src/sys/arch/sun3/sun3: locore.s machdep.h
src/sys/arch/sun3/sun3x: locore.s
src/sys/arch/sun68k/include: intr.h
src/sys/arch/sun68k/sun68k: isr.c
src/sys/arch/virt68k/virt68k: locore.s

Log Message:
Make getsr() an inline in  and G/C all of the now-redudant
copies.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/luna68k/isr.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/include/psl.h
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/mvme68k/mvme68k/locore.s
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/next68k/next68k/locore.s
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sun2/sun2/locore.s
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sun2/sun2/machdep.h
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/sun3/sun3/locore.s
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/sun3/sun3/machdep.h
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/sun3/sun3x/locore.s
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun68k/include/intr.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun68k/sun68k/isr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/virt68k/virt68k/locore.s

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



Re: CVS commit: src/sys/arch

2024-01-12 Thread Izumi Tsutsui
simonb@ wrote:

> Module Name:  src
> Committed By: simonb
> Date: Sun Aug  7 02:52:30 UTC 2022
> 
> Modified Files:
 :
>   src/sys/arch/sun3/conf: DISKLESS GENERIC GENERIC3X
 :
> Log Message:
> UFS/LFS dirhash:
> - Enable UFS_DIRHASH if the architecture or kernel model specific config
>   file can use 128MB of RAM or more.
> - Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel
>   and by a number of NetBSD developers for years.
> - Add LFS_DIRHASH if LFS was enabled.
> - Be somewhat consistent with FS options order.
 :
> cvs rdiff -u -r1.187 -r1.188 src/sys/arch/sun3/conf/GENERIC

>>  # Veriexec
>>  # include "dev/veriexec.config"
>> +
>> +no obmem0 at mainbus?   # XX

Is this intentional!?

---
Izumi Tsutsui


CVS commit: src/doc

2024-01-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 12 19:31:43 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
libarchive-3.7.2 is out


To generate a diff of this commit:
cvs rdiff -u -r1.1974 -r1.1975 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.1974 src/doc/3RDPARTY:1.1975
--- src/doc/3RDPARTY:1.1974	Sat Dec 23 20:49:22 2023
+++ src/doc/3RDPARTY	Fri Jan 12 19:31:43 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1974 2023/12/23 20:49:22 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1975 2024/01/12 19:31:43 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -716,7 +716,7 @@ Talk to mrg before importing any new ver
 
 Package:	libarchive
 Version:	3.4.0
-Current Vers:	3.6.2
+Current Vers:	3.7.2
 Maintainer:	kient...@freebsd.org, jo...@netbsd.org
 Archive Site:	https://github.com/libarchive/libarchive/releases
 Home Page: 	http://www.libarchive.org



CVS commit: src/doc

2024-01-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 12 19:31:43 UTC 2024

Modified Files:
src/doc: 3RDPARTY

Log Message:
libarchive-3.7.2 is out


To generate a diff of this commit:
cvs rdiff -u -r1.1974 -r1.1975 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/sys/dev/fdt

2024-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 12 18:06:18 UTC 2024

Modified Files:
src/sys/dev/fdt: fdt_memory.c

Log Message:
Cache the result from fdtbus_get_data() in fdt_memory_remove_reserved

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/fdt/fdt_memory.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/fdt/fdt_memory.c
diff -u src/sys/dev/fdt/fdt_memory.c:1.8 src/sys/dev/fdt/fdt_memory.c:1.9
--- src/sys/dev/fdt/fdt_memory.c:1.8	Fri Nov  4 10:51:16 2022
+++ src/sys/dev/fdt/fdt_memory.c	Fri Jan 12 18:06:18 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_memory.c,v 1.8 2022/11/04 10:51:16 jmcneill Exp $ */
+/* $NetBSD: fdt_memory.c,v 1.9 2024/01/12 18:06:18 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "opt_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.8 2022/11/04 10:51:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.9 2024/01/12 18:06:18 skrll Exp $");
 
 #include 
 #include 
@@ -110,15 +110,16 @@ fdt_memory_remove_reserved(uint64_t min_
 {
 	uint64_t lstart = 0, lend = 0;
 	int index, error, phandle, child;
+	const void *fdt_data = fdtbus_get_data();
+	const int num = fdt_num_mem_rsv(fdt_data);
 
-	const int num = fdt_num_mem_rsv(fdtbus_get_data());
 	for (index = 0; index <= num; index++) {
 		uint64_t addr, size;
 
-		error = fdt_get_mem_rsv(fdtbus_get_data(), index,
-		, );
+		error = fdt_get_mem_rsv(fdt_data, index, , );
 		if (error != 0)
 			continue;
+
 		if (lstart <= addr && addr <= lend) {
 			size -= (lend - addr);
 			addr = lend;



CVS commit: src/sys/dev/fdt

2024-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 12 18:06:18 UTC 2024

Modified Files:
src/sys/dev/fdt: fdt_memory.c

Log Message:
Cache the result from fdtbus_get_data() in fdt_memory_remove_reserved

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/fdt/fdt_memory.c

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



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

2024-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 12 11:24:48 UTC 2024

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

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/fdt/pcihost_fdt.c

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

Modified files:

Index: src/sys/arch/arm/fdt/pcihost_fdt.c
diff -u src/sys/arch/arm/fdt/pcihost_fdt.c:1.32 src/sys/arch/arm/fdt/pcihost_fdt.c:1.33
--- src/sys/arch/arm/fdt/pcihost_fdt.c:1.32	Sat Oct 15 11:07:38 2022
+++ src/sys/arch/arm/fdt/pcihost_fdt.c	Fri Jan 12 11:24:48 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.32 2022/10/15 11:07:38 jmcneill Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.33 2024/01/12 11:24:48 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.32 2022/10/15 11:07:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.33 2024/01/12 11:24:48 skrll Exp $");
 
 #include 
 
@@ -506,8 +506,8 @@ pcihost_intr_map(const struct pci_attach
 	index = 0;
 	while (imaplen >= 20) {
 		const int map_ihandle = fdtbus_get_phandle_from_native(be32toh(imap[4]));
-	if (of_getprop_uint32(map_ihandle, "#address-cells", _cells))
-	addr_cells = 2;
+		if (of_getprop_uint32(map_ihandle, "#address-cells", _cells))
+			addr_cells = 2;
 		if (of_getprop_uint32(map_ihandle, "#interrupt-cells", _cells))
 			interrupt_cells = 0;
 		if (imaplen < (addr_cells + interrupt_cells) * 4)
@@ -542,8 +542,8 @@ pcihost_find_intr(struct pcihost_softc *
 	index = 0;
 	while (imaplen >= 20) {
 		const int map_ihandle = fdtbus_get_phandle_from_native(be32toh(imap[4]));
-	if (of_getprop_uint32(map_ihandle, "#address-cells", _cells))
-	addr_cells = 2;
+		if (of_getprop_uint32(map_ihandle, "#address-cells", _cells))
+			addr_cells = 2;
 		if (of_getprop_uint32(map_ihandle, "#interrupt-cells", _cells))
 			interrupt_cells = 0;
 		if (imaplen < (addr_cells + interrupt_cells) * 4)



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

2024-01-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Jan 12 11:24:48 UTC 2024

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

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/fdt/pcihost_fdt.c

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



CVS commit: src/doc

2024-01-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 12 08:44:42 UTC 2024

Modified Files:
src/doc: HACKS

Log Message:
Extend the lint "trapv" gcc bug to VAX and note that it has been fixed
(according to upstream) in gcc 11 and newer.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.240 src/doc/HACKS:1.241
--- src/doc/HACKS:1.240	Mon Sep  4 21:01:15 2023
+++ src/doc/HACKS	Fri Jan 12 08:44:42 2024
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.240 2023/09/04 21:01:15 mrg Exp $
+# $NetBSD: HACKS,v 1.241 2024/01/12 08:44:42 martin Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -1058,14 +1058,16 @@ kcah
 hack	alpha gcc error in lint
 cdate	2022/04/10 13:21:34
 who	martin
-port	alpha
-file	usr.bin/xlint/Makefile.inc: 1.23
+port	alpha, vax
+file	usr.bin/xlint/Makefile.inc: 1.23, 1.25
 pr	56789
 descr
 	Compiling lint with -ftrapv fails with an internal
 	gcc compiler error.
 
 	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105209
+
+	Supposedly fixed in gcc 11 or newer.
 kcah
 
 hack	compile copy{in,out}() for ibm4xx with -O0 for clang



CVS commit: src/doc

2024-01-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 12 08:44:42 UTC 2024

Modified Files:
src/doc: HACKS

Log Message:
Extend the lint "trapv" gcc bug to VAX and note that it has been fixed
(according to upstream) in gcc 11 and newer.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/doc/HACKS

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



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

2024-01-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Jan 12 08:33:39 UTC 2024

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: clean up grammar for array size


To generate a diff of this commit:
cvs rdiff -u -r1.480 -r1.481 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/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.480 src/usr.bin/xlint/lint1/cgram.y:1.481
--- src/usr.bin/xlint/lint1/cgram.y:1.480	Thu Jan 11 23:26:39 2024
+++ src/usr.bin/xlint/lint1/cgram.y	Fri Jan 12 08:33:39 2024
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.480 2024/01/11 23:26:39 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.481 2024/01/12 08:33:39 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.480 2024/01/11 23:26:39 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.481 2024/01/12 08:33:39 rillig Exp $");
 #endif
 
 #include 
@@ -363,7 +363,6 @@ is_either(const char *s, const char *a, 
 %type		param_list
 /* No type for id_list_lparen. */
 %type		array_size_opt
-%type		array_size
 %type			identifier_list
 %type		type_name
 %type			abstract_declaration
@@ -1461,28 +1460,26 @@ array_size_opt:
 		$$.has_dim = false; /* TODO: maybe change to true */
 		$$.dim = 0;	/* just as a placeholder */
 	}
-|	array_size {
-		$$.has_dim = true;
-		$$.dim = $1 == NULL ? 0 : to_int_constant($1, false);
-	}
-;
-
-array_size:
-	type_qualifier_list_opt T_SCLASS constant_expression {
+|	type_qualifier_list_opt T_SCLASS constant_expression {
 		/* C11 6.7.6.3p7 */
 		if ($2 != STATIC)
 			yyerror("Bad attribute");
 		/* static array size requires C11 or later */
 		c11ism(343);
-		$$ = $3;
+		$$.has_dim = true;
+		$$.dim = $3 == NULL ? 0 : to_int_constant($3, false);
 	}
 |	type_qualifier {
 		/* C11 6.7.6.2 */
 		if (!$1.tq_restrict)
 			yyerror("Bad attribute");
-		$$ = NULL;
+		$$.has_dim = true;
+		$$.dim = 0;
+	}
+|	constant_expression {
+		$$.has_dim = true;
+		$$.dim = $1 == NULL ? 0 : to_int_constant($1, false);
 	}
-|	constant_expression
 ;
 
 identifier_list:		/* C99 6.7.5 */



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

2024-01-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Jan 12 08:33:39 UTC 2024

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: clean up grammar for array size


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