CVS commit: src/usr.sbin/sysinst

2024-06-19 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu Jun 20 05:46:22 UTC 2024

Modified Files:
src/usr.sbin/sysinst: msg.mi.de msg.mi.en

Log Message:
sysinst(8): Note that leaving the network "media type" empty autoconfigures


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/sysinst/msg.mi.en

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.de
diff -u src/usr.sbin/sysinst/msg.mi.de:1.48 src/usr.sbin/sysinst/msg.mi.de:1.49
--- src/usr.sbin/sysinst/msg.mi.de:1.48	Thu Apr 25 11:25:08 2024
+++ src/usr.sbin/sysinst/msg.mi.de	Thu Jun 20 05:46:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.48 2024/04/25 11:25:08 hannken Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.49 2024/06/20 05:46:22 nia Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -643,7 +643,7 @@ message net_defroute
 {IPv4-Gateway}
 
 message net_media
-{Art der Netzwerkverbindung}
+{Art der Netzwerkverbindung (fuer Automatik leer lassen)}
 
 message net_ssid
 {WLAN-SSID?}

Index: src/usr.sbin/sysinst/msg.mi.en
diff -u src/usr.sbin/sysinst/msg.mi.en:1.51 src/usr.sbin/sysinst/msg.mi.en:1.52
--- src/usr.sbin/sysinst/msg.mi.en:1.51	Thu Apr 25 11:25:08 2024
+++ src/usr.sbin/sysinst/msg.mi.en	Thu Jun 20 05:46:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.51 2024/04/25 11:25:08 hannken Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.52 2024/06/20 05:46:22 nia Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -618,7 +618,7 @@ message net_defroute
 {IPv4 gateway}
 
 message net_media
-{Network media type}
+{Network media type (empty to autoconfigure)}
 
 message net_ssid
 {Wi-Fi SSID?}



CVS commit: src/usr.sbin/sysinst

2024-06-19 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu Jun 20 05:46:22 UTC 2024

Modified Files:
src/usr.sbin/sysinst: msg.mi.de msg.mi.en

Log Message:
sysinst(8): Note that leaving the network "media type" empty autoconfigures


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/sysinst/msg.mi.en

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



CVS commit: src/external/apache2/llvm/lib

2024-06-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 20 04:13:35 UTC 2024

Modified Files:
src/external/apache2/llvm/lib: Makefile.inc
src/external/apache2/llvm/lib/libclangSema: Makefile

Log Message:
fix building llvm with GCC 12 as a native host.

there's a specific header in llvm that is triggering a warning-as-error.
apply some ${CC_WNO_MISSING_TEMPLATE_KEYWORD} to avoid eg:

external/apache2/llvm/lib/libLLVMAArch64AsmParser/../../dist/llvm/include/llvm/ADT/PointerSumType.h:275:21:
 error: expected 'template' keyword before dependent template name 
[-Werror=missing-template-keyword]
  275 | return SumType::create(SomePointerInfo::getEmptyKey());
  | ^~

additionally, for libclangSema, this error is avoided:

external/apache2/llvm/lib/libclangSema/../../dist/llvm/include/llvm/ADT/APInt.h:338:18:
 error: 'void operator delete [](void*)' called on a pointer to an unallocated 
object '1' [-Werror=free-nonheap-object]
  338 |   delete[] U.pVal;
  |  ^~~~


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/lib/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/lib/libclangSema/Makefile

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



CVS commit: src/external/apache2/llvm/lib

2024-06-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun 20 04:13:35 UTC 2024

Modified Files:
src/external/apache2/llvm/lib: Makefile.inc
src/external/apache2/llvm/lib/libclangSema: Makefile

Log Message:
fix building llvm with GCC 12 as a native host.

there's a specific header in llvm that is triggering a warning-as-error.
apply some ${CC_WNO_MISSING_TEMPLATE_KEYWORD} to avoid eg:

external/apache2/llvm/lib/libLLVMAArch64AsmParser/../../dist/llvm/include/llvm/ADT/PointerSumType.h:275:21:
 error: expected 'template' keyword before dependent template name 
[-Werror=missing-template-keyword]
  275 | return SumType::create(SomePointerInfo::getEmptyKey());
  | ^~

additionally, for libclangSema, this error is avoided:

external/apache2/llvm/lib/libclangSema/../../dist/llvm/include/llvm/ADT/APInt.h:338:18:
 error: 'void operator delete [](void*)' called on a pointer to an unallocated 
object '1' [-Werror=free-nonheap-object]
  338 |   delete[] U.pVal;
  |  ^~~~


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/apache2/llvm/lib/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/llvm/lib/libclangSema/Makefile

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

Modified files:

Index: src/external/apache2/llvm/lib/Makefile.inc
diff -u src/external/apache2/llvm/lib/Makefile.inc:1.1 src/external/apache2/llvm/lib/Makefile.inc:1.2
--- src/external/apache2/llvm/lib/Makefile.inc:1.1	Mon Nov 11 22:45:02 2019
+++ src/external/apache2/llvm/lib/Makefile.inc	Thu Jun 20 04:13:35 2024
@@ -1,5 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.1 2019/11/11 22:45:02 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.2 2024/06/20 04:13:35 mrg Exp $
 
 LIBISPRIVATE=	yes
 
 .include "${.PARSEDIR}/../Makefile.inc"
+
+CXXFLAGS+=	${CC_WNO_MISSING_TEMPLATE_KEYWORD}

Index: src/external/apache2/llvm/lib/libclangSema/Makefile
diff -u src/external/apache2/llvm/lib/libclangSema/Makefile:1.2 src/external/apache2/llvm/lib/libclangSema/Makefile:1.3
--- src/external/apache2/llvm/lib/libclangSema/Makefile:1.2	Sun May 30 01:56:57 2021
+++ src/external/apache2/llvm/lib/libclangSema/Makefile	Thu Jun 20 04:13:35 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2021/05/30 01:56:57 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2024/06/20 04:13:35 mrg Exp $
 
 LIB=	clangSema
 
@@ -69,3 +69,5 @@ CLANG_TABLEGEN_OUTPUT= \
 .else
 .include 
 .endif
+
+CWARNFLAGS.gcc+=   -Wno-free-nonheap-object



CVS commit: src/external/historical/nawk/bin

2024-06-19 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 23:30:06 UTC 2024

Modified Files:
src/external/historical/nawk/bin: awk.1

Log Message:
awk(1): properly markup \n backreferences


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/historical/nawk/bin/awk.1

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

Modified files:

Index: src/external/historical/nawk/bin/awk.1
diff -u src/external/historical/nawk/bin/awk.1:1.32 src/external/historical/nawk/bin/awk.1:1.33
--- src/external/historical/nawk/bin/awk.1:1.32	Tue Jul  5 22:50:43 2022
+++ src/external/historical/nawk/bin/awk.1	Wed Jun 19 23:30:06 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: awk.1,v 1.32 2022/07/05 22:50:43 uwe Exp $
+.\"	$NetBSD: awk.1,v 1.33 2024/06/19 23:30:06 uwe Exp $
 .\"
 .\" Copyright (C) Lucent Technologies 1997
 .\" All Rights Reserved
@@ -438,7 +438,7 @@ is used instead.
 .\"Within the replacement text
 .\".Ar s ,
 .\"the sequence
-.\".Ar \en ,
+.\".Sq Li \e Ns Ar n ,
 .\"where
 .\".Ar n
 .\"is a digit from 1 to 9, may be used to indicate just the text that
@@ -458,8 +458,8 @@ and the original target is
 .Em not
 changed.
 Note that the
-.Ql \en
-sequences within replacement string
+.Sq Li \e Ns Ar n
+sequences (backreferences) within replacement string
 .Ar s
 supported by GNU
 .Nm



CVS commit: src/external/historical/nawk/bin

2024-06-19 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 19 23:30:06 UTC 2024

Modified Files:
src/external/historical/nawk/bin: awk.1

Log Message:
awk(1): properly markup \n backreferences


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/historical/nawk/bin/awk.1

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



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

2024-06-19 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jun 19 20:04:20 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: revert two new functions introduced in rev. 1.13 - not necessary yet


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev/vdsk.c
diff -u src/sys/arch/sparc64/dev/vdsk.c:1.15 src/sys/arch/sparc64/dev/vdsk.c:1.16
--- src/sys/arch/sparc64/dev/vdsk.c:1.15	Wed Jun 19 20:00:10 2024
+++ src/sys/arch/sparc64/dev/vdsk.c	Wed Jun 19 20:04:20 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vdsk.c,v 1.15 2024/06/19 20:00:10 palle Exp $	*/
+/*	$NetBSD: vdsk.c,v 1.16 2024/06/19 20:04:20 palle Exp $	*/
 /*	$OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $	*/
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -219,8 +219,6 @@ void	vdsk_scsi_inquiry(struct vdsk_softc
 void	vdsk_scsi_capacity(struct vdsk_softc *sc, struct scsipi_xfer *);
 void	vdsk_scsi_capacity16(struct vdsk_softc *sc, struct scsipi_xfer *);
 void	vdsk_scsi_report_luns(struct vdsk_softc *sc, struct scsipi_xfer *);
-void	vdsk_scsi_read_discinfo(struct vdsk_softc *sc, struct scsipi_xfer *);
-void	vdsk_scsi_read_trackinfo(struct vdsk_softc *sc, struct scsipi_xfer *);
 void	vdsk_scsi_done(struct scsipi_xfer *, int);
 
 int
@@ -1051,14 +1049,6 @@ vdsk_scsi_cmd(struct vdsk_softc *sc, str
 			vdsk_scsi_report_luns(sc, xs);
 			return;
 
-		case READ_DISCINFO:
-			vdsk_scsi_read_discinfo(sc, xs);
-			return;
-
-		case READ_TRACKINFO:
-			vdsk_scsi_read_trackinfo(sc, xs);
-			return;
-
 		case SCSI_TEST_UNIT_READY:
 		case START_STOP:
 		case SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL:
@@ -1350,32 +1340,6 @@ vdsk_scsi_report_luns(struct vdsk_softc 
 }
 
 void
-vdsk_scsi_read_discinfo(struct vdsk_softc *sc, struct scsipi_xfer *xs)
-{
-	DPRINTF(("%s()\n", __FUNCTION__));
-
-	struct scsipi_read_discinfo_data read_discinfo_data;
-	bzero(_discinfo_data, sizeof(read_discinfo_data));
-
-	bcopy(_discinfo_data, xs->data, MIN(sizeof(read_discinfo_data), xs->datalen));
-
-	vdsk_scsi_done(xs, XS_NOERROR);
-}
-
-void
-vdsk_scsi_read_trackinfo(struct vdsk_softc *sc, struct scsipi_xfer *xs)
-{
-	DPRINTF(("%s()\n", __FUNCTION__));
-
-	struct scsipi_read_trackinfo_data read_trackinfo_data;
-	bzero(_trackinfo_data, sizeof(read_trackinfo_data));
-
-	bcopy(_trackinfo_data, xs->data, MIN(sizeof(read_trackinfo_data), xs->datalen));
-
-	vdsk_scsi_done(xs, XS_NOERROR);
-}
-
-void
 vdsk_scsi_done(struct scsipi_xfer *xs, int error)
 {
 	xs->error = error;



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

2024-06-19 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jun 19 20:04:20 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: revert two new functions introduced in rev. 1.13 - not necessary yet


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev

2024-06-19 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jun 19 20:00:10 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: fix incorrect string length (product name Virtual CDROM)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev

2024-06-19 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jun 19 20:00:10 UTC 2024

Modified Files:
src/sys/arch/sparc64/dev: vdsk.c

Log Message:
sun4v: fix incorrect string length (product name Virtual CDROM)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc64/dev/vdsk.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/sparc64/dev/vdsk.c
diff -u src/sys/arch/sparc64/dev/vdsk.c:1.14 src/sys/arch/sparc64/dev/vdsk.c:1.15
--- src/sys/arch/sparc64/dev/vdsk.c:1.14	Wed Jun 12 19:12:44 2024
+++ src/sys/arch/sparc64/dev/vdsk.c	Wed Jun 19 20:00:10 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vdsk.c,v 1.14 2024/06/12 19:12:44 riastradh Exp $	*/
+/*	$NetBSD: vdsk.c,v 1.15 2024/06/19 20:00:10 palle Exp $	*/
 /*	$OpenBSD: vdsk.c,v 1.46 2015/01/25 21:42:13 kettenis Exp $	*/
 /*
  * Copyright (c) 2009, 2011 Mark Kettenis
@@ -1277,7 +1277,7 @@ vdsk_scsi_inquiry(struct vdsk_softc *sc,
 		case VD_MEDIA_TYPE_DVD:
 			inq.device = T_CDROM;
 			inq.dev_qual2 = SID_REMOVABLE;
-			bcopy("Virtual CDROM", inq.product, sizeof(inq.product));
+			bcopy("Virtual CDROM   ", inq.product, sizeof(inq.product));
 			break;
 		case VD_MEDIA_TYPE_FIXED:
 			inq.device = T_DIRECT;



CVS commit: src/sys/arch/sun2/sun2

2024-06-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 19 15:24:37 UTC 2024

Modified Files:
src/sys/arch/sun2/sun2: enable.h

Log Message:
sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules

Finally fix sun2 build for PR kern/58346


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sun2/sun2/enable.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/sun2/sun2/enable.h
diff -u src/sys/arch/sun2/sun2/enable.h:1.4 src/sys/arch/sun2/sun2/enable.h:1.5
--- src/sys/arch/sun2/sun2/enable.h:1.4	Mon Apr 28 20:23:37 2008
+++ src/sys/arch/sun2/sun2/enable.h	Wed Jun 19 15:24:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: enable.h,v 1.4 2008/04/28 20:23:37 martin Exp $	*/
+/*	$NetBSD: enable.h,v 1.5 2024/06/19 15:24:37 rin Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
  */
 #ifdef	_KERNEL
 #define ENABLE_REG_SOFT_UNDEF (0)
-volatile extern u_short enable_reg_soft;
+extern volatile u_short enable_reg_soft;
 u_short enable_reg_and(u_short);
 u_short enable_reg_or(u_short);
 #endif	/* _KERNEL */



CVS commit: src/sys/arch/sun2/sun2

2024-06-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 19 15:24:37 UTC 2024

Modified Files:
src/sys/arch/sun2/sun2: enable.h

Log Message:
sun2/enable.h: Fix -Wold-style-definition for WARNS=5 build as modules

Finally fix sun2 build for PR kern/58346


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sun2/sun2/enable.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/sun2/sun2

2024-06-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 19 15:21:59 UTC 2024

Modified Files:
src/sys/arch/sun2/sun2: genassym.cf

Log Message:
sun2/genassym.cf: Skip KERNBASE for _MODULE

as it is not a compile-time constant; see sun2/vmparam.h.

It should not be, and is not actually, used for modules.

PR kern/58346


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sun2/sun2/genassym.cf

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/genassym.cf
diff -u src/sys/arch/sun2/sun2/genassym.cf:1.16 src/sys/arch/sun2/sun2/genassym.cf:1.17
--- src/sys/arch/sun2/sun2/genassym.cf:1.16	Sun Jan 14 22:34:54 2024
+++ src/sys/arch/sun2/sun2/genassym.cf	Wed Jun 19 15:21:59 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.16 2024/01/14 22:34:54 thorpej Exp $
+#	$NetBSD: genassym.cf,v 1.17 2024/06/19 15:21:59 rin Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -129,7 +129,9 @@ define	AM9513_CLK_CMD			AM9513_CLK_CMD
 define	SUN2_CLK_TIMER_CLEAR_OUTPUT	AM9513_CMD_CLEAR_OUTPUT(AM9513_TIMER2)
 
 # kernel-isms
+ifndef _MODULE
 define	KERNBASE			KERNBASE
+endif
 define	USPACEUSPACE
 define	PAGE_SIZE			PAGE_SIZE
 define	NBPGNBPG



CVS commit: src/sys/arch/sun2/sun2

2024-06-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 19 15:21:59 UTC 2024

Modified Files:
src/sys/arch/sun2/sun2: genassym.cf

Log Message:
sun2/genassym.cf: Skip KERNBASE for _MODULE

as it is not a compile-time constant; see sun2/vmparam.h.

It should not be, and is not actually, used for modules.

PR kern/58346


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sun2/sun2/genassym.cf

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



CVS commit: src/sys/arch/powerpc/powerpc

2024-06-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 19 15:19:22 UTC 2024

Modified Files:
src/sys/arch/powerpc/powerpc: compat_13_machdep.c compat_16_machdep.c

Log Message:
powerpc64: Provide dummy stubs for compat1[36]

as done for amd64. We haven't had working userland for powerpc64,
and therefore compatible to 1.[36] is only useful for netbsd32.

Fix build failure for evbppc64 for PR kern/58346 (my bug!).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/powerpc/compat_13_machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/powerpc/compat_16_machdep.c

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



CVS commit: src/sys/arch/powerpc/powerpc

2024-06-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jun 19 15:19:22 UTC 2024

Modified Files:
src/sys/arch/powerpc/powerpc: compat_13_machdep.c compat_16_machdep.c

Log Message:
powerpc64: Provide dummy stubs for compat1[36]

as done for amd64. We haven't had working userland for powerpc64,
and therefore compatible to 1.[36] is only useful for netbsd32.

Fix build failure for evbppc64 for PR kern/58346 (my bug!).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/powerpc/compat_13_machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/powerpc/compat_16_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/compat_13_machdep.c
diff -u src/sys/arch/powerpc/powerpc/compat_13_machdep.c:1.22 src/sys/arch/powerpc/powerpc/compat_13_machdep.c:1.23
--- src/sys/arch/powerpc/powerpc/compat_13_machdep.c:1.22	Sun Mar 13 17:50:55 2022
+++ src/sys/arch/powerpc/powerpc/compat_13_machdep.c	Wed Jun 19 15:19:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_13_machdep.c,v 1.22 2022/03/13 17:50:55 andvar Exp $	*/
+/*	$NetBSD: compat_13_machdep.c,v 1.23 2024/06/19 15:19:22 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.22 2022/03/13 17:50:55 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.23 2024/06/19 15:19:22 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
@@ -53,6 +53,22 @@ __KERNEL_RCSID(0, "$NetBSD: compat_13_ma
 
 #include 
 
+#ifdef _LP64
+
+/*
+ * COMPAT_13 is useful only with COMPAT_NETBSD32.
+ */
+
+int
+compat_13_sys_sigreturn(struct lwp *l,
+const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
+{
+
+	return ENOSYS;
+}
+
+#else
+
 int
 compat_13_sys_sigreturn(struct lwp *l,
 const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
@@ -104,3 +120,5 @@ compat_13_sys_sigreturn(struct lwp *l,
 
 	return (EJUSTRETURN);
 }
+
+#endif /* !_LP64 */

Index: src/sys/arch/powerpc/powerpc/compat_16_machdep.c
diff -u src/sys/arch/powerpc/powerpc/compat_16_machdep.c:1.25 src/sys/arch/powerpc/powerpc/compat_16_machdep.c:1.26
--- src/sys/arch/powerpc/powerpc/compat_16_machdep.c:1.25	Mon Jun 17 21:57:59 2024
+++ src/sys/arch/powerpc/powerpc/compat_16_machdep.c	Wed Jun 19 15:19:22 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_16_machdep.c,v 1.25 2024/06/17 21:57:59 pgoyette Exp $	*/
+/*	$NetBSD: compat_16_machdep.c,v 1.26 2024/06/19 15:19:22 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.25 2024/06/17 21:57:59 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.26 2024/06/19 15:19:22 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -60,6 +60,29 @@ __KERNEL_RCSID(0, "$NetBSD: compat_16_ma
 #include 
 #endif
 
+#ifdef _LP64
+
+/*
+ * COMPAT_16 is useful only with COMPAT_NETBSD32.
+ */
+void
+sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
+{
+
+	printf("sendsig_sigcontext: illegal\n");
+	sigexit(curlwp, SIGILL);
+}
+
+int
+compat_16_sys___sigreturn14(struct lwp *l,
+const struct compat_16_sys___sigreturn14_args *uap, register_t *retval)
+{
+
+	return ENOSYS;
+}
+
+#else
+
 /*
  * Send a signal to process.
  */
@@ -253,3 +276,5 @@ compat_16_sys___sigreturn14(struct lwp *
 
 	return (EJUSTRETURN);
 }
+
+#endif /* !_LP64 */



CVS commit: src/external/gpl2/mkhybrid/dist/libfile

2024-06-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jun 19 10:30:53 UTC 2024

Modified Files:
src/external/gpl2/mkhybrid/dist/libfile: file.h

Log Message:
No need to check and redefine C89 strerror(3) and strtoul(3).

Fixes build error on MacOS 10.4 with Xcode 2.5.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/libfile/file.h

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

Modified files:

Index: src/external/gpl2/mkhybrid/dist/libfile/file.h
diff -u src/external/gpl2/mkhybrid/dist/libfile/file.h:1.2 src/external/gpl2/mkhybrid/dist/libfile/file.h:1.3
--- src/external/gpl2/mkhybrid/dist/libfile/file.h:1.2	Fri May 31 20:25:41 2024
+++ src/external/gpl2/mkhybrid/dist/libfile/file.h	Wed Jun 19 10:30:53 2024
@@ -116,15 +116,4 @@ extern int debug;		/* enable debugging?	
 extern int zflag;		/* process compressed files?		*/
 extern int lflag;		/* follow symbolic links?		*/
 
-
-#ifndef	HAVE_STRERROR
-extern int sys_nerr;
-extern char *sys_errlist[];
-#define strerror(e) \
-	(((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error")
-#endif
-#ifndef	HAVE_STRTOUL
-#define strtoul(a, b, c)	strtol(a, b, c)
-#endif
-
 #endif /* __file_h__ */



CVS commit: src/external/gpl2/mkhybrid/dist/libfile

2024-06-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jun 19 10:30:53 UTC 2024

Modified Files:
src/external/gpl2/mkhybrid/dist/libfile: file.h

Log Message:
No need to check and redefine C89 strerror(3) and strtoul(3).

Fixes build error on MacOS 10.4 with Xcode 2.5.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/mkhybrid/dist/libfile/file.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/xen/xen

2024-06-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 19 09:43:22 UTC 2024

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Fix format string for size_t argument


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen

2024-06-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jun 19 09:43:22 UTC 2024

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Fix format string for size_t argument


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.105 src/sys/arch/xen/xen/xbdback_xenbus.c:1.106
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.105	Wed Jun 19 09:02:48 2024
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Jun 19 09:43:22 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.105 2024/06/19 09:02:48 bouyer Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.106 2024/06/19 09:43:22 martin Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.105 2024/06/19 09:02:48 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.106 2024/06/19 09:43:22 martin Exp $");
 
 #include 
 #include 
@@ -420,7 +420,7 @@ xbdback_xenbus_create(struct xenbus_devi
 		sizeof(struct blkif_request_segment) * VBD_MAX_INDIRECT_SEGMENTS,
 		NULL, BUS_DMA_WAITOK);
 		if (error != 0) {
-			printf("%s: can't load dma map for indirect segments %d @%p (%d, %ld)\n",
+			printf("%s: can't load dma map for indirect segments %d @%p (%d, %zu)\n",
 			xbdi->xbdi_name, i, xbd_io->xio_seg, error, sizeof(xbd_io->xio_seg));
 			bus_dmamap_destroy(xbdi->xbdi_xbusd->xbusd_dmat,
 			xbd_io->xio_seg_dmamap);



CVS commit: src/sys/arch/xen/xen

2024-06-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jun 19 09:02:49 UTC 2024

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Restore "sparse" segements support which was lost in rev 1.83, causing
VBD corruption with linux guests.
The segments in a single request are not always contigous in VA; this means
that the end of a segment is not always 7 and the start of the next one is not
always 0. When this happens this means that a contigous chunk of data from
disk has to be dispatched to various non-contigous VA, in chunks of VBD_BSIZE
bytes (or the other way round for writes).
Linux I/O subsystems seems to support this natively; to emulate this allocate
a MAXPHYS bounce buffer to do the I/O and then memcpy() the data from/to
the segments as requested. If the request is contigous do the I/O
directly to the mapped VA.

This means that we need to keep segments details until iodone(); so move
the blkif_request_segment array from xbdback_instance to xbdback_io. The
array is allocated separately to guarantee proper page alignement.

non-contigous segments seems rare so allocate one bounce buffer per
xbdback_instance, and stall the ring if the bounce buffer is already in use.
For this add back a mechanism to restart an I/O at a specific point
after thread sleep/wakeup.

While there guard some more printfs with ratecheck() and add more checks on
segments bounds.

Tested with a HVM scientific linux install from iso image; the install would
fail with a xfs corruption when installing grub.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen

2024-06-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jun 19 09:02:49 UTC 2024

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
Restore "sparse" segements support which was lost in rev 1.83, causing
VBD corruption with linux guests.
The segments in a single request are not always contigous in VA; this means
that the end of a segment is not always 7 and the start of the next one is not
always 0. When this happens this means that a contigous chunk of data from
disk has to be dispatched to various non-contigous VA, in chunks of VBD_BSIZE
bytes (or the other way round for writes).
Linux I/O subsystems seems to support this natively; to emulate this allocate
a MAXPHYS bounce buffer to do the I/O and then memcpy() the data from/to
the segments as requested. If the request is contigous do the I/O
directly to the mapped VA.

This means that we need to keep segments details until iodone(); so move
the blkif_request_segment array from xbdback_instance to xbdback_io. The
array is allocated separately to guarantee proper page alignement.

non-contigous segments seems rare so allocate one bounce buffer per
xbdback_instance, and stall the ring if the bounce buffer is already in use.
For this add back a mechanism to restart an I/O at a specific point
after thread sleep/wakeup.

While there guard some more printfs with ratecheck() and add more checks on
segments bounds.

Tested with a HVM scientific linux install from iso image; the install would
fail with a xfs corruption when installing grub.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.104 src/sys/arch/xen/xen/xbdback_xenbus.c:1.105
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.104	Thu Jun 13 14:47:54 2024
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Jun 19 09:02:48 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.104 2024/06/13 14:47:54 bouyer Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.105 2024/06/19 09:02:48 bouyer Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.104 2024/06/13 14:47:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.105 2024/06/19 09:02:48 bouyer Exp $");
 
 #include 
 #include 
@@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: xbdback_xenb
 #define VBD_MAXSECT ((PAGE_SIZE / VBD_BSIZE) - 1)
 
 #define VBD_VA_SIZE			MAXPHYS
-#define VBD_MAX_INDIRECT_SEGMENTS	VBD_VA_SIZE >> PAGE_SHIFT
+#define VBD_MAX_INDIRECT_SEGMENTS	(VBD_VA_SIZE >> PAGE_SHIFT)
 
 CTASSERT(XENSHM_MAX_PAGES_PER_REQUEST >= VBD_MAX_INDIRECT_SEGMENTS);
 
@@ -100,6 +100,10 @@ typedef enum {WAITING, RUN, DISCONNECTIN
  * condition before it starts processing requests again from where it left.
  * Continuation state is "stored" in the xbdback instance (xbdi_cont),
  * and should only be manipulated by the instance thread.
+ * If a continuation has to be restarted from a specific point,
+ * the callback and argument can be stored in xbdi_cont_restart and
+ * xbdi_cont_restart_obj
+ *
  *
  * As xbdback(4) has to handle different sort of asynchronous events (Xen
  * event channels, biointr() soft interrupts, xenbus commands), the xbdi_lock
@@ -111,9 +115,7 @@ typedef enum {WAITING, RUN, DISCONNECTIN
  * xbdback_co_main()
  *|   --> xbdback_co_cache_flush()
  *|   ||
- *|   |-> xbdback_co_cache_doflush() or NULL
- *|   ||
- *|   |-> xbdback_co_do_io()
+ *|   |-> xbdback_co_do_io() or NULL
  * xbdback_co_main_loop()-|
  *|   |-> xbdback_co_main_done2() or NULL
  *|   |
@@ -121,9 +123,7 @@ typedef enum {WAITING, RUN, DISCONNECTIN
  *|
  * xbdback_co_io() -> xbdback_co_main_incr() -> xbdback_co_main_loop()
  *|
- * xbdback_co_io_gotio() -> xbdback_map_shm()
- *| |
- *| xbdback_co_main_incr() -> xbdback_co_main_loop()
+ * xbdback_co_io_gotio() -> xbdback_co_main_incr() -> xbdback_co_main_loop()
  *|
  * xbdback_co_do_io()
  *|
@@ -152,8 +152,12 @@ struct xbdback_io {
 	SLIST_ENTRY(xbdback_io) xio_next;
 	/* The instance pointer is duplicated for convenience. */
 	struct xbdback_instance *xio_xbdi; /* our xbd instance */
-	uint8_t xio_operation;
-	uint64_t xio_id;
+	/* _request state: track requests fetched from ring */
+	blkif_request_t xio_xen_req;
+	/* array of segments[VBD_MAX_INDIRECT_SEGMENTS] allocated separately */
+	struct blkif_request_segment *xio_seg;
+	bus_dmamap_t xio_seg_dmamap;
+	/* internal states */
 	union {
 		struct {
 			struct buf xio_buf; /* our