CVS commit: src

2024-04-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed May  1 05:49:33 UTC 2024

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

Log Message:
lint: fix warning about out-of-bounds bit-field value


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tests/usr.bin/xlint/lint1/msg_132.c
cvs rdiff -u -r1.637 -r1.638 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src

2024-04-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed May  1 05:49:33 UTC 2024

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

Log Message:
lint: fix warning about out-of-bounds bit-field value


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/tests/usr.bin/xlint/lint1/msg_132.c
cvs rdiff -u -r1.637 -r1.638 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_132.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.39 src/tests/usr.bin/xlint/lint1/msg_132.c:1.40
--- src/tests/usr.bin/xlint/lint1/msg_132.c:1.39	Wed May  1 05:38:11 2024
+++ src/tests/usr.bin/xlint/lint1/msg_132.c	Wed May  1 05:49:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132.c,v 1.39 2024/05/01 05:38:11 rillig Exp $	*/
+/*	$NetBSD: msg_132.c,v 1.40 2024/05/01 05:49:33 rillig Exp $	*/
 # 3 "msg_132.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -265,13 +265,13 @@ test_ic_shr(u64_t x)
 unsigned char
 test_bit_fields(unsigned long long m)
 {
-	/* expect+1: warning: conversion from 'unsigned long long:32' to 'unsigned int:3' may lose accuracy [132] */
+	/* expect+1: warning: conversion from 'unsigned long long' to 'unsigned int:3' may lose accuracy [132] */
 	bits.u3 = bits.u32 & m;
 
 	bits.u5 = bits.u3 & m;
 	bits.u32 = bits.u5 & m;
 
-	/* expect+1: warning: conversion from 'unsigned long long:32' to 'unsigned char' may lose accuracy [132] */
+	/* expect+1: warning: conversion from 'unsigned long long' to 'unsigned char' may lose accuracy [132] */
 	return bits.u32 & m;
 }
 
@@ -450,6 +450,7 @@ binary_operators_on_bit_fields(void)
 	cond = (s.u15 | s.u48 | s.u64) != 0;
 	cond = (s.u64 | s.u48 | s.u15) != 0;
 
-	/* expect+1: warning: conversion of 'int' to 'int:4' is out of range [119] */
+	// Before tree.c from 1.638 from 2024-05-01, lint wrongly warned:
+	// warning: conversion of 'int' to 'int:4' is out of range [119]
 	s32 = 8 - bits.u3;
 }

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.637 src/usr.bin/xlint/lint1/tree.c:1.638
--- src/usr.bin/xlint/lint1/tree.c:1.637	Sat Apr 27 12:46:37 2024
+++ src/usr.bin/xlint/lint1/tree.c	Wed May  1 05:49:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.637 2024/04/27 12:46:37 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.638 2024/05/01 05:49:33 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.637 2024/04/27 12:46:37 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.638 2024/05/01 05:49:33 rillig Exp $");
 #endif
 
 #include 
@@ -763,12 +763,14 @@ balance(op_t op, tnode_t **lnp, tnode_t 
 	if (t != rt)
 		*rnp = apply_usual_arithmetic_conversions(op, *rnp, t);
 
-	unsigned lw = (*lnp)->tn_type->t_bit_field_width;
-	unsigned rw = (*rnp)->tn_type->t_bit_field_width;
-	if (lw < rw)
-		*lnp = convert(NOOP, 0, (*rnp)->tn_type, *lnp);
-	if (rw < lw)
-		*rnp = convert(NOOP, 0, (*lnp)->tn_type, *rnp);
+	if (is_integer(t)) {
+		unsigned lw = width_in_bits((*lnp)->tn_type);
+		unsigned rw = width_in_bits((*rnp)->tn_type);
+		if (lw < rw)
+			*lnp = convert(NOOP, 0, (*rnp)->tn_type, *lnp);
+		if (rw < lw)
+			*rnp = convert(NOOP, 0, (*lnp)->tn_type, *rnp);
+	}
 }
 
 static tnode_t *



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

2024-04-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed May  1 05:38:11 UTC 2024

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

Log Message:
lint: demonstrate wrong warning about out-of-range bit-field


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/usr.bin/xlint/lint1/msg_132.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_132.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.38 src/tests/usr.bin/xlint/lint1/msg_132.c:1.39
--- src/tests/usr.bin/xlint/lint1/msg_132.c:1.38	Mon Mar 25 23:39:14 2024
+++ src/tests/usr.bin/xlint/lint1/msg_132.c	Wed May  1 05:38:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132.c,v 1.38 2024/03/25 23:39:14 rillig Exp $	*/
+/*	$NetBSD: msg_132.c,v 1.39 2024/05/01 05:38:11 rillig Exp $	*/
 # 3 "msg_132.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -449,4 +449,7 @@ binary_operators_on_bit_fields(void)
 	u64 = s.u64 | s.u48 | s.u15;
 	cond = (s.u15 | s.u48 | s.u64) != 0;
 	cond = (s.u64 | s.u48 | s.u15) != 0;
+
+	/* expect+1: warning: conversion of 'int' to 'int:4' is out of range [119] */
+	s32 = 8 - bits.u3;
 }



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

2024-04-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed May  1 05:38:11 UTC 2024

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

Log Message:
lint: demonstrate wrong warning about out-of-range bit-field


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tests/usr.bin/xlint/lint1/msg_132.c

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



CVS commit: src/etc/etc.evbppc

2024-04-30 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed May  1 02:16:15 UTC 2024

Modified Files:
src/etc/etc.evbppc: MAKEDEV.conf

Log Message:
etc.evbppc/MAKEDEV.conf: drop unused block and fix comment


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/etc.evbppc/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.evbppc/MAKEDEV.conf
diff -u src/etc/etc.evbppc/MAKEDEV.conf:1.13 src/etc/etc.evbppc/MAKEDEV.conf:1.14
--- src/etc/etc.evbppc/MAKEDEV.conf:1.13	Fri Aug 12 11:15:41 2022
+++ src/etc/etc.evbppc/MAKEDEV.conf	Wed May  1 02:16:15 2024
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.13 2022/08/12 11:15:41 riastradh Exp $
+# $NetBSD: MAKEDEV.conf,v 1.14 2024/05/01 02:16:15 gutteridge Exp $
 
 all_md)
 	makedev wscons sd0 sd1 sd2 st0 st1 cd0 cd1 wd0 wd1
@@ -26,10 +26,7 @@ all_md)
 	makedev ttyVI
 	;;
 
-# No bpf?
-ramdisk)
-	makedev md0
-	;;
+# ramdisk definition is found at distrib/evbppc/ramdisk/Makefile
 
 xlcom[0-9]*)
 	unit=${i#xlcom}



CVS commit: src/etc/etc.evbppc

2024-04-30 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed May  1 02:16:15 UTC 2024

Modified Files:
src/etc/etc.evbppc: MAKEDEV.conf

Log Message:
etc.evbppc/MAKEDEV.conf: drop unused block and fix comment


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/etc.evbppc/MAKEDEV.conf

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/hp300/dev

2024-04-30 Thread Roland Illig
Am 30.04.2024 um 11:55 schrieb Izumi Tsutsui:
> Module Name:  src
> Committed By: tsutsui
> Date: Tue Apr 30 09:55:46 UTC 2024
>
> Modified Files:
>   src/sys/arch/hp300/dev: dma.c
>
> Log Message:
> Fix another fatal typo that prevents dma(4) interrupts.

The buggy code was:
>   if ((sc->sc_ipl == ipl) == 0) {

The typo in the first '==' can be found by treating bool as a data type
incompatible with any other scalar type, and this is what lint does in
its "strict bool mode".

Lint is not yet ready for the whole kernel source, as it errors out on
232 of the 3223 source files. But it can check hp300/dma.c, and running
it with the extra flag -T finds the bug, among several false positives.

If you want to play around a bit, the attached patch allows you to
suppress the uninteresting lint warnings in the kernel source, and to
configure per-file lint flags. To detect the above bug in dma.c 1.47, run:

cd OBJDIR/sys/arch/hp300/compile/GENERIC
make dma.ln KERNLINTFLAGS.dma.c=-T

Roland
Index: sys/conf/lint.mk
===
RCS file: /cvsroot/src/sys/conf/lint.mk,v
retrieving revision 1.5
diff -u -r1.5 lint.mk
--- sys/conf/lint.mk27 Aug 2022 21:49:33 -  1.5
+++ sys/conf/lint.mk30 Apr 2024 22:50:59 -
@@ -5,11 +5,25 @@
 ##
 
 .if !target(lint)
+DEFKERNLINTFLAGS=  -bceghnxzFS
+DEFKERNLINTFLAGS+= -X 0# empty declaration
+DEFKERNLINTFLAGS+= -X 2# empty declaration
+DEFKERNLINTFLAGS+= -X 56   # integral constant too large
+DEFKERNLINTFLAGS+= -X 129  # expression with null effect
+DEFKERNLINTFLAGS+= -X 161  # constant in conditional context
+DEFKERNLINTFLAGS+= -X 226  # static variable unused
+DEFKERNLINTFLAGS+= -X 231  # unused parameter
+DEFKERNLINTFLAGS+= -X 236  # unused static function
+DEFKERNLINTFLAGS+= -X 247  # pointer cast may be troublesome
+DEFKERNLINTFLAGS+= -X 309  # lossy bitwise '&'
+DEFKERNLINTFLAGS+= -X 351  # missing header declaration
+DEFKERNLINTFLAGS+= -X 352  # nested 'extern' declaration
+
 .PATH: $S
 ALLSFILES?=${MD_SFILES} ${SFILES}
 LINTSTUBS?=${ALLSFILES:T:R:%=LintStub_%.c}
-KERNLINTFLAGS?=-bceghnxzFS
-NORMAL_LN?=${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} -o $@ -i $<
+KERNLINTFLAGS?=${DEFKERNLINTFLAGS}
+NORMAL_LN?=${LINT} ${KERNLINTFLAGS} ${KERNLINTFLAGS.${.IMPSRC:T}} 
${CPPFLAGS:M-[IDU]*} -o $@ -i $<
 
 _lsrc= ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
 LOBJS?=${_lsrc:T:.c=.ln} ${LIBKERNLN} ${SYSLIBCOMPATLN}


CVS commit: src

2024-04-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Apr 30 19:35:29 UTC 2024

Modified Files:
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/manhtml: mi
src/share/man/man4/man4.i386: Makefile
src/share/man/man4/man4.x86: Makefile
src/sys/arch/amd64/conf: ALL GENERIC
src/sys/arch/i386/conf: ALL GENERIC
src/sys/arch/x86/x86: viac7temp.c
Added Files:
src/share/man/man4/man4.x86: viac7temp.4
Removed Files:
src/share/man/man4/man4.i386: viac7temp.4

Log Message:
viac7temp(4): rewrite temperature sensor to read value from MSR instead of using
documented cpuid instruction and eax register.

This approach is adapted from linux via-cputemp.c, no official documentation is
currently available. However, msr value seems to work on all tested CPUs while
documented cpuid instruction typically reports 0, even for my C7-D CPU.
msr value seems to have temperature in Celsius in lower 24-bits without fraction
(thus "msr & 0xff;" is used).

Tested on my personal systems based on CPUs below (i386 and amd64):
C7-D 1.6GHz (i386 only), Nano X2 L4350E, Nano X2 U4300, U2300 Nano, KX-U6580.
Also got one response via email which was based on Nano X2 L4050 (VE-900).
Nano reports independent values for each core.
KX-U6580 seems to show the same value for all cores but more testing is needed.

Since it works on amd64 capable CPUs, adding driver to GENERIC kernel config.
Also moving viac7temp man page to x86 instead of i386 (with updates).
In theory the change should add support for all VIA Nano CPUs and Zhaoxin CPUs
 at least up to KX-6000(G) series.

In the future I may need to introduce amd64 kernel module as well.

Plan to pullup to at least netbsd-10.

Patch mainly reviewed by riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.1772 -r1.1773 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.80 -r1.81 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r1.3 -r0 src/share/man/man4/man4.i386/viac7temp.4
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/man4.x86/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.x86/viac7temp.4
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.611 -r1.612 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.518 -r1.519 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1255 -r1.1256 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/x86/viac7temp.c

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1772 src/distrib/sets/lists/man/mi:1.1773
--- src/distrib/sets/lists/man/mi:1.1772	Tue Apr  9 15:17:24 2024
+++ src/distrib/sets/lists/man/mi	Tue Apr 30 19:35:28 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1772 2024/04/09 15:17:24 nia Exp $
+# $NetBSD: mi,v 1.1773 2024/04/30 19:35:28 andvar Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1340,7 +1340,7 @@
 ./usr/share/man/cat4/i386/spic.0		man-sys-catman		.cat
 ./usr/share/man/cat4/i386/vald.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i386/vesafb.0		man-obsolete		obsolete
-./usr/share/man/cat4/i386/viac7temp.0		man-sys-catman		.cat
+./usr/share/man/cat4/i386/viac7temp.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i4b.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i4bctl.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i4bipr.0			man-obsolete		obsolete
@@ -2158,6 +2158,7 @@
 ./usr/share/man/cat4/x86/tco.0			man-sys-catman		.cat
 ./usr/share/man/cat4/x86/tprof_amdpmi.0		man-obsolete		obsolete
 ./usr/share/man/cat4/x86/tprof_pmi.0		man-obsolete		obsolete
+./usr/share/man/cat4/x86/viac7temp.0		man-sys-catman		.cat
 ./usr/share/man/cat4/x86/vmt.0			man-obsolete		obsolete
 ./usr/share/man/cat4/x86/vmx.0			man-obsolete		obsolete
 ./usr/share/man/cat4/xbd.0			man-sys-catman		.cat
@@ -4835,7 +4836,7 @@
 ./usr/share/man/man4/i386/spic.4		man-sys-man		.man
 ./usr/share/man/man4/i386/vald.4		man-obsolete		obsolete
 ./usr/share/man/man4/i386/vesafb.4		man-obsolete		obsolete
-./usr/share/man/man4/i386/viac7temp.4		man-sys-man		.man
+./usr/share/man/man4/i386/viac7temp.4		man-obsolete		obsolete
 ./usr/share/man/man4/i4b.4			man-obsolete		obsolete
 ./usr/share/man/man4/i4bctl.4			man-obsolete		obsolete
 ./usr/share/man/man4/i4bipr.4			man-obsolete		obsolete
@@ -5653,6 +5654,7 @@
 ./usr/share/man/man4/x86/tco.4			man-sys-man		.man
 ./usr/share/man/man4/x86/tprof_amdpmi.4		man-obsolete		obsolete
 ./usr/share/man/man4/x86/tprof_pmi.4		man-obsolete		obsolete
+./usr/share/man/man4/x86/viac7temp.4		man-sys-man		.man
 ./usr/share/man/man4/x86/vmt.4			man-obsolete		obsolete
 ./usr/share/man/man4/x86/vmx.4			man-obsolete		obsolete
 ./usr/share/man/man4/xbd.4			man-sys-man		.man

Index: src/distrib/sets/lists/manhtml/mi
diff -u src/distrib/sets/lists/manhtml/mi:1.1 src/distrib/sets/lists/m

CVS commit: src

2024-04-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Apr 30 19:35:29 UTC 2024

Modified Files:
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/manhtml: mi
src/share/man/man4/man4.i386: Makefile
src/share/man/man4/man4.x86: Makefile
src/sys/arch/amd64/conf: ALL GENERIC
src/sys/arch/i386/conf: ALL GENERIC
src/sys/arch/x86/x86: viac7temp.c
Added Files:
src/share/man/man4/man4.x86: viac7temp.4
Removed Files:
src/share/man/man4/man4.i386: viac7temp.4

Log Message:
viac7temp(4): rewrite temperature sensor to read value from MSR instead of using
documented cpuid instruction and eax register.

This approach is adapted from linux via-cputemp.c, no official documentation is
currently available. However, msr value seems to work on all tested CPUs while
documented cpuid instruction typically reports 0, even for my C7-D CPU.
msr value seems to have temperature in Celsius in lower 24-bits without fraction
(thus "msr & 0xff;" is used).

Tested on my personal systems based on CPUs below (i386 and amd64):
C7-D 1.6GHz (i386 only), Nano X2 L4350E, Nano X2 U4300, U2300 Nano, KX-U6580.
Also got one response via email which was based on Nano X2 L4050 (VE-900).
Nano reports independent values for each core.
KX-U6580 seems to show the same value for all cores but more testing is needed.

Since it works on amd64 capable CPUs, adding driver to GENERIC kernel config.
Also moving viac7temp man page to x86 instead of i386 (with updates).
In theory the change should add support for all VIA Nano CPUs and Zhaoxin CPUs
 at least up to KX-6000(G) series.

In the future I may need to introduce amd64 kernel module as well.

Plan to pullup to at least netbsd-10.

Patch mainly reviewed by riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.1772 -r1.1773 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.80 -r1.81 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r1.3 -r0 src/share/man/man4/man4.i386/viac7temp.4
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/man4.x86/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.x86/viac7temp.4
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.611 -r1.612 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.518 -r1.519 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1255 -r1.1256 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/x86/viac7temp.c

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



CVS commit: src/distrib/sets/lists

2024-04-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 30 18:34:19 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: md.amd64
src/distrib/sets/lists/debug32: md.amd64

Log Message:
Mark ctf libs as depending on MKCTF


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/base32/md.amd64
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/debug32/md.amd64

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



CVS commit: src/distrib/sets/lists

2024-04-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 30 18:34:19 UTC 2024

Modified Files:
src/distrib/sets/lists/base32: md.amd64
src/distrib/sets/lists/debug32: md.amd64

Log Message:
Mark ctf libs as depending on MKCTF


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/base32/md.amd64
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/debug32/md.amd64

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/base32/md.amd64
diff -u src/distrib/sets/lists/base32/md.amd64:1.6 src/distrib/sets/lists/base32/md.amd64:1.7
--- src/distrib/sets/lists/base32/md.amd64:1.6	Tue Apr 30 01:18:40 2024
+++ src/distrib/sets/lists/base32/md.amd64	Tue Apr 30 18:34:19 2024
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.6 2024/04/30 01:18:40 macallan Exp $
+# $NetBSD: md.amd64,v 1.7 2024/04/30 18:34:19 martin Exp $
 ./lib/i386	base-compat-shlib	compat
 ./lib/i386/npf	base-compat-shlib	compat,npf
 ./lib/i386/npf/ext_log.so			base-compat-shlib	compat,npf
@@ -142,9 +142,9 @@
 ./usr/lib/i386/libcrypto.so			base-compat-shlib	compat
 ./usr/lib/i386/libcrypto.so.15			base-compat-shlib	compat
 ./usr/lib/i386/libcrypto.so.15.0		base-compat-shlib	compat
-./usr/lib/i386/libctf.so			base-compat-shlib	compat
-./usr/lib/i386/libctf.so.3			base-compat-shlib	compat
-./usr/lib/i386/libctf.so.3.0			base-compat-shlib	compat
+./usr/lib/i386/libctf.so			base-compat-shlib	compat,ctf
+./usr/lib/i386/libctf.so.3			base-compat-shlib	compat,ctf
+./usr/lib/i386/libctf.so.3.0			base-compat-shlib	compat,ctf
 ./usr/lib/i386/libcurses.so			base-compat-shlib	compat
 ./usr/lib/i386/libcurses.so.9			base-compat-shlib	compat
 ./usr/lib/i386/libcurses.so.9.1			base-compat-shlib	compat

Index: src/distrib/sets/lists/debug32/md.amd64
diff -u src/distrib/sets/lists/debug32/md.amd64:1.8 src/distrib/sets/lists/debug32/md.amd64:1.9
--- src/distrib/sets/lists/debug32/md.amd64:1.8	Tue Apr 16 19:15:36 2024
+++ src/distrib/sets/lists/debug32/md.amd64	Tue Apr 30 18:34:19 2024
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.8 2024/04/16 19:15:36 christos Exp $
+# $NetBSD: md.amd64,v 1.9 2024/04/30 18:34:19 martin Exp $
 ./usr/lib/i386/i18n/libBIG5_g.a			comp-c-debuglib	debuglib,compat
 ./usr/lib/i386/i18n/libDECHanyu_g.a			comp-c-debuglib	debuglib,compat
 ./usr/lib/i386/i18n/libEUCTW_g.a			comp-c-debuglib	debuglib,compat
@@ -211,7 +211,7 @@
 ./usr/libdata/debug/usr/lib/i386/libcom_err.so.8.0.debug	comp-sys-debug	debug,compat,kerberos
 ./usr/libdata/debug/usr/lib/i386/libcrypt.so.1.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/i386/libcrypto.so.15.0.debug	comp-sys-debug	debug,compat
-./usr/libdata/debug/usr/lib/i386/libctf.so.3.0.debug
+./usr/libdata/debug/usr/lib/i386/libctf.so.3.0.debug	comp-sys-debug	debug,compat,ctf
 ./usr/libdata/debug/usr/lib/i386/libcurses.so.9.1.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/i386/libdes.so.15.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/i386/libdevmapper.so.1.0.debug	comp-sys-debug	debug,compat,lvm



CVS commit: src/sys/compat/netbsd32

2024-04-30 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Apr 30 17:10:22 UTC 2024

Modified Files:
src/sys/compat/netbsd32: netbsd32_sysent.c

Log Message:
Enable compat sigreturn system call.

The previous bug in netbsd32___sigaction_sigtramp hid the problem,
as it failed all but the first installation of a signal handler.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/compat/netbsd32/netbsd32_sysent.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/compat/netbsd32/netbsd32_sysent.c
diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.158 src/sys/compat/netbsd32/netbsd32_sysent.c:1.159
--- src/sys/compat/netbsd32/netbsd32_sysent.c:1.158	Sun Jul 30 06:53:13 2023
+++ src/sys/compat/netbsd32/netbsd32_sysent.c	Tue Apr 30 17:10:22 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_sysent.c,v 1.158 2023/07/30 06:53:13 rin Exp $ */
+/* $NetBSD: netbsd32_sysent.c,v 1.159 2024/04/30 17:10:22 mlelstv Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.158 2023/07/30 06:53:13 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.159 2024/04/30 17:10:22 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -1280,7 +1280,7 @@ struct sysent netbsd32_sysent[] = {
 	},		/* 294 = netbsd32___sigsuspend14 */
 	{
 		ns(struct compat_16_netbsd32___sigreturn14_args),
-		.sy_call = (sy_call_t *)sys_nomodule
+		.sy_call = (sy_call_t *)compat_16_netbsd32___sigreturn14
 	},		/* 295 = compat_16_netbsd32___sigreturn14 */
 	{
 		ns(struct netbsd32___getcwd_args),



CVS commit: src/sys/compat/netbsd32

2024-04-30 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Apr 30 17:10:22 UTC 2024

Modified Files:
src/sys/compat/netbsd32: netbsd32_sysent.c

Log Message:
Enable compat sigreturn system call.

The previous bug in netbsd32___sigaction_sigtramp hid the problem,
as it failed all but the first installation of a signal handler.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/compat/netbsd32/netbsd32_sysent.c

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



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

2024-04-30 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Apr 30 16:41:33 UTC 2024

Modified Files:
src/usr.bin/make/unit-tests: Makefile deptgt-phony.exp

Log Message:
Subst DEFSYSPATH in deptgt-phony


To generate a diff of this commit:
cvs rdiff -u -r1.343 -r1.344 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/deptgt-phony.exp

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

Modified files:

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.343 src/usr.bin/make/unit-tests/Makefile:1.344
--- src/usr.bin/make/unit-tests/Makefile:1.343	Sat Apr 20 10:18:55 2024
+++ src/usr.bin/make/unit-tests/Makefile	Tue Apr 30 16:41:32 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.343 2024/04/20 10:18:55 rillig Exp $
+# $NetBSD: Makefile,v 1.344 2024/04/30 16:41:32 sjg Exp $
 #
 # Unit tests for make(1)
 #
@@ -589,8 +589,9 @@ unexport-env.rawout: export.mk
 
 # In tests that use the debugging option -dd, ignore debugging output that is
 # only logged in -DCLEANUP mode.
-STD_SED_CMDS.dd=		-e '/^OpenDirs_Done:/d'
-STD_SED_CMDS.dd+=		-e '/^CachedDir /d'
+STD_SED_CMDS.dd=	-e '/^OpenDirs_Done:/d'
+STD_SED_CMDS.dd+=	-e '/^CachedDir /d'
+STD_SED_CMDS.dd+=	-e 's,  ${DEFSYSPATH:U/usr/share/mk} ,   ,'
 
 # Omit details such as process IDs from the output of the -dg1 option.
 STD_SED_CMDS.dg1=	-e 's,${.CURDIR}$$,,'

Index: src/usr.bin/make/unit-tests/deptgt-phony.exp
diff -u src/usr.bin/make/unit-tests/deptgt-phony.exp:1.3 src/usr.bin/make/unit-tests/deptgt-phony.exp:1.4
--- src/usr.bin/make/unit-tests/deptgt-phony.exp:1.3	Tue Apr 30 16:13:34 2024
+++ src/usr.bin/make/unit-tests/deptgt-phony.exp	Tue Apr 30 16:41:32 2024
@@ -3,7 +3,7 @@ Expanding "deptgt-phony-pr-15164-*-wildc
 Searching for .depend ...
failed.
 Searching for .depend ...[dot last]...
-   /usr/share/mk ...
+...
failed.
 Wildcard expanding "all"...
 Searching for all ...



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

2024-04-30 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Apr 30 16:41:33 UTC 2024

Modified Files:
src/usr.bin/make/unit-tests: Makefile deptgt-phony.exp

Log Message:
Subst DEFSYSPATH in deptgt-phony


To generate a diff of this commit:
cvs rdiff -u -r1.343 -r1.344 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/deptgt-phony.exp

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



CVS commit: src/usr.bin/make

2024-04-30 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Apr 30 16:13:34 UTC 2024

Modified Files:
src/usr.bin/make: main.c
src/usr.bin/make/unit-tests: deptgt-phony.exp opt-m-include-dir.mk

Log Message:
make: ensure '.include ' respects MAKESYSPATH

Since Dir_FindFile is used by '.include' and its variants,
and will first search .CURDIR unless the give path starts with
".DOTLAST".

Update unit-tests/opt-m-include-dir to test this.


To generate a diff of this commit:
cvs rdiff -u -r1.613 -r1.614 src/usr.bin/make/main.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-phony.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-m-include-dir.mk

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

Modified files:

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.613 src/usr.bin/make/main.c:1.614
--- src/usr.bin/make/main.c:1.613	Sat Apr 27 17:33:46 2024
+++ src/usr.bin/make/main.c	Tue Apr 30 16:13:33 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.613 2024/04/27 17:33:46 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.614 2024/04/30 16:13:33 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.613 2024/04/27 17:33:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.614 2024/04/30 16:13:33 sjg Exp $");
 #if defined(MAKE_NATIVE)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -1156,6 +1156,8 @@ InitDefSysIncPath(char *syspath)
 	else
 		syspath = bmake_strdup(syspath);
 
+	/* do NOT search .CURDIR first for .include  */
+	SearchPath_Add(defSysIncPath, ".DOTLAST");
 	for (start = syspath; *start != '\0'; start = p) {
 		for (p = start; *p != '\0' && *p != ':'; p++)
 			continue;

Index: src/usr.bin/make/unit-tests/deptgt-phony.exp
diff -u src/usr.bin/make/unit-tests/deptgt-phony.exp:1.2 src/usr.bin/make/unit-tests/deptgt-phony.exp:1.3
--- src/usr.bin/make/unit-tests/deptgt-phony.exp:1.2	Fri Feb 11 23:44:18 2022
+++ src/usr.bin/make/unit-tests/deptgt-phony.exp	Tue Apr 30 16:13:34 2024
@@ -2,7 +2,7 @@ Expanding "depsrc-phony-pr-15164-*-wildc
 Expanding "deptgt-phony-pr-15164-*-wildcard"... 
 Searching for .depend ...
failed.
-Searching for .depend ...
+Searching for .depend ...[dot last]...
/usr/share/mk ...
failed.
 Wildcard expanding "all"...

Index: src/usr.bin/make/unit-tests/opt-m-include-dir.mk
diff -u src/usr.bin/make/unit-tests/opt-m-include-dir.mk:1.4 src/usr.bin/make/unit-tests/opt-m-include-dir.mk:1.5
--- src/usr.bin/make/unit-tests/opt-m-include-dir.mk:1.4	Tue Sep  1 20:14:34 2020
+++ src/usr.bin/make/unit-tests/opt-m-include-dir.mk	Tue Apr 30 16:13:34 2024
@@ -1,4 +1,4 @@
-# $NetBSD: opt-m-include-dir.mk,v 1.4 2020/09/01 20:14:34 rillig Exp $
+# $NetBSD: opt-m-include-dir.mk,v 1.5 2024/04/30 16:13:34 sjg Exp $
 #
 # Tests for the -m command line option, which adds a directory to the
 # search path for the .include <...> directive.
@@ -22,11 +22,14 @@
 TEST_DIR:=	${.PARSEFILE:R}.tmp/sub/sub/sub/workdir
 CANARY_FILE:=	${.PARSEFILE:R}.tmp/sub/opt-m-canary.mk
 ACTUAL_FILE:=	${.PARSEFILE:R}.tmp/sub/opt-m-step3.mk
+WANTED_FILE:=	${.PARSEFILE:R}.tmp/sub/opt-m-check.mk
 
 _!=	mkdir -p ${TEST_DIR}
 _!=	> ${CANARY_FILE}
 _!=	cp ${MAKEFILE} ${TEST_DIR}/step2.mk
 _!=	cp ${MAKEFILE} ${ACTUAL_FILE}
+_!=	echo CHECK=ok > ${WANTED_FILE}
+_!=	echo CHECK=${WANTED_FILE:T} found in .CURDIR > ${TEST_DIR}/${WANTED_FILE:T}
 
 step1:
 	@${.MAKE} -C ${TEST_DIR} -f step2.mk step2
@@ -52,9 +55,10 @@ step1:
 .elif ${.PARSEFILE:T} == "opt-m-step3.mk"
 
 # This file is included by step2.mk.
+.include 
 
 step2:
-	@echo ok
+	@echo ${CHECK}
 
 .else
 .  error



CVS commit: src/usr.bin/make

2024-04-30 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Apr 30 16:13:34 UTC 2024

Modified Files:
src/usr.bin/make: main.c
src/usr.bin/make/unit-tests: deptgt-phony.exp opt-m-include-dir.mk

Log Message:
make: ensure '.include ' respects MAKESYSPATH

Since Dir_FindFile is used by '.include' and its variants,
and will first search .CURDIR unless the give path starts with
".DOTLAST".

Update unit-tests/opt-m-include-dir to test this.


To generate a diff of this commit:
cvs rdiff -u -r1.613 -r1.614 src/usr.bin/make/main.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/deptgt-phony.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/opt-m-include-dir.mk

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



CVS commit: src/sys/arch/hp300/dev

2024-04-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 30 09:55:46 UTC 2024

Modified Files:
src/sys/arch/hp300/dev: dma.c

Log Message:
Fix another fatal typo that prevents dma(4) interrupts.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hp300/dev/dma.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/hp300/dev/dma.c
diff -u src/sys/arch/hp300/dev/dma.c:1.47 src/sys/arch/hp300/dev/dma.c:1.48
--- src/sys/arch/hp300/dev/dma.c:1.47	Tue Jan 16 07:06:59 2024
+++ src/sys/arch/hp300/dev/dma.c	Tue Apr 30 09:55:45 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: dma.c,v 1.47 2024/01/16 07:06:59 thorpej Exp $	*/
+/*	$NetBSD: dma.c,v 1.48 2024/04/30 09:55:45 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.47 2024/01/16 07:06:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.48 2024/04/30 09:55:45 tsutsui Exp $");
 
 #include 	/* XXX param.h includes cpu.h */
 
@@ -276,7 +276,7 @@ dmaupdateipl(int ipl)
 		intr_disestablish(sc->sc_ih);
 	}
 
-	if ((sc->sc_ipl == ipl) == 0) {
+	if ((sc->sc_ipl = ipl) == 0) {
 		/* Don't hook up a new handler. */
 		return;
 	}



CVS commit: src/sys/arch/hp300/dev

2024-04-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 30 09:55:46 UTC 2024

Modified Files:
src/sys/arch/hp300/dev: dma.c

Log Message:
Fix another fatal typo that prevents dma(4) interrupts.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hp300/dev/dma.c

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