CVS commit: src/sys/netinet

2022-10-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Oct 29 02:56:29 UTC 2022

Modified Files:
src/sys/netinet: in_pcb.c

Log Message:
inpcb: fix for kernels without INET6


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/netinet/in_pcb.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/netinet/in_pcb.c
diff -u src/sys/netinet/in_pcb.c:1.193 src/sys/netinet/in_pcb.c:1.194
--- src/sys/netinet/in_pcb.c:1.193	Fri Oct 28 05:25:36 2022
+++ src/sys/netinet/in_pcb.c	Sat Oct 29 02:56:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_pcb.c,v 1.193 2022/10/28 05:25:36 ozaki-r Exp $	*/
+/*	$NetBSD: in_pcb.c,v 1.194 2022/10/29 02:56:29 ozaki-r Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.193 2022/10/28 05:25:36 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.194 2022/10/29 02:56:29 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -157,7 +157,9 @@ int	lowportmin  = IPPORT_RESERVEDMIN;
 int	lowportmax  = IPPORT_RESERVEDMAX;
 
 static struct pool in4pcb_pool;
+#ifdef INET6
 static struct pool in6pcb_pool;
+#endif
 
 static int
 inpcb_poolinit(void)
@@ -165,8 +167,10 @@ inpcb_poolinit(void)
 
 	pool_init(_pool, sizeof(struct in4pcb), 0, 0, 0, "in4pcbpl", NULL,
 	IPL_NET);
+#ifdef INET6
 	pool_init(_pool, sizeof(struct in6pcb), 0, 0, 0, "in6pcbpl", NULL,
 	IPL_NET);
+#endif
 	return 0;
 }
 
@@ -195,12 +199,17 @@ in_pcballoc(struct socket *so, void *v)
 	struct inpcb *inp;
 	int s;
 
+#ifdef INET6
 	KASSERT(soaf(so) == AF_INET || soaf(so) == AF_INET6);
 
 	if (soaf(so) == AF_INET)
 		inp = pool_get(_pool, PR_NOWAIT|PR_ZERO);
 	else
 		inp = pool_get(_pool, PR_NOWAIT|PR_ZERO);
+#else
+	KASSERT(soaf(so) == AF_INET);
+	inp = pool_get(_pool, PR_NOWAIT|PR_ZERO);
+#endif
 	if (inp == NULL)
 		return (ENOBUFS);
 	inp->inp_af = soaf(so);
@@ -226,10 +235,15 @@ in_pcballoc(struct socket *so, void *v)
 	if (ipsec_enabled) {
 		int error = ipsec_init_pcbpolicy(so, >inp_sp);
 		if (error != 0) {
+#ifdef INET6
 			if (inp->inp_af == AF_INET)
 pool_put(_pool, inp);
 			else
 pool_put(_pool, inp);
+#else
+			KASSERT(inp->inp_af == AF_INET);
+			pool_put(_pool, inp);
+#endif
 			return error;
 		}
 		inp->inp_sp->sp_inp = inp;
@@ -665,6 +679,7 @@ in_pcbdetach(void *v)
 	}
 	rtcache_free(>inp_route);
 	ip_freemoptions(inp->inp_moptions);
+#ifdef INET6
 	if (inp->inp_af == AF_INET6) {
 		if (in6p_outputopts(inp) != NULL) {
 			ip6_clearpktopts(in6p_outputopts(inp), -1);
@@ -672,12 +687,18 @@ in_pcbdetach(void *v)
 		}
 		ip6_freemoptions(in6p_moptions(inp));
 	}
+#endif
 	sofree(so);			/* drops the socket's lock */
 
+#ifdef INET6
 	if (inp->inp_af == AF_INET)
 		pool_put(_pool, inp);
 	else
 		pool_put(_pool, inp);
+#else
+	KASSERT(inp->inp_af == AF_INET);
+	pool_put(_pool, inp);
+#endif
 	mutex_enter(softnet_lock);	/* reacquire the softnet_lock */
 }
 
@@ -1096,10 +1117,15 @@ void
 in_pcbstate(struct inpcb *inp, int state)
 {
 
+#ifdef INET6
 	if (inp->inp_af == AF_INET6) {
 		in6_pcbstate(inp, state);
 		return;
 	}
+#else
+	if (inp->inp_af != AF_INET)
+		return;
+#endif
 
 	if (inp->inp_state > INP_ATTACHED)
 		LIST_REMOVE(inp, inp_hash);
@@ -1130,8 +1156,10 @@ in_pcbrtentry(struct inpcb *inp)
 		struct sockaddr_in	dst4;
 	} u;
 
+#ifdef INET6
 	if (inp->inp_af == AF_INET6)
 		return in6_pcbrtentry(inp);
+#endif
 	if (inp->inp_af != AF_INET)
 		return (NULL);
 



CVS commit: src/sys/netinet

2022-10-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Oct 29 02:56:29 UTC 2022

Modified Files:
src/sys/netinet: in_pcb.c

Log Message:
inpcb: fix for kernels without INET6


To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/sys/netinet/in_pcb.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/xilinx

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 29 01:19:36 UTC 2022

Modified Files:
src/sys/arch/arm/xilinx: zynq_gpio.c

Log Message:
Fix MASK_DATA_SET macro


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/xilinx/zynq_gpio.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/xilinx/zynq_gpio.c
diff -u src/sys/arch/arm/xilinx/zynq_gpio.c:1.2 src/sys/arch/arm/xilinx/zynq_gpio.c:1.3
--- src/sys/arch/arm/xilinx/zynq_gpio.c:1.2	Thu Oct 27 22:35:31 2022
+++ src/sys/arch/arm/xilinx/zynq_gpio.c	Sat Oct 29 01:19:36 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: zynq_gpio.c,v 1.2 2022/10/27 22:35:31 jmcneill Exp $ */
+/* $NetBSD: zynq_gpio.c,v 1.3 2022/10/29 01:19:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2022 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zynq_gpio.c,v 1.2 2022/10/27 22:35:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zynq_gpio.c,v 1.3 2022/10/29 01:19:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -46,7 +46,8 @@ __KERNEL_RCSID(0, "$NetBSD: zynq_gpio.c,
 #define	ZYNQ_GPIO_NPINS		(4 * 32)
 
 #define	MASK_DATA_REG(pin)	(0x000 + 0x4 * ((pin) / 16))
-#define	MASK_DATA_SET(pin, val)	pin) % 16) << 16) | ((val) << ((pin) % 16)))
+#define	MASK_DATA_SET(pin, val)	\
+	((1 << (((pin) % 16) + 16)) | ((val) << ((pin) % 16)))
 #define	DATA_RO_REG(pin)	(0x060 + 0x4 * ((pin) / 32))
 #define	DATA_RO_BIT(pin)	__BIT((pin) % 32)
 #define	DIRM_REG(pin)		(0x204 + 0x40 * ((pin) / 32))



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

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Oct 29 01:19:36 UTC 2022

Modified Files:
src/sys/arch/arm/xilinx: zynq_gpio.c

Log Message:
Fix MASK_DATA_SET macro


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/xilinx/zynq_gpio.c

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



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Oct 29 00:19:22 UTC 2022

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
callout(9): Mark new flags local unused for non-KDTRACE_HOOKS builds.

(feel free to add a new __dtrace_used annotation to make this more
precise)


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/kern/kern_timeout.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/kern/kern_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.72 src/sys/kern/kern_timeout.c:1.73
--- src/sys/kern/kern_timeout.c:1.72	Fri Oct 28 21:53:26 2022
+++ src/sys/kern/kern_timeout.c	Sat Oct 29 00:19:21 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.72 2022/10/28 21:53:26 riastradh Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.73 2022/10/29 00:19:21 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.72 2022/10/28 21:53:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.73 2022/10/29 00:19:21 riastradh Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -817,7 +817,7 @@ callout_softclock(void *v)
 	void (*func)(void *);
 	void *arg;
 	int mpsafe, count, ticks, delta;
-	u_int flags;
+	u_int flags __unused;
 	lwp_t *l;
 
 	l = curlwp;



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Oct 29 00:19:22 UTC 2022

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
callout(9): Mark new flags local unused for non-KDTRACE_HOOKS builds.

(feel free to add a new __dtrace_used annotation to make this more
precise)


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/kern/kern_timeout.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/external/bsd/drm2/pci

2022-10-28 Thread matthew green
> Modified Files:
>   src/sys/external/bsd/drm2/pci: drm_pci.c
>
> Log Message:
> drm(4): Mark PCI interrupt handlers as MP-safe.

i tested this recently and on one of nvidia or radeon
it wasn't working for me.  i can confirm again next
weekend...


.mrg.


CVS commit: src/sys/dev/ic

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 23:44:38 UTC 2022

Modified Files:
src/sys/dev/ic: pckbc.c

Log Message:
pckbc(4): Simplify the (disabled) logic to check keyboard port.

No functional change intended -- just reduces code duplication (and
fixes wrong-number-of-arguments in #if 0 logic).


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/pckbc.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/ic/pckbc.c
diff -u src/sys/dev/ic/pckbc.c:1.63 src/sys/dev/ic/pckbc.c:1.64
--- src/sys/dev/ic/pckbc.c:1.63	Fri Oct 28 23:40:37 2022
+++ src/sys/dev/ic/pckbc.c	Fri Oct 28 23:44:38 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc.c,v 1.63 2022/10/28 23:40:37 riastradh Exp $ */
+/* $NetBSD: pckbc.c,v 1.64 2022/10/28 23:44:38 riastradh Exp $ */
 
 /*
  * Copyright (c) 2004 Ben Harris.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.63 2022/10/28 23:40:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.64 2022/10/28 23:44:38 riastradh Exp $");
 
 #include 
 #include 
@@ -311,27 +311,23 @@ pckbc_attach(struct pckbc_softc *sc)
 	 */
 	if (!pckbc_send_cmd(iot, ioh_c, KBC_KBDTEST))
 		return;
-	res = pckbc_poll_data1(t, PCKBC_KBD_SLOT, 0);
+	res = pckbc_poll_data1(t, PCKBC_KBD_SLOT);
 
 	/*
 	 * Normally, we should get a "0" here.
 	 * But there are keyboard controllers behaving differently.
 	 */
-	if (res == 0 || res == 0xfa || res == 0x01 || res == 0xab) {
-#ifdef PCKBCDEBUG
-		if (res != 0)
-			printf("pckbc: returned %x on kbd slot test\n", res);
-#endif
-		if (pckbc_attach_slot(sc, PCKBC_KBD_SLOT))
-			cmdbits |= KC8_KENABLE;
-	} else {
+	if (!(res == 0 || res == 0xfa || res == 0x01 || res == 0xab)) {
 		printf("pckbc: kbd port test: %x\n", res);
 		return;
 	}
-#else
+#ifdef PCKBCDEBUG
+	if (res != 0)
+		printf("pckbc: returned %x on kbd slot test\n", res);
+#endif
+#endif /* 0 */
 	if (pckbc_attach_slot(sc, PCKBC_KBD_SLOT))
 		cmdbits |= KC8_KENABLE;
-#endif /* 0 */
 
 	/*
 	 * Check aux port ok.



CVS commit: src/sys/dev/ic

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 23:44:38 UTC 2022

Modified Files:
src/sys/dev/ic: pckbc.c

Log Message:
pckbc(4): Simplify the (disabled) logic to check keyboard port.

No functional change intended -- just reduces code duplication (and
fixes wrong-number-of-arguments in #if 0 logic).


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/ic/pckbc.c

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



CVS commit: src/sys/dev

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 23:40:37 UTC 2022

Modified Files:
src/sys/dev/ic: pckbc.c
src/sys/dev/pckbport: pckbd.c pms.c

Log Message:
pckbport(4): C99 initializers

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/pckbc.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pckbport/pckbd.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pckbport/pms.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/ic/pckbc.c
diff -u src/sys/dev/ic/pckbc.c:1.62 src/sys/dev/ic/pckbc.c:1.63
--- src/sys/dev/ic/pckbc.c:1.62	Fri May  1 01:34:57 2020
+++ src/sys/dev/ic/pckbc.c	Fri Oct 28 23:40:37 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc.c,v 1.62 2020/05/01 01:34:57 riastradh Exp $ */
+/* $NetBSD: pckbc.c,v 1.63 2022/10/28 23:40:37 riastradh Exp $ */
 
 /*
  * Copyright (c) 2004 Ben Harris.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.62 2020/05/01 01:34:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.63 2022/10/28 23:40:37 riastradh Exp $");
 
 #include 
 #include 
@@ -85,13 +85,13 @@ void pckbc_start(struct pckbc_internal *
 
 const char * const pckbc_slot_names[] = { "kbd", "aux" };
 
-static struct pckbport_accessops const pckbc_ops = {
-	pckbc_xt_translation,
-	pckbc_send_devcmd,
-	pckbc_poll_data1,
-	pckbc_slot_enable,
-	pckbc_intr_establish,
-	pckbc_set_poll
+static const struct pckbport_accessops pckbc_ops = {
+	.t_xt_translation = pckbc_xt_translation,
+	.t_send_devcmd = pckbc_send_devcmd,
+	.t_poll_data1 = pckbc_poll_data1,
+	.t_slot_enable = pckbc_slot_enable,
+	.t_intr_establish = pckbc_intr_establish,
+	.t_set_poll = pckbc_set_poll,
 };
 
 #define	KBD_DELAY	DELAY(8)

Index: src/sys/dev/pckbport/pckbd.c
diff -u src/sys/dev/pckbport/pckbd.c:1.36 src/sys/dev/pckbport/pckbd.c:1.37
--- src/sys/dev/pckbport/pckbd.c:1.36	Sat Aug  7 16:19:15 2021
+++ src/sys/dev/pckbport/pckbd.c	Fri Oct 28 23:40:37 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.36 2021/08/07 16:19:15 thorpej Exp $ */
+/* $NetBSD: pckbd.c,v 1.37 2022/10/28 23:40:37 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.36 2021/08/07 16:19:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.37 2022/10/28 23:40:37 riastradh Exp $");
 
 #include 
 #include 
@@ -137,9 +137,9 @@ void	pckbd_set_leds(void *, int);
 int	pckbd_ioctl(void *, u_long, void *, int, struct lwp *);
 
 const struct wskbd_accessops pckbd_accessops = {
-	pckbd_enable,
-	pckbd_set_leds,
-	pckbd_ioctl,
+	.enable = pckbd_enable,
+	.set_leds = pckbd_set_leds,
+	.ioctl = pckbd_ioctl,
 };
 
 void	pckbd_cngetc(void *, u_int *, int *);
@@ -147,17 +147,17 @@ void	pckbd_cnpollc(void *, int);
 void	pckbd_cnbell(void *, u_int, u_int, u_int);
 
 const struct wskbd_consops pckbd_consops = {
-	pckbd_cngetc,
-	pckbd_cnpollc,
-	pckbd_cnbell,
+	.getc = pckbd_cngetc,
+	.pollc = pckbd_cnpollc,
+	.bell = pckbd_cnbell,
 };
 
 const struct wskbd_mapdata pckbd_keymapdata = {
-	pckbd_keydesctab,
+	.keydesc = pckbd_keydesctab,
 #ifdef PCKBD_LAYOUT
-	PCKBD_LAYOUT,
+	.layout = PCKBD_LAYOUT,
 #else
-	KB_US,
+	.layout = KB_US,
 #endif
 };
 

Index: src/sys/dev/pckbport/pms.c
diff -u src/sys/dev/pckbport/pms.c:1.39 src/sys/dev/pckbport/pms.c:1.40
--- src/sys/dev/pckbport/pms.c:1.39	Sat Aug  7 16:19:15 2021
+++ src/sys/dev/pckbport/pms.c	Fri Oct 28 23:40:37 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pms.c,v 1.39 2021/08/07 16:19:15 thorpej Exp $ */
+/* $NetBSD: pms.c,v 1.40 2022/10/28 23:40:37 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2004 Kentaro Kurahone.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.39 2021/08/07 16:19:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.40 2022/10/28 23:40:37 riastradh Exp $");
 
 #include "opt_pms.h"
 
@@ -97,9 +97,9 @@ static bool	pms_suspend(device_t, const 
 static bool	pms_resume(device_t, const pmf_qual_t *);
 
 static const struct wsmouse_accessops pms_accessops = {
-	pms_enable,
-	pms_ioctl,
-	pms_disable,
+	.enable = pms_enable,
+	.ioctl = pms_ioctl,
+	.disable = pms_disable,
 };
 
 static int



CVS commit: src/sys/dev

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 23:40:37 UTC 2022

Modified Files:
src/sys/dev/ic: pckbc.c
src/sys/dev/pckbport: pckbd.c pms.c

Log Message:
pckbport(4): C99 initializers

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/ic/pckbc.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pckbport/pckbd.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pckbport/pms.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/pci

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:58:48 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/pci: drm_pci.c

Log Message:
drm(4): Mark PCI interrupt handlers as MP-safe.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/external/bsd/drm2/pci/drm_pci.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/pci

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:58:48 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/pci: drm_pci.c

Log Message:
drm(4): Mark PCI interrupt handlers as MP-safe.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/external/bsd/drm2/pci/drm_pci.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/pci/drm_pci.c
diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.47 src/sys/external/bsd/drm2/pci/drm_pci.c:1.48
--- src/sys/external/bsd/drm2/pci/drm_pci.c:1.47	Sun Dec 19 11:54:32 2021
+++ src/sys/external/bsd/drm2/pci/drm_pci.c	Fri Oct 28 21:58:48 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_pci.c,v 1.47 2021/12/19 11:54:32 riastradh Exp $	*/
+/*	$NetBSD: drm_pci.c,v 1.48 2022/10/28 21:58:48 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.47 2021/12/19 11:54:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.48 2022/10/28 21:58:48 riastradh Exp $");
 
 #include 
 #include 
@@ -188,6 +188,8 @@ drm_pci_request_irq(struct drm_device *d
 		}
 	}
 
+	pci_intr_setattr(pa->pa_pc, _cookie->intr_handles[0],
+	PCI_INTR_MPSAFE, true);
 	intrstr = pci_intr_string(pa->pa_pc, irq_cookie->intr_handles[0],
 	intrbuf, sizeof(intrbuf));
 	irq_cookie->ih_cookie = pci_intr_establish_xname(pa->pa_pc,



CVS commit: src/sys/arch/x86/acpi

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:58:27 UTC 2022

Modified Files:
src/sys/arch/x86/acpi: acpi_machdep.c

Log Message:
x86/acpi: Mark acpica interrupt handlers MP-safe.

acpica has its own internal locking, and the interrupt handlers we
install with AcpiInstall*Handler (gpe, notify, ) also have their
own locking.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/acpi/acpi_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/x86/acpi/acpi_machdep.c
diff -u src/sys/arch/x86/acpi/acpi_machdep.c:1.33 src/sys/arch/x86/acpi/acpi_machdep.c:1.34
--- src/sys/arch/x86/acpi/acpi_machdep.c:1.33	Sat Aug 20 23:48:50 2022
+++ src/sys/arch/x86/acpi/acpi_machdep.c	Fri Oct 28 21:58:27 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.33 2022/08/20 23:48:50 riastradh Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.34 2022/10/28 21:58:27 riastradh Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.33 2022/08/20 23:48:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.34 2022/10/28 21:58:27 riastradh Exp $");
 
 #include 
 #include 
@@ -223,7 +223,7 @@ acpi_md_OsInstallInterruptHandler(uint32
 	void *ih;
 
 	ih = acpi_md_intr_establish(InterruptNumber, IPL_TTY, IST_LEVEL,
-	(int (*)(void *))ServiceRoutine, Context, false, xname);
+	(int (*)(void *))ServiceRoutine, Context, /*mpsafe*/true, xname);
 	if (ih == NULL)
 		return AE_NO_MEMORY;
 



CVS commit: src/sys/arch/x86/acpi

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:58:27 UTC 2022

Modified Files:
src/sys/arch/x86/acpi: acpi_machdep.c

Log Message:
x86/acpi: Mark acpica interrupt handlers MP-safe.

acpica has its own internal locking, and the interrupt handlers we
install with AcpiInstall*Handler (gpe, notify, ) also have their
own locking.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/acpi/acpi_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/dev/pci

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:57:58 UTC 2022

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

Log Message:
xhci(4): Mark PCI interrupt handler MP-safe.

xhci_intr has its own intr lock to coordinate with the MP-safe
softint it defers all its work to, other than reading and writing a
few registers to get and acknowledge the interrupt status.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/xhci_pci.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/xhci_pci.c
diff -u src/sys/dev/pci/xhci_pci.c:1.31 src/sys/dev/pci/xhci_pci.c:1.32
--- src/sys/dev/pci/xhci_pci.c:1.31	Tue Oct 11 09:18:22 2022
+++ src/sys/dev/pci/xhci_pci.c	Fri Oct 28 21:57:58 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci_pci.c,v 1.31 2022/10/11 09:18:22 msaitoh Exp $	*/
+/*	$NetBSD: xhci_pci.c,v 1.32 2022/10/28 21:57:58 riastradh Exp $	*/
 /*	OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.31 2022/10/11 09:18:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.32 2022/10/28 21:57:58 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -229,6 +229,7 @@ xhci_pci_attach(device_t parent, device_
 	}
 	intrstr = pci_intr_string(pc, psc->sc_pihp[0], intrbuf,
 	sizeof(intrbuf));
+	pci_intr_setattr(pa->pa_pc, >sc_pihp[0], PCI_INTR_MPSAFE, true);
 	psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pihp[0], IPL_USB,
 	xhci_intr, sc, device_xname(sc->sc_dev));
 	if (psc->sc_ih == NULL) {



CVS commit: src/sys/dev/pci

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:57:58 UTC 2022

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

Log Message:
xhci(4): Mark PCI interrupt handler MP-safe.

xhci_intr has its own intr lock to coordinate with the MP-safe
softint it defers all its work to, other than reading and writing a
few registers to get and acknowledge the interrupt status.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/xhci_pci.c

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-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:56:44 UTC 2022

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

Log Message:
ehci(4): Mark PCI interrupt handler MP-safe.

ehci_intr has its own intr lock to coordinate with the MP-safe
softint it defers all its work to, other than reading and writing a
few registers to get and acknowledge the interrupt status.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ehci_pci.c

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-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:56:44 UTC 2022

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

Log Message:
ehci(4): Mark PCI interrupt handler MP-safe.

ehci_intr has its own intr lock to coordinate with the MP-safe
softint it defers all its work to, other than reading and writing a
few registers to get and acknowledge the interrupt status.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ehci_pci.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/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.74 src/sys/dev/pci/ehci_pci.c:1.75
--- src/sys/dev/pci/ehci_pci.c:1.74	Sun Mar 13 11:29:21 2022
+++ src/sys/dev/pci/ehci_pci.c	Fri Oct 28 21:56:44 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.74 2022/03/13 11:29:21 riastradh Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.75 2022/10/28 21:56:44 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.74 2022/03/13 11:29:21 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.75 2022/10/28 21:56:44 riastradh Exp $");
 
 #include 
 #include 
@@ -196,6 +196,7 @@ ehci_pci_attach(device_t parent, device_
 	 * Allocate IRQ
 	 */
 	intrstr = pci_intr_string(pc, sc->sc_pihp[0], intrbuf, sizeof(intrbuf));
+	pci_intr_setattr(pa->pa_pc, >sc_pihp[0], PCI_INTR_MPSAFE, true);
 	sc->sc_ih = pci_intr_establish_xname(pc, sc->sc_pihp[0], IPL_USB,
 	ehci_intr, sc, device_xname(self));
 	if (sc->sc_ih == NULL) {



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:53:26 UTC 2022

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
callout(9): Sprinkle dtrace probes.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/kern/kern_timeout.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/kern/kern_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.71 src/sys/kern/kern_timeout.c:1.72
--- src/sys/kern/kern_timeout.c:1.71	Fri Oct 28 21:52:22 2022
+++ src/sys/kern/kern_timeout.c	Fri Oct 28 21:53:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.71 2022/10/28 21:52:22 riastradh Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.72 2022/10/28 21:53:26 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.71 2022/10/28 21:52:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.72 2022/10/28 21:53:26 riastradh Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -96,6 +96,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_timeout
 #include 
 #include 
 #include 
+#include 
 
 #ifdef DDB
 #include 
@@ -180,6 +181,7 @@ struct callout_cpu {
 	struct callout_circq cc_wheel[BUCKETS];	/* Queues of timeouts */
 	char		cc_name1[12];
 	char		cc_name2[12];
+	struct cpu_info	*cc_cpu;
 };
 
 #ifdef DDB
@@ -193,6 +195,57 @@ static void	callout_wait(callout_impl_t 
 static struct callout_cpu callout_cpu0 __cacheline_aligned;
 static void *callout_sih __read_mostly;
 
+SDT_PROBE_DEFINE2(sdt, kernel, callout, init,
+"struct callout *"/*ch*/,
+"unsigned"/*flags*/);
+SDT_PROBE_DEFINE1(sdt, kernel, callout, destroy,
+"struct callout *"/*ch*/);
+SDT_PROBE_DEFINE4(sdt, kernel, callout, setfunc,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+SDT_PROBE_DEFINE5(sdt, kernel, callout, schedule,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/,
+"int"/*ticks*/);
+SDT_PROBE_DEFINE6(sdt, kernel, callout, migrate,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/,
+"struct cpu_info *"/*ocpu*/,
+"struct cpu_info *"/*ncpu*/);
+SDT_PROBE_DEFINE4(sdt, kernel, callout, entry,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+SDT_PROBE_DEFINE4(sdt, kernel, callout, return,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+SDT_PROBE_DEFINE5(sdt, kernel, callout, stop,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/,
+"bool"/*expired*/);
+SDT_PROBE_DEFINE4(sdt, kernel, callout, halt,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+SDT_PROBE_DEFINE5(sdt, kernel, callout, halt__done,
+"struct callout *"/*ch*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/,
+"bool"/*expired*/);
+
 static inline kmutex_t *
 callout_lock(callout_impl_t *c)
 {
@@ -270,6 +323,7 @@ callout_init_cpu(struct cpu_info *ci)
 	evcnt_attach_dynamic(>cc_ev_block, EVCNT_TYPE_MISC,
 	NULL, "callout", cc->cc_name2);
 
+	cc->cc_cpu = ci;
 	ci->ci_data.cpu_callout = cc;
 }
 
@@ -287,6 +341,8 @@ callout_init(callout_t *cs, u_int flags)
 
 	KASSERT((flags & ~CALLOUT_FLAGMASK) == 0);
 
+	SDT_PROBE2(sdt, kernel, callout, init,  cs, flags);
+
 	cc = curcpu()->ci_data.cpu_callout;
 	c->c_func = NULL;
 	c->c_magic = CALLOUT_MAGIC;
@@ -309,6 +365,8 @@ callout_destroy(callout_t *cs)
 {
 	callout_impl_t *c = (callout_impl_t *)cs;
 
+	SDT_PROBE1(sdt, kernel, callout, destroy,  cs);
+
 	KASSERTMSG(c->c_magic == CALLOUT_MAGIC,
 	"callout %p: c_magic (%#x) != CALLOUT_MAGIC (%#x)",
 	c, c->c_magic, CALLOUT_MAGIC);
@@ -339,6 +397,9 @@ callout_schedule_locked(callout_impl_t *
 	struct callout_cpu *cc, *occ;
 	int old_time;
 
+	SDT_PROBE5(sdt, kernel, callout, schedule,
+	c, c->c_func, c->c_arg, c->c_flags, to_ticks);
+
 	KASSERT(to_ticks >= 0);
 	KASSERT(c->c_func != NULL);
 
@@ -377,6 +438,9 @@ callout_schedule_locked(callout_impl_t *
 		c->c_flags |= CALLOUT_PENDING;
 		CIRCQ_INSERT(>c_list, >cc_todo);
 		mutex_spin_exit(cc->cc_lock);
+		SDT_PROBE6(sdt, kernel, callout, migrate,
+		c, c->c_func, c->c_arg, c->c_flags,
+		occ->cc_cpu, cc->cc_cpu);
 	}
 	mutex_spin_exit(lock);
 }
@@ -397,6 +461,7 @@ callout_reset(callout_t *cs, int to_tick
 	KASSERT(func != NULL);
 
 	lock = callout_lock(c);
+	SDT_PROBE4(sdt, kernel, callout, setfunc,  cs, func, arg, c->c_flags);
 	c->c_func = func;
 	c->c_arg = arg;
 	callout_schedule_locked(c, lock, to_ticks);
@@ -454,6 +519,9 @@ 

CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:53:26 UTC 2022

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
callout(9): Sprinkle dtrace probes.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/kern/kern_timeout.c

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



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:52:22 UTC 2022

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
callout(9): Nix trailing whitespace.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/kern/kern_timeout.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/kern/kern_timeout.c
diff -u src/sys/kern/kern_timeout.c:1.70 src/sys/kern/kern_timeout.c:1.71
--- src/sys/kern/kern_timeout.c:1.70	Wed Jun 29 22:27:01 2022
+++ src/sys/kern/kern_timeout.c	Fri Oct 28 21:52:22 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_timeout.c,v 1.70 2022/06/29 22:27:01 riastradh Exp $	*/
+/*	$NetBSD: kern_timeout.c,v 1.71 2022/10/28 21:52:22 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.70 2022/06/29 22:27:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.71 2022/10/28 21:52:22 riastradh Exp $");
 
 /*
  * Timeouts are kept in a hierarchical timing wheel.  The c_time is the
@@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_timeout
  * We use the fact that any element added to the queue must be added with
  * a positive time.  That means that any element `to' on the queue cannot
  * be scheduled to timeout further in time than INT_MAX, but c->c_time can
- * be positive or negative so comparing it with anything is dangerous. 
+ * be positive or negative so comparing it with anything is dangerous.
  * The only way we can use the c->c_time value in any predictable way is
  * when we calculate how far in the future `to' will timeout - "c->c_time
  * - c->c_cpu->cc_ticks".  The result will always be positive for future
@@ -547,7 +547,7 @@ callout_wait(callout_impl_t *c, void *in
 		}
 
 		/*
-		 * Re-lock the callout and check the state of play again. 
+		 * Re-lock the callout and check the state of play again.
 		 * It's a common design pattern for callouts to re-schedule
 		 * themselves so put a stop to it again if needed.
 		 */



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:52:22 UTC 2022

Modified Files:
src/sys/kern: kern_timeout.c

Log Message:
callout(9): Nix trailing whitespace.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/kern/kern_timeout.c

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



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:52:02 UTC 2022

Modified Files:
src/sys/kern: kern_softint.c

Log Message:
softint(9): Sprinkle dtrace probes.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/kern/kern_softint.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/kern/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.71 src/sys/kern/kern_softint.c:1.72
--- src/sys/kern/kern_softint.c:1.71	Sat Sep  3 02:48:00 2022
+++ src/sys/kern/kern_softint.c	Fri Oct 28 21:52:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.71 2022/09/03 02:48:00 thorpej Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.72 2022/10/28 21:52:02 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.71 2022/09/03 02:48:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.72 2022/10/28 21:52:02 riastradh Exp $");
 
 #include 
 #include 
@@ -184,6 +184,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_softint
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -223,6 +224,31 @@ u_int		softint_timing;
 static u_int	softint_max;
 static kmutex_t	softint_lock;
 
+SDT_PROBE_DEFINE4(sdt, kernel, softint, establish,
+"void *"/*sih*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+
+SDT_PROBE_DEFINE1(sdt, kernel, softint, disestablish,
+"void *"/*sih*/);
+
+SDT_PROBE_DEFINE2(sdt, kernel, softint, schedule,
+"void *"/*sih*/,
+"struct cpu_info *"/*ci*/);
+
+SDT_PROBE_DEFINE4(sdt, kernel, softint, entry,
+"void *"/*sih*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+
+SDT_PROBE_DEFINE4(sdt, kernel, softint, return,
+"void *"/*sih*/,
+"void (*)(void *)"/*func*/,
+"void *"/*arg*/,
+"unsigned"/*flags*/);
+
 /*
  * softint_init_isr:
  *
@@ -382,6 +408,8 @@ softint_establish(u_int flags, void (*fu
 	}
 	mutex_exit(_lock);
 
+	SDT_PROBE4(sdt, kernel, softint, establish,  sih, func, arg, flags);
+
 	return sih;
 }
 
@@ -425,6 +453,12 @@ softint_disestablish(void *arg)
 	 */
 	xc_barrier(XC_HIGHPRI_IPL(sh->sh_isr->si_ipl));
 
+	/*
+	 * Notify dtrace probe when the old softint can't be running
+	 * any more, but before it can be recycled for a new softint.
+	 */
+	SDT_PROBE1(sdt, kernel, softint, disestablish,  arg);
+
 	/* Clear the handler on each CPU. */
 	mutex_enter(_lock);
 	for (CPU_INFO_FOREACH(cii, ci)) {
@@ -451,6 +485,8 @@ softint_schedule(void *arg)
 	uintptr_t offset;
 	int s;
 
+	SDT_PROBE2(sdt, kernel, softint, schedule,  arg, /*ci*/NULL);
+
 	/*
 	 * If this assert fires, rather than disabling preemption explicitly
 	 * to make it stop, consider that you are probably using a softint
@@ -503,6 +539,7 @@ softint_schedule_cpu(void *arg, struct c
 		const uintptr_t offset = (uintptr_t)arg;
 		const softhand_t *sh;
 
+		SDT_PROBE2(sdt, kernel, softint, schedule,  arg, ci);
 		sh = (const softhand_t *)((const uint8_t *)sc + offset);
 		KASSERT((sh->sh_flags & SOFTINT_RCPU) != 0);
 		ipi_trigger(sh->sh_ipi_id, ci);
@@ -550,6 +587,10 @@ softint_execute(lwp_t *l, int s)
 		splx(s);
 
 		/* Run the handler. */
+		SDT_PROBE4(sdt, kernel, softint, entry,
+		((const char *)sh -
+			(const char *)curcpu()->ci_data.cpu_softcpu),
+		sh->sh_func, sh->sh_arg, sh->sh_flags);
 		if (__predict_true((sh->sh_flags & SOFTINT_MPSAFE) != 0)) {
 			(*sh->sh_func)(sh->sh_arg);
 		} else {
@@ -557,6 +598,10 @@ softint_execute(lwp_t *l, int s)
 			(*sh->sh_func)(sh->sh_arg);
 			KERNEL_UNLOCK_ONE(l);
 		}
+		SDT_PROBE4(sdt, kernel, softint, return,
+		((const char *)sh -
+			(const char *)curcpu()->ci_data.cpu_softcpu),
+		sh->sh_func, sh->sh_arg, sh->sh_flags);
 
 		/* Diagnostic: check that spin-locks have not leaked. */
 		KASSERTMSG(curcpu()->ci_mtx_count == 0,



CVS commit: src/sys/kern

2022-10-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Oct 28 21:52:02 UTC 2022

Modified Files:
src/sys/kern: kern_softint.c

Log Message:
softint(9): Sprinkle dtrace probes.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/kern/kern_softint.c

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



CVS commit: src/doc

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:39:23 UTC 2022

Modified Files:
src/doc: CHANGES

Log Message:
Update date on previous


To generate a diff of this commit:
cvs rdiff -u -r1.2925 -r1.2926 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.2925 src/doc/CHANGES:1.2926
--- src/doc/CHANGES:1.2925	Fri Oct 28 20:38:58 2022
+++ src/doc/CHANGES	Fri Oct 28 20:39:23 2022
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2925 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2926 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -711,4 +711,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		[jmcneill 20221015]
 	libc: put reallocarray(3) in the public namespace
 	evbarm: Update Xilinx Zynq-7000 SoC support to use FDT based
-		configuration. [jmcneill 20191028]
+		configuration. [jmcneill 20221028]



CVS commit: src/doc

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:39:23 UTC 2022

Modified Files:
src/doc: CHANGES

Log Message:
Update date on previous


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

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



CVS commit: src/doc

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:38:58 UTC 2022

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Update Xilinx Zynq-7000 SoC support to use FDT based configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.2924 -r1.2925 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.2924 src/doc/CHANGES:1.2925
--- src/doc/CHANGES:1.2924	Fri Oct 28 09:44:52 2022
+++ src/doc/CHANGES	Fri Oct 28 20:38:58 2022
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2924 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2925 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -710,3 +710,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	evbarm: Add support for Oracle Cloud virtual machines.
 		[jmcneill 20221015]
 	libc: put reallocarray(3) in the public namespace
+	evbarm: Update Xilinx Zynq-7000 SoC support to use FDT based
+		configuration. [jmcneill 20191028]



CVS commit: src/doc

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:38:58 UTC 2022

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Update Xilinx Zynq-7000 SoC support to use FDT based configuration.


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

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



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

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:37:47 UTC 2022

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

Log Message:
Remove commented out reference to zynqslcr driver that doesn't exist.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/evbarm/conf/GENERIC

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

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.110 src/sys/arch/evbarm/conf/GENERIC:1.111
--- src/sys/arch/evbarm/conf/GENERIC:1.110	Thu Oct 27 09:41:28 2022
+++ src/sys/arch/evbarm/conf/GENERIC	Fri Oct 28 20:37:47 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.110 2022/10/27 09:41:28 jmcneill Exp $
+#	$NetBSD: GENERIC,v 1.111 2022/10/28 20:37:47 jmcneill Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -185,7 +185,6 @@ sunxisramc* 	at fdt? pass 4		# SRAM cont
 imxocotp0 	at fdt? pass 2		# On-Chip OTP Controller
 syscon*		at fdt? pass 1		# Generic System Controller
 tisysc*		at fdt? pass 2		# TI sysc interconnect
-#zynqslcr* 	at fdt? pass 1		# Zynq 7000 system Controller
 
 # Timer
 a9ptmr* 	at fdt? pass 2		# ARM Cortex A5/A9 Private Timer



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

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:37:47 UTC 2022

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

Log Message:
Remove commented out reference to zynqslcr driver that doesn't exist.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/evbarm/conf/GENERIC

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



CVS commit: src/sys/arch

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:37:04 UTC 2022

Modified Files:
src/sys/arch/arm/xilinx: zynq_platform.c
src/sys/arch/evbarm: Makefile
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/arm/zynq: files.zynq zynq7000_board.c zynq7000_intr.h
zynq7000_reg.h zynq7000_sdhc.c zynq7000_uart.c zynq7000_usb.c
zynq7000_var.h zynq_axi.c zynq_cemac.c zynq_dma.c zynq_slcr.c
zynq_slcrreg.h zynq_slcrvar.h zynq_space.c zynq_uart.c
zynq_uartreg.h zynq_uartvar.h zynq_usb.c zynq_usbreg.h
zynq_usbvar.h
src/sys/arch/evbarm/conf: PARALLELLA ZEDBOARD files.parallella
files.zedboard files.zynq mk.zynq std.zynq
src/sys/arch/evbarm/zynq: platform.h zynq_machdep.c

Log Message:
Retire PARALLELLA and ZEDBOARD kernel configs.

The Zynq-7000 port has been converted to Devicetree and is supported
by the GENERIC kernel now.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/xilinx/zynq_platform.c
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/zynq/files.zynq \
src/sys/arch/arm/zynq/zynq7000_reg.h src/sys/arch/arm/zynq/zynq7000_var.h \
src/sys/arch/arm/zynq/zynq_dma.c src/sys/arch/arm/zynq/zynq_usbreg.h \
src/sys/arch/arm/zynq/zynq_usbvar.h
cvs rdiff -u -r1.5 -r0 src/sys/arch/arm/zynq/zynq7000_board.c \
src/sys/arch/arm/zynq/zynq_uart.c
cvs rdiff -u -r1.1 -r0 src/sys/arch/arm/zynq/zynq7000_intr.h \
src/sys/arch/arm/zynq/zynq7000_sdhc.c \
src/sys/arch/arm/zynq/zynq7000_uart.c \
src/sys/arch/arm/zynq/zynq7000_usb.c src/sys/arch/arm/zynq/zynq_cemac.c \
src/sys/arch/arm/zynq/zynq_slcr.c src/sys/arch/arm/zynq/zynq_slcrreg.h \
src/sys/arch/arm/zynq/zynq_slcrvar.h src/sys/arch/arm/zynq/zynq_uartreg.h \
src/sys/arch/arm/zynq/zynq_uartvar.h
cvs rdiff -u -r1.3 -r0 src/sys/arch/arm/zynq/zynq_axi.c
cvs rdiff -u -r1.4 -r0 src/sys/arch/arm/zynq/zynq_space.c
cvs rdiff -u -r1.7 -r0 src/sys/arch/arm/zynq/zynq_usb.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/Makefile
cvs rdiff -u -r1.9 -r0 src/sys/arch/evbarm/conf/PARALLELLA
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/conf/README.evbarm
cvs rdiff -u -r1.8 -r0 src/sys/arch/evbarm/conf/ZEDBOARD
cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/files.parallella \
src/sys/arch/evbarm/conf/files.zedboard
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/files.zynq \
src/sys/arch/evbarm/conf/mk.zynq
cvs rdiff -u -r1.7 -r0 src/sys/arch/evbarm/conf/std.zynq
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/zynq/platform.h
cvs rdiff -u -r1.17 -r0 src/sys/arch/evbarm/zynq/zynq_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/xilinx/zynq_platform.c
diff -u src/sys/arch/arm/xilinx/zynq_platform.c:1.8 src/sys/arch/arm/xilinx/zynq_platform.c:1.9
--- src/sys/arch/arm/xilinx/zynq_platform.c:1.8	Thu Oct 27 20:37:10 2022
+++ src/sys/arch/arm/xilinx/zynq_platform.c	Fri Oct 28 20:37:03 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: zynq_platform.c,v 1.8 2022/10/27 20:37:10 jmcneill Exp $	*/
+/*	$NetBSD: zynq_platform.c,v 1.9 2022/10/28 20:37:03 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include "arml2cc.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zynq_platform.c,v 1.8 2022/10/27 20:37:10 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zynq_platform.c,v 1.9 2022/10/28 20:37:03 jmcneill Exp $");
 
 #include 
 #include 
@@ -75,7 +75,7 @@ __KERNEL_RCSID(0, "$NetBSD: zynq_platfor
 
 #define ZYNQ_ARMCORE_VBASE	(ZYNQ_GPV_VBASE + ZYNQ_GPV_SIZE)
 #define ZYNQ_ARMCORE_PBASE	0xf8f0
-#define ZYNQ_ARMCORE_SIZE	0x3000
+#define ZYNQ_ARMCORE_SIZE	0x0010
 
 #define	ZYNQ_OCM_VBASE		(ZYNQ_ARMCORE_VBASE + ZYNQ_ARMCORE_SIZE)
 #define	ZYNQ_OCM_PBASE		0xfff0

Index: src/sys/arch/evbarm/Makefile
diff -u src/sys/arch/evbarm/Makefile:1.10 src/sys/arch/evbarm/Makefile:1.11
--- src/sys/arch/evbarm/Makefile:1.10	Fri Jan 23 12:34:09 2015
+++ src/sys/arch/evbarm/Makefile	Fri Oct 28 20:37:04 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2015/01/23 12:34:09 hkenken Exp $
+#	$NetBSD: Makefile,v 1.11 2022/10/28 20:37:04 jmcneill Exp $
 
 # Makefile for evbarm tags file and boot blocks
 
@@ -39,7 +39,6 @@ SEVBARM+=	${SYSDIR}/arch/evbarm/smdk2xx0
 SEVBARM+=	${SYSDIR}/arch/evbarm/tisdp24xx/*.[ch]
 SEVBARM+=	${SYSDIR}/arch/evbarm/tsarm/*.[ch]
 SEVBARM+=	${SYSDIR}/arch/evbarm/viper/*.[ch]
-SEVBARM+=	${SYSDIR}/arch/evbarm/zynq/*.[ch]
 SEVBARM+=	${SYSDIR}/arch/arm/xscale/*.[ch]
 
 AEVBARM=	${SYSDIR}/arch/evbarm/adi_brh/*.S
@@ -67,7 +66,6 @@ AEVBARM+=	${SYSDIR}/arch/arm/xscale/*.S
 AEVBARM+=	${SYSDIR}/arch/evbarm/integrator/*.S
 AEVBARM+=	${SYSDIR}/arch/evbarm/iq80310/*.S
 AEVBARM+=	${SYSDIR}/arch/evbarm/iq80321/*.S
-AEVBARM+=	${SYSDIR}/arch/evbarm/zynq/*.S
 
 # Directories in which to place tags links
 DEVBARM=	include

Index: 

CVS commit: src/sys/arch

2022-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct 28 20:37:04 UTC 2022

Modified Files:
src/sys/arch/arm/xilinx: zynq_platform.c
src/sys/arch/evbarm: Makefile
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/arm/zynq: files.zynq zynq7000_board.c zynq7000_intr.h
zynq7000_reg.h zynq7000_sdhc.c zynq7000_uart.c zynq7000_usb.c
zynq7000_var.h zynq_axi.c zynq_cemac.c zynq_dma.c zynq_slcr.c
zynq_slcrreg.h zynq_slcrvar.h zynq_space.c zynq_uart.c
zynq_uartreg.h zynq_uartvar.h zynq_usb.c zynq_usbreg.h
zynq_usbvar.h
src/sys/arch/evbarm/conf: PARALLELLA ZEDBOARD files.parallella
files.zedboard files.zynq mk.zynq std.zynq
src/sys/arch/evbarm/zynq: platform.h zynq_machdep.c

Log Message:
Retire PARALLELLA and ZEDBOARD kernel configs.

The Zynq-7000 port has been converted to Devicetree and is supported
by the GENERIC kernel now.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/xilinx/zynq_platform.c
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/zynq/files.zynq \
src/sys/arch/arm/zynq/zynq7000_reg.h src/sys/arch/arm/zynq/zynq7000_var.h \
src/sys/arch/arm/zynq/zynq_dma.c src/sys/arch/arm/zynq/zynq_usbreg.h \
src/sys/arch/arm/zynq/zynq_usbvar.h
cvs rdiff -u -r1.5 -r0 src/sys/arch/arm/zynq/zynq7000_board.c \
src/sys/arch/arm/zynq/zynq_uart.c
cvs rdiff -u -r1.1 -r0 src/sys/arch/arm/zynq/zynq7000_intr.h \
src/sys/arch/arm/zynq/zynq7000_sdhc.c \
src/sys/arch/arm/zynq/zynq7000_uart.c \
src/sys/arch/arm/zynq/zynq7000_usb.c src/sys/arch/arm/zynq/zynq_cemac.c \
src/sys/arch/arm/zynq/zynq_slcr.c src/sys/arch/arm/zynq/zynq_slcrreg.h \
src/sys/arch/arm/zynq/zynq_slcrvar.h src/sys/arch/arm/zynq/zynq_uartreg.h \
src/sys/arch/arm/zynq/zynq_uartvar.h
cvs rdiff -u -r1.3 -r0 src/sys/arch/arm/zynq/zynq_axi.c
cvs rdiff -u -r1.4 -r0 src/sys/arch/arm/zynq/zynq_space.c
cvs rdiff -u -r1.7 -r0 src/sys/arch/arm/zynq/zynq_usb.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/Makefile
cvs rdiff -u -r1.9 -r0 src/sys/arch/evbarm/conf/PARALLELLA
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/conf/README.evbarm
cvs rdiff -u -r1.8 -r0 src/sys/arch/evbarm/conf/ZEDBOARD
cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/files.parallella \
src/sys/arch/evbarm/conf/files.zedboard
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/files.zynq \
src/sys/arch/evbarm/conf/mk.zynq
cvs rdiff -u -r1.7 -r0 src/sys/arch/evbarm/conf/std.zynq
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/zynq/platform.h
cvs rdiff -u -r1.17 -r0 src/sys/arch/evbarm/zynq/zynq_machdep.c

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



CVS commit: src/doc

2022-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Oct 28 09:44:53 UTC 2022

Modified Files:
src/doc: CHANGES

Log Message:
mention reallocarray change


To generate a diff of this commit:
cvs rdiff -u -r1.2923 -r1.2924 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.2923 src/doc/CHANGES:1.2924
--- src/doc/CHANGES:1.2923	Wed Oct 19 18:16:01 2022
+++ src/doc/CHANGES	Fri Oct 28 09:44:52 2022
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2923 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2924 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -709,3 +709,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		recent. [mrg 20221015]
 	evbarm: Add support for Oracle Cloud virtual machines.
 		[jmcneill 20221015]
+	libc: put reallocarray(3) in the public namespace



CVS commit: src/doc

2022-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Oct 28 09:44:53 UTC 2022

Modified Files:
src/doc: CHANGES

Log Message:
mention reallocarray change


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

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



CVS commit: src

2022-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Oct 28 09:43:59 UTC 2022

Modified Files:
src/external/mit/xorg/bin/fslsfonts: Makefile
src/external/mit/xorg/bin/xauth: Makefile
src/external/mit/xorg/bin/xrdb: Makefile
src/external/mit/xorg/lib/libFS: Makefile
src/external/mit/xorg/lib/libX11: Makefile.libx11
src/external/mit/xorg/lib/libXfont2: Makefile
src/external/mit/xorg/lib/libfontenc: Makefile
src/external/mit/xorg/server/xorg-server: Makefile.serverlib
Makefile.servermod
src/external/mit/xorg/server/xorg-server/hw/netbsd/x68k: Makefile
src/external/mit/xorg/server/xorg-server/hw/sun: Makefile.Xsun
src/external/mit/xorg/server/xorg-server/hw/vfb: Makefile
src/external/mit/xorg/server/xorg-server/os: Makefile
src/include: stdlib.h
src/lib/libc/stdlib: reallocarray.3 reallocarray.c

Log Message:
put reallocarray() in the public namespace

reallocarray() will be part of the next POSIX release, see
https://austingroupbugs.net/view.php?id=1218

adapt an errno value to match POSIX expectations

As discussed on tech-userlevel


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/bin/fslsfonts/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/mit/xorg/bin/xauth/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/mit/xorg/bin/xrdb/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libFS/Makefile
cvs rdiff -u -r1.24 -r1.25 src/external/mit/xorg/lib/libX11/Makefile.libx11
cvs rdiff -u -r1.10 -r1.11 src/external/mit/xorg/lib/libXfont2/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libfontenc/Makefile
cvs rdiff -u -r1.16 -r1.17 \
src/external/mit/xorg/server/xorg-server/Makefile.serverlib
cvs rdiff -u -r1.9 -r1.10 \
src/external/mit/xorg/server/xorg-server/Makefile.servermod
cvs rdiff -u -r1.13 -r1.14 \
src/external/mit/xorg/server/xorg-server/hw/netbsd/x68k/Makefile
cvs rdiff -u -r1.7 -r1.8 \
src/external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun
cvs rdiff -u -r1.22 -r1.23 \
src/external/mit/xorg/server/xorg-server/hw/vfb/Makefile
cvs rdiff -u -r1.18 -r1.19 \
src/external/mit/xorg/server/xorg-server/os/Makefile
cvs rdiff -u -r1.124 -r1.125 src/include/stdlib.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdlib/reallocarray.3
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdlib/reallocarray.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/mit/xorg/bin/fslsfonts/Makefile
diff -u src/external/mit/xorg/bin/fslsfonts/Makefile:1.4 src/external/mit/xorg/bin/fslsfonts/Makefile:1.5
--- src/external/mit/xorg/bin/fslsfonts/Makefile:1.4	Sun Oct 16 23:38:02 2022
+++ src/external/mit/xorg/bin/fslsfonts/Makefile	Fri Oct 28 09:43:58 2022
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2022/10/16 23:38:02 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2022/10/28 09:43:58 wiz Exp $
 
 .include 
 
 PROG=	fslsfonts
 
-CPPFLAGS+=	-DHAVE_REALLOCARRAY -D_OPENBSD_SOURCE
+CPPFLAGS+=	-DHAVE_REALLOCARRAY
 
 LDADD+=	-lFS
 DPADD+=	${LIBFS}

Index: src/external/mit/xorg/bin/xauth/Makefile
diff -u src/external/mit/xorg/bin/xauth/Makefile:1.8 src/external/mit/xorg/bin/xauth/Makefile:1.9
--- src/external/mit/xorg/bin/xauth/Makefile:1.8	Mon Apr 12 06:08:30 2021
+++ src/external/mit/xorg/bin/xauth/Makefile	Fri Oct 28 09:43:58 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2021/04/12 06:08:30 mrg Exp $
+#	$NetBSD: Makefile,v 1.9 2022/10/28 09:43:58 wiz Exp $
 
 .include 
 
@@ -7,6 +7,7 @@ SRCS=	xauth.c gethost.c process.c parsed
 
 CPPFLAGS+=		-DRETSIGTYPE=void -DPACKAGE_VERSION=\"1.0.8\"
 CPPFLAGS+= 		-DHAVE_STRLCPY
+CPPFLAGS+= 		-DHAVE_REALLOCARRAY
 CPPFLAGS.gethost.c=	${X11FLAGS.CONNECTION}
 CPPFLAGS.parsedpy.c=	${X11FLAGS.CONNECTION}
 

Index: src/external/mit/xorg/bin/xrdb/Makefile
diff -u src/external/mit/xorg/bin/xrdb/Makefile:1.9 src/external/mit/xorg/bin/xrdb/Makefile:1.10
--- src/external/mit/xorg/bin/xrdb/Makefile:1.9	Mon Sep 19 18:46:06 2022
+++ src/external/mit/xorg/bin/xrdb/Makefile	Fri Oct 28 09:43:58 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2022/09/19 18:46:06 christos Exp $
+#	$NetBSD: Makefile,v 1.10 2022/10/28 09:43:58 wiz Exp $
 
 .include 
 
@@ -6,6 +6,7 @@ PROG=	xrdb
 
 CPPFLAGS+=-DCPP="\"/usr/bin/tradcpp -nostdinc\"" -DHAVE_MKSTEMP	# XXX
 CPPFLAGS+=-DHAVE_ASPRINTF
+CPPFLAGS+=-DHAVE_REALLOCARRAY
 
 LDADD+=	-lXmuu -lXt -lSM -lICE -lXext -lX11
 DPADD+=	${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}

Index: src/external/mit/xorg/lib/libFS/Makefile
diff -u src/external/mit/xorg/lib/libFS/Makefile:1.4 src/external/mit/xorg/lib/libFS/Makefile:1.5
--- src/external/mit/xorg/lib/libFS/Makefile:1.4	Fri Sep  9 03:46:29 2022
+++ src/external/mit/xorg/lib/libFS/Makefile	Fri Oct 28 09:43:58 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2022/09/09 03:46:29 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2022/10/28 09:43:58 wiz Exp $
 
 

CVS commit: src

2022-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Oct 28 09:43:59 UTC 2022

Modified Files:
src/external/mit/xorg/bin/fslsfonts: Makefile
src/external/mit/xorg/bin/xauth: Makefile
src/external/mit/xorg/bin/xrdb: Makefile
src/external/mit/xorg/lib/libFS: Makefile
src/external/mit/xorg/lib/libX11: Makefile.libx11
src/external/mit/xorg/lib/libXfont2: Makefile
src/external/mit/xorg/lib/libfontenc: Makefile
src/external/mit/xorg/server/xorg-server: Makefile.serverlib
Makefile.servermod
src/external/mit/xorg/server/xorg-server/hw/netbsd/x68k: Makefile
src/external/mit/xorg/server/xorg-server/hw/sun: Makefile.Xsun
src/external/mit/xorg/server/xorg-server/hw/vfb: Makefile
src/external/mit/xorg/server/xorg-server/os: Makefile
src/include: stdlib.h
src/lib/libc/stdlib: reallocarray.3 reallocarray.c

Log Message:
put reallocarray() in the public namespace

reallocarray() will be part of the next POSIX release, see
https://austingroupbugs.net/view.php?id=1218

adapt an errno value to match POSIX expectations

As discussed on tech-userlevel


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/bin/fslsfonts/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/mit/xorg/bin/xauth/Makefile
cvs rdiff -u -r1.9 -r1.10 src/external/mit/xorg/bin/xrdb/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libFS/Makefile
cvs rdiff -u -r1.24 -r1.25 src/external/mit/xorg/lib/libX11/Makefile.libx11
cvs rdiff -u -r1.10 -r1.11 src/external/mit/xorg/lib/libXfont2/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libfontenc/Makefile
cvs rdiff -u -r1.16 -r1.17 \
src/external/mit/xorg/server/xorg-server/Makefile.serverlib
cvs rdiff -u -r1.9 -r1.10 \
src/external/mit/xorg/server/xorg-server/Makefile.servermod
cvs rdiff -u -r1.13 -r1.14 \
src/external/mit/xorg/server/xorg-server/hw/netbsd/x68k/Makefile
cvs rdiff -u -r1.7 -r1.8 \
src/external/mit/xorg/server/xorg-server/hw/sun/Makefile.Xsun
cvs rdiff -u -r1.22 -r1.23 \
src/external/mit/xorg/server/xorg-server/hw/vfb/Makefile
cvs rdiff -u -r1.18 -r1.19 \
src/external/mit/xorg/server/xorg-server/os/Makefile
cvs rdiff -u -r1.124 -r1.125 src/include/stdlib.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdlib/reallocarray.3
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdlib/reallocarray.c

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



CVS commit: src/sys/sys

2022-10-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Oct 28 08:16:57 UTC 2022

Modified Files:
src/sys/sys: param.h

Log Message:
Bump the version for inpcb changes

Welcome to 9.99.104


To generate a diff of this commit:
cvs rdiff -u -r1.716 -r1.717 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.716 src/sys/sys/param.h:1.717
--- src/sys/sys/param.h:1.716	Thu Oct 27 00:26:20 2022
+++ src/sys/sys/param.h	Fri Oct 28 08:16:57 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.716 2022/10/27 00:26:20 msaitoh Exp $	*/
+/*	$NetBSD: param.h,v 1.717 2022/10/28 08:16:57 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999010300	/* NetBSD 9.99.103 */
+#define	__NetBSD_Version__	999010400	/* NetBSD 9.99.104 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys/sys

2022-10-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Oct 28 08:16:57 UTC 2022

Modified Files:
src/sys/sys: param.h

Log Message:
Bump the version for inpcb changes

Welcome to 9.99.104


To generate a diff of this commit:
cvs rdiff -u -r1.716 -r1.717 src/sys/sys/param.h

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



CVS commit: src/sys

2022-10-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 28 07:16:34 UTC 2022

Modified Files:
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/arm/conf: files.arm
src/sys/arch/x86/conf: files.x86
src/sys/conf: files
src/sys/uvm/pmap: pmap.c

Log Message:
MI PMAP EFI_RUNTIME support


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/x86/conf/files.x86
cvs rdiff -u -r1.1301 -r1.1302 src/sys/conf/files
cvs rdiff -u -r1.71 -r1.72 src/sys/uvm/pmap/pmap.c

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



CVS commit: src/sys

2022-10-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 28 07:16:34 UTC 2022

Modified Files:
src/sys/arch/aarch64/conf: files.aarch64
src/sys/arch/arm/conf: files.arm
src/sys/arch/x86/conf: files.x86
src/sys/conf: files
src/sys/uvm/pmap: pmap.c

Log Message:
MI PMAP EFI_RUNTIME support


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/aarch64/conf/files.aarch64
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/x86/conf/files.x86
cvs rdiff -u -r1.1301 -r1.1302 src/sys/conf/files
cvs rdiff -u -r1.71 -r1.72 src/sys/uvm/pmap/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/conf/files.aarch64
diff -u src/sys/arch/aarch64/conf/files.aarch64:1.39 src/sys/arch/aarch64/conf/files.aarch64:1.40
--- src/sys/arch/aarch64/conf/files.aarch64:1.39	Sat Oct 15 11:07:38 2022
+++ src/sys/arch/aarch64/conf/files.aarch64	Fri Oct 28 07:16:34 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.aarch64,v 1.39 2022/10/15 11:07:38 jmcneill Exp $
+#	$NetBSD: files.aarch64,v 1.40 2022/10/28 07:16:34 skrll Exp $
 
 defflag opt_cpuoptions.h	AARCH64_ALIGNMENT_CHECK
 defflag opt_cpuoptions.h	AARCH64_EL0_STACK_ALIGNMENT_CHECK
@@ -47,7 +47,6 @@ file	arch/arm/arm/psci.c			psci
 file	arch/arm/arm/psci_arm.S			psci
 
 # EFI support
-defflag	opt_efi.h		EFI_RUNTIME
 file	arch/arm/arm/efi_runtime.c		efi_runtime
 
 # PMAP options

Index: src/sys/arch/arm/conf/files.arm
diff -u src/sys/arch/arm/conf/files.arm:1.166 src/sys/arch/arm/conf/files.arm:1.167
--- src/sys/arch/arm/conf/files.arm:1.166	Sat Apr  2 11:16:07 2022
+++ src/sys/arch/arm/conf/files.arm	Fri Oct 28 07:16:34 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.arm,v 1.166 2022/04/02 11:16:07 skrll Exp $
+#	$NetBSD: files.arm,v 1.167 2022/10/28 07:16:34 skrll Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defflagARM32
@@ -109,7 +109,6 @@ file	arch/arm/arm/psci.c			psci
 file	arch/arm/arm/psci_arm.S			psci
 
 # EFI support
-defflag	opt_efi.h		EFI_RUNTIME
 file	arch/arm/arm/efi_runtime.c		efi_runtime
 
 # New PMAP options

Index: src/sys/arch/x86/conf/files.x86
diff -u src/sys/arch/x86/conf/files.x86:1.124 src/sys/arch/x86/conf/files.x86:1.125
--- src/sys/arch/x86/conf/files.x86:1.124	Sat Sep 24 11:05:18 2022
+++ src/sys/arch/x86/conf/files.x86	Fri Oct 28 07:16:34 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.x86,v 1.124 2022/09/24 11:05:18 riastradh Exp $
+#	$NetBSD: files.x86,v 1.125 2022/10/28 07:16:34 skrll Exp $
 
 # options for MP configuration through the MP spec
 defflag opt_mpbios.h MPBIOS MPDEBUG MPBIOS_SCANPCI
@@ -21,8 +21,6 @@ defflag	opt_xen.h		DO_NOT_DEFINE
 # Option to have a static kernel memory layout
 defflag opt_kaslr.h	NO_X86_ASLR
 
-defflag opt_efi.h	EFI_RUNTIME
-
 defflag	SVS
 
 defflag	PCPU_IDT

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1301 src/sys/conf/files:1.1302
--- src/sys/conf/files:1.1301	Sun Jul 24 18:04:48 2022
+++ src/sys/conf/files	Fri Oct 28 07:16:34 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1301 2022/07/24 18:04:48 mrg Exp $
+#	$NetBSD: files,v 1.1302 2022/10/28 07:16:34 skrll Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -144,6 +144,8 @@ defflag opt_todr.h		TODR_DEBUG
 
 defparam opt_maxlwp.h		MAXLWP
 
+defflag opt_efi.h		EFI_RUNTIME
+
 # compatibility options
 #
 defflag opt_compat_netbsd.h	COMPAT_NETBSD

Index: src/sys/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.71 src/sys/uvm/pmap/pmap.c:1.72
--- src/sys/uvm/pmap/pmap.c:1.71	Thu Oct 27 06:20:41 2022
+++ src/sys/uvm/pmap/pmap.c	Fri Oct 28 07:16:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.71 2022/10/27 06:20:41 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.72 2022/10/28 07:16:34 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.71 2022/10/27 06:20:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.72 2022/10/28 07:16:34 skrll Exp $");
 
 /*
  *	Manages physical address maps.
@@ -96,6 +96,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.7
  */
 
 #include "opt_ddb.h"
+#include "opt_efi.h"
 #include "opt_modular.h"
 #include "opt_multiprocessor.h"
 #include "opt_sysv.h"
@@ -157,6 +158,7 @@ PMAP_COUNTER(kernel_mappings_changed, "k
 PMAP_COUNTER(uncached_mappings, "uncached pages mapped");
 PMAP_COUNTER(unmanaged_mappings, "unmanaged pages mapped");
 PMAP_COUNTER(pvtracked_mappings, "pv-tracked unmanaged pages mapped");
+PMAP_COUNTER(efirt_mappings, "EFI RT pages mapped");
 PMAP_COUNTER(managed_mappings, "managed pages mapped");
 PMAP_COUNTER(mappings, "pages mapped");
 PMAP_COUNTER(remappings, "pages remapped");
@@ -237,6 +239,22 @@ struct pmap_kernel kernel_pmap_store = {
 
 struct pmap * const kernel_pmap_ptr = _pmap_store.kernel_pmap;
 
+#if defined(EFI_RUNTIME)
+static struct pmap efirt_pmap;
+
+pmap_t

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

2022-10-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 28 06:22:26 UTC 2022

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

Log Message:
Remove some empty lines


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/aarch64/aarch64/pmap.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.143 src/sys/arch/aarch64/aarch64/pmap.c:1.144
--- src/sys/arch/aarch64/aarch64/pmap.c:1.143	Sun Oct 23 07:04:44 2022
+++ src/sys/arch/aarch64/aarch64/pmap.c	Fri Oct 28 06:22:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.143 2022/10/23 07:04:44 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.144 2022/10/28 06:22:26 skrll Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.143 2022/10/23 07:04:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.144 2022/10/28 06:22:26 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -199,7 +199,6 @@ static int _pmap_get_pdp(struct pmap *, 
 struct vm_page **);
 
 static struct pmap kernel_pmap __cacheline_aligned;
-
 struct pmap * const kernel_pmap_ptr = _pmap;
 
 #if defined(EFI_RUNTIME)
@@ -2873,7 +2872,6 @@ kvtopte(vaddr_t va)
 }
 
 #ifdef DDB
-
 void
 pmap_db_pmap_print(struct pmap *pm,
 void (*pr)(const char *, ...) __printflike(1, 2))
@@ -2886,4 +2884,3 @@ pmap_db_pmap_print(struct pmap *pm,
 	pr(" pm_activated  = %d\n\n", pm->pm_activated);
 }
 #endif /* DDB */
-



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

2022-10-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct 28 06:22:26 UTC 2022

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

Log Message:
Remove some empty lines


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/aarch64/aarch64/pmap.c

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