CVS commit: src/sys/arch/alpha/alpha

2024-03-31 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar 31 19:06:31 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: api_up1000.c autoconf.c dec_1000a.c
dec_2000_300.c dec_2100_a50.c dec_2100_a500.c dec_3000_300.c
dec_3000_500.c dec_550.c dec_6600.c dec_alphabook1.c
dec_axppci_33.c dec_eb164.c dec_eb64plus.c dec_eb66.c dec_kn20aa.c
dec_kn300.c dec_kn8ae.c

Log Message:
Always call platform.device_register(), even if bootdev_data is NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/alpha/api_up1000.c
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/alpha/autoconf.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/alpha/dec_1000a.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/alpha/alpha/dec_2000_300.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/alpha/alpha/dec_2100_a50.c \
src/sys/arch/alpha/alpha/dec_axppci_33.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/alpha/dec_2100_a500.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/alpha/dec_3000_300.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/alpha/alpha/dec_3000_500.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/alpha/dec_550.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/alpha/alpha/dec_6600.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/alpha/dec_alphabook1.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/alpha/alpha/dec_eb164.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/alpha/dec_eb64plus.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/alpha/alpha/dec_eb66.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/alpha/alpha/dec_kn20aa.c
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/alpha/alpha/dec_kn300.c \
src/sys/arch/alpha/alpha/dec_kn8ae.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/alpha/alpha/api_up1000.c
diff -u src/sys/arch/alpha/alpha/api_up1000.c:1.32 src/sys/arch/alpha/alpha/api_up1000.c:1.33
--- src/sys/arch/alpha/alpha/api_up1000.c:1.32	Mon Dec  4 00:32:10 2023
+++ src/sys/arch/alpha/alpha/api_up1000.c	Sun Mar 31 19:06:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: api_up1000.c,v 1.32 2023/12/04 00:32:10 thorpej Exp $ */
+/* $NetBSD: api_up1000.c,v 1.33 2024/03/31 19:06:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -34,7 +34,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: api_up1000.c,v 1.32 2023/12/04 00:32:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: api_up1000.c,v 1.33 2024/03/31 19:06:30 thorpej Exp $");
 
 #include 
 #include 
@@ -178,7 +178,7 @@ api_up1000_device_register(device_t dev,
 	struct bootdev_data *b = bootdev_data;
 	device_t parent = device_parent(dev);
 
-	if (found)
+	if (b == NULL || found)
 		return;
 
 	if (!initted) {

Index: src/sys/arch/alpha/alpha/autoconf.c
diff -u src/sys/arch/alpha/alpha/autoconf.c:1.58 src/sys/arch/alpha/alpha/autoconf.c:1.59
--- src/sys/arch/alpha/alpha/autoconf.c:1.58	Fri Jul  9 01:29:20 2021
+++ src/sys/arch/alpha/alpha/autoconf.c	Sun Mar 31 19:06:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.58 2021/07/09 01:29:20 thorpej Exp $ */
+/* $NetBSD: autoconf.c,v 1.59 2024/03/31 19:06:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.58 2021/07/09 01:29:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.59 2024/03/31 19:06:30 thorpej Exp $");
 
 #include "pci.h"
 
@@ -324,13 +324,6 @@ device_register(device_t dev, void *aux)
 	if (parent != NULL && device_is_a(parent, "pci"))
 		device_pci_register(dev, aux);
 #endif
-
-	if (bootdev_data == NULL) {
-		/*
-		 * There is no hope.
-		 */
-		return;
-	}
 	if (platform.device_register)
 		(*platform.device_register)(dev, aux);
 }

Index: src/sys/arch/alpha/alpha/dec_1000a.c
diff -u src/sys/arch/alpha/alpha/dec_1000a.c:1.34 src/sys/arch/alpha/alpha/dec_1000a.c:1.35
--- src/sys/arch/alpha/alpha/dec_1000a.c:1.34	Mon Dec  4 00:32:10 2023
+++ src/sys/arch/alpha/alpha/dec_1000a.c	Sun Mar 31 19:06:30 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_1000a.c,v 1.34 2023/12/04 00:32:10 thorpej Exp $ */
+/* $NetBSD: dec_1000a.c,v 1.35 2024/03/31 19:06:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.34 2023/12/04 00:32:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.35 2024/03/31 19:06:30 thorpej Exp $");
 
 #include 
 #include 
@@ -254,7 +254,7 @@ dec_1000a_device_register(device_t dev, 
 	struct bootdev_data *b = bootdev_data;
 	device_t parent = device_parent(dev);
 
-	if (found)
+	if (b == NULL || found)
 		return;
 
 	if (!initted) {

Index: src/sys/arch/alpha/alpha/dec_2000_300.c
diff -u src/sys/arch/alpha/alpha/dec_2000_300.c:1.21 src/sys/arch/alpha/alpha/dec_2000_300.c:1.22
--- src/sys/arch/alpha/alpha/dec_2000_300.c:1.21	Mon 

CVS commit: src/sys/arch/alpha/alpha

2024-03-31 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar 31 19:06:31 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: api_up1000.c autoconf.c dec_1000a.c
dec_2000_300.c dec_2100_a50.c dec_2100_a500.c dec_3000_300.c
dec_3000_500.c dec_550.c dec_6600.c dec_alphabook1.c
dec_axppci_33.c dec_eb164.c dec_eb64plus.c dec_eb66.c dec_kn20aa.c
dec_kn300.c dec_kn8ae.c

Log Message:
Always call platform.device_register(), even if bootdev_data is NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/alpha/api_up1000.c
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/alpha/autoconf.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/alpha/dec_1000a.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/alpha/alpha/dec_2000_300.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/alpha/alpha/dec_2100_a50.c \
src/sys/arch/alpha/alpha/dec_axppci_33.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/alpha/dec_2100_a500.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/alpha/dec_3000_300.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/alpha/alpha/dec_3000_500.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/alpha/dec_550.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/alpha/alpha/dec_6600.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/alpha/dec_alphabook1.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/alpha/alpha/dec_eb164.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/alpha/dec_eb64plus.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/alpha/alpha/dec_eb66.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/alpha/alpha/dec_kn20aa.c
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/alpha/alpha/dec_kn300.c \
src/sys/arch/alpha/alpha/dec_kn8ae.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/alpha/alpha

2024-03-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Mar  6 07:22:45 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: cpu.c

Log Message:
Statically initialize the PRIMARY and RUNNING flags in cpu_info_primary.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/alpha/alpha/cpu.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/alpha/alpha

2024-03-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Mar  6 07:22:45 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: cpu.c

Log Message:
Statically initialize the PRIMARY and RUNNING flags in cpu_info_primary.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/alpha/alpha/cpu.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/alpha/alpha/cpu.c
diff -u src/sys/arch/alpha/alpha/cpu.c:1.107 src/sys/arch/alpha/alpha/cpu.c:1.108
--- src/sys/arch/alpha/alpha/cpu.c:1.107	Sun May 22 11:27:33 2022
+++ src/sys/arch/alpha/alpha/cpu.c	Wed Mar  6 07:22:45 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.107 2022/05/22 11:27:33 andvar Exp $ */
+/* $NetBSD: cpu.c,v 1.108 2024/03/06 07:22:45 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2020 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.107 2022/05/22 11:27:33 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.108 2024/03/06 07:22:45 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -82,7 +82,8 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10
 #include 
 
 struct cpu_info cpu_info_primary __cacheline_aligned = {
-	.ci_curlwp = &lwp0
+	.ci_curlwp = &lwp0,
+	.ci_flags  = CPUF_PRIMARY|CPUF_RUNNING,
 };
 struct cpu_info *cpu_info_list __read_mostly = &cpu_info_primary;
 
@@ -450,7 +451,8 @@ cpuattach(device_t parent, device_t self
 	if (primary) {
 		cpu_announce_extensions(ci);
 #if defined(MULTIPROCESSOR)
-		ci->ci_flags |= CPUF_PRIMARY|CPUF_RUNNING;
+		KASSERT(ci->ci_flags & CPUF_PRIMARY);
+		KASSERT(ci->ci_flags & CPUF_RUNNING);
 		atomic_or_ulong(&cpus_booted, (1UL << ma->ma_slot));
 		atomic_or_ulong(&cpus_running, (1UL << ma->ma_slot));
 #endif /* MULTIPROCESSOR */



CVS commit: src/sys/arch/alpha/alpha

2024-03-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  3 19:56:30 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: prom.c

Log Message:
prom_uses_prom_console() needs to consider ST_DEC_7000, as well.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/alpha/prom.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/alpha/alpha

2024-03-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Mar  3 19:56:30 UTC 2024

Modified Files:
src/sys/arch/alpha/alpha: prom.c

Log Message:
prom_uses_prom_console() needs to consider ST_DEC_7000, as well.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/alpha/prom.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/alpha/alpha/prom.c
diff -u src/sys/arch/alpha/alpha/prom.c:1.58 src/sys/arch/alpha/alpha/prom.c:1.59
--- src/sys/arch/alpha/alpha/prom.c:1.58	Sat Oct  3 17:31:46 2020
+++ src/sys/arch/alpha/alpha/prom.c	Sun Mar  3 19:56:29 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: prom.c,v 1.58 2020/10/03 17:31:46 thorpej Exp $ */
+/* $NetBSD: prom.c,v 1.59 2024/03/03 19:56:29 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@@ -27,7 +27,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.58 2020/10/03 17:31:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.59 2024/03/03 19:56:29 thorpej Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -89,7 +89,7 @@ bool
 prom_uses_prom_console(void)
 {
 #ifdef _PROM_MAY_USE_PROM_CONSOLE
-	return (cputype == ST_DEC_21000);
+	return (cputype == ST_DEC_7000 || cputype == ST_DEC_21000);
 #else
 	return false;
 #endif



CVS commit: src/sys/arch/alpha/alpha

2023-12-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 30 23:07:42 UTC 2023

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

Log Message:
pmap_bootstrap(): When initializing the L2 PTEs, don't use l2pte_index(),
as it is designed to wrap from 1023->0 during the normal course of use.
However, when setting up the initial kernel page tables, if we have a
large enough config that we end up with more than L2 PT page, we rely
on being able to index > 1023 into the adjacent PT pages to initialize
those entries.

Fixes a MM fault panic during early boot on larger memory configs
(reported by Dave McGuire with an 8GB ES40 and John Klos with a 12GB
DS25).  I've successfully booted at 16GB config in Qemu with this fix.


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/arch/alpha/alpha/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/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.307 src/sys/arch/alpha/alpha/pmap.c:1.308
--- src/sys/arch/alpha/alpha/pmap.c:1.307	Sat Apr  9 23:38:31 2022
+++ src/sys/arch/alpha/alpha/pmap.c	Sat Dec 30 23:07:42 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.307 2022/04/09 23:38:31 riastradh Exp $ */
+/* $NetBSD: pmap.c,v 1.308 2023/12/30 23:07:42 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.307 2022/04/09 23:38:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.308 2023/12/30 23:07:42 thorpej Exp $");
 
 #include 
 #include 
@@ -1204,13 +1204,15 @@ static bool	vtophys_internal(vaddr_t, pa
 	l1pte_ = pmap_l1pte(kernel_lev1map, va);			\
 	if (pmap_pte_v(l1pte_) == 0) {	\
 		printf("kernel level 1 PTE not valid, va 0x%lx "	\
-		"(line %d)\n", (va), __LINE__);			\
+		"(line %d) pte=%p *pte=0x%016lx\n", (va), __LINE__,	\
+		l1pte_, *l1pte_);	\
 		panic("PMAP_KERNEL_PTE");\
 	}\
 	l2pte_ = pmap_l2pte(kernel_lev1map, va, l1pte_);		\
 	if (pmap_pte_v(l2pte_) == 0) {	\
 		printf("kernel level 2 PTE not valid, va 0x%lx "	\
-		"(line %d)\n", (va), __LINE__);			\
+		"(line %d) pte=%p *pte=0x%016lx\n", (va), __LINE__,	\
+		l2pte_, *l2pte_);	\
 		panic("PMAP_KERNEL_PTE");\
 	}\
 	pmap_l3pte(kernel_lev1map, va, l2pte_);\
@@ -1358,8 +1360,19 @@ pmap_bootstrap(paddr_t ptaddr, u_int max
 		pte = (ALPHA_K0SEG_TO_PHYS(((vaddr_t)lev3map) +
 		(i*PAGE_SIZE)) >> PGSHIFT) << PG_SHIFT;
 		pte |= PG_V | PG_ASM | PG_KRE | PG_KWE | PG_WIRED;
-		lev2map[l2pte_index(VM_MIN_KERNEL_ADDRESS+
-		(i*PAGE_SIZE*NPTEPG))] = pte;
+		/*
+		 * No need to use l2pte_index() here; it's equivalent
+		 * to just indexing with our loop variable i, but will
+		 * fall over if we end up with more than 1 L2 PT page.
+		 *
+		 * In other words:
+		 *
+		 *	l2pte_index(VM_MIN_KERNEL_ADDRESS +
+		 *	(i*PAGE_SIZE*NPTEPG))
+		 *
+		 * ...is the same as 'i' so long as i stays below 1024.
+		 */
+		lev2map[i] = pte;
 	}
 
 	/* Initialize the pmap_growkernel_lock. */



CVS commit: src/sys/arch/alpha/alpha

2023-12-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 30 23:07:42 UTC 2023

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

Log Message:
pmap_bootstrap(): When initializing the L2 PTEs, don't use l2pte_index(),
as it is designed to wrap from 1023->0 during the normal course of use.
However, when setting up the initial kernel page tables, if we have a
large enough config that we end up with more than L2 PT page, we rely
on being able to index > 1023 into the adjacent PT pages to initialize
those entries.

Fixes a MM fault panic during early boot on larger memory configs
(reported by Dave McGuire with an 8GB ES40 and John Klos with a 12GB
DS25).  I've successfully booted at 16GB config in Qemu with this fix.


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/arch/alpha/alpha/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/arch/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 22:25:16 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_disasm.c

Log Message:
pal_opname(): Make the static buffer for unknown PALcode ops large enough
to hold all possible values.
alpha_print_instruction(): Make this private if not-_KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/alpha/alpha/db_disasm.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/alpha/alpha/db_disasm.c
diff -u src/sys/arch/alpha/alpha/db_disasm.c:1.19 src/sys/arch/alpha/alpha/db_disasm.c:1.20
--- src/sys/arch/alpha/alpha/db_disasm.c:1.19	Tue Nov 21 22:19:12 2023
+++ src/sys/arch/alpha/alpha/db_disasm.c	Tue Nov 21 22:25:16 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.19 2023/11/21 22:19:12 thorpej Exp $ */
+/* $NetBSD: db_disasm.c,v 1.20 2023/11/21 22:25:16 thorpej Exp $ */
 
 /*
  * Mach Operating System
@@ -48,7 +48,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.19 2023/11/21 22:19:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.20 2023/11/21 22:25:16 thorpej Exp $");
 
 #include 
 #include 
@@ -191,7 +191,7 @@ static const struct tbl pal_op_tbl[] = {
 static const char *
 pal_opname(int op)
 {
-	static char unk[8];
+	static char unk[11];
 	int i;
 
 	for (i = 0; pal_op_tbl[i].name != NULL; i++) {
@@ -199,7 +199,7 @@ pal_opname(int op)
 			return (pal_op_tbl[i].name);
 	}
 
-	snprintf(unk, sizeof(unk), "0x%x", op);
+	snprintf(unk, sizeof(unk), "0x%08x", op);
 	return (unk);
 }
 
@@ -813,6 +813,9 @@ insn_printf(struct alpha_print_instructi
  * next instruction.
  */
 
+#ifndef _KERNEL
+static
+#endif
 int
 alpha_print_instruction(struct alpha_print_instruction_context *ctx)
 {



CVS commit: src/sys/arch/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 22:25:16 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_disasm.c

Log Message:
pal_opname(): Make the static buffer for unknown PALcode ops large enough
to hold all possible values.
alpha_print_instruction(): Make this private if not-_KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/alpha/alpha/db_disasm.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/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 21:53:06 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_interface.c

Log Message:
Ensure that all fields of db_regs[] are initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/alpha/db_interface.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/alpha/alpha/db_interface.c
diff -u src/sys/arch/alpha/alpha/db_interface.c:1.39 src/sys/arch/alpha/alpha/db_interface.c:1.40
--- src/sys/arch/alpha/alpha/db_interface.c:1.39	Tue Nov 21 21:23:56 2023
+++ src/sys/arch/alpha/alpha/db_interface.c	Tue Nov 21 21:53:06 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.39 2023/11/21 21:23:56 thorpej Exp $ */
+/* $NetBSD: db_interface.c,v 1.40 2023/11/21 21:53:06 thorpej Exp $ */
 
 /*
  * Mach Operating System
@@ -54,7 +54,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.39 2023/11/21 21:23:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.40 2023/11/21 21:53:06 thorpej Exp $");
 
 #include 
 #include 
@@ -105,45 +105,53 @@ static int db_alpha_regop(const struct d
 
 #define	dbreg(xx)	((long *)(xx))
 
+#define	DBREG(n, r)		\
+	{	.name = __STRING(n),\
+		.valuep = ((long *)(r)),			\
+		.fcn = db_alpha_regop,\
+		.modif = NULL, }
+
 const struct db_variable db_regs[] = {
-	{	"v0",	dbreg(FRAME_V0),	db_alpha_regop	},
-	{	"t0",	dbreg(FRAME_T0),	db_alpha_regop	},
-	{	"t1",	dbreg(FRAME_T1),	db_alpha_regop	},
-	{	"t2",	dbreg(FRAME_T2),	db_alpha_regop	},
-	{	"t3",	dbreg(FRAME_T3),	db_alpha_regop	},
-	{	"t4",	dbreg(FRAME_T4),	db_alpha_regop	},
-	{	"t5",	dbreg(FRAME_T5),	db_alpha_regop	},
-	{	"t6",	dbreg(FRAME_T6),	db_alpha_regop	},
-	{	"t7",	dbreg(FRAME_T7),	db_alpha_regop	},
-	{	"s0",	dbreg(FRAME_S0),	db_alpha_regop	},
-	{	"s1",	dbreg(FRAME_S1),	db_alpha_regop	},
-	{	"s2",	dbreg(FRAME_S2),	db_alpha_regop	},
-	{	"s3",	dbreg(FRAME_S3),	db_alpha_regop	},
-	{	"s4",	dbreg(FRAME_S4),	db_alpha_regop	},
-	{	"s5",	dbreg(FRAME_S5),	db_alpha_regop	},
-	{	"s6",	dbreg(FRAME_S6),	db_alpha_regop	},
-	{	"a0",	dbreg(FRAME_A0),	db_alpha_regop	},
-	{	"a1",	dbreg(FRAME_A1),	db_alpha_regop	},
-	{	"a2",	dbreg(FRAME_A2),	db_alpha_regop	},
-	{	"a3",	dbreg(FRAME_A3),	db_alpha_regop	},
-	{	"a4",	dbreg(FRAME_A4),	db_alpha_regop	},
-	{	"a5",	dbreg(FRAME_A5),	db_alpha_regop	},
-	{	"t8",	dbreg(FRAME_T8),	db_alpha_regop	},
-	{	"t9",	dbreg(FRAME_T9),	db_alpha_regop	},
-	{	"t10",	dbreg(FRAME_T10),	db_alpha_regop	},
-	{	"t11",	dbreg(FRAME_T11),	db_alpha_regop	},
-	{	"ra",	dbreg(FRAME_RA),	db_alpha_regop	},
-	{	"t12",	dbreg(FRAME_T12),	db_alpha_regop	},
-	{	"at",	dbreg(FRAME_AT),	db_alpha_regop	},
-	{	"gp",	dbreg(FRAME_GP),	db_alpha_regop	},
-	{	"sp",	dbreg(FRAME_SP),	db_alpha_regop	},
-	{	"pc",	dbreg(FRAME_PC),	db_alpha_regop	},
-	{	"ps",	dbreg(FRAME_PS),	db_alpha_regop	},
-	{	"ai",	dbreg(FRAME_T11),	db_alpha_regop	},
-	{	"pv",	dbreg(FRAME_T12),	db_alpha_regop	},
+	DBREG(v0,	FRAME_V0),
+	DBREG(t0,	FRAME_T0),
+	DBREG(t1,	FRAME_T1),
+	DBREG(t2,	FRAME_T2),
+	DBREG(t3,	FRAME_T3),
+	DBREG(t4,	FRAME_T4),
+	DBREG(t5,	FRAME_T5),
+	DBREG(t6,	FRAME_T6),
+	DBREG(t7,	FRAME_T7),
+	DBREG(s0,	FRAME_S0),
+	DBREG(s1,	FRAME_S1),
+	DBREG(s2,	FRAME_S2),
+	DBREG(s3,	FRAME_S3),
+	DBREG(s4,	FRAME_S4),
+	DBREG(s5,	FRAME_S5),
+	DBREG(s6,	FRAME_S6),
+	DBREG(a0,	FRAME_A0),
+	DBREG(a1,	FRAME_A1),
+	DBREG(a2,	FRAME_A2),
+	DBREG(a3,	FRAME_A3),
+	DBREG(a4,	FRAME_A4),
+	DBREG(a5,	FRAME_A5),
+	DBREG(t8,	FRAME_T8),
+	DBREG(t9,	FRAME_T9),
+	DBREG(t10,	FRAME_T10),
+	DBREG(t11,	FRAME_T11),
+	DBREG(ra,	FRAME_RA),
+	DBREG(t12,	FRAME_T12),
+	DBREG(at,	FRAME_AT),
+	DBREG(gp,	FRAME_GP),
+	DBREG(sp,	FRAME_SP),
+	DBREG(pc,	FRAME_PC),
+	DBREG(ps,	FRAME_PS),
+	DBREG(ai,	FRAME_T11),
+	DBREG(pv,	FRAME_T12),
 };
 const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
 
+#undef DBREG
+
 static int
 db_alpha_regop(const struct db_variable *vp, db_expr_t *val, int opcode)
 {



CVS commit: src/sys/arch/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 21:53:06 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_interface.c

Log Message:
Ensure that all fields of db_regs[] are initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/alpha/db_interface.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/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 20:40:24 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Reduce db_trace.c's exposure to proc/lwp.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 20:40:24 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Reduce db_trace.c's exposure to proc/lwp.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha/db_trace.c
diff -u src/sys/arch/alpha/alpha/db_trace.c:1.36 src/sys/arch/alpha/alpha/db_trace.c:1.37
--- src/sys/arch/alpha/alpha/db_trace.c:1.36	Tue Nov 21 20:29:47 2023
+++ src/sys/arch/alpha/alpha/db_trace.c	Tue Nov 21 20:40:24 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.36 2023/11/21 20:29:47 thorpej Exp $ */
+/* $NetBSD: db_trace.c,v 1.37 2023/11/21 20:40:24 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.36 2023/11/21 20:29:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.37 2023/11/21 20:40:24 thorpej Exp $");
 
 #include 
 #include 
@@ -133,9 +133,8 @@ do {	\
 }
 
 static void
-decode_syscall(int number, struct proc *p, void (*pr)(const char *, ...))
+decode_syscall(int number, void (*pr)(const char *, ...))
 {
-
 	(*pr)(" (%d)", number);
 }
 
@@ -175,8 +174,6 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 	struct trapframe *tf;
 	bool ra_from_tf;
 	u_long last_ipl = ~0L;
-	struct proc *p = NULL;
-	struct lwp *l = NULL;
 	char c;
 	bool trace_thread = false;
 	bool lwpaddr = false;
@@ -188,13 +185,15 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 	}
 
 	if (!have_addr) {
-		p = curproc;
 		addr = DDB_REGS->tf_regs[FRAME_SP] - FRAME_SIZE * 8;
 		tf = (struct trapframe *)addr;
 		callpc = db_alpha_tf_reg(tf, FRAME_PC);
 		frame = (db_addr_t)tf + FRAME_SIZE * 8;
 		ra_from_tf = true;
 	} else {
+		struct proc *p = NULL;
+		struct lwp *l = NULL;
+
 		if (trace_thread) {
 			if (lwpaddr) {
 l = (struct lwp *)addr;
@@ -293,7 +292,7 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 			tfps = db_alpha_tf_reg(tf, FRAME_PS);
 			if (db_alpha_sym_is_syscall(symval)) {
 decode_syscall(db_alpha_tf_reg(tf, FRAME_V0),
-p, pr);
+pr);
 			}
 			if ((tfps & ALPHA_PSL_IPL_MASK) != last_ipl) {
 last_ipl = tfps & ALPHA_PSL_IPL_MASK;



CVS commit: src/sys/arch/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 20:29:47 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
decode_prologue(): Make pc a db_addr_t, not a db_expr_t.
db_stack_trace_print_ra(): Missed one direct reference to XentSys; fix.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha/db_trace.c
diff -u src/sys/arch/alpha/alpha/db_trace.c:1.35 src/sys/arch/alpha/alpha/db_trace.c:1.36
--- src/sys/arch/alpha/alpha/db_trace.c:1.35	Tue Nov 21 19:59:07 2023
+++ src/sys/arch/alpha/alpha/db_trace.c	Tue Nov 21 20:29:47 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.35 2023/11/21 19:59:07 thorpej Exp $ */
+/* $NetBSD: db_trace.c,v 1.36 2023/11/21 20:29:47 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.35 2023/11/21 19:59:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.36 2023/11/21 20:29:47 thorpej Exp $");
 
 #include 
 #include 
@@ -71,7 +71,7 @@ decode_prologue(db_addr_t callpc, db_add
 {
 	long signed_immediate;
 	alpha_instruction ins;
-	db_expr_t pc;
+	db_addr_t pc;
 
 	pi->pi_regmask = 0;
 	pi->pi_frame_size = 0;
@@ -297,8 +297,9 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 			}
 			if ((tfps & ALPHA_PSL_IPL_MASK) != last_ipl) {
 last_ipl = tfps & ALPHA_PSL_IPL_MASK;
-if (symval != (vaddr_t)&XentSys)
+if (! db_alpha_sym_is_syscall(symval)) {
 	(*pr)(" (from ipl %ld)", last_ipl);
+}
 			}
 			(*pr)(" ---\n");
 			if (tfps & ALPHA_PSL_USERMODE) {



CVS commit: src/sys/arch/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 20:29:47 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
decode_prologue(): Make pc a db_addr_t, not a db_expr_t.
db_stack_trace_print_ra(): Missed one direct reference to XentSys; fix.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 18:57:29 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Don't access insns or frame values directly; use db_read_bytes().


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 21 18:57:29 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Don't access insns or frame values directly; use db_read_bytes().


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha/db_trace.c
diff -u src/sys/arch/alpha/alpha/db_trace.c:1.33 src/sys/arch/alpha/alpha/db_trace.c:1.34
--- src/sys/arch/alpha/alpha/db_trace.c:1.33	Tue Nov 21 14:35:01 2023
+++ src/sys/arch/alpha/alpha/db_trace.c	Tue Nov 21 18:57:29 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.33 2023/11/21 14:35:01 riastradh Exp $ */
+/* $NetBSD: db_trace.c,v 1.34 2023/11/21 18:57:29 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.33 2023/11/21 14:35:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.34 2023/11/21 18:57:29 thorpej Exp $");
 
 #include 
 #include 
@@ -117,7 +117,7 @@ do {	\
 } while (0)
 
 	for (pc = func; pc < callpc; pc += sizeof(alpha_instruction)) {
-		ins.bits = *(unsigned int *)pc;
+		db_read_bytes(pc, sizeof(ins.bits), (char *)&ins.bits);
 
 		if (ins.mem_format.opcode == op_lda &&
 		ins.mem_format.ra == 30 &&
@@ -199,6 +199,16 @@ db_alpha_trap_is_syscall(vaddr_t v)
 	return v == (vaddr_t)&XentSys;
 }
 
+static unsigned long
+db_alpha_tf_reg(struct trapframe *tf, unsigned int regno)
+{
+	unsigned long reg;
+
+	db_read_bytes((db_addr_t)&tf->tf_regs[regno], sizeof(reg),
+	(char *)®);
+	return reg;
+}
+
 static void
 decode_syscall(int number, struct proc *p, void (*pr)(const char *, ...))
 {
@@ -248,7 +258,7 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 		p = curproc;
 		addr = DDB_REGS->tf_regs[FRAME_SP] - FRAME_SIZE * 8;
 		tf = (struct trapframe *)addr;
-		callpc = tf->tf_regs[FRAME_PC];
+		callpc = db_alpha_tf_reg(tf, FRAME_PC);
 		frame = (db_addr_t)tf + FRAME_SIZE * 8;
 		ra_from_tf = true;
 	} else {
@@ -347,9 +357,11 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 
 			(*pr)("--- %s", db_alpha_trap_description(symval));
 
-			tfps = tf->tf_regs[FRAME_PS];
-			if (db_alpha_trap_is_syscall(symval))
-decode_syscall(tf->tf_regs[FRAME_V0], p, pr);
+			tfps = db_alpha_tf_reg(tf, FRAME_PS);
+			if (db_alpha_trap_is_syscall(symval)) {
+decode_syscall(db_alpha_tf_reg(tf, FRAME_V0),
+p, pr);
+			}
 			if ((tfps & ALPHA_PSL_IPL_MASK) != last_ipl) {
 last_ipl = tfps & ALPHA_PSL_IPL_MASK;
 if (symval != (vaddr_t)&XentSys)
@@ -360,7 +372,7 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 (*pr)("--- user mode ---\n");
 break;	/* Terminate search.  */
 			}
-			callpc = tf->tf_regs[FRAME_PC];
+			callpc = db_alpha_tf_reg(tf, FRAME_PC);
 			frame = (db_addr_t)tf + FRAME_SIZE * 8;
 			ra_from_tf = true;
 			continue;
@@ -380,14 +392,19 @@ db_stack_trace_print_ra(db_expr_t ra, bo
 			 * in a leaf call).  If not, we've found the
 			 * root of the call graph.
 			 */
-			if (ra_from_tf)
-callpc = tf->tf_regs[FRAME_RA];
-			else {
+			if (ra_from_tf) {
+callpc = db_alpha_tf_reg(tf, FRAME_RA);
+			} else {
 (*pr)("--- root of call graph ---\n");
 break;
 			}
-		} else
-			callpc = *(u_long *)(frame + pi.pi_reg_offset[26]);
+		} else {
+			unsigned long reg;
+
+			db_read_bytes(frame + pi.pi_reg_offset[26],
+			sizeof(reg), (char *)®);
+			callpc = reg;
+		}
 		frame += pi.pi_frame_size;
 		ra_from_tf = false;
 	}



CVS commit: src/sys/arch/alpha/alpha

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:07:36 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: machdep.c

Log Message:
alpha: Add support for bootflags [xX] to enable debug messages.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/sys/arch/alpha/alpha/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/alpha/alpha/machdep.c
diff -u src/sys/arch/alpha/alpha/machdep.c:1.375 src/sys/arch/alpha/alpha/machdep.c:1.376
--- src/sys/arch/alpha/alpha/machdep.c:1.375	Thu Jul 22 01:39:18 2021
+++ src/sys/arch/alpha/alpha/machdep.c	Thu Aug  3 03:07:35 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.375 2021/07/22 01:39:18 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.376 2023/08/03 03:07:35 rin Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2019, 2020 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.375 2021/07/22 01:39:18 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.376 2023/08/03 03:07:35 rin Exp $");
 
 #include 
 #include 
@@ -797,6 +797,11 @@ nobootinfo:
 			boothowto |= AB_VERBOSE;
 			break;
 
+		case 'x': /* debug messages */
+		case 'X':
+			boothowto |= AB_DEBUG;
+			break;
+
 		case '-':
 			/*
 			 * Just ignore this.  It's not required, but it's



CVS commit: src/sys/arch/alpha/alpha

2023-08-02 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug  3 03:07:36 UTC 2023

Modified Files:
src/sys/arch/alpha/alpha: machdep.c

Log Message:
alpha: Add support for bootflags [xX] to enable debug messages.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/sys/arch/alpha/alpha/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/alpha/alpha

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jul 21 01:52:28 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Rename functions in previous in preparation for future changes.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha/db_trace.c
diff -u src/sys/arch/alpha/alpha/db_trace.c:1.31 src/sys/arch/alpha/alpha/db_trace.c:1.32
--- src/sys/arch/alpha/alpha/db_trace.c:1.31	Wed Jul 20 17:03:10 2022
+++ src/sys/arch/alpha/alpha/db_trace.c	Thu Jul 21 01:52:28 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.31 2022/07/20 17:03:10 thorpej Exp $ */
+/* $NetBSD: db_trace.c,v 1.32 2022/07/21 01:52:28 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.31 2022/07/20 17:03:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.32 2022/07/21 01:52:28 thorpej Exp $");
 
 #include 
 #include 
@@ -166,7 +166,7 @@ do {	\
 }
 
 static bool
-sym_is_trapsymbol(vaddr_t v)
+db_alpha_sym_is_trapsymbol(vaddr_t v)
 {
 	int i;
 
@@ -177,13 +177,13 @@ sym_is_trapsymbol(vaddr_t v)
 }
 
 static bool
-sym_is_backstop(vaddr_t v)
+db_alpha_sym_is_backstop(vaddr_t v)
 {
 	return v == (vaddr_t)&alpha_kthread_backstop;
 }
 
 static const char *
-trap_description(vaddr_t v)
+db_alpha_trap_description(vaddr_t v)
 {
 	int i;
 
@@ -194,7 +194,7 @@ trap_description(vaddr_t v)
 }
 
 static bool
-trap_is_syscall(vaddr_t v)
+db_alpha_trap_is_syscall(vaddr_t v)
 {
 	return v == (vaddr_t)&XentSys;
 }
@@ -288,7 +288,7 @@ db_stack_trace_print(db_expr_t addr, boo
 		 * backstop, then we are at the root of the call
 		 * graph.
 		 */
-		if (sym_is_backstop(symval)) {
+		if (db_alpha_sym_is_backstop(symval)) {
 			(*pr)("--- kernel thread backstop ---\n");
 			break;
 		}
@@ -328,13 +328,13 @@ db_stack_trace_print(db_expr_t addr, boo
 		 * If we are in a trap vector, frame points to a
 		 * trapframe.
 		 */
-		if (sym_is_trapsymbol(symval)) {
+		if (db_alpha_sym_is_trapsymbol(symval)) {
 			tf = (struct trapframe *)frame;
 
-			(*pr)("--- %s", trap_description(symval));
+			(*pr)("--- %s", db_alpha_trap_description(symval));
 
 			tfps = tf->tf_regs[FRAME_PS];
-			if (trap_is_syscall(symval))
+			if (db_alpha_trap_is_syscall(symval))
 decode_syscall(tf->tf_regs[FRAME_V0], p, pr);
 			if ((tfps & ALPHA_PSL_IPL_MASK) != last_ipl) {
 last_ipl = tfps & ALPHA_PSL_IPL_MASK;



CVS commit: src/sys/arch/alpha/alpha

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jul 21 01:52:28 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Rename functions in previous in preparation for future changes.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 18:25:10 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: locore.s

Log Message:
Fix a couple of nits with savectx():
- Note that this function is only used by dumpsys().
- Don't safe the PS word; there isn't actually a spot for it in the PCB.
- Don't bother returning anything; savectx() is declared void.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/arch/alpha/alpha/locore.s

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/alpha/alpha/locore.s
diff -u src/sys/arch/alpha/alpha/locore.s:1.141 src/sys/arch/alpha/alpha/locore.s:1.142
--- src/sys/arch/alpha/alpha/locore.s:1.141	Thu Jul 22 15:48:40 2021
+++ src/sys/arch/alpha/alpha/locore.s	Wed Jul 20 18:25:10 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.141 2021/07/22 15:48:40 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.142 2022/07/20 18:25:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.141 2021/07/22 15:48:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.142 2022/07/20 18:25:10 thorpej Exp $");
 
 #include "assym.h"
 
@@ -651,13 +651,10 @@ LEAF(restorefpstate, 1)
  * sanely be used for curlwp iff cpu_switchto won't be called again, e.g.
  * if called from boot().)
  *
+ * N.B. this is actually only used by dumpsys().
+ *
  * Arguments:
  *	a0	'struct pcb *' of the process that needs its context saved
- *
- * Return:
- *	v0	0.  (note that for child processes, it seems
- *		like savectx() returns 1, because the return address
- *		in the PCB is set to the return address from savectx().)
  */
 
 LEAF(savectx, 1)
@@ -672,10 +669,6 @@ LEAF(savectx, 1)
 	stq	s5, PCB_CONTEXT+(5 * 8)(a0)
 	stq	s6, PCB_CONTEXT+(6 * 8)(a0)
 	stq	ra, PCB_CONTEXT+(7 * 8)(a0)	/* store ra */
-	call_pal PAL_OSF1_rdps			/* NOTE: doesn't kill a0 */
-	stq	v0, PCB_CONTEXT+(8 * 8)(a0)	/* store ps, for ipl */
-
-	mov	zero, v0
 	RET
 	END(savectx)
 



CVS commit: src/sys/arch/alpha/alpha

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 18:25:10 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: locore.s

Log Message:
Fix a couple of nits with savectx():
- Note that this function is only used by dumpsys().
- Don't safe the PS word; there isn't actually a spot for it in the PCB.
- Don't bother returning anything; savectx() is declared void.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/arch/alpha/alpha/locore.s

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



CVS commit: src/sys/arch/alpha/alpha

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 17:03:11 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Localize direct refernces to kernel symbols into functions.  NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha/db_trace.c
diff -u src/sys/arch/alpha/alpha/db_trace.c:1.30 src/sys/arch/alpha/alpha/db_trace.c:1.31
--- src/sys/arch/alpha/alpha/db_trace.c:1.30	Sat Jul 24 21:31:32 2021
+++ src/sys/arch/alpha/alpha/db_trace.c	Wed Jul 20 17:03:10 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.30 2021/07/24 21:31:32 andvar Exp $ */
+/* $NetBSD: db_trace.c,v 1.31 2022/07/20 17:03:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.30 2021/07/24 21:31:32 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.31 2022/07/20 17:03:10 thorpej Exp $");
 
 #include 
 #include 
@@ -165,15 +165,38 @@ do {	\
 	}
 }
 
-static int
+static bool
 sym_is_trapsymbol(vaddr_t v)
 {
 	int i;
 
 	for (i = 0; special_symbols[i].ss_val != 0; ++i)
 		if (v == special_symbols[i].ss_val)
-			return 1;
-	return 0;
+			return true;
+	return false;
+}
+
+static bool
+sym_is_backstop(vaddr_t v)
+{
+	return v == (vaddr_t)&alpha_kthread_backstop;
+}
+
+static const char *
+trap_description(vaddr_t v)
+{
+	int i;
+
+	for (i = 0; special_symbols[i].ss_val != 0; ++i)
+		if (v == special_symbols[i].ss_val)
+			return special_symbols[i].ss_note;
+	return "(? trap ?)";
+}
+
+static bool
+trap_is_syscall(vaddr_t v)
+{
+	return v == (vaddr_t)&XentSys;
 }
 
 static void
@@ -191,7 +214,6 @@ db_stack_trace_print(db_expr_t addr, boo
 	struct prologue_info pi;
 	db_expr_t diff;
 	db_sym_t sym;
-	int i;
 	u_long tfps;
 	const char *symname;
 	struct pcb *pcbp;
@@ -266,7 +288,7 @@ db_stack_trace_print(db_expr_t addr, boo
 		 * backstop, then we are at the root of the call
 		 * graph.
 		 */
-		if (symval == (vaddr_t)&alpha_kthread_backstop) {
+		if (sym_is_backstop(symval)) {
 			(*pr)("--- kernel thread backstop ---\n");
 			break;
 		}
@@ -309,13 +331,10 @@ db_stack_trace_print(db_expr_t addr, boo
 		if (sym_is_trapsymbol(symval)) {
 			tf = (struct trapframe *)frame;
 
-			for (i = 0; special_symbols[i].ss_val != 0; ++i)
-if (symval == special_symbols[i].ss_val)
-	(*pr)("--- %s",
-	special_symbols[i].ss_note);
+			(*pr)("--- %s", trap_description(symval));
 
 			tfps = tf->tf_regs[FRAME_PS];
-			if (symval == (vaddr_t)&XentSys)
+			if (trap_is_syscall(symval))
 decode_syscall(tf->tf_regs[FRAME_V0], p, pr);
 			if ((tfps & ALPHA_PSL_IPL_MASK) != last_ipl) {
 last_ipl = tfps & ALPHA_PSL_IPL_MASK;



CVS commit: src/sys/arch/alpha/alpha

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 17:03:11 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: db_trace.c

Log Message:
Localize direct refernces to kernel symbols into functions.  NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/alpha/alpha/db_trace.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/alpha/alpha

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:42:56 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: ipifuncs.c

Log Message:
alpha: Convert ipifuncs.c to membar_release/acquire.

No semantic change is possible because all of these membars are just
mb on alpha -- change just makes the intent clearer.  (Only
membar_producer is weaker, wmb.)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/alpha/alpha/ipifuncs.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/alpha/alpha/ipifuncs.c
diff -u src/sys/arch/alpha/alpha/ipifuncs.c:1.54 src/sys/arch/alpha/alpha/ipifuncs.c:1.55
--- src/sys/arch/alpha/alpha/ipifuncs.c:1.54	Sat Oct 10 03:05:04 2020
+++ src/sys/arch/alpha/alpha/ipifuncs.c	Sat Apr  9 23:42:56 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ipifuncs.c,v 1.54 2020/10/10 03:05:04 thorpej Exp $ */
+/* $NetBSD: ipifuncs.c,v 1.55 2022/04/09 23:42:56 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.54 2020/10/10 03:05:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.55 2022/04/09 23:42:56 riastradh Exp $");
 
 /*
  * Interprocessor interrupt handlers.
@@ -127,10 +127,12 @@ alpha_ipi_process(struct cpu_info *ci, s
 
 	while ((pending_ipis = atomic_swap_ulong(&ci->ci_ipis, 0)) != 0) {
 		/*
-		 * Ensure the atomic swap is globally visible before
-		 * we do any of the work.
+		 * Ensure everything prior to setting ci_ipis in
+		 * alpha_send_ipi happens-before everything after
+		 * reading ci_ipis here so we're not working on stale
+		 * inputs.
 		 */
-		membar_enter();
+		membar_acquire();
 
 		sc->sc_evcnt_ipi.ev_count++;
 
@@ -159,7 +161,7 @@ alpha_send_ipi(u_long const cpu_id, u_lo
 	 * alpha_send_ipi() have completed before informing
 	 * the CPU of the work we are asking it to do.
 	 */
-	membar_exit();
+	membar_release();
 	atomic_or_ulong(&cpu_info[cpu_id]->ci_ipis, ipimask);
 
 	/*



CVS commit: src/sys/arch/alpha/alpha

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:42:56 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: ipifuncs.c

Log Message:
alpha: Convert ipifuncs.c to membar_release/acquire.

No semantic change is possible because all of these membars are just
mb on alpha -- change just makes the intent clearer.  (Only
membar_producer is weaker, wmb.)


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/alpha/alpha/ipifuncs.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/alpha/alpha

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:39:18 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: cpu.c

Log Message:
alpha: Convert cpu_iccb_send from membar_exit to membar_release.

XXX Maybe this should really use alpha_mb, since it's not writing to
normal MI-type memory so technically the membr_* semantics doesn't
apply?


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/alpha/alpha/cpu.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/alpha/alpha/cpu.c
diff -u src/sys/arch/alpha/alpha/cpu.c:1.105 src/sys/arch/alpha/alpha/cpu.c:1.106
--- src/sys/arch/alpha/alpha/cpu.c:1.105	Sun Feb 27 14:17:10 2022
+++ src/sys/arch/alpha/alpha/cpu.c	Sat Apr  9 23:39:18 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.105 2022/02/27 14:17:10 riastradh Exp $ */
+/* $NetBSD: cpu.c,v 1.106 2022/04/09 23:39:18 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2020 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.105 2022/02/27 14:17:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.106 2022/04/09 23:39:18 riastradh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -887,7 +887,7 @@ cpu_iccb_send(long cpu_id, const char *m
 	 */
 	strcpy(pcsp->pcs_iccb.iccb_rxbuf, msg);
 	pcsp->pcs_iccb.iccb_rxlen = strlen(msg);
-	membar_exit();
+	membar_release();
 	atomic_or_ulong(&hwrpb->rpb_rxrdy, cpumask);
 
 	/* Wait for the message to be received. */



CVS commit: src/sys/arch/alpha/alpha

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:39:18 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: cpu.c

Log Message:
alpha: Convert cpu_iccb_send from membar_exit to membar_release.

XXX Maybe this should really use alpha_mb, since it's not writing to
normal MI-type memory so technically the membr_* semantics doesn't
apply?


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

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:36:22 UTC 2022

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

Log Message:
alpha: Omit needless membar in pmap_reference.

If the pmap is published enough for us to obtain a reference to it
then there's no membar needed.  If it's not then something else is
wrong and we can't use pmap_reference here anyway.  Membars are
needed only on the destruction side to make sure all use, by any
thread, happens-before all freeing in the last user thread.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/arch/alpha/alpha/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/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.305 src/sys/arch/alpha/alpha/pmap.c:1.306
--- src/sys/arch/alpha/alpha/pmap.c:1.305	Sat Mar 12 15:32:31 2022
+++ src/sys/arch/alpha/alpha/pmap.c	Sat Apr  9 23:36:22 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.305 2022/03/12 15:32:31 riastradh Exp $ */
+/* $NetBSD: pmap.c,v 1.306 2022/04/09 23:36:22 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.305 2022/03/12 15:32:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.306 2022/04/09 23:36:22 riastradh Exp $");
 
 #include 
 #include 
@@ -1706,7 +1706,6 @@ pmap_reference(pmap_t pmap)
 
 	newcount = atomic_inc_uint_nv(&pmap->pm_count);
 	KASSERT(newcount != 0);
-	PMAP_MP(membar_enter());
 }
 
 /*



CVS commit: src/sys/arch/alpha/alpha

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:36:22 UTC 2022

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

Log Message:
alpha: Omit needless membar in pmap_reference.

If the pmap is published enough for us to obtain a reference to it
then there's no membar needed.  If it's not then something else is
wrong and we can't use pmap_reference here anyway.  Membars are
needed only on the destruction side to make sure all use, by any
thread, happens-before all freeing in the last user thread.


To generate a diff of this commit:
cvs rdiff -u -r1.305 -r1.306 src/sys/arch/alpha/alpha/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/arch/alpha/alpha

2022-04-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr  5 04:33:36 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: clock.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/alpha/clock.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/alpha/alpha/clock.c
diff -u src/sys/arch/alpha/alpha/clock.c:1.46 src/sys/arch/alpha/alpha/clock.c:1.47
--- src/sys/arch/alpha/alpha/clock.c:1.46	Sat Oct 10 03:05:04 2020
+++ src/sys/arch/alpha/alpha/clock.c	Tue Apr  5 04:33:36 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.46 2020/10/10 03:05:04 thorpej Exp $ */
+/* $NetBSD: clock.c,v 1.47 2022/04/05 04:33:36 skrll Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.46 2020/10/10 03:05:04 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.47 2022/04/05 04:33:36 skrll Exp $");
 
 #include 
 #include 
@@ -110,7 +110,7 @@ cpu_initclocks(void)
 	 * Initialize PCC timecounter, unless we're running in Qemu
 	 * (we will use a different timecounter in that case).
 	 */
-	if (! alpha_is_qemu) {
+	if (!alpha_is_qemu) {
 		const uint64_t pcc_freq = cpu_frequency(curcpu());
 		cc_init(NULL, pcc_freq, "PCC", PCC_QUAL);
 		alpha_use_cctr = 1;



CVS commit: src/sys/arch/alpha/alpha

2022-04-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr  5 04:33:36 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: clock.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/alpha/clock.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/alpha/alpha

2022-02-27 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 27 14:17:10 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: cpu.c

Log Message:
alpha: Fix placement of membar for sending ICCB message.

While here, reduce it to membar_exit -- it's obviously not needed for
store-before-load here (although alpha doesn't have anything weaker
than the full sequential consistency `mb'), and although we do need a
store-before-load (and load-before-load) to spin waiting for the CPU
to wake up, that already happens a few lines below with alpha_mb in
the loop anyway.  So no need for membar_sync, which is just `mb'
under the hood -- deleting the membar_sync in this place can't hurt.

The membar_sync had been inserted automatically when converting from
an older style of atomic_ops(3) API.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/alpha/alpha/cpu.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/alpha/alpha/cpu.c
diff -u src/sys/arch/alpha/alpha/cpu.c:1.104 src/sys/arch/alpha/alpha/cpu.c:1.105
--- src/sys/arch/alpha/alpha/cpu.c:1.104	Wed May  5 03:54:16 2021
+++ src/sys/arch/alpha/alpha/cpu.c	Sun Feb 27 14:17:10 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.104 2021/05/05 03:54:16 thorpej Exp $ */
+/* $NetBSD: cpu.c,v 1.105 2022/02/27 14:17:10 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2020 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.104 2021/05/05 03:54:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.105 2022/02/27 14:17:10 riastradh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -882,12 +882,13 @@ cpu_iccb_send(long cpu_id, const char *m
 
 	/*
 	 * Copy the message into the ICCB, and tell the secondary console
-	 * that it's there.
+	 * that it's there.  Ensure the buffer is initialized before we
+	 * set the rxrdy bits, as a store-release.
 	 */
 	strcpy(pcsp->pcs_iccb.iccb_rxbuf, msg);
 	pcsp->pcs_iccb.iccb_rxlen = strlen(msg);
+	membar_exit();
 	atomic_or_ulong(&hwrpb->rpb_rxrdy, cpumask);
-	membar_sync();
 
 	/* Wait for the message to be received. */
 	for (timeout = 1; timeout != 0; timeout--) {



CVS commit: src/sys/arch/alpha/alpha

2022-02-27 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 27 14:17:10 UTC 2022

Modified Files:
src/sys/arch/alpha/alpha: cpu.c

Log Message:
alpha: Fix placement of membar for sending ICCB message.

While here, reduce it to membar_exit -- it's obviously not needed for
store-before-load here (although alpha doesn't have anything weaker
than the full sequential consistency `mb'), and although we do need a
store-before-load (and load-before-load) to spin waiting for the CPU
to wake up, that already happens a few lines below with alpha_mb in
the loop anyway.  So no need for membar_sync, which is just `mb'
under the hood -- deleting the membar_sync in this place can't hurt.

The membar_sync had been inserted automatically when converting from
an older style of atomic_ops(3) API.


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

2021-12-09 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Dec  9 21:13:18 UTC 2021

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

Log Message:
Few typos slipped in the last review, fixing them.


To generate a diff of this commit:
cvs rdiff -u -r1.303 -r1.304 src/sys/arch/alpha/alpha/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/arch/alpha/alpha

2021-12-09 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Dec  9 21:13:18 UTC 2021

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

Log Message:
Few typos slipped in the last review, fixing them.


To generate a diff of this commit:
cvs rdiff -u -r1.303 -r1.304 src/sys/arch/alpha/alpha/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/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.303 src/sys/arch/alpha/alpha/pmap.c:1.304
--- src/sys/arch/alpha/alpha/pmap.c:1.303	Sun Sep 19 20:43:46 2021
+++ src/sys/arch/alpha/alpha/pmap.c	Thu Dec  9 21:13:18 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.303 2021/09/19 20:43:46 andvar Exp $ */
+/* $NetBSD: pmap.c,v 1.304 2021/12/09 21:13:18 andvar Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.303 2021/09/19 20:43:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.304 2021/12/09 21:13:18 andvar Exp $");
 
 #include 
 #include 
@@ -2106,7 +2106,7 @@ pmap_enter_l2pt_delref(pmap_t const pmap
 	/*
 	 * PALcode may have tried to service a TLB miss with
 	 * this L2 PTE, so we need to make sure we don't actually
-	 * free the PT page untl we've shot down any TLB entries
+	 * free the PT page until we've shot down any TLB entries
 	 * for this VPT index.
 	 */
 
@@ -3810,7 +3810,7 @@ pmap_l2pt_delref(pmap_t pmap, pt_entry_t
 			"0x%lx\n", pmap_pte_pa(l1pte));
 #endif
 		/*
-		 * You can pass NULL if you know the last refrence won't
+		 * You can pass NULL if you know the last reference won't
 		 * be dropped.
 		 */
 		KASSERT(tlbctx != NULL);
@@ -3870,7 +3870,7 @@ pmap_asn_alloc(pmap_t const pmap, struct
 	KASSERT(pmap->pm_percpu[ci->ci_cpuid].pmc_lev1map != kernel_lev1map);
 	KASSERT(kpreempt_disabled());
 
-	/* No work to do if the the CPU does not implement ASNs. */
+	/* No work to do if the CPU does not implement ASNs. */
 	if (pmap_max_asn == 0)
 		return 0;
 



CVS commit: src/sys/arch/alpha/alpha

2021-09-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 19 20:43:46 UTC 2021

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

Log Message:
review and fix rest of the typos in alpha pmap.c.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/arch/alpha/alpha/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/arch/alpha/alpha

2021-09-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 19 20:43:46 UTC 2021

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

Log Message:
review and fix rest of the typos in alpha pmap.c.


To generate a diff of this commit:
cvs rdiff -u -r1.302 -r1.303 src/sys/arch/alpha/alpha/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/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.302 src/sys/arch/alpha/alpha/pmap.c:1.303
--- src/sys/arch/alpha/alpha/pmap.c:1.302	Sun Sep 19 10:34:07 2021
+++ src/sys/arch/alpha/alpha/pmap.c	Sun Sep 19 20:43:46 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.302 2021/09/19 10:34:07 andvar Exp $ */
+/* $NetBSD: pmap.c,v 1.303 2021/09/19 20:43:46 andvar Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.302 2021/09/19 10:34:07 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.303 2021/09/19 20:43:46 andvar Exp $");
 
 #include 
 #include 
@@ -544,7 +544,7 @@ pmap_pvlist_free(struct pmap_pvlist * co
  * Some things that add complexity:
  *
  * ==> ASNs. A CPU may have valid TLB entries for other than the current
- * address spaace.  We can only invalidate TLB entries for the current
+ * address space.  We can only invalidate TLB entries for the current
  * address space, so when asked to invalidate a VA for the non-current
  * pmap on a given CPU, we simply invalidate the ASN for that pmap,CPU
  * tuple so that new one is allocated on the next activation on that
@@ -587,7 +587,7 @@ pmap_pvlist_free(struct pmap_pvlist * co
  * global bitmap off CPUs to be notified, and then send the IPIs to
  * each victim.  While the other CPUs are in-flight, we then perform
  * any invalidations necessary on the local CPU.  Once that is done,
- * we then wait the the global context pointer to be cleared, which
+ * we then wait the global context pointer to be cleared, which
  * will be done by the final remote CPU to complete their work. This
  * method reduces cache line contention during processing.
  *
@@ -597,7 +597,7 @@ pmap_pvlist_free(struct pmap_pvlist * co
  * CPU might hold for the respective recursive VPT mappings.  This must
  * be done whenever an L1 or L2 PTE is invalidated.  Until these VPT
  * translations are invalidated, the PT pages must not be reused.  For
- * this reason, we keep a list of freed PT pages in the context stucture
+ * this reason, we keep a list of freed PT pages in the context structure
  * and drain them off once all invalidations are complete.
  *
  * NOTE: The value of TLB_CTX_MAXVA is tuned to accommodate the UBC
@@ -3635,7 +3635,7 @@ pmap_l1pt_ctor(void *arg, void *object, 
 /*
  * pmap_l1pt_alloc:
  *
- *	Page alloctaor for L1 PT pages.
+ *	Page allocator for L1 PT pages.
  */
 static void *
 pmap_l1pt_alloc(struct pool *pp, int flags)



CVS commit: src/sys/arch/alpha/alpha

2019-11-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Nov 21 19:02:43 UTC 2019

Modified Files:
src/sys/arch/alpha/alpha: ipifuncs.c

Log Message:
alpha_ipi_ast: use ci_data.cpu_onproc, not ci_curlwp.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/alpha/ipifuncs.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/alpha/alpha/ipifuncs.c
diff -u src/sys/arch/alpha/alpha/ipifuncs.c:1.48 src/sys/arch/alpha/alpha/ipifuncs.c:1.49
--- src/sys/arch/alpha/alpha/ipifuncs.c:1.48	Mon May 19 22:47:53 2014
+++ src/sys/arch/alpha/alpha/ipifuncs.c	Thu Nov 21 19:02:43 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ipifuncs.c,v 1.48 2014/05/19 22:47:53 rmind Exp $ */
+/* $NetBSD: ipifuncs.c,v 1.49 2019/11/21 19:02:43 ad Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.48 2014/05/19 22:47:53 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.49 2019/11/21 19:02:43 ad Exp $");
 
 /*
  * Interprocessor interrupt handlers.
@@ -263,8 +263,8 @@ static void
 alpha_ipi_ast(struct cpu_info *ci, struct trapframe *framep)
 {
 
-	if (ci->ci_curlwp != ci->ci_data.cpu_idlelwp)
-		aston(ci->ci_curlwp);
+	if (ci->ci_data.cpu_onproc != ci->ci_data.cpu_idlelwp)
+		aston(ci->ci_data.cpu_onproc);
 }
 
 static void



CVS commit: src/sys/arch/alpha/alpha

2019-11-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Nov 21 19:02:43 UTC 2019

Modified Files:
src/sys/arch/alpha/alpha: ipifuncs.c

Log Message:
alpha_ipi_ast: use ci_data.cpu_onproc, not ci_curlwp.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/alpha/alpha/ipifuncs.c

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



Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-27 Thread Izumi Tsutsui
> > > Looking how many atoi() copies we have in tree, does it make sense to
> > > add the following at the end of libkern.h
> > 
> > Please don't use it for #ifdef _STANDALONE ones.
> > libc's strtoll() is larger than dumb atoi()s.
> 
> ...if strtoll isn't already pulled in for other reasons.

On i386, only netboot variants pull strtoul(), so I don't think
we can assume strtoll() is already pulled in most standalone ones.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
On Wed, Jul 27, 2011 at 02:33:24AM +0900, Izumi Tsutsui wrote:
> > Looking how many atoi() copies we have in tree, does it make sense to
> > add the following at the end of libkern.h
> 
> Please don't use it for #ifdef _STANDALONE ones.
> libc's strtoll() is larger than dumb atoi()s.

Fine. No need then, i'll only update the alpha one.

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Joerg Sonnenberger
On Wed, Jul 27, 2011 at 02:33:24AM +0900, Izumi Tsutsui wrote:
> > Looking how many atoi() copies we have in tree, does it make sense to
> > add the following at the end of libkern.h
> 
> Please don't use it for #ifdef _STANDALONE ones.
> libc's strtoll() is larger than dumb atoi()s.

...if strtoll isn't already pulled in for other reasons.

Joerg


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Izumi Tsutsui
> Looking how many atoi() copies we have in tree, does it make sense to
> add the following at the end of libkern.h

Please don't use it for #ifdef _STANDALONE ones.
libc's strtoll() is larger than dumb atoi()s.

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
On Tue, Jul 26, 2011 at 06:45:31PM +0200, Joerg Sonnenberger wrote:
> On Tue, Jul 26, 2011 at 06:19:21PM +0200, Nicolas Joly wrote:
> > On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote:
> > > On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
> > > > Module Name:src
> > > > Committed By:   njoly
> > > > Date:   Tue Jul 26 14:59:03 UTC 2011
> > > > 
> > > > Modified Files:
> > > > src/sys/arch/alpha/alpha: autoconf.c
> > > > 
> > > > Log Message:
> > > > Make atoi func static, and constify
> > > 
> > > Shouldn't this use strtol to implement atoi?
> > 
> > We don't have strtol for kernel use.
> 
> Then use strtoll. We have at least some conversion code in libkern.

Looking how many atoi() copies we have in tree, does it make sense to
add the following at the end of libkern.h

LIBKERN_INLINE int atoi(const char *) __unused;

#ifdef LIBKERN_BODY
LIBKERN_INLINE int
atoi(const char *s)
{
return (int)strtoll(s, NULL, 10);
}
#endif

and rename the conflicting ones (dm, ptyfs and procfs).

njoly@lanfeust [NetBSD/src]> find sys -type f -name '*.[ch]'| xargs grep 
'atoi(.*char'
sys/arch/alpha/alpha/autoconf.c:static int atoi(const char *);
sys/arch/alpha/alpha/autoconf.c:atoi(const char *s)
sys/arch/amiga/dev/ite.c:inline static int atoi(const char *);
sys/arch/amiga/dev/ite.c:atoi(const char *cp)
sys/arch/atari/dev/ite.c:static inline int  atoi(const char *);
sys/arch/hp300/stand/common/devopen.c:atoi(char *cp)
sys/arch/hp300/stand/common/samachdep.h:int atoi(char *);
sys/arch/i386/stand/lib/bootmenu.c:atoi(const char *in)
sys/arch/i386/stand/lib/bootmenu.h:int atoi(const char *);
sys/arch/next68k/next68k/autoconf.c:static int atoi(const char *);
sys/arch/next68k/next68k/autoconf.c:atoi(const char *s)
sys/arch/next68k/stand/boot/devopen.c:int atoi(const char *);
sys/arch/next68k/stand/boot/devopen.c:atoi(const char *cp)
sys/arch/prep/stand/boot/devopen.c:int atoi(char *);
sys/arch/prep/stand/boot/devopen.c:atoi(char *cp)
sys/arch/rs6000/stand/boot/devopen.c:int atoi(char *);
sys/arch/rs6000/stand/boot/devopen.c:atoi(char *cp)
sys/arch/vax/boot/boot/devopen.c:intatoi(char *);
sys/arch/x68k/dev/ite.c:inline static int atoi(const char *);
sys/arch/x68k/dev/ite.c:atoi(const char *cp)
sys/arch/zaurus/stand/zboot/bootmenu.c:atoi(const char *in)
sys/arch/zaurus/stand/zboot/bootmenu.h:int atoi(const char *);
sys/compat/ndis/subr_ntoskrnl.c:atoi(const char *str)
sys/dev/dm/dm.h:uint64_t atoi(const char *);
sys/dev/dm/dm_target_linear.c:atoi(const char *s)
sys/dev/raidframe/rf_utils.c:rf_atoi(char *p)
sys/dev/raidframe/rf_utils.h:int rf_atoi(char *p);
sys/fs/ptyfs/ptyfs_vnops.c:static int atoi(const char *, size_t);
sys/fs/ptyfs/ptyfs_vnops.c:atoi(const char *b, size_t len)
sys/miscfs/procfs/procfs_vnops.c:static int atoi(const char *, size_t);
sys/miscfs/procfs/procfs_vnops.c:atoi(const char *b, size_t len)

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Joerg Sonnenberger
On Tue, Jul 26, 2011 at 06:19:21PM +0200, Nicolas Joly wrote:
> On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote:
> > On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
> > > Module Name:  src
> > > Committed By: njoly
> > > Date: Tue Jul 26 14:59:03 UTC 2011
> > > 
> > > Modified Files:
> > >   src/sys/arch/alpha/alpha: autoconf.c
> > > 
> > > Log Message:
> > > Make atoi func static, and constify
> > 
> > Shouldn't this use strtol to implement atoi?
> 
> We don't have strtol for kernel use.

Then use strtoll. We have at least some conversion code in libkern.

Joerg


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Nicolas Joly
On Tue, Jul 26, 2011 at 05:27:38PM +0200, Joerg Sonnenberger wrote:
> On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
> > Module Name:src
> > Committed By:   njoly
> > Date:   Tue Jul 26 14:59:03 UTC 2011
> > 
> > Modified Files:
> > src/sys/arch/alpha/alpha: autoconf.c
> > 
> > Log Message:
> > Make atoi func static, and constify
> 
> Shouldn't this use strtol to implement atoi?

We don't have strtol for kernel use.

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.


Re: CVS commit: src/sys/arch/alpha/alpha

2011-07-26 Thread Joerg Sonnenberger
On Tue, Jul 26, 2011 at 02:59:04PM +, Nicolas Joly wrote:
> Module Name:  src
> Committed By: njoly
> Date: Tue Jul 26 14:59:03 UTC 2011
> 
> Modified Files:
>   src/sys/arch/alpha/alpha: autoconf.c
> 
> Log Message:
> Make atoi func static, and constify

Shouldn't this use strtol to implement atoi?

Joerg


CVS commit: src/sys/arch/alpha/alpha

2010-02-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 25 07:14:48 UTC 2010

Modified Files:
src/sys/arch/alpha/alpha: locore.s syscall.c

Log Message:
s/cpu_fork/cpu_lwp_fork/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/alpha/alpha/locore.s
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/syscall.c

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



Re: CVS commit: src/sys/arch/alpha/alpha

2009-11-09 Thread Michael L. Hitch

On Mon, 9 Nov 2009, Christoph Egger wrote:


PR port-amiga/38335 and PR port-amiga/42174.


You mean port-alpha, right ?


  Yes, I meant port-alpha.  I seem to frequently mis-typing them, they 
both are ingraind in my finger memory.


--
Michael L. Hitchmhi...@montana.edu
Computer Consultant
Information Technology Center
Montana State UniversityBozeman, MT USA


Re: CVS commit: src/sys/arch/alpha/alpha

2009-11-09 Thread Christoph Egger
Michael L. Hitch wrote:
> Module Name:  src
> Committed By: mhitch
> Date: Mon Nov  9 04:31:03 UTC 2009
> 
> Modified Files:
>   src/sys/arch/alpha/alpha: pmap.c
> 
> Log Message:
> The tlb shootdown IPI can interrupt the pool_cache_get() in places that
> can cause a deadlock or pool cache corruption.  Take the shootdown job
> queue mutex before calling pool_cache_get(), which will block the IPI
> interrupts and seems to fix the remaining tlb shootdown deadlocks and
> pool cache corruption I've been seeing.  Should address both
> PR port-amiga/38335 and PR port-amiga/42174.

You mean port-alpha, right ?

Christoph