CVS commit: src/external/bsd/top/dist/machine

2023-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Dec 14 07:18:44 UTC 2023

Modified Files:
src/external/bsd/top/dist/machine: m_netbsd.c

Log Message:
avoid crashes when proc_from_thread() returns NULL.

XXX: pullup-10, ...


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/top/dist/machine/m_netbsd.c

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



CVS commit: src/external/bsd/top/dist/machine

2023-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Dec 14 07:18:44 UTC 2023

Modified Files:
src/external/bsd/top/dist/machine: m_netbsd.c

Log Message:
avoid crashes when proc_from_thread() returns NULL.

XXX: pullup-10, ...


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/top/dist/machine/m_netbsd.c

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

Modified files:

Index: src/external/bsd/top/dist/machine/m_netbsd.c
diff -u src/external/bsd/top/dist/machine/m_netbsd.c:1.28 src/external/bsd/top/dist/machine/m_netbsd.c:1.29
--- src/external/bsd/top/dist/machine/m_netbsd.c:1.28	Sun Oct 22 14:44:09 2023
+++ src/external/bsd/top/dist/machine/m_netbsd.c	Thu Dec 14 07:18:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: m_netbsd.c,v 1.28 2023/10/22 14:44:09 simonb Exp $	*/
+/*	$NetBSD: m_netbsd.c,v 1.29 2023/12/14 07:18:44 mrg Exp $	*/
 
 /*
  * top - a top users display for Unix
@@ -45,12 +45,12 @@
  *		Andrew Doran 
  *
  *
- * $Id: m_netbsd.c,v 1.28 2023/10/22 14:44:09 simonb Exp $
+ * $Id: m_netbsd.c,v 1.29 2023/12/14 07:18:44 mrg Exp $
  */
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: m_netbsd.c,v 1.28 2023/10/22 14:44:09 simonb Exp $");
+__RCSID("$NetBSD: m_netbsd.c,v 1.29 2023/12/14 07:18:44 mrg Exp $");
 #endif
 
 #include 
@@ -825,18 +825,20 @@ get_lwp_info(struct system_info *si, str
 		 * status field.  threads with L_SYSTEM set are system
 		 * threads---these get ignored unless show_sysprocs is set.
 		 */
-		if (lp->l_stat != 0 && (show_system || ((lp->l_flag & LW_SYSTEM) == 0))) {
+		if (lp->l_stat != 0 &&
+		(show_system || ((lp->l_flag & LW_SYSTEM) == 0))) {
 			total_lwps++;
 			process_states[(unsigned char) lp->l_stat]++;
 			if (lp->l_stat != LSZOMB &&
 			(show_idle || (lp->l_pctcpu != 0) || 
-			(lp->l_stat == LSRUN || lp->l_stat == LSONPROC)) &&
+			 (lp->l_stat == LSRUN || lp->l_stat == LSONPROC)) &&
 			(!show_uid || uid_from_thread(lp) == sel->uid) &&
 			(!show_command ||
-			 strstr(get_command(sel, proc_from_thread(lp)),
- show_command) != NULL)) {
-	*lrefp++ = lp;
-	active_lwps++;
+			 ((pp = proc_from_thread(lp)) != NULL &&
+			  strstr(get_command(sel, pp),
+ show_command) != NULL))) {
+*lrefp++ = lp;
+active_lwps++;
 			}
 		}
 	}
@@ -1215,6 +1217,8 @@ compare_pid(pp1, pp2)
 		struct kinfo_lwp *l2 = *(struct kinfo_lwp **) pp2;
 		struct kinfo_proc2 *p1 = proc_from_thread(l1);
 		struct kinfo_proc2 *p2 = proc_from_thread(l2);
+		if (p1 == NULL || p2 == NULL)
+			return -1;
 		return p2->p_pid - p1->p_pid;
 	} else {
 		struct kinfo_proc2 *p1 = *(struct kinfo_proc2 **) pp1;
@@ -1232,6 +1236,8 @@ compare_command(pp1, pp2)
 		struct kinfo_lwp *l2 = *(struct kinfo_lwp **) pp2;
 		struct kinfo_proc2 *p1 = proc_from_thread(l1);
 		struct kinfo_proc2 *p2 = proc_from_thread(l2);
+		if (p1 == NULL || p2 == NULL)
+			return -1;
 		return strcmp(p2->p_comm, p1->p_comm);
 	} else {
 		struct kinfo_proc2 *p1 = *(struct kinfo_proc2 **) pp1;
@@ -1249,6 +1255,8 @@ compare_username(pp1, pp2)
 		struct kinfo_lwp *l2 = *(struct kinfo_lwp **) pp2;
 		struct kinfo_proc2 *p1 = proc_from_thread(l1);
 		struct kinfo_proc2 *p2 = proc_from_thread(l2);
+		if (p1 == NULL || p2 == NULL)
+			return -1;
 		return strcmp(p2->p_login, p1->p_login);
 	} else {
 		struct kinfo_proc2 *p1 = *(struct kinfo_proc2 **) pp1;



CVS commit: src/sys/lib/libsa

2023-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 14 05:39:00 UTC 2023

Modified Files:
src/sys/lib/libsa: nfs.c

Log Message:
libsa: nfs: Fix NFS_NOSYMLINK option for previous

Used only by mvme68k.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/lib/libsa/nfs.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/lib/libsa/nfs.c
diff -u src/sys/lib/libsa/nfs.c:1.51 src/sys/lib/libsa/nfs.c:1.52
--- src/sys/lib/libsa/nfs.c:1.51	Tue Dec 12 09:12:55 2023
+++ src/sys/lib/libsa/nfs.c	Thu Dec 14 05:39:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs.c,v 1.51 2023/12/12 09:12:55 mlelstv Exp $	*/
+/*	$NetBSD: nfs.c,v 1.52 2023/12/14 05:39:00 rin Exp $	*/
 
 /*-
  *  Copyright (c) 1993 John Brezak
@@ -596,9 +596,9 @@ nfs_open(const char *path, struct open_f
 	char namebuf[NFS_MAXPATHLEN + 1];
 	char linkbuf[NFS_MAXPATHLEN + 1];
 	int nlinks = 0;
+	n_long fa_type;
 #endif
 	int error = 0;
-	n_long fa_type;
 
 #ifdef NFS_DEBUG
  	if (debug)



CVS commit: src/sys/lib/libsa

2023-12-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Dec 14 05:39:00 UTC 2023

Modified Files:
src/sys/lib/libsa: nfs.c

Log Message:
libsa: nfs: Fix NFS_NOSYMLINK option for previous

Used only by mvme68k.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/lib/libsa/nfs.c

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

2023-12-13 Thread Valery Ushakov
On Wed, Dec 13, 2023 at 23:11:35 +, Andrius Varanavicius wrote:

> Module Name:  src
> Committed By: andvar
> Date: Wed Dec 13 23:11:35 UTC 2023
> 
> Modified Files:
>   src/sys/arch/sparc64/dev: vnet.c
>   src/sys/arch/sparc64/sparc64: netbsd32_machdep_13.c
> 
> Log Message:
> Add #ifdef DDB blocks around Debugger(); calls to make kernel build without 
> DDB.

May be use console_debugger() that from a quick look seems to do the
right thing already (including db_fromconsole guard)?

-uwe



CVS commit: src/lib/libc/stdlib

2023-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec 13 23:53:50 UTC 2023

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
make malloc_usable_size() visible with old jemalloc.

it's in  and applications like firefox expect it.

XXX: pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libc/stdlib/jemalloc.c

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

Modified files:

Index: src/lib/libc/stdlib/jemalloc.c
diff -u src/lib/libc/stdlib/jemalloc.c:1.63 src/lib/libc/stdlib/jemalloc.c:1.64
--- src/lib/libc/stdlib/jemalloc.c:1.63	Sat Oct 14 19:39:33 2023
+++ src/lib/libc/stdlib/jemalloc.c	Wed Dec 13 23:53:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: jemalloc.c,v 1.63 2023/10/14 19:39:33 ad Exp $	*/
+/*	$NetBSD: jemalloc.c,v 1.64 2023/12/13 23:53:50 mrg Exp $	*/
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans .
@@ -111,7 +111,7 @@
 
 #include 
 /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */
-__RCSID("$NetBSD: jemalloc.c,v 1.63 2023/10/14 19:39:33 ad Exp $");
+__RCSID("$NetBSD: jemalloc.c,v 1.64 2023/12/13 23:53:50 mrg Exp $");
 
 #include "namespace.h"
 #include 
@@ -135,6 +135,7 @@ __RCSID("$NetBSD: jemalloc.c,v 1.63 2023
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include "extern.h"
@@ -3784,7 +3785,6 @@ free(void *ptr)
 /*
  * Begin non-standard functions.
  */
-#ifndef __NetBSD__
 size_t
 malloc_usable_size(const void *ptr)
 {
@@ -3793,7 +3793,6 @@ malloc_usable_size(const void *ptr)
 
 	return (isalloc(ptr));
 }
-#endif
 
 /*
  * End non-standard functions.



CVS commit: src/lib/libc/stdlib

2023-12-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec 13 23:53:50 UTC 2023

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
make malloc_usable_size() visible with old jemalloc.

it's in  and applications like firefox expect it.

XXX: pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libc/stdlib/jemalloc.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

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 23:11:35 UTC 2023

Modified Files:
src/sys/arch/sparc64/dev: vnet.c
src/sys/arch/sparc64/sparc64: netbsd32_machdep_13.c

Log Message:
Add #ifdef DDB blocks around Debugger(); calls to make kernel build without DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/vnet.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.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/vnet.c
diff -u src/sys/arch/sparc64/dev/vnet.c:1.8 src/sys/arch/sparc64/dev/vnet.c:1.9
--- src/sys/arch/sparc64/dev/vnet.c:1.8	Wed Dec 13 22:53:04 2023
+++ src/sys/arch/sparc64/dev/vnet.c	Wed Dec 13 23:11:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnet.c,v 1.8 2023/12/13 22:53:04 andvar Exp $	*/
+/*	$NetBSD: vnet.c,v 1.9 2023/12/13 23:11:35 andvar Exp $	*/
 /*	$OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $	*/
 /*
  * Copyright (c) 2009, 2015 Mark Kettenis
@@ -441,7 +441,9 @@ vnet_rx_intr(void *arg)
 	default:
 		DPRINTF(("%s: unhandled type %0x02/%0x02/%0x02\n",
  __func__, lp->type, lp->stype, lp->ctrl));
+#ifdef DDB
 		Debugger();
+#endif
 		ldc_reset(lc);
 		break;
 	}

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.3 src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.4
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.3	Wed Jan 30 10:11:11 2019
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c	Wed Dec 13 23:11:35 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep_13.c,v 1.3 2019/01/30 10:11:11 hannken Exp $	*/
+/*	$NetBSD: netbsd32_machdep_13.c,v 1.4 2023/12/13 23:11:35 andvar Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.3 2019/01/30 10:11:11 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.4 2023/12/13 23:11:35 andvar Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -105,8 +105,10 @@ compat_13_netbsd32_sigreturn(struct lwp 
 #ifdef DEBUG
 		printf("%s: rwindow_save(%p) failed, sending SIGILL\n",
 		__func__, p);
+#ifdef DDB
 		Debugger();
 #endif
+#endif
 		mutex_enter(p->p_lock);
 		sigexit(l, SIGILL);
 	}
@@ -114,7 +116,9 @@ compat_13_netbsd32_sigreturn(struct lwp 
 	if (sigdebug & SDB_FOLLOW) {
 		printf("%s: %s[%d], sigcntxp %u\n", __func__,
 		p->p_comm, p->p_pid, SCARG(uap, sigcntxp));
+#ifdef DDB
 		if (sigdebug & SDB_DDB) Debugger();
+#endif
 	}
 #endif
 	scp = (struct netbsd32_sigcontext13 *)(u_long)SCARG(uap, sigcntxp);
@@ -122,8 +126,10 @@ compat_13_netbsd32_sigreturn(struct lwp 
 	{
 #ifdef DEBUG
 		printf("%s: copyin failed\n", __func__);
+#ifdef DDB
 		Debugger();
 #endif
+#endif
 		return (EINVAL);
 	}
 	scp = ≻
@@ -139,7 +145,9 @@ compat_13_netbsd32_sigreturn(struct lwp 
 	{
 		printf("%s: pc %d or npc %d invalid\n",
 		   __func__, sc.sc_pc, sc.sc_npc);
+#ifdef DDB
 		Debugger();
+#endif
 		return (EINVAL);
 	}
 #else
@@ -156,7 +164,9 @@ compat_13_netbsd32_sigreturn(struct lwp 
 	if (sigdebug & SDB_FOLLOW) {
 		printf("%s: return trapframe pc=%d sp=%d tstate=%x\n", __func__,
 		   (int)tf->tf_pc, (int)tf->tf_out[6], (int)tf->tf_tstate);
+#ifdef DDB
 		if (sigdebug & SDB_DDB) Debugger();
+#endif
 	}
 #endif
 	mutex_enter(p->p_lock);



CVS commit: src/sys/arch/sparc64

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 23:11:35 UTC 2023

Modified Files:
src/sys/arch/sparc64/dev: vnet.c
src/sys/arch/sparc64/sparc64: netbsd32_machdep_13.c

Log Message:
Add #ifdef DDB blocks around Debugger(); calls to make kernel build without DDB.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/vnet.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.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

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 22:53:04 UTC 2023

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

Log Message:
Make NBPFILTER build by adopting NetBSD's bpf_mtap() interface and definitions.
Condition is also not needed, since this check is performed inside function.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc64/dev/vnet.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/vnet.c
diff -u src/sys/arch/sparc64/dev/vnet.c:1.7 src/sys/arch/sparc64/dev/vnet.c:1.8
--- src/sys/arch/sparc64/dev/vnet.c:1.7	Sun Sep 18 13:31:08 2022
+++ src/sys/arch/sparc64/dev/vnet.c	Wed Dec 13 22:53:04 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnet.c,v 1.7 2022/09/18 13:31:08 thorpej Exp $	*/
+/*	$NetBSD: vnet.c,v 1.8 2023/12/13 22:53:04 andvar Exp $	*/
 /*	$OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $	*/
 /*
  * Copyright (c) 2009, 2015 Mark Kettenis
@@ -1206,12 +1206,9 @@ vnet_start(struct ifnet *ifp)
 		 * If BPF is listening on this interface, let it see the
 		 * packet before we commit it to the wire.
 		 */
-		if (ifp->if_bpf)
-		{
-			DPRINTF(("%s: before bpf\n", __func__));
-			bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
-			DPRINTF(("%s: after bpf\n", __func__));
-		}
+		DPRINTF(("%s: before bpf\n", __func__));
+		bpf_mtap(ifp, m, BPF_D_OUT);
+		DPRINTF(("%s: after bpf\n", __func__));
 #endif
 
 		pmap_extract(pmap_kernel(), (vaddr_t)buf, &pa);
@@ -1286,8 +1283,7 @@ vnet_start_desc(struct ifnet *ifp)
 		 * If BPF is listening on this interface, let it see the
 		 * packet before we commit it to the wire.
 		 */
-		if (ifp->if_bpf)
-			bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
+		bpf_mtap(ifp, m, BPF_D_OUT);
 #endif
 
 		pmap_extract(pmap_kernel(), (vaddr_t)buf, &pa);



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

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 22:53:04 UTC 2023

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

Log Message:
Make NBPFILTER build by adopting NetBSD's bpf_mtap() interface and definitions.
Condition is also not needed, since this check is performed inside function.


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

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 20:53:15 UTC 2023

Modified Files:
src/sys/arch/sgimips/gio: grtwo.c light.c
src/sys/arch/sgimips/hpc: hpcdma.c

Log Message:
Add (intptr_t) casts to fix "cast to pointer from integer of different size",
mainly for GENERIC64_32_* configs.
Also change segp->ds_len format specifier to %lld, which fixes DMA_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/gio/grtwo.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/gio/light.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/hpc/hpcdma.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/sgimips/gio/grtwo.c
diff -u src/sys/arch/sgimips/gio/grtwo.c:1.18 src/sys/arch/sgimips/gio/grtwo.c:1.19
--- src/sys/arch/sgimips/gio/grtwo.c:1.18	Sat Aug  7 16:19:04 2021
+++ src/sys/arch/sgimips/gio/grtwo.c	Wed Dec 13 20:53:14 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: grtwo.c,v 1.18 2021/08/07 16:19:04 thorpej Exp $	 */
+/* $NetBSD: grtwo.c,v 1.19 2023/12/13 20:53:14 andvar Exp $	 */
 
 /*
  * Copyright (c) 2004 Christopher SEKIYA
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.18 2021/08/07 16:19:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.19 2023/12/13 20:53:14 andvar Exp $");
 
 #include 
 #include 
@@ -454,7 +454,7 @@ grtwo_match(device_t parent, cfdata_t cf
 	 * ID.  Instead, we determine presence by looking at the HQ2 "mystery"
 	 * register, which contains a magic number.
 	 */
-	if ( platform.badaddr((void *) (ga->ga_ioh + HQ2_MYSTERY),
+	if ( platform.badaddr((void *)(intptr_t)(ga->ga_ioh + HQ2_MYSTERY),
 	sizeof(u_int32_t)) )
 		return 0;
 

Index: src/sys/arch/sgimips/gio/light.c
diff -u src/sys/arch/sgimips/gio/light.c:1.10 src/sys/arch/sgimips/gio/light.c:1.11
--- src/sys/arch/sgimips/gio/light.c:1.10	Sat Aug  7 16:19:04 2021
+++ src/sys/arch/sgimips/gio/light.c	Wed Dec 13 20:53:14 2023
@@ -1,4 +1,4 @@
-/*	$Id: light.c,v 1.10 2021/08/07 16:19:04 thorpej Exp $	*/
+/*	$Id: light.c,v 1.11 2023/12/13 20:53:14 andvar Exp $	*/
 
 /*
  * Copyright (c) 2006 Stephen M. Rumble
@@ -43,7 +43,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.10 2021/08/07 16:19:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.11 2023/12/13 20:53:14 andvar Exp $");
 
 #include 
 #include 
@@ -271,7 +271,7 @@ light_match(device_t parent, cfdata_t cf
 		return (0);
 
 	if (platform.badaddr(
-	(void *)(ga->ga_ioh + REX_PAGE1_SET + REX_P1REG_XYOFFSET),
+	(void *)(intptr_t)(ga->ga_ioh + REX_PAGE1_SET + REX_P1REG_XYOFFSET),
 	sizeof(uint32_t)))
 		return (0);
 

Index: src/sys/arch/sgimips/hpc/hpcdma.c
diff -u src/sys/arch/sgimips/hpc/hpcdma.c:1.21 src/sys/arch/sgimips/hpc/hpcdma.c:1.22
--- src/sys/arch/sgimips/hpc/hpcdma.c:1.21	Fri Jul  1 18:53:46 2011
+++ src/sys/arch/sgimips/hpc/hpcdma.c	Wed Dec 13 20:53:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpcdma.c,v 1.21 2011/07/01 18:53:46 dyoung Exp $	*/
+/*	$NetBSD: hpcdma.c,v 1.22 2023/12/13 20:53:14 andvar Exp $	*/
 
 /*
  * Copyright (c) 2001 Wayne Knowles
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hpcdma.c,v 1.21 2011/07/01 18:53:46 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcdma.c,v 1.22 2023/12/13 20:53:14 andvar Exp $");
 
 #include 
 #include 
@@ -133,7 +133,7 @@ hpcdma_sglist_create(struct hpc_dma_soft
 #endif
 	for (i = dmamap->dm_nsegs; i; i--) {
 #ifdef DMA_DEBUG
-		printf("%p:%ld, ", (void *)segp->ds_addr, segp->ds_len);
+		printf("%p:%lld, ", (void *)(intptr_t)segp->ds_addr, segp->ds_len);
 #endif
 		hpa += sizeof(struct hpc_dma_desc);	/* next chain desc */
 		if (sc->hpc->revision == 3) {



CVS commit: src/sys/arch/sgimips

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 20:53:15 UTC 2023

Modified Files:
src/sys/arch/sgimips/gio: grtwo.c light.c
src/sys/arch/sgimips/hpc: hpcdma.c

Log Message:
Add (intptr_t) casts to fix "cast to pointer from integer of different size",
mainly for GENERIC64_32_* configs.
Also change segp->ds_len format specifier to %lld, which fixes DMA_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/gio/grtwo.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/gio/light.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/hpc/hpcdma.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

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 10:53:15 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL

Log Message:
Removing obsolete TTY_DEBUG option from ALL kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.513 -r1.514 src/sys/arch/i386/conf/ALL

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/amd64/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.182 src/sys/arch/amd64/conf/ALL:1.183
--- src/sys/arch/amd64/conf/ALL:1.182	Tue Dec  5 16:32:38 2023
+++ src/sys/arch/amd64/conf/ALL	Wed Dec 13 10:53:15 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.182 2023/12/05 16:32:38 thorpej Exp $
+# $NetBSD: ALL,v 1.183 2023/12/13 10:53:15 andvar Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.182 $"
+#ident		"ALL-$Revision: 1.183 $"
 
 maxusers	64		# estimated number of users
 
@@ -2246,7 +2246,6 @@ options TROPICDEBUG
 options TRTCMISADEBUG
 options TSDEBUG
 options TSLOT_DEBUG
-options TTY_DEBUG
 options TUDEBUG
 options TULIP_DEBUG
 options TWA_DEBUG

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.513 src/sys/arch/i386/conf/ALL:1.514
--- src/sys/arch/i386/conf/ALL:1.513	Tue Dec  5 16:32:38 2023
+++ src/sys/arch/i386/conf/ALL	Wed Dec 13 10:53:15 2023
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.513 2023/12/05 16:32:38 thorpej Exp $
+# $NetBSD: ALL,v 1.514 2023/12/13 10:53:15 andvar Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.513 $"
+#ident		"ALL-$Revision: 1.514 $"
 
 maxusers	64		# estimated number of users
 
@@ -2343,7 +2343,6 @@ options TROPICDEBUG
 options TRTCMISADEBUG
 options TSDEBUG
 options TSLOT_DEBUG
-options TTY_DEBUG
 options TUDEBUG
 options TULIP_DEBUG
 options TWA_DEBUG



CVS commit: src/sys/arch

2023-12-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Dec 13 10:53:15 UTC 2023

Modified Files:
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL

Log Message:
Removing obsolete TTY_DEBUG option from ALL kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.182 -r1.183 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.513 -r1.514 src/sys/arch/i386/conf/ALL

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



CVS commit: src/sys/dev/pci/ixgbe

2023-12-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 13 08:25:54 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
ixgbe: micro-optimize ixgbe_txeof()

 Update txr->packets outside the loop in ixgbe_txeof().


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/ixgbe/ix_txrx.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/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.110 src/sys/dev/pci/ixgbe/ix_txrx.c:1.111
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.110	Fri Dec  8 05:42:59 2023
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Wed Dec 13 08:25:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.110 2023/12/08 05:42:59 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.111 2023/12/13 08:25:54 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.110 2023/12/08 05:42:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.111 2023/12/13 08:25:54 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1203,7 +1203,6 @@ ixgbe_txeof(struct tx_ring *txr)
 			buf->eop = NULL;
 
 		}
-		++txr->packets;
 		++processed;
 
 		/* Try the next packet */
@@ -1227,6 +1226,7 @@ ixgbe_txeof(struct tx_ring *txr)
 	if (processed) {
 		txr->tx_avail = avail;
 		txr->txr_no_space = false;
+		txr->packets += processed;
 		if_statadd(ifp, if_opackets, processed);
 	}
 



CVS commit: src/sys/dev/pci/ixgbe

2023-12-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 13 08:25:54 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
ixgbe: micro-optimize ixgbe_txeof()

 Update txr->packets outside the loop in ixgbe_txeof().


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/ixgbe/ix_txrx.c

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



CVS commit: src/doc

2023-12-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Dec 13 08:20:04 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
doc: Recent changes


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.3021 src/doc/CHANGES:1.3022
--- src/doc/CHANGES:1.3021	Fri Nov 17 22:46:19 2023
+++ src/doc/CHANGES	Wed Dec 13 08:20:04 2023
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3021 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.3022 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -225,3 +225,19 @@ Changes from NetBSD 10.0 to NetBSD 11.0:
 		to use a /dev/gpioirqN device to get pin interrupts into
 		userland. [brad 20231105]
 	gpiosim(4): Simulated interrupts [brad 20231108]
+	sparc64: Support for virtio(4). [thorpej 20231119]
+	alpha: Support for virtio(4). [thorpej 20231119]
+	alpha: Support for crash(8). [thorpej 20231122]
+	iscsid(8): Handle IPv6 addresses. [mlelstv 20231125]
+	kernel: Replace the vdrain kernel thread with two threadpool jobs.
+		[hannken 20231127]
+	kernel: Import various bits of nouveau firmware for newer
+		nvidia graphics hardware. [bouyer 20231128]
+	kernel: Replace various usage of extent(9) with vmem(9).
+		[thorpej 20231201]
+	indent(1): Use line number of the token start in diagnostics
+		[rilling 20231203]
+	vmem(9): Add the notion of "private boundary tags", allowing vmem
+		to be used VERY early in boot. [thorpej 20231203]
+	kernel: Modularize compat90. [pgoyette 20231209]
+	libsa: Add NFSv3 support. [mlelstv 20231212]



CVS commit: src/doc

2023-12-13 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Dec 13 08:20:04 UTC 2023

Modified Files:
src/doc: CHANGES

Log Message:
doc: Recent changes


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

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