CVS commit: src

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 22:00:24 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: module.md.amd64 module.md.i386
src/distrib/sets/lists/modules: md.amd64 md.i386
src/sys/modules: Makefile

Log Message:
drm: Hook up the drmkms modules to the build.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/debug/module.md.amd64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/debug/module.md.i386
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.268 -r1.269 src/sys/modules/Makefile

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



CVS commit: src

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 22:00:24 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: module.md.amd64 module.md.i386
src/distrib/sets/lists/modules: md.amd64 md.i386
src/sys/modules: Makefile

Log Message:
drm: Hook up the drmkms modules to the build.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/debug/module.md.amd64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/debug/module.md.i386
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.92 -r1.93 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.268 -r1.269 src/sys/modules/Makefile

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/debug/module.md.amd64
diff -u src/distrib/sets/lists/debug/module.md.amd64:1.11 src/distrib/sets/lists/debug/module.md.amd64:1.12
--- src/distrib/sets/lists/debug/module.md.amd64:1.11	Thu Jul 28 16:45:31 2022
+++ src/distrib/sets/lists/debug/module.md.amd64	Thu Jul 28 22:00:23 2022
@@ -1,4 +1,4 @@
-# $NetBSD: module.md.amd64,v 1.11 2022/07/28 16:45:31 martin Exp $
+# $NetBSD: module.md.amd64,v 1.12 2022/07/28 22:00:23 riastradh Exp $
 ./usr/libdata/debug/@MODULEDIR@/acpiacadmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpiacad/acpiacad.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpibatmodules-base-kernel	kmod,debug
@@ -107,14 +107,18 @@
 ./usr/libdata/debug/@MODULEDIR@/cxdtv/cxdtv.kmod.debug			modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/drmmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/drm/drm.kmod.debug			modules-base-kernel	kmod,debug
-./usr/libdata/debug/@MODULEDIR@/drmkmsmodules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms/drmkms.kmod.debug		modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms_agp			modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms_agp/drmkms_agp.kmod.debug	modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms_linux			modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms_linux/drmkms_linux.kmod.debug	modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms_pci			modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/drmkms_pci/drmkms_pci.kmod.debug	modules-obsolete	obsolete
+./usr/libdata/debug/@MODULEDIR@/drmkmsmodules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms/drmkms.kmod.debug		modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_agp			modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_agp/drmkms_agp.kmod.debug	modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_linux			modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_linux/drmkms_linux.kmod.debug	modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_pci			modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_pci/drmkms_pci.kmod.debug	modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_sched			modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_sched/drmkms_sched.kmod.debug	modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_ttm			modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/drmkms_ttm/drmkms_ttm.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/dtrace_syscall_linux		modules-base-kernel	kmod,dtrace,debug
 ./usr/libdata/debug/@MODULEDIR@/dtrace_syscall_linux/dtrace_syscall_linux.kmod.debug	modules-base-kernel	kmod,dtrace,debug
 ./usr/libdata/debug/@MODULEDIR@/dtrace_syscall_linux32		modules-base-kernel	kmod,dtrace,debug
@@ -151,8 +155,8 @@
 ./usr/libdata/debug/@MODULEDIR@/hpqlb/hpqlb.kmod.debug			modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/i915drmmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/i915drm/i915drm.kmod.debug		modules-base-kernel	kmod,debug
-./usr/libdata/debug/@MODULEDIR@/i915drmkms			modules-obsolete	obsolete
-./usr/libdata/debug/@MODULEDIR@/i915drmkms/i915drmkms.kmod.debug	modules-obsolete	obsolete
+./usr/libdata/debug/@MODULEDIR@/i915drmkms			modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/i915drmkms/i915drmkms.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/ichsmbmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/ichsmb/ichsmb.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/if_iavfmodules-base-kernel	kmod,debug

Index: src/distrib/sets/lists/debug/module.md.i386
diff -u src/distrib/sets/lists/debug/module.md.i386:1.6 src/distrib/sets/lists/debug/module.md.i386:1.7
--- src/distrib/sets/lists/debug/module.md.i386:1.6	Wed Jul 27 20:34:30 2022
+++ src/distrib/sets/lists/debug/module.md.i386	Thu Jul 28 22:00:23 2022
@@ -1,4 +1,4 @@
-# 

CVS commit: src/sys

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 21:52:37 UTC 2022

Modified Files:
src/sys/arch/i386/conf: GENERIC
src/sys/external/bsd/drm2/drm: files.drmkms

Log Message:
drm: New option DRM_LEGACY.

This brings in the `drmums' components, which are the parts of the
current drm code base (sys/external/bsd/drm2) needed by legacy
user-mode-setting drivers (currently just viadrmums), in contrast to
the old drm code base (sys/external/bsd/drm).

This way, viadrmums.kmod can be loaded into GENERIC i386 kernels, but
platforms without any relevant legacy UMS drivers don't get the
legacy goo statically baked in.


To generate a diff of this commit:
cvs rdiff -u -r1.1238 -r1.1239 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/external/bsd/drm2/drm/files.drmkms

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/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1238 src/sys/arch/i386/conf/GENERIC:1.1239
--- src/sys/arch/i386/conf/GENERIC:1.1238	Sat Apr 16 11:57:46 2022
+++ src/sys/arch/i386/conf/GENERIC	Thu Jul 28 21:52:36 2022
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1238 2022/04/16 11:57:46 nia Exp $
+# $NetBSD: GENERIC,v 1.1239 2022/07/28 21:52:36 riastradh Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.1238 $"
+#ident		"GENERIC-$Revision: 1.1239 $"
 
 maxusers	64		# estimated number of users
 
@@ -554,7 +554,8 @@ radeondrmkmsfb* at radeonfbbus?
 nouveau*	at pci? dev ? function ?
 nouveaufb*	at nouveaufbbus?
 
-# DRMUMS drivers
+# DRMUMS drivers -- make them loadable, but not statically linked in
+options 	DRM_LEGACY
 #viadrmums*	at drm?
 
 # Serial Devices

Index: src/sys/external/bsd/drm2/drm/files.drmkms
diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.82 src/sys/external/bsd/drm2/drm/files.drmkms:1.83
--- src/sys/external/bsd/drm2/drm/files.drmkms:1.82	Thu Jul 28 10:43:35 2022
+++ src/sys/external/bsd/drm2/drm/files.drmkms	Thu Jul 28 21:52:36 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.drmkms,v 1.82 2022/07/28 10:43:35 riastradh Exp $
+#	$NetBSD: files.drmkms,v 1.83 2022/07/28 21:52:36 riastradh Exp $
 
 version	20180827
 
@@ -86,7 +86,17 @@ makeoptions 	drmkms 	"CWARNFLAGS.drm_ioc
 makeoptions	drmkms	"CWARNFLAGS.drm_mm.c"+="${${ACTIVE_CC} == clang :? -Wno-unused-function :}"
 makeoptions 	drmkms 	"CWARNFLAGS.drm_modes.c"+="-Wno-shadow"
 
-# Legacy user-mode setting
+# Legacy user-mode setting -- for the following legacy drivers:
+#
+#   mach64*
+#   mga*
+#   savage*
+#   sis*
+#   tdfx*
+#   via
+#
+# * not yet adapted to current drm code base
+#
 define	drmums: drmkms
 makeoptions	drmums	"CPPFLAGS.drmkms"+="-DCONFIG_DRM_LEGACY"
 makeoptions	drmums	"CPPFLAGS.drmums"+="${CPPFLAGS.drmkms}"
@@ -97,6 +107,10 @@ file	external/bsd/drm2/dist/drm/drm_lega
 file	external/bsd/drm2/drm/drm_lock.c		drmums
 file	external/bsd/drm2/drm/drm_scatter.c		drmums
 
+# Set `options DRM_LEGACY' to allow loading modules requiring drmums
+# even if none are statically linked into the kernel.
+defflag		DRM_LEGACY: drmums
+
 # GPU scheduler
 define	drmkms_sched: drmkms
 makeoptions	drmkms_sched	"CPPFLAGS.drmkms_sched"+="${CPPFLAGS.drmkms}"



CVS commit: src/sys

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 21:52:37 UTC 2022

Modified Files:
src/sys/arch/i386/conf: GENERIC
src/sys/external/bsd/drm2/drm: files.drmkms

Log Message:
drm: New option DRM_LEGACY.

This brings in the `drmums' components, which are the parts of the
current drm code base (sys/external/bsd/drm2) needed by legacy
user-mode-setting drivers (currently just viadrmums), in contrast to
the old drm code base (sys/external/bsd/drm).

This way, viadrmums.kmod can be loaded into GENERIC i386 kernels, but
platforms without any relevant legacy UMS drivers don't get the
legacy goo statically baked in.


To generate a diff of this commit:
cvs rdiff -u -r1.1238 -r1.1239 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/external/bsd/drm2/drm/files.drmkms

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

2022-07-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jul 28 16:45:31 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: module.md.amd64

Log Message:
Revert editor mishap in r1.10


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/debug/module.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/debug/module.md.amd64
diff -u src/distrib/sets/lists/debug/module.md.amd64:1.10 src/distrib/sets/lists/debug/module.md.amd64:1.11
--- src/distrib/sets/lists/debug/module.md.amd64:1.10	Thu Jul 28 00:33:57 2022
+++ src/distrib/sets/lists/debug/module.md.amd64	Thu Jul 28 16:45:31 2022
@@ -1,4 +1,4 @@
-# $NetBSD: module.md.amd64,v 1.10 2022/07/28 00:33:57 pgoyette Exp $
+# $NetBSD: module.md.amd64,v 1.11 2022/07/28 16:45:31 martin Exp $
 ./usr/libdata/debug/@MODULEDIR@/acpiacadmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpiacad/acpiacad.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpibatmodules-base-kernel	kmod,debug
@@ -75,6 +75,8 @@
 ./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_80/compat_netbsd32_80.kmod.debug modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_90		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_90/compat_netbsd32_90.kmod.debug modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_coredump		modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_coredump/compat_netbsd32_coredump.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_mqueue		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_mqueue/compat_netbsd32_mqueue.kmod.debug	modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/compat_netbsd32_nfssrv		modules-base-kernel	kmod,debug



CVS commit: src/distrib/sets/lists/debug

2022-07-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jul 28 16:45:31 UTC 2022

Modified Files:
src/distrib/sets/lists/debug: module.md.amd64

Log Message:
Revert editor mishap in r1.10


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/debug/module.md.amd64

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



CVS commit: src/sys/net

2022-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 28 15:15:29 UTC 2022

Modified Files:
src/sys/net: if.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.299 src/sys/net/if.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/net/if.h
diff -u src/sys/net/if.h:1.298 src/sys/net/if.h:1.299
--- src/sys/net/if.h:1.298	Mon Jun 20 08:20:09 2022
+++ src/sys/net/if.h	Thu Jul 28 15:15:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.298 2022/06/20 08:20:09 yamaguchi Exp $	*/
+/*	$NetBSD: if.h,v 1.299 2022/07/28 15:15:29 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -439,7 +439,7 @@ typedef struct ifnet {
 } ifnet_t;
 
 #include 
- 
+
 #define	if_name(ifp)	((ifp)->if_xname)
 
 #define	IFF_UP		0x0001		/* interface is up */
@@ -700,7 +700,7 @@ if_start_lock(struct ifnet *ifp)
 		(m)->m_nextpkt = 0; \
 		(ifq)->ifq_len--; \
 	} \
-} while (/*CONSTCOND*/0) 
+} while (/*CONSTCOND*/0)
 #define	IF_POLL(ifq, m)		((m) = (ifq)->ifq_head)
 #define	IF_PURGE(ifq)			\
 do {	\
@@ -1408,7 +1408,7 @@ int	sysctl_ifq(int *name, u_int namelen,
 #define IFQCTL_PEAK	3
 #define IFQCTL_DROPS	4
 
-/* 
+/*
  * Hook for if_vlan - needed by if_agr
  */
 MODULE_HOOK(if_vlan_vlan_input_hook,



CVS commit: src/sys/net

2022-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 28 15:15:29 UTC 2022

Modified Files:
src/sys/net: if.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.299 src/sys/net/if.h

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

2022-07-28 Thread Tetsuya Isaki
At Tue, 26 Jul 2022 09:52:40 -0700,
Chuck Silvers wrote:
> > This commit breaks usr.sbin/crash on m68k.
> > curlwp is defined only in _KERNEL.  usr.sbin/crash defines _KMEMUSER
> > but not _KERNEL.
> > 
> > Would you look into?
> 
> I fixed it now, sorry about that.

Thank you!
---
Tetsuya Isaki 


CVS commit: src/sys/external/bsd/drm2/dist/drm/scheduler

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:44:46 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/dist/drm/scheduler: sched_fence.c

Log Message:
drmkms_sched: Fix typo in module definition.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c
diff -u src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c:1.6 src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c:1.6	Thu Jul 28 10:42:45 2022
+++ src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c	Thu Jul 28 10:44:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched_fence.c,v 1.6 2022/07/28 10:42:45 riastradh Exp $	*/
+/*	$NetBSD: sched_fence.c,v 1.7 2022/07/28 10:44:46 riastradh Exp $	*/
 
 /*
  * Copyright 2015 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sched_fence.c,v 1.6 2022/07/28 10:42:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sched_fence.c,v 1.7 2022/07/28 10:44:46 riastradh Exp $");
 
 #include 
 #include 
@@ -197,7 +197,7 @@ MODULE_LICENSE("GPL and additional right
 MODULE(MODULE_CLASS_MISC, drmkms_sched, "drmkms,drmkms_linux");
 
 static int
-drmsched_modcmd(modcmd_t cmd, void *arg)
+drmkms_sched_modcmd(modcmd_t cmd, void *arg)
 {
 
 	switch (cmd) {



CVS commit: src/sys/external/bsd/drm2/dist/drm/scheduler

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:44:46 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/dist/drm/scheduler: sched_fence.c

Log Message:
drmkms_sched: Fix typo in module definition.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c

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



CVS commit: src/sys/external/bsd/drm2/drm

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:43:36 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/drm: files.drmkms

Log Message:
drmkms_sched: Remove duplicate module definition.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/external/bsd/drm2/drm/files.drmkms

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

Modified files:

Index: src/sys/external/bsd/drm2/drm/files.drmkms
diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.81 src/sys/external/bsd/drm2/drm/files.drmkms:1.82
--- src/sys/external/bsd/drm2/drm/files.drmkms:1.81	Sun Jul 24 19:23:59 2022
+++ src/sys/external/bsd/drm2/drm/files.drmkms	Thu Jul 28 10:43:35 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.drmkms,v 1.81 2022/07/24 19:23:59 riastradh Exp $
+#	$NetBSD: files.drmkms,v 1.82 2022/07/28 10:43:35 riastradh Exp $
 
 version	20180827
 
@@ -104,7 +104,6 @@ makeoptions	drmkms_sched	"CPPFLAGS.drmkm
 file	external/bsd/drm2/dist/drm/scheduler/sched_entity.c	drmkms_sched
 file	external/bsd/drm2/dist/drm/scheduler/sched_fence.c	drmkms_sched
 file	external/bsd/drm2/dist/drm/scheduler/sched_main.c	drmkms_sched
-file	external/bsd/drm2/drm/sched_module.c			drmkms_sched
 
 # Generated from drm2netbsd.
 #file	external/bsd/drm2/dist/drm/drm_agpsupport.c	drmkms	# drmkms_pci



CVS commit: src/sys/external/bsd/drm2/drm

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:43:36 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/drm: files.drmkms

Log Message:
drmkms_sched: Remove duplicate module definition.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/external/bsd/drm2/drm/files.drmkms

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



CVS commit: src/sys

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:42:46 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/dist/drm/scheduler: sched_fence.c
src/sys/modules/drmkms_sched: Makefile
Removed Files:
src/sys/external/bsd/drm2/drm: sched_module.c

Log Message:
drmkms_sched: Remove duplicate module definition.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c
cvs rdiff -u -r1.1 -r0 src/sys/external/bsd/drm2/drm/sched_module.c
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/drmkms_sched/Makefile

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



CVS commit: src/sys

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:42:46 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/dist/drm/scheduler: sched_fence.c
src/sys/modules/drmkms_sched: Makefile
Removed Files:
src/sys/external/bsd/drm2/drm: sched_module.c

Log Message:
drmkms_sched: Remove duplicate module definition.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c
cvs rdiff -u -r1.1 -r0 src/sys/external/bsd/drm2/drm/sched_module.c
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/drmkms_sched/Makefile

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c
diff -u src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c:1.5 src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c:1.6
--- src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c:1.5	Sun Dec 19 12:32:45 2021
+++ src/sys/external/bsd/drm2/dist/drm/scheduler/sched_fence.c	Thu Jul 28 10:42:45 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched_fence.c,v 1.5 2021/12/19 12:32:45 riastradh Exp $	*/
+/*	$NetBSD: sched_fence.c,v 1.6 2022/07/28 10:42:45 riastradh Exp $	*/
 
 /*
  * Copyright 2015 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sched_fence.c,v 1.5 2021/12/19 12:32:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sched_fence.c,v 1.6 2022/07/28 10:42:45 riastradh Exp $");
 
 #include 
 #include 
@@ -194,7 +194,8 @@ MODULE_DESCRIPTION("DRM GPU scheduler");
 MODULE_LICENSE("GPL and additional rights");
 
 #ifdef __NetBSD__
-MODULE(MODULE_CLASS_MISC, drmsched, NULL);
+MODULE(MODULE_CLASS_MISC, drmkms_sched, "drmkms,drmkms_linux");
+
 static int
 drmsched_modcmd(modcmd_t cmd, void *arg)
 {

Index: src/sys/modules/drmkms_sched/Makefile
diff -u src/sys/modules/drmkms_sched/Makefile:1.3 src/sys/modules/drmkms_sched/Makefile:1.4
--- src/sys/modules/drmkms_sched/Makefile:1.3	Thu Jul 28 10:41:07 2022
+++ src/sys/modules/drmkms_sched/Makefile	Thu Jul 28 10:42:46 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2022/07/28 10:41:07 riastradh Exp $
+#	$NetBSD: Makefile,v 1.4 2022/07/28 10:42:46 riastradh Exp $
 
 .include "../Makefile.inc"
 .include "../drmkms/Makefile.inc"
@@ -11,7 +11,6 @@ KMOD=	drmkms_sched
 SRCS+=	sched_entity.c
 SRCS+=	sched_fence.c
 SRCS+=	sched_main.c
-SRCS+=	sched_module.c
 
 WARNS=	3
 



CVS commit: src/sys/modules/drmkms_sched

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:41:07 UTC 2022

Modified Files:
src/sys/modules/drmkms_sched: Makefile

Log Message:
drmkms_sched: Revert previous MKLDSCRIPT, red herring.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/drmkms_sched/Makefile

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

Modified files:

Index: src/sys/modules/drmkms_sched/Makefile
diff -u src/sys/modules/drmkms_sched/Makefile:1.2 src/sys/modules/drmkms_sched/Makefile:1.3
--- src/sys/modules/drmkms_sched/Makefile:1.2	Thu Jul 28 10:24:46 2022
+++ src/sys/modules/drmkms_sched/Makefile	Thu Jul 28 10:41:07 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2022/07/28 10:24:46 riastradh Exp $
+#	$NetBSD: Makefile,v 1.3 2022/07/28 10:41:07 riastradh Exp $
 
 .include "../Makefile.inc"
 .include "../drmkms/Makefile.inc"
@@ -7,7 +7,6 @@
 .PATH:	${S}/external/bsd/drm2/drm
 
 KMOD=	drmkms_sched
-MKLDSCRIPT=yes
 
 SRCS+=	sched_entity.c
 SRCS+=	sched_fence.c



CVS commit: src/sys/modules/drmkms_sched

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:41:07 UTC 2022

Modified Files:
src/sys/modules/drmkms_sched: Makefile

Log Message:
drmkms_sched: Revert previous MKLDSCRIPT, red herring.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/drmkms_sched/Makefile

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

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:26:26 UTC 2022

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
arm/pic: Mark definitions static to match declarations.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.82 src/sys/arch/arm/pic/pic.c:1.83
--- src/sys/arch/arm/pic/pic.c:1.82	Thu Jul 28 10:26:15 2022
+++ src/sys/arch/arm/pic/pic.c	Thu Jul 28 10:26:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.82 2022/07/28 10:26:15 riastradh Exp $	*/
+/*	$NetBSD: pic.c,v 1.83 2022/07/28 10:26:26 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.82 2022/07/28 10:26:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.83 2022/07/28 10:26:26 riastradh Exp $");
 
 #include 
 #include 
@@ -298,7 +298,7 @@ pic_mark_pending_sources(struct pic_soft
 	return ipl_mask;
 }
 
-uint32_t
+static uint32_t
 pic_find_pending_irqs_by_ipl(struct pic_softc *pic, size_t irq_base,
 	uint32_t pending, int ipl)
 {
@@ -369,7 +369,7 @@ pic_dispatch(struct intrsource *is, void
 }
 
 #if defined(__HAVE_PIC_PENDING_INTRS)
-void
+static void
 pic_deliver_irqs(struct cpu_info *ci, struct pic_softc *pic, int ipl,
 void *frame)
 {
@@ -505,7 +505,7 @@ pic_list_unblock_irqs(struct cpu_info *c
 	}
 }
 
-struct pic_softc *
+static struct pic_softc *
 pic_list_find_pic_by_pending_ipl(struct cpu_info *ci, uint32_t ipl_mask)
 {
 	uint32_t pending_pics = ci->ci_pending_pics;
@@ -524,7 +524,7 @@ pic_list_find_pic_by_pending_ipl(struct 
 	}
 }
 
-void
+static void
 pic_list_deliver_irqs(struct cpu_info *ci, register_t psw, int ipl,
 void *frame)
 {



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

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:26:26 UTC 2022

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
arm/pic: Mark definitions static to match declarations.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arm/pic/pic.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/pic

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:26:15 UTC 2022

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
arm/pic: Assert ci_cpl doesn't lower across interrupt handler.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.81 src/sys/arch/arm/pic/pic.c:1.82
--- src/sys/arch/arm/pic/pic.c:1.81	Thu Jul 28 07:15:27 2022
+++ src/sys/arch/arm/pic/pic.c	Thu Jul 28 10:26:15 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.81 2022/07/28 07:15:27 skrll Exp $	*/
+/*	$NetBSD: pic.c,v 1.82 2022/07/28 10:26:15 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.81 2022/07/28 07:15:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.82 2022/07/28 10:26:15 riastradh Exp $");
 
 #include 
 #include 
@@ -333,6 +333,7 @@ pic_dispatch(struct intrsource *is, void
 {
 	int (*func)(void *) = is->is_func;
 	void *arg = is->is_arg;
+	int ocpl, ncpl;
 
 	if (__predict_false(arg == NULL)) {
 		if (__predict_false(frame == NULL)) {
@@ -342,6 +343,7 @@ pic_dispatch(struct intrsource *is, void
 		arg = frame;
 	}
 
+	ocpl = curcpu()->ci_cpl;
 #ifdef MULTIPROCESSOR
 	if (!is->is_mpsafe) {
 		KERNEL_LOCK(1, NULL);
@@ -354,6 +356,11 @@ pic_dispatch(struct intrsource *is, void
 	} else
 #endif
 		(void)(*func)(arg);
+	ncpl = curcpu()->ci_cpl;
+	KASSERTMSG(ocpl <= ncpl, "pic %s irq %u intrsource %s:"
+	" cpl slipped %d -> %d",
+	is->is_pic->pic_name, is->is_irq, is->is_source,
+	ocpl, ncpl);
 
 	struct pic_percpu * const pcpu = percpu_getref(is->is_pic->pic_percpu);
 	KASSERT(pcpu->pcpu_magic == PICPERCPU_MAGIC);



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

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:26:15 UTC 2022

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
arm/pic: Assert ci_cpl doesn't lower across interrupt handler.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arm/pic/pic.c

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



CVS commit: src/sys/modules/drmkms_sched

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:24:46 UTC 2022

Modified Files:
src/sys/modules/drmkms_sched: Makefile

Log Message:
drmkms_sched: Fix link sets in module.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/drmkms_sched/Makefile

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

Modified files:

Index: src/sys/modules/drmkms_sched/Makefile
diff -u src/sys/modules/drmkms_sched/Makefile:1.1 src/sys/modules/drmkms_sched/Makefile:1.2
--- src/sys/modules/drmkms_sched/Makefile:1.1	Sat Jul 23 12:52:10 2022
+++ src/sys/modules/drmkms_sched/Makefile	Thu Jul 28 10:24:46 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2022/07/23 12:52:10 riastradh Exp $
+#	$NetBSD: Makefile,v 1.2 2022/07/28 10:24:46 riastradh Exp $
 
 .include "../Makefile.inc"
 .include "../drmkms/Makefile.inc"
@@ -7,6 +7,7 @@
 .PATH:	${S}/external/bsd/drm2/drm
 
 KMOD=	drmkms_sched
+MKLDSCRIPT=yes
 
 SRCS+=	sched_entity.c
 SRCS+=	sched_fence.c



CVS commit: src/sys/modules/drmkms_sched

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 10:24:46 UTC 2022

Modified Files:
src/sys/modules/drmkms_sched: Makefile

Log Message:
drmkms_sched: Fix link sets in module.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/drmkms_sched/Makefile

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

2022-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 28 09:22:25 UTC 2022

Modified Files:
src/sys/dev/pci: if_wm.c

Log Message:
KNF the KNF


To generate a diff of this commit:
cvs rdiff -u -r1.746 -r1.747 src/sys/dev/pci/if_wm.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.746 src/sys/dev/pci/if_wm.c:1.747
--- src/sys/dev/pci/if_wm.c:1.746	Fri Jul 22 05:23:50 2022
+++ src/sys/dev/pci/if_wm.c	Thu Jul 28 09:22:25 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.746 2022/07/22 05:23:50 msaitoh Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.747 2022/07/28 09:22:25 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.746 2022/07/22 05:23:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.747 2022/07/28 09:22:25 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -98,8 +98,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/dev/pci

2022-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 28 09:22:25 UTC 2022

Modified Files:
src/sys/dev/pci: if_wm.c

Log Message:
KNF the KNF


To generate a diff of this commit:
cvs rdiff -u -r1.746 -r1.747 src/sys/dev/pci/if_wm.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/arm32

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 09:14:23 UTC 2022

Modified Files:
src/sys/arch/arm/arm32: arm32_machdep.c

Log Message:
arm32: Refactor splhigh and restore in dosoftints.

No functional change intended.  splhigh always returns ci->ci_cpl,
which should not be changing at this point.  Makes the bracketing by
splhigh/splx clearer.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/arm/arm32/arm32_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/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.143 src/sys/arch/arm/arm32/arm32_machdep.c:1.144
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.143	Sat Mar 12 09:16:05 2022
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Thu Jul 28 09:14:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.143 2022/03/12 09:16:05 skrll Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.144 2022/07/28 09:14:23 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.143 2022/03/12 09:16:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.144 2022/07/28 09:14:23 riastradh Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_arm_start.h"
@@ -663,15 +663,16 @@ dosoftints(void)
 	struct cpu_info * const ci = curcpu();
 	const int opl = ci->ci_cpl;
 	const uint32_t softiplmask = SOFTIPLMASK(opl);
+	int s;
 
-	splhigh();
+	s = splhigh();
+	KASSERT(s == opl);
 	for (;;) {
 		u_int softints = ci->ci_softints & softiplmask;
 		KASSERT((softints != 0) == ((ci->ci_softints >> opl) != 0));
 		KASSERT(opl == IPL_NONE || (softints & (1 << (opl - IPL_SOFTCLOCK))) == 0);
 		if (softints == 0) {
-			splx(opl);
-			return;
+			break;
 		}
 #define	DOSOFTINT(n) \
 		if (ci->ci_softints & (1 << (IPL_SOFT ## n - IPL_SOFTCLOCK))) { \
@@ -687,6 +688,7 @@ dosoftints(void)
 		DOSOFTINT(CLOCK);
 		panic("dosoftints wtf (softints=%u?, ipl=%d)", softints, opl);
 	}
+	splx(s);
 }
 #endif /* !__HAVE_PIC_FAST_SOFTINTS */
 #endif /* __HAVE_FAST_SOFTINTS */



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

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 09:14:23 UTC 2022

Modified Files:
src/sys/arch/arm/arm32: arm32_machdep.c

Log Message:
arm32: Refactor splhigh and restore in dosoftints.

No functional change intended.  splhigh always returns ci->ci_cpl,
which should not be changing at this point.  Makes the bracketing by
splhigh/splx clearer.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/arm/arm32/arm32_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/aarch64/aarch64

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 09:14:12 UTC 2022

Modified Files:
src/sys/arch/aarch64/aarch64: cpu_machdep.c

Log Message:
aarch64: Refactor splhigh and restore in dosoftints.

No functional change intended.  splhigh always returns ci->ci_cpl,
which should not be changing at this point.  Makes the bracketing by
splhigh/splx clearer.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/cpu_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/aarch64/aarch64/cpu_machdep.c
diff -u src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.12 src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.13
--- src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.12	Thu Sep 23 15:19:03 2021
+++ src/sys/arch/aarch64/aarch64/cpu_machdep.c	Thu Jul 28 09:14:12 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_machdep.c,v 1.12 2021/09/23 15:19:03 ryo Exp $ */
+/* $NetBSD: cpu_machdep.c,v 1.13 2022/07/28 09:14:12 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014, 2019 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.12 2021/09/23 15:19:03 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.13 2022/07/28 09:14:12 riastradh Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -114,8 +114,10 @@ dosoftints(void)
 	struct cpu_info * const ci = curcpu();
 	const int opl = ci->ci_cpl;
 	const uint32_t softiplmask = SOFTIPLMASK(opl);
+	int s;
 
-	splhigh();
+	s = splhigh();
+	KASSERT(s == opl);
 	for (;;) {
 		u_int softints = ci->ci_softints & softiplmask;
 		KASSERT((softints != 0) == ((ci->ci_softints >> opl) != 0));
@@ -130,8 +132,7 @@ dosoftints(void)
 kpreempt(-2);
 			}
 #endif
-			splx(opl);
-			return;
+			break;
 		}
 #define DOSOFTINT(n) \
 		if (ci->ci_softints & (1 << (IPL_SOFT ## n - IPL_SOFTCLOCK))) {\
@@ -147,6 +148,7 @@ dosoftints(void)
 		DOSOFTINT(CLOCK);
 		panic("dosoftints wtf (softints=%u?, ipl=%d)", softints, opl);
 	}
+	splx(s);
 }
 #endif /* !__HAVE_PIC_FAST_SOFTINTS */
 #endif /* __HAVE_FAST_SOFTINTS */



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

2022-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 28 09:14:12 UTC 2022

Modified Files:
src/sys/arch/aarch64/aarch64: cpu_machdep.c

Log Message:
aarch64: Refactor splhigh and restore in dosoftints.

No functional change intended.  splhigh always returns ci->ci_cpl,
which should not be changing at this point.  Makes the bracketing by
splhigh/splx clearer.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/cpu_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/arm/pic

2022-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 28 07:15:27 UTC 2022

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
Catch up with the per lwp astpending (rather than per cpu) flag in the
preemption code.  NFC as preemption (still) isn't enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.80 src/sys/arch/arm/pic/pic.c:1.81
--- src/sys/arch/arm/pic/pic.c:1.80	Sat Jun 25 12:41:56 2022
+++ src/sys/arch/arm/pic/pic.c	Thu Jul 28 07:15:27 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.80 2022/06/25 12:41:56 jmcneill Exp $	*/
+/*	$NetBSD: pic.c,v 1.81 2022/07/28 07:15:27 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.80 2022/06/25 12:41:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.81 2022/07/28 07:15:27 skrll Exp $");
 
 #include 
 #include 
@@ -150,7 +150,9 @@ pic_ipi_ddb(void *arg)
 int
 pic_ipi_kpreempt(void *arg)
 {
-	atomic_or_uint(()->ci_astpending, __BIT(1));
+	struct lwp * const l = curlwp;
+
+	l->l_md.md_astpending |= __BIT(1);
 	return 1;
 }
 #endif /* __HAVE_PREEMPTION */
@@ -554,7 +556,8 @@ pic_do_pending_ints(register_t psw, int 
 	}
 #endif /* __HAVE_PIC_PENDING_INTRS */
 #ifdef __HAVE_PREEMPTION
-	if (newipl == IPL_NONE && (ci->ci_astpending & __BIT(1))) {
+	struct lwp * const l = curlwp;
+	if (newipl == IPL_NONE && (l->l_md.md_astpending & __BIT(1))) {
 		pic_set_priority(ci, IPL_SCHED);
 		kpreempt(0);
 	}



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

2022-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 28 07:15:27 UTC 2022

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
Catch up with the per lwp astpending (rather than per cpu) flag in the
preemption code.  NFC as preemption (still) isn't enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/arm/pic/pic.c

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



CVS commit: xsrc/external/mit/xf86-video-nv/dist/src

2022-07-28 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Jul 28 06:32:35 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-nv/dist/src: nv_driver.c

Log Message:
if we add a mode for the DFP port, make sure it has a name so we don't crash
later on
now this works again on my 12" powerbook


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c
diff -u xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c:1.11 xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c:1.12
--- xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c:1.11	Mon Dec 31 13:02:41 2018
+++ xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c	Thu Jul 28 06:32:35 2022
@@ -1933,6 +1933,8 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 
 	Mode = xf86CVTMode(pNv->fpWidth, pNv->fpHeight, 60.00, TRUE, FALSE);
 	Mode->type = M_T_DRIVER;
+	xf86SetModeDefaultName(Mode);
+
 	pScrn->monitor->Modes = NVModesAdd(pScrn->monitor->Modes, Mode);
 
 	if (!config_mon_rates) {



CVS commit: xsrc/external/mit/xf86-video-nv/dist/src

2022-07-28 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Jul 28 06:32:35 UTC 2022

Modified Files:
xsrc/external/mit/xf86-video-nv/dist/src: nv_driver.c

Log Message:
if we add a mode for the DFP port, make sure it has a name so we don't crash
later on
now this works again on my 12" powerbook


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
xsrc/external/mit/xf86-video-nv/dist/src/nv_driver.c

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