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

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 22 01:56:14 UTC 2023

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
If not _KERNEL, include  to make sure we have offsetof().


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/alpha/include/cpu.h

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



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

2023-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 22 01:56:14 UTC 2023

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
If not _KERNEL, include  to make sure we have offsetof().


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.104 src/sys/arch/alpha/include/cpu.h:1.105
--- src/sys/arch/alpha/include/cpu.h:1.104	Sat Aug 14 17:51:18 2021
+++ src/sys/arch/alpha/include/cpu.h	Wed Nov 22 01:56:14 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.104 2021/08/14 17:51:18 ryo Exp $ */
+/* $NetBSD: cpu.h,v 1.105 2023/11/22 01:56:14 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -89,6 +89,10 @@
 #include 
 #include 
 
+#ifndef _KERNEL
+#include 
+#endif /* ! _KERNEL */
+
 /*
  * Machine check information.
  */



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

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

Modified Files:
src/sys/arch/alpha/include: alpha_instruction.h

Log Message:
Expose alpha_print_instruction_context to not-_KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/alpha_instruction.h

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

Modified files:

Index: src/sys/arch/alpha/include/alpha_instruction.h
diff -u src/sys/arch/alpha/include/alpha_instruction.h:1.1 src/sys/arch/alpha/include/alpha_instruction.h:1.2
--- src/sys/arch/alpha/include/alpha_instruction.h:1.1	Tue Nov 21 22:19:12 2023
+++ src/sys/arch/alpha/include/alpha_instruction.h	Tue Nov 21 22:27:41 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_instruction.h,v 1.1 2023/11/21 22:19:12 thorpej Exp $ */
+/* $NetBSD: alpha_instruction.h,v 1.2 2023/11/21 22:27:41 thorpej Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -746,7 +746,6 @@ typedef union {
 #define	op_cvtgd_su	0x5ad
 #define	op_cvtgqg_sv	0x5af
 
-#ifdef _KERNEL
 struct alpha_print_instruction_context {
 	unsigned long pc;	/* address of insn */
 	alpha_instruction insn;	/* instruction bits */
@@ -755,6 +754,7 @@ struct alpha_print_instruction_context {
 	size_t	cursor;		/* current next output location */
 };
 
+#ifdef _KERNEL
 int	alpha_print_instruction(struct alpha_print_instruction_context *);
 #endif /* _KERNEL */
 



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

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

Modified Files:
src/sys/arch/alpha/include: alpha_instruction.h

Log Message:
Expose alpha_print_instruction_context to not-_KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/alpha_instruction.h

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



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

2023-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 23 14:55:10 UTC 2023

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
alpha: Add missing barriers in cpu_switchto.

Details in comments.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.44 src/sys/arch/alpha/include/asm.h:1.45
--- src/sys/arch/alpha/include/asm.h:1.44	Fri Sep  4 03:53:12 2020
+++ src/sys/arch/alpha/include/asm.h	Thu Feb 23 14:55:10 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.44 2020/09/04 03:53:12 thorpej Exp $ */
+/* $NetBSD: asm.h,v 1.45 2023/02/23 14:55:10 riastradh Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -669,10 +669,30 @@ label:	ASCIZ msg;		\
 #define	GET_CURLWP			\
 	call_pal PAL_OSF1_rdval
 
+/*
+ * Issue barriers to coordinate mutex_exit on this CPU with
+ * mutex_vector_enter on another CPU.
+ *
+ * 1. Any prior mutex_exit by oldlwp must be visible to other
+ *CPUs before we set ci_curlwp := newlwp on this one,
+ *requiring a store-before-store barrier.
+ *
+ * 2. ci_curlwp := newlwp must be visible on all other CPUs
+ *before any subsequent mutex_exit by newlwp can even test
+ *whether there might be waiters, requiring a
+ *store-before-load barrier.
+ *
+ * See kern_mutex.c for details -- this is necessary for
+ * adaptive mutexes to detect whether the lwp is on the CPU in
+ * order to safely block without requiring atomic r/m/w in
+ * mutex_exit.
+ */
 #define	SET_CURLWP(r)			\
 	ldq	v0, L_CPU(r)	;	\
 	mov	r, a0		;	\
+	wmb	/* store-before-store XXX patch out if !MP? */	;	\
 	stq	r, CPU_INFO_CURLWP(v0);	\
+	mb	/* store-before-load XXX patch out if !MP? */	;	\
 	call_pal PAL_OSF1_wrval
 
 #else	/* if not MULTIPROCESSOR... */



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

2023-02-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 23 14:55:10 UTC 2023

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
alpha: Add missing barriers in cpu_switchto.

Details in comments.

PR kern/57240

XXX pullup-8
XXX pullup-9
XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/alpha/include/asm.h

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



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

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 15:52:47 UTC 2022

Modified Files:
src/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Make alpha_wmb() actually a WMB rather than an MB (all uses of
alpha_wmb() have been audited and fixed-up as necessary).


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/alpha/include/alpha_cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/alpha_cpu.h
diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.55 src/sys/arch/alpha/include/alpha_cpu.h:1.56
--- src/sys/arch/alpha/include/alpha_cpu.h:1.55	Tue Nov  2 11:26:03 2021
+++ src/sys/arch/alpha/include/alpha_cpu.h	Wed Jul 20 15:52:47 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_cpu.h,v 1.55 2021/11/02 11:26:03 ryo Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.56 2022/07/20 15:52:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -377,7 +377,7 @@ alpha_rpcc(void)
 }
 
 #define	alpha_mb()	__asm volatile("mb" : : : "memory")
-#define	alpha_wmb()	__asm volatile("mb" : : : "memory")	/* XXX */
+#define	alpha_wmb()	__asm volatile("wmb" : : : "memory")
 
 #if defined(_KERNEL) || defined(_STANDALONE)
 



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

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 15:52:47 UTC 2022

Modified Files:
src/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Make alpha_wmb() actually a WMB rather than an MB (all uses of
alpha_wmb() have been audited and fixed-up as necessary).


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/alpha/include/alpha_cpu.h

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



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

2022-07-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul 19 22:04:14 UTC 2022

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
alpha: Fix missing includes in pmap.h.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/alpha/include/pmap.h

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

Modified files:

Index: src/sys/arch/alpha/include/pmap.h
diff -u src/sys/arch/alpha/include/pmap.h:1.98 src/sys/arch/alpha/include/pmap.h:1.99
--- src/sys/arch/alpha/include/pmap.h:1.98	Mon May 31 17:22:44 2021
+++ src/sys/arch/alpha/include/pmap.h	Tue Jul 19 22:04:14 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.98 2021/05/31 17:22:44 thorpej Exp $ */
+/* $NetBSD: pmap.h,v 1.99 2022/07/19 22:04:14 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -110,6 +110,9 @@
 #include "opt_multiprocessor.h"
 #endif
 
+#include 
+#include 
+
 #include 
 #include 
 



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

2022-07-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul 19 22:04:14 UTC 2022

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
alpha: Fix missing includes in pmap.h.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/alpha/include/pmap.h

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



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

2022-06-03 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Jun  3 17:04:54 UTC 2022

Modified Files:
src/sys/arch/alpha/include: cfbreg.h

Log Message:
remove reference to gatekeeper.dec.com ftp.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/alpha/include/cfbreg.h

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

Modified files:

Index: src/sys/arch/alpha/include/cfbreg.h
diff -u src/sys/arch/alpha/include/cfbreg.h:1.3 src/sys/arch/alpha/include/cfbreg.h:1.4
--- src/sys/arch/alpha/include/cfbreg.h:1.3	Thu Jun 22 16:46:52 2017
+++ src/sys/arch/alpha/include/cfbreg.h	Fri Jun  3 17:04:54 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cfbreg.h,v 1.3 2017/06/22 16:46:52 flxd Exp $ */
+/* $NetBSD: cfbreg.h,v 1.4 2022/06/03 17:04:54 andvar Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -30,7 +30,7 @@
 /*
  * Color Frame Buffer definitions, from:
  * ``PMAG-BA TURBOchannel Color Frame Buffer Functional Specification
- * (Revision 1.2)'', availalable via anonymous FTP from gatekeeper.dec.com.
+ * (Revision 1.2)''.
  *
  * All definitions are in "dense" TURBOchannel space.
  */



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

2022-06-03 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Jun  3 17:04:54 UTC 2022

Modified Files:
src/sys/arch/alpha/include: cfbreg.h

Log Message:
remove reference to gatekeeper.dec.com ftp.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/alpha/include/cfbreg.h

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



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

2022-02-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 13 13:42:30 UTC 2022

Modified Files:
src/sys/arch/alpha/include: lock.h

Log Message:
alpha: __cpu_simple_lock audit.

Add missing "cc" and "memory" asm clobbers to the compiler can't
reorder memory access around these.  The necessary memory barrier
instructions, mb, already appear in all the right places.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/include/lock.h

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

Modified files:

Index: src/sys/arch/alpha/include/lock.h
diff -u src/sys/arch/alpha/include/lock.h:1.32 src/sys/arch/alpha/include/lock.h:1.33
--- src/sys/arch/alpha/include/lock.h:1.32	Sat Feb 12 17:17:53 2022
+++ src/sys/arch/alpha/include/lock.h	Sun Feb 13 13:42:30 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.32 2022/02/12 17:17:53 riastradh Exp $ */
+/* $NetBSD: lock.h,v 1.33 2022/02/13 13:42:30 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@ __cpu_simple_lock(__cpu_simple_lock_t *a
 		"	# END __cpu_simple_lock\n"
 		: "=" (t0), "=m" (*alp)
 		: "i" (__SIMPLELOCK_LOCKED), "m" (*alp)
-		: "memory");
+		: "cc", "memory");
 }
 
 static __inline int
@@ -126,7 +126,7 @@ __cpu_simple_lock_try(__cpu_simple_lock_
 		"	# END __cpu_simple_lock_try"
 		: "=" (t0), "=r" (v0), "=m" (*alp)
 		: "i" (__SIMPLELOCK_LOCKED), "m" (*alp)
-		: "memory");
+		: "cc", "memory");
 
 	return (v0 != 0);
 }
@@ -140,7 +140,9 @@ __cpu_simple_unlock(__cpu_simple_lock_t 
 		"	mb			\n"
 		"	stl	$31, %0		\n"
 		"	# END __cpu_simple_unlock"
-		: "=m" (*alp));
+		: "=m" (*alp)
+		: /* no inputs */
+		: "memory");
 }
 
 #if defined(MULTIPROCESSOR)



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

2022-02-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Feb 13 13:42:30 UTC 2022

Modified Files:
src/sys/arch/alpha/include: lock.h

Log Message:
alpha: __cpu_simple_lock audit.

Add missing "cc" and "memory" asm clobbers to the compiler can't
reorder memory access around these.  The necessary memory barrier
instructions, mb, already appear in all the right places.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/include/lock.h

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



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

2021-10-28 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Oct 29 01:49:26 UTC 2021

Modified Files:
src/sys/arch/alpha/include: signal.h

Log Message:
Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/alpha/include/signal.h

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

Modified files:

Index: src/sys/arch/alpha/include/signal.h
diff -u src/sys/arch/alpha/include/signal.h:1.18 src/sys/arch/alpha/include/signal.h:1.19
--- src/sys/arch/alpha/include/signal.h:1.18	Tue Oct 26 16:16:34 2021
+++ src/sys/arch/alpha/include/signal.h	Fri Oct 29 01:49:26 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: signal.h,v 1.18 2021/10/26 16:16:34 christos Exp $ */
+/* $NetBSD: signal.h,v 1.19 2021/10/29 01:49:26 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -32,6 +32,8 @@
 
 #include 
 
+#define	__HAVE_STRUCT_SIGCONTEXT
+
 typedef long	sig_atomic_t;
 
 #ifdef _KERNEL_OPT
@@ -66,7 +68,6 @@ struct sigcontext13 {
 #endif /* _KERNEL && COMPAT_13 */
 
 #if defined(_LIBC) || (defined(_KERNEL) && defined(COMPAT_16))
-#define	__HAVE_STRUCT_SIGCONTEXT
 struct sigcontext {
 	long	sc_onstack;		/* sigstack state to restore */
 	long	__sc_mask13;		/* signal mask to restore (old style) */



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

2021-10-28 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Oct 29 01:49:26 UTC 2021

Modified Files:
src/sys/arch/alpha/include: signal.h

Log Message:
Define __HAVE_STRUCT_SIGCONTEXT regardless of its current visibility.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/alpha/include/signal.h

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



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

2021-07-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jul 22 01:31:55 UTC 2021

Modified Files:
src/sys/arch/alpha/include: proc.h

Log Message:
Use __BITS() to define MDLWP_FP_C.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/alpha/include/proc.h

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



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

2021-07-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jul 22 01:31:55 UTC 2021

Modified Files:
src/sys/arch/alpha/include: proc.h

Log Message:
Use __BITS() to define MDLWP_FP_C.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/alpha/include/proc.h

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

Modified files:

Index: src/sys/arch/alpha/include/proc.h
diff -u src/sys/arch/alpha/include/proc.h:1.22 src/sys/arch/alpha/include/proc.h:1.23
--- src/sys/arch/alpha/include/proc.h:1.22	Fri May 16 19:18:21 2014
+++ src/sys/arch/alpha/include/proc.h	Thu Jul 22 01:31:55 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.22 2014/05/16 19:18:21 matt Exp $ */
+/* $NetBSD: proc.h,v 1.23 2021/07/22 01:31:55 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -61,7 +61,7 @@ struct mdlwp {
  * 	C99 API's, the use of the MDLWP_FP_C bits is defined variously in
  * 	ieeefp.h and fpu.h.
  */
-#define	MDLWP_FP_C	0x007e	/* Extended FP_C Quadword bits */
+#define	MDLWP_FP_C	__BITS(1,22)	/* Extended FP_C Quadword bits */
 #define	MDLWP_FPACTIVE	__BIT(63)	/* FPU is active on LWP's PCU CPU */
 
 /*



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

2021-07-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jul 20 05:43:10 UTC 2021

Modified Files:
src/sys/arch/alpha/include: alpha.h

Log Message:
Define the f_float in-memory format.  Line of the fields in s_float and
t_float.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/alpha.h

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

Modified files:

Index: src/sys/arch/alpha/include/alpha.h
diff -u src/sys/arch/alpha/include/alpha.h:1.45 src/sys/arch/alpha/include/alpha.h:1.46
--- src/sys/arch/alpha/include/alpha.h:1.45	Wed May  5 15:36:17 2021
+++ src/sys/arch/alpha/include/alpha.h	Tue Jul 20 05:43:10 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha.h,v 1.45 2021/05/05 15:36:17 thorpej Exp $ */
+/* $NetBSD: alpha.h,v 1.46 2021/07/20 05:43:10 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -41,18 +41,26 @@
 #ifndef _ALPHA_H_
 #define _ALPHA_H_
 
+typedef union alpha_f_float {
+	uint32_t i;
+	uint32_t frac_hi:  7,
+		 exp:  8,
+		sign:  1,
+		 frac_lo: 16;
+} f_float;
+
 typedef union alpha_s_float {
 	uint32_t i;
 	uint32_t frac: 23,
-		  exp:   8,
-		  sign:  1;
+		  exp:  8,
+		 sign:  1;
 } s_float;
 
 typedef union alpha_t_float {
 	uint64_t i;
 	uint64_t frac: 52,
-		  exp:  11,
-		  sign:  1;
+		  exp: 11,
+		 sign:  1;
 } t_float;
 
 #ifdef _KERNEL
@@ -73,6 +81,7 @@ extern u_long cpu_implver;		/* from IMPL
 extern u_long cpu_amask;		/* from AMASK instruction */
 extern int bootdev_debug;
 extern int alpha_fp_sync_complete;
+extern int alpha_fp_complete_debug;
 extern int alpha_unaligned_print, alpha_unaligned_fix, alpha_unaligned_sigbus;
 extern void (*alpha_delay_fn)(unsigned long);
 



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

2021-07-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jul 20 05:43:10 UTC 2021

Modified Files:
src/sys/arch/alpha/include: alpha.h

Log Message:
Define the f_float in-memory format.  Line of the fields in s_float and
t_float.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/alpha.h

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



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

2021-06-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jun 26 15:02:19 UTC 2021

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.101 src/sys/arch/alpha/include/cpu.h:1.102
--- src/sys/arch/alpha/include/cpu.h:1.101	Tue Apr 20 00:09:45 2021
+++ src/sys/arch/alpha/include/cpu.h	Sat Jun 26 15:02:19 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.101 2021/04/20 00:09:45 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.102 2021/06/26 15:02:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -203,7 +203,7 @@ struct clockframe {
 /*
  * This isn't perfect; if the clock interrupt comes in before the
  * r/m/w cycle is complete, we won't be counted... but it's not
- * like this stastic has to be extremely accurate.
+ * like this statistic has to be extremely accurate.
  */
 #define	CLKF_INTR(framep)		\
 	((curcpu()->ci_intrdepth & 0xf) != 0)	/* see interrupt() */



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

2021-06-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jun 26 15:02:19 UTC 2021

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/alpha/include/cpu.h

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



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

2021-05-31 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 31 17:22:45 UTC 2021

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
Additional comment about the range (0-1025) that's needed for the PT page
reference count, and thus now many bits we need to scare up.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/alpha/include/pmap.h

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

Modified files:

Index: src/sys/arch/alpha/include/pmap.h
diff -u src/sys/arch/alpha/include/pmap.h:1.97 src/sys/arch/alpha/include/pmap.h:1.98
--- src/sys/arch/alpha/include/pmap.h:1.97	Mon May 31 17:16:05 2021
+++ src/sys/arch/alpha/include/pmap.h	Mon May 31 17:22:44 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.97 2021/05/31 17:16:05 thorpej Exp $ */
+/* $NetBSD: pmap.h,v 1.98 2021/05/31 17:22:44 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -360,6 +360,10 @@ struct vm_page_md {
 	 * XXX These fields are only needed for pages that are used
 	 * as PT pages.  It would be nice to find safely-unused fields
 	 * in the vm_page structure that could be used instead.
+	 *
+	 * (Only 11 bits are needed ... we need to be able to count from
+	 * 0-1025 ... 1025 because sometimes we need to take an extra
+	 * reference temporarily in pmap_enter().)
 	 */
 	unsigned int pvh_physpgrefs;	/* # refs as a PT page */
 	unsigned int pvh_spare0;	/* XXX spare field */



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

2021-05-31 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon May 31 17:22:45 UTC 2021

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
Additional comment about the range (0-1025) that's needed for the PT page
reference count, and thus now many bits we need to scare up.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/alpha/include/pmap.h

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



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

2021-05-27 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu May 27 22:05:25 UTC 2021

Modified Files:
src/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Define the arithmetic exception summary bits passed in a0 to entArith.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/include/alpha_cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/alpha_cpu.h
diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.53 src/sys/arch/alpha/include/alpha_cpu.h:1.54
--- src/sys/arch/alpha/include/alpha_cpu.h:1.53	Thu Oct 15 00:55:09 2020
+++ src/sys/arch/alpha/include/alpha_cpu.h	Thu May 27 22:05:24 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_cpu.h,v 1.53 2020/10/15 00:55:09 thorpej Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.54 2021/05/27 22:05:24 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -44,6 +44,7 @@
  *	Virtual Memory Management
  *	Kernel Entry Vectors
  *	MMCSR Fault Type Codes
+ *	AESR Fault Code bits
  *	Translation Buffer Invalidation
  *
  * and miscellaneous PALcode operations.
@@ -265,6 +266,18 @@ typedef unsigned long alpha_pt_entry_t;
 #define	ALPHA_KENTRY_SYS	5
 
 /*
+ * Arithmetic Exception Summary Register.  [OSF/1 PALcode Specific]
+ */
+
+#define	ALPHA_AESR_SWC		__BIT(0)	/* software completion */
+#define	ALPHA_AESR_INV		__BIT(1)	/* invalid operation */
+#define	ALPHA_AESR_DZE		__BIT(2)	/* division by zero */
+#define	ALPHA_AESR_OVF		__BIT(3)	/* overflow */
+#define	ALPHA_AESR_UNF		__BIT(4)	/* underflow */
+#define	ALPHA_AESR_INE		__BIT(5)	/* inexact result */
+#define	ALPHA_AESR_IOV		__BIT(6)	/* integer overflow */
+
+/*
  * MMCSR Fault Type Codes.  [OSF/1 PALcode Specific]
  */
 



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

2021-05-27 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu May 27 22:05:25 UTC 2021

Modified Files:
src/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Define the arithmetic exception summary bits passed in a0 to entArith.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/include/alpha_cpu.h

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



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

2021-05-01 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May  1 13:23:07 UTC 2021

Modified Files:
src/sys/arch/alpha/include: userret.h

Log Message:
Make sure preemption is disabled around PMAP_USERRET(); it uses
per-cpu information.

XXX mi_userret() also internally disables preemption.  Should restructure
these to remove redundancies.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/include/userret.h

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



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

2021-05-01 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May  1 13:23:07 UTC 2021

Modified Files:
src/sys/arch/alpha/include: userret.h

Log Message:
Make sure preemption is disabled around PMAP_USERRET(); it uses
per-cpu information.

XXX mi_userret() also internally disables preemption.  Should restructure
these to remove redundancies.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/include/userret.h

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

Modified files:

Index: src/sys/arch/alpha/include/userret.h
diff -u src/sys/arch/alpha/include/userret.h:1.10 src/sys/arch/alpha/include/userret.h:1.11
--- src/sys/arch/alpha/include/userret.h:1.10	Mon Feb  6 02:14:13 2012
+++ src/sys/arch/alpha/include/userret.h	Sat May  1 13:23:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: userret.h,v 1.10 2012/02/06 02:14:13 matt Exp $ */
+/* $NetBSD: userret.h,v 1.11 2021/05/01 13:23:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -103,7 +103,9 @@ userret(struct lwp *l)
 	struct proc *p = l->l_proc;
 
 	/* Do any deferred user pmap operations. */
+	KPREEMPT_DISABLE(l);
 	PMAP_USERRET(vm_map_pmap(>p_vmspace->vm_map));
+	KPREEMPT_ENABLE(l);
 
 	/* Invoke MI userret code */
 	mi_userret(l);



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

2021-04-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Apr 15 08:23:24 UTC 2021

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Fix fallout from alpha/interrupt.c rev 1.93:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/alpha/alpha/interrupt.c#rev1.93

by which interrupts *seem* to occupy 100% CPU time.

Now, we bump ci_intrdepth for clock interrupt. Therefore, if ci_intrdepth > 1
is observed in statclock(), CPU is actually occupied by interrupts.

Thanks jklos and thorpej for notice!


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.99 src/sys/arch/alpha/include/cpu.h:1.100
--- src/sys/arch/alpha/include/cpu.h:1.99	Thu Oct 15 01:00:01 2020
+++ src/sys/arch/alpha/include/cpu.h	Thu Apr 15 08:23:24 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.99 2020/10/15 01:00:01 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.100 2021/04/15 08:23:24 rin Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -205,7 +205,8 @@ struct clockframe {
  * r/m/w cycle is complete, we won't be counted... but it's not
  * like this stastic has to be extremely accurate.
  */
-#define	CLKF_INTR(framep)	(curcpu()->ci_intrdepth)
+#define	CLKF_INTR(framep)		\
+	(curcpu()->ci_intrdepth > 1)	/* one for clock interrupt itself */
 
 /*
  * This is used during profiling to integrate system time.  It can safely



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

2021-04-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Apr 15 08:23:24 UTC 2021

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Fix fallout from alpha/interrupt.c rev 1.93:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/alpha/alpha/interrupt.c#rev1.93

by which interrupts *seem* to occupy 100% CPU time.

Now, we bump ci_intrdepth for clock interrupt. Therefore, if ci_intrdepth > 1
is observed in statclock(), CPU is actually occupied by interrupts.

Thanks jklos and thorpej for notice!


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/alpha/include/cpu.h

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



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

2020-10-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Oct 15 00:55:09 UTC 2020

Modified Files:
src/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Fix the bit position for the PMI bit in ALPHA_AMASK_BITS.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/alpha/include/alpha_cpu.h

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



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

2020-10-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Oct 15 00:55:09 UTC 2020

Modified Files:
src/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Fix the bit position for the PMI bit in ALPHA_AMASK_BITS.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/alpha/include/alpha_cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/alpha_cpu.h
diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.52 src/sys/arch/alpha/include/alpha_cpu.h:1.53
--- src/sys/arch/alpha/include/alpha_cpu.h:1.52	Tue Sep 29 01:17:22 2020
+++ src/sys/arch/alpha/include/alpha_cpu.h	Thu Oct 15 00:55:09 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha_cpu.h,v 1.52 2020/09/29 01:17:22 thorpej Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.53 2020/10/15 00:55:09 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -314,7 +314,7 @@ typedef unsigned long alpha_pt_entry_t;
  ALPHA_AMASK_PAT|ALPHA_AMASK_PMI)
 
 #define	ALPHA_AMASK_BITS		\
-"\20\17PMI\12PAT\11MVI\3CIX\2FIX\1BWX"
+"\20\15PMI\12PAT\11MVI\3CIX\2FIX\1BWX"
 
 /*
  * Chip family IDs returned by implver instruction



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

2020-10-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Oct  3 17:33:23 UTC 2020

Modified Files:
src/sys/arch/alpha/include: rpb.h

Log Message:
Add a comment describing the rpb::rpb_vptb field.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/alpha/include/rpb.h

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



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

2020-10-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Oct  3 17:33:23 UTC 2020

Modified Files:
src/sys/arch/alpha/include: rpb.h

Log Message:
Add a comment describing the rpb::rpb_vptb field.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/alpha/include/rpb.h

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

Modified files:

Index: src/sys/arch/alpha/include/rpb.h
diff -u src/sys/arch/alpha/include/rpb.h:1.43 src/sys/arch/alpha/include/rpb.h:1.44
--- src/sys/arch/alpha/include/rpb.h:1.43	Mon Apr  8 00:47:21 2019
+++ src/sys/arch/alpha/include/rpb.h	Sat Oct  3 17:33:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: rpb.h,v 1.43 2019/04/08 00:47:21 thorpej Exp $ */
+/* $NetBSD: rpb.h,v 1.44 2020/10/03 17:33:23 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -190,7 +190,7 @@ struct rpb {
 	char		rpb_revision[8];	/*  60; only first 4 valid */
 	uint64_t	rpb_intr_freq;		/*  68; scaled by 4096 */
 	uint64_t	rpb_cc_freq;		/*  70: cycle cntr frequency */
-	u_long		rpb_vptb;		/*  78: */
+	u_long		rpb_vptb;		/*  78: virtual page tbl base */
 	uint64_t	rpb_reserved_arch;	/*  80: */
 	u_long		rpb_tbhint_off;		/*  88: */
 	uint64_t	rpb_pcs_cnt;		/*  90: */



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

2020-09-28 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Sep 28 16:27:47 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpuconf.h

Log Message:
Remove a no-longer-accurate comment.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/include/cpuconf.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpuconf.h
diff -u src/sys/arch/alpha/include/cpuconf.h:1.15 src/sys/arch/alpha/include/cpuconf.h:1.16
--- src/sys/arch/alpha/include/cpuconf.h:1.15	Mon Feb  6 02:14:13 2012
+++ src/sys/arch/alpha/include/cpuconf.h	Mon Sep 28 16:27:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuconf.h,v 1.15 2012/02/06 02:14:13 matt Exp $	*/
+/*	$NetBSD: cpuconf.h,v 1.16 2020/09/28 16:27:47 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -79,7 +79,6 @@ struct platform {
  * tags. It may optionally fill in the cons_init, device_register and
  * mcheck_handler tags.
  *
- * The iointr tag is filled in by set_iointr (in interrupt.c).
  * The clockintr tag is filled in by cpu_initclocks (in clock.c).
  *
  * nocpu is function to call when you can't figure what platform you're on.



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

2020-09-28 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Sep 28 16:27:47 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpuconf.h

Log Message:
Remove a no-longer-accurate comment.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/include/cpuconf.h

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



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

2020-09-23 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 23 18:47:21 UTC 2020

Modified Files:
src/sys/arch/alpha/include: intr.h

Log Message:
Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts,
rather than doing it in alpha_shared_intr_establish() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/alpha/include/intr.h

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

Modified files:

Index: src/sys/arch/alpha/include/intr.h
diff -u src/sys/arch/alpha/include/intr.h:1.79 src/sys/arch/alpha/include/intr.h:1.80
--- src/sys/arch/alpha/include/intr.h:1.79	Tue Sep 22 15:24:01 2020
+++ src/sys/arch/alpha/include/intr.h	Wed Sep 23 18:47:21 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.79 2020/09/22 15:24:01 thorpej Exp $ */
+/* $NetBSD: intr.h,v 1.80 2020/09/23 18:47:21 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -203,9 +203,10 @@ struct alpha_shared_intrhand {
 	struct alpha_shared_intr *ih_intrhead;
 	int	(*ih_fn)(void *);
 	void	*ih_arg;
+	int	(*ih_real_fn)(void *);
+	void	*ih_real_arg;
 	int	ih_level;
 	unsigned int ih_num;
-	int	ih_mpsafe;
 };
 
 struct alpha_shared_intr {



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

2020-09-23 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 23 18:47:21 UTC 2020

Modified Files:
src/sys/arch/alpha/include: intr.h

Log Message:
Use a wrapper to acquire the kernel lock for non-MPSAFE interrupts,
rather than doing it in alpha_shared_intr_establish() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/alpha/include/intr.h

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



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

2020-09-22 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 23 00:52:49 UTC 2020

Modified Files:
src/sys/arch/alpha/include: mutex.h

Log Message:
Move the compile-time assert outside of the __MUTEX_PRIVATE guard.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/include/mutex.h

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

Modified files:

Index: src/sys/arch/alpha/include/mutex.h
diff -u src/sys/arch/alpha/include/mutex.h:1.7 src/sys/arch/alpha/include/mutex.h:1.8
--- src/sys/arch/alpha/include/mutex.h:1.7	Wed Sep 23 00:51:59 2020
+++ src/sys/arch/alpha/include/mutex.h	Wed Sep 23 00:52:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mutex.h,v 1.7 2020/09/23 00:51:59 thorpej Exp $	*/
+/*	$NetBSD: mutex.h,v 1.8 2020/09/23 00:52:49 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc.
@@ -52,8 +52,6 @@ struct kmutex {
 	} u;
 };
 
-__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t));
-
 #define	mtx_owner 			u.mtxa_owner
 #define	mtx_flags 			u.s.mtxs_flags
 #define	mtx_ipl 			u.s.mtxs_ipl
@@ -68,4 +66,6 @@ int	_lock_cas(volatile uintptr_t *, uint
 
 #endif	/* __MUTEX_PRIVATE */
 
+__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t));
+
 #endif /* _ALPHA_MUTEX_H_ */



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

2020-09-22 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 23 00:51:59 UTC 2020

Modified Files:
src/sys/arch/alpha/include: mutex.h

Log Message:
Move the simple lock used for spin mutexes into the sub-structure that
contains the spin lock IPL field.  This shrinks kmutex_t to sizeof(uintptr_t)
on Alpha.

This should have been done in rev 1.3 when the lock ID field was removed,
but better late than never, I guess.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/include/mutex.h

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



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

2020-09-22 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 23 00:52:49 UTC 2020

Modified Files:
src/sys/arch/alpha/include: mutex.h

Log Message:
Move the compile-time assert outside of the __MUTEX_PRIVATE guard.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/alpha/include/mutex.h

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



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

2020-09-22 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Sep 23 00:51:59 UTC 2020

Modified Files:
src/sys/arch/alpha/include: mutex.h

Log Message:
Move the simple lock used for spin mutexes into the sub-structure that
contains the spin lock IPL field.  This shrinks kmutex_t to sizeof(uintptr_t)
on Alpha.

This should have been done in rev 1.3 when the lock ID field was removed,
but better late than never, I guess.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/include/mutex.h

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

Modified files:

Index: src/sys/arch/alpha/include/mutex.h
diff -u src/sys/arch/alpha/include/mutex.h:1.6 src/sys/arch/alpha/include/mutex.h:1.7
--- src/sys/arch/alpha/include/mutex.h:1.6	Fri Nov 29 22:55:33 2019
+++ src/sys/arch/alpha/include/mutex.h	Wed Sep 23 00:51:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mutex.h,v 1.6 2019/11/29 22:55:33 riastradh Exp $	*/
+/*	$NetBSD: mutex.h,v 1.7 2020/09/23 00:51:59 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
 
 struct kmutex {
 	uintptr_t	mtx_pad1;
-	uint32_t	mtx_pad2;
 };
 
 #else	/* __MUTEX_PRIVATE */
@@ -48,14 +47,17 @@ struct kmutex {
 			volatile uint8_t	mtxs_flags;
 			ipl_cookie_t		mtxs_ipl;
 			volatile uint16_t	mtxs_unused;
+			__cpu_simple_lock_t	mtxs_lock;
 		} s;
 	} u;
-	__cpu_simple_lock_t	mtx_lock;
 };
 
+__CTASSERT(sizeof(struct kmutex) == sizeof(uintptr_t));
+
 #define	mtx_owner 			u.mtxa_owner
 #define	mtx_flags 			u.s.mtxs_flags
 #define	mtx_ipl 			u.s.mtxs_ipl
+#define	mtx_lock 			u.s.mtxs_lock
 
 #define	__HAVE_SIMPLE_MUTEXES		1
 #define	__HAVE_MUTEX_STUBS		1



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

2020-09-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep 18 00:07:22 UTC 2020

Modified Files:
src/sys/arch/alpha/include: alpha.h

Log Message:
Rather than having exception_return() at the root of the call graph for
kernel threads, provide a backstop that will prevent them from ever
accidentally trying to return to user space.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/include/alpha.h

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



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

2020-09-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep 18 00:07:22 UTC 2020

Modified Files:
src/sys/arch/alpha/include: alpha.h

Log Message:
Rather than having exception_return() at the root of the call graph for
kernel threads, provide a backstop that will prevent them from ever
accidentally trying to return to user space.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/include/alpha.h

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

Modified files:

Index: src/sys/arch/alpha/include/alpha.h
diff -u src/sys/arch/alpha/include/alpha.h:1.39 src/sys/arch/alpha/include/alpha.h:1.40
--- src/sys/arch/alpha/include/alpha.h:1.39	Thu Sep  3 02:09:09 2020
+++ src/sys/arch/alpha/include/alpha.h	Fri Sep 18 00:07:22 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: alpha.h,v 1.39 2020/09/03 02:09:09 thorpej Exp $ */
+/* $NetBSD: alpha.h,v 1.40 2020/09/18 00:07:22 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -73,11 +73,11 @@ extern int bootdev_debug;
 extern int alpha_fp_sync_complete;
 extern int alpha_unaligned_print, alpha_unaligned_fix, alpha_unaligned_sigbus;
 
-void	XentArith(uint64_t, uint64_t, uint64_t);		/* MAGIC */
+void	XentArith(uint64_t, uint64_t, uint64_t);	/* MAGIC */
 void	XentIF(uint64_t, uint64_t, uint64_t);		/* MAGIC */
 void	XentInt(uint64_t, uint64_t, uint64_t);		/* MAGIC */
 void	XentMM(uint64_t, uint64_t, uint64_t);		/* MAGIC */
-void	XentRestart(void);	/* MAGIC */
+void	XentRestart(void);/* MAGIC */
 void	XentSys(uint64_t, uint64_t, uint64_t);		/* MAGIC */
 void	XentUna(uint64_t, uint64_t, uint64_t);		/* MAGIC */
 void	alpha_init(u_long, u_long, u_long, u_long, u_long);
@@ -86,7 +86,8 @@ int	badaddr(void *, size_t);
 int	badaddr_read(void *, size_t, void *);
 uint64_t console_restart(struct trapframe *);
 void	do_sir(void);
-void	exception_return(void);	/* MAGIC */
+void	exception_return(void);/* MAGIC */
+void	alpha_kthread_backstop(void);			/* MAGIC */
 void	frametoreg(const struct trapframe *, struct reg *);
 void	init_bootstrap_console(void);
 void	init_prom_interface(unsigned long, struct rpb *);



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

2020-09-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 15:50:10 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h types.h

Log Message:
Put the MI cpu_data at the beginning of cpu_info so that it is
cache line aligned.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/alpha/include/types.h

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



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

2020-09-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 15:50:10 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h types.h

Log Message:
Put the MI cpu_data at the beginning of cpu_info so that it is
cache line aligned.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/alpha/include/cpu.h
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/alpha/include/types.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.93 src/sys/arch/alpha/include/cpu.h:1.94
--- src/sys/arch/alpha/include/cpu.h:1.93	Fri Sep  4 03:53:12 2020
+++ src/sys/arch/alpha/include/cpu.h	Fri Sep  4 15:50:09 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.93 2020/09/04 03:53:12 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.94 2020/09/04 15:50:09 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -99,9 +99,9 @@ struct mchkinfo {
  * Per-cpu information.  Data accessed by MI code is marked [MI].
  */
 struct cpu_info {
+	struct cpu_data ci_data;	/* [MI] general per-cpu data */
 	struct lwp *ci_curlwp;		/* [MI] current owner of the cpu */
 	struct lwp *ci_onproc;		/* [MI] current user LWP / kthread */
-	struct cpu_data ci_data;	/* [MI] general per-cpu data */
 	struct cctr_state ci_cc;	/* [MI] cycle counter state */
 
 	volatile int ci_mtx_count;	/* [MI] neg count of spin mutexes */

Index: src/sys/arch/alpha/include/types.h
diff -u src/sys/arch/alpha/include/types.h:1.56 src/sys/arch/alpha/include/types.h:1.57
--- src/sys/arch/alpha/include/types.h:1.56	Thu Apr 30 20:48:10 2020
+++ src/sys/arch/alpha/include/types.h	Fri Sep  4 15:50:09 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.56 2020/04/30 20:48:10 skrll Exp $ */
+/* $NetBSD: types.h,v 1.57 2020/09/04 15:50:09 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -77,6 +77,7 @@ typedef __register_t	register_t;
 #define	__HAVE_ATOMIC64_OPS
 #define	__HAVE_MM_MD_DIRECT_MAPPED_IO
 #define	__HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#define	__HAVE_CPU_DATA_FIRST
 #define	__HAVE_CPU_UAREA_ROUTINES
 #define	__HAVE_CPU_LWP_SETPRIVATE
 #define	__HAVE___LWP_GETPRIVATE_FAST



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 02:59:44 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Missed one in last change.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.42 src/sys/arch/alpha/include/asm.h:1.43
--- src/sys/arch/alpha/include/asm.h:1.42	Fri Sep  4 02:58:18 2020
+++ src/sys/arch/alpha/include/asm.h	Fri Sep  4 02:59:44 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.42 2020/09/04 02:58:18 thorpej Exp $ */
+/* $NetBSD: asm.h,v 1.43 2020/09/04 02:59:44 thorpej Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -673,10 +673,6 @@ label:	ASCIZ msg;		\
 	call_pal PAL_OSF1_rdval	;	\
 	stq	r, CPU_INFO_CURLWP(v0)
 
-#define	GET_FPCURLWP			\
-	call_pal PAL_OSF1_rdval	;	\
-	addq	v0, CPU_INFO_FPCURLWP, v0
-
 #else	/* if not MULTIPROCESSOR... */
 
 IMPORT(cpu_info_primary, CPU_INFO_SIZEOF)



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 02:59:44 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Missed one in last change.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/include/asm.h

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



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 02:58:19 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Garbage-collect GET_CPUINFO; it's no longer used.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/include/asm.h

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



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 02:58:19 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Garbage-collect GET_CPUINFO; it's no longer used.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.41 src/sys/arch/alpha/include/asm.h:1.42
--- src/sys/arch/alpha/include/asm.h:1.41	Fri Sep  4 02:54:56 2020
+++ src/sys/arch/alpha/include/asm.h	Fri Sep  4 02:58:18 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.41 2020/09/04 02:54:56 thorpej Exp $ */
+/* $NetBSD: asm.h,v 1.42 2020/09/04 02:58:18 thorpej Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -665,8 +665,6 @@ label:	ASCIZ msg;		\
  *
  * All return values are in v0.
  */
-#define	GET_CPUINFO		call_pal PAL_OSF1_rdval
-
 #define	GET_CURLWP			\
 	call_pal PAL_OSF1_rdval	;	\
 	ldq	v0, CPU_INFO_CURLWP(v0)
@@ -683,8 +681,6 @@ label:	ASCIZ msg;		\
 
 IMPORT(cpu_info_primary, CPU_INFO_SIZEOF)
 
-#define	GET_CPUINFO		lda v0, cpu_info_primary
-
 #define	GET_CURLWP		lda v0, cpu_info_primary	;	\
 ldq v0, CPU_INFO_CURLWP(v0)
 



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 01:57:29 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Shuffle fields in cpu_info for better cache behavior.
XXX More changes to come after curlwp is overhauled.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/alpha/include/cpu.h

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



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Sep  4 01:57:29 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Shuffle fields in cpu_info for better cache behavior.
XXX More changes to come after curlwp is overhauled.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.91 src/sys/arch/alpha/include/cpu.h:1.92
--- src/sys/arch/alpha/include/cpu.h:1.91	Thu Sep  3 14:27:47 2020
+++ src/sys/arch/alpha/include/cpu.h	Fri Sep  4 01:57:29 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.91 2020/09/03 14:27:47 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.92 2020/09/04 01:57:29 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -84,10 +84,8 @@
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #include 
-#ifndef _KMEMUSER
 #include 
 #include 
-#endif
 
 /*
  * Machine check information.
@@ -97,42 +95,51 @@ struct mchkinfo {
 	volatile int mc_received;	/* machine check was received */
 };
 
+/*
+ * Per-cpu information.  Data accessed by MI code is marked [MI].
+ */
 struct cpu_info {
-	/*
-	 * Public members.
-	 */
-	struct lwp *ci_curlwp;		/* current owner of the processor */
-	struct lwp *ci_onproc;		/* current user LWP / kthread */
-	struct cpu_data ci_data;	/* MI per-cpu data */
-#if !defined(_KMEMUSER)
-	struct cctr_state ci_cc;	/* cycle counter state */
-	struct cpu_info *ci_next;	/* next cpu_info structure */
-	int ci_mtx_count;
-	int ci_mtx_oldspl;
+	struct lwp *ci_curlwp;		/* [MI] current owner of the cpu */
+	struct lwp *ci_onproc;		/* [MI] current user LWP / kthread */
+	struct cpu_data ci_data;	/* [MI] general per-cpu data */
+	struct cctr_state ci_cc;	/* [MI] cycle counter state */
+
+	volatile int ci_mtx_count;	/* [MI] neg count of spin mutexes */
+	volatile int ci_mtx_oldspl;	/* [MI] for spin mutex splx() */
 
-	/*
-	 * Private members.
-	 */
-	struct mchkinfo ci_mcinfo;	/* machine check info */
-	cpuid_t ci_cpuid;		/* our CPU ID */
-	struct cpu_softc *ci_softc;	/* pointer to our device */
-	u_int ci_want_resched;		/* preempt current process */
-	u_int ci_unused;		/* unused */
 	u_long ci_intrdepth;		/* interrupt trap depth */
-	struct trapframe *ci_db_regs;	/* registers for debuggers */
-	uint64_t ci_pcc_freq;		/* cpu cycles/second */
+	struct cpu_softc *ci_softc;	/* pointer to our device */
 
 	struct pmap *ci_pmap;		/* currently-activated pmap */
 	u_int ci_next_asn;		/* next ASN to assign */
 	u_long ci_asn_gen;		/* current ASN generation */
 
-#if defined(MULTIPROCESSOR)
+	struct mchkinfo ci_mcinfo;	/* machine check info */
+
+	/*
+	 * The following must be in their own cache line, as they are
+	 * stored to regularly by remote CPUs.
+	 */
+	volatile u_long ci_ipis		/* interprocessor interrupts pending */
+			__aligned(64);
+	u_int	ci_want_resched;	/* [MI] preempt current process */
+
+	/*
+	 * These are largely static, and will frequently be fetched
+	 * by other CPUs.  For that reason, they get their own cache
+	 * line, too.
+	 */
+	struct cpu_info *ci_next	/* next cpu_info structure */
+			__aligned(64);
+	cpuid_t ci_cpuid;		/* [MI] our CPU ID */
 	volatile u_long ci_flags;	/* flags; see below */
-	volatile u_long ci_ipis;	/* interprocessor interrupts pending */
-#endif
-#endif /* !_KMEMUSER */
+	uint64_t ci_pcc_freq;		/* cpu cycles/second */
+	struct trapframe *ci_db_regs;	/* registers for debuggers */
 };
 
+/* Ensure cpu_info::ci_curlwp is within the signed 16-bit displacement. */
+__CTASSERT(offsetof(struct cpu_info, ci_curlwp) <= 0x7ff0);
+
 #endif /* _KERNEL || _KMEMUSER */
 
 #if defined(_KERNEL)
@@ -141,7 +148,6 @@ struct cpu_info {
 #define	CPUF_PRESENT	0x02		/* CPU is present */
 #define	CPUF_RUNNING	0x04		/* CPU is running */
 #define	CPUF_PAUSED	0x08		/* CPU is paused */
-#define	CPUF_FPUSAVE	0x10		/* CPU is currently in fpusave_cpu() */
 
 extern	struct cpu_info cpu_info_primary;
 extern	struct cpu_info *cpu_info_list;



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

2020-09-03 Thread Jason Thorpe


> On Sep 3, 2020, at 1:14 PM, matthew green  wrote:
> 
> "Jason R Thorpe" writes:
>> Module Name: src
>> Committed By:thorpej
>> Date:Thu Sep  3 04:20:54 UTC 2020
>> 
>> Modified Files:
>>  src/sys/arch/alpha/include: cpu.h
>> 
>> Log Message:
>> Garabage-collect curpcb / cpu_info::ci_curpcb.
> 
> does alpha have modules?  this may be a ABI change needing
> a kernel version bump...

"Sort of."  They don't work (not all of the required relocations are handled 
correctly), so I'm not that concerned.

-- thorpej



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep  3 22:56:11 UTC 2020

Modified Files:
src/sys/arch/alpha/include: param.h

Log Message:
Define COHERENCY_UNIT and CACHE_LINE_SIZE as 64, which is the primary cache
line size on EV6 / EV7.  This is also the default MI fallback definition,
but now we're not relying on that value.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/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/arch/alpha/include/param.h
diff -u src/sys/arch/alpha/include/param.h:1.45 src/sys/arch/alpha/include/param.h:1.46
--- src/sys/arch/alpha/include/param.h:1.45	Mon Jan  7 22:00:30 2019
+++ src/sys/arch/alpha/include/param.h	Thu Sep  3 22:56:11 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.45 2019/01/07 22:00:30 jdolecek Exp $ */
+/* $NetBSD: param.h,v 1.46 2020/09/03 22:56:11 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -71,6 +71,13 @@
 #endif
 
 /*
+ * EV4 (21064) and EV5 (21164) have a 32-byte cache line size.
+ * EV6 (21264) and EV7 (21364) have a 64-byte cache line size.
+ */
+#define	COHERENCY_UNIT	64
+#define	CACHE_LINE_SIZE	64
+
+/*
  * Constants related to network buffer management.
  * MCLBYTES must be no larger than NBPG (the software page size), and,
  * on machines that exchange pages of input or output buffers with mbuf



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep  3 22:56:11 UTC 2020

Modified Files:
src/sys/arch/alpha/include: param.h

Log Message:
Define COHERENCY_UNIT and CACHE_LINE_SIZE as 64, which is the primary cache
line size on EV6 / EV7.  This is also the default MI fallback definition,
but now we're not relying on that value.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/alpha/include/param.h

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



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

2020-09-03 Thread matthew green
"Jason R Thorpe" writes:
> Module Name:  src
> Committed By: thorpej
> Date: Thu Sep  3 04:20:54 UTC 2020
> 
> Modified Files:
>   src/sys/arch/alpha/include: cpu.h
> 
> Log Message:
> Garabage-collect curpcb / cpu_info::ci_curpcb.

does alpha have modules?  this may be a ABI change needing
a kernel version bump...


.mrg.


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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep  3 14:27:47 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Garbage-collect fpcurlwp -- it has been obsolete since FPU tracking
was converted over to PCU.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/alpha/include/cpu.h

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



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

2020-09-03 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep  3 14:27:47 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Garbage-collect fpcurlwp -- it has been obsolete since FPU tracking
was converted over to PCU.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.90 src/sys/arch/alpha/include/cpu.h:1.91
--- src/sys/arch/alpha/include/cpu.h:1.90	Thu Sep  3 04:20:54 2020
+++ src/sys/arch/alpha/include/cpu.h	Thu Sep  3 14:27:47 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.90 2020/09/03 04:20:54 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.91 2020/09/03 14:27:47 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -99,11 +99,6 @@ struct mchkinfo {
 
 struct cpu_info {
 	/*
-	 * Private members accessed in assembly with 8 bit offsets.
-	 */
-	struct lwp *ci_fpcurlwp;	/* current owner of the FPU */
-
-	/*
 	 * Public members.
 	 */
 	struct lwp *ci_curlwp;		/* current owner of the processor */
@@ -172,7 +167,6 @@ void	cpu_pause_resume_all(int);
 #endif /* MULTIPROCESSOR */
 
 #define	curlwp		curcpu()->ci_curlwp
-#define	fpcurlwp	curcpu()->ci_fpcurlwp
 
 /*
  * definitions of cpu-dependent requirements



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

2020-09-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep  3 04:20:54 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Garabage-collect curpcb / cpu_info::ci_curpcb.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/alpha/include/cpu.h

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



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

2020-09-02 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Sep  3 04:20:54 UTC 2020

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Garabage-collect curpcb / cpu_info::ci_curpcb.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.89 src/sys/arch/alpha/include/cpu.h:1.90
--- src/sys/arch/alpha/include/cpu.h:1.89	Sat Aug 29 20:07:00 2020
+++ src/sys/arch/alpha/include/cpu.h	Thu Sep  3 04:20:54 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.89 2020/08/29 20:07:00 thorpej Exp $ */
+/* $NetBSD: cpu.h,v 1.90 2020/09/03 04:20:54 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -102,7 +102,6 @@ struct cpu_info {
 	 * Private members accessed in assembly with 8 bit offsets.
 	 */
 	struct lwp *ci_fpcurlwp;	/* current owner of the FPU */
-	paddr_t ci_curpcb;		/* PA of current HW PCB */
 
 	/*
 	 * Public members.
@@ -174,7 +173,6 @@ void	cpu_pause_resume_all(int);
 
 #define	curlwp		curcpu()->ci_curlwp
 #define	fpcurlwp	curcpu()->ci_fpcurlwp
-#define	curpcb		curcpu()->ci_curpcb
 
 /*
  * definitions of cpu-dependent requirements



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

2020-08-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Aug 29 22:50:27 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
G/C GET_IDLE_PCB -- it hasn't been used for some time.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/include/asm.h

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



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

2020-08-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Aug 29 22:50:27 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
G/C GET_IDLE_PCB -- it hasn't been used for some time.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.38 src/sys/arch/alpha/include/asm.h:1.39
--- src/sys/arch/alpha/include/asm.h:1.38	Sat Apr 18 10:30:49 2020
+++ src/sys/arch/alpha/include/asm.h	Sat Aug 29 22:50:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.38 2020/04/18 10:30:49 martin Exp $ */
+/* $NetBSD: asm.h,v 1.39 2020/08/29 22:50:27 thorpej Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -679,10 +679,6 @@ label:	ASCIZ msg;		\
 	call_pal PAL_OSF1_rdval	;	\
 	addq	v0, CPU_INFO_CURPCB, v0
 
-#define	GET_IDLE_PCB(reg)		\
-	call_pal PAL_OSF1_rdval	;	\
-	ldq	reg, CPU_INFO_IDLE_PCB_PADDR(v0)
-
 #else	/* if not MULTIPROCESSOR... */
 
 IMPORT(cpu_info_primary, CPU_INFO_SIZEOF)
@@ -694,10 +690,6 @@ IMPORT(cpu_info_primary, CPU_INFO_SIZEOF
 #define	GET_FPCURLWP		lda v0, cpu_info_primary + CPU_INFO_FPCURLWP
 
 #define	GET_CURPCB		lda v0, cpu_info_primary + CPU_INFO_CURPCB
-
-#define	GET_IDLE_PCB(reg)		\
-	lda	reg, cpu_info_primary;	\
-	ldq	reg, CPU_INFO_IDLE_PCB_PADDR(reg)
 #endif /* MULTIPROCESSOR */
 #else
 #define	RCSID(_s)		__SECTIONSTRING(.ident, _s)



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

2020-08-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Aug 29 20:08:08 UTC 2020

Modified Files:
src/sys/arch/alpha/include: vmparam.h

Log Message:
Bump UBC_WINSHIFT to 16 (64KB), and UBC_NWINS to 4096 (256MB total).
Alpha has plenty of KVA to use for this.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/include/vmparam.h

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

Modified files:

Index: src/sys/arch/alpha/include/vmparam.h
diff -u src/sys/arch/alpha/include/vmparam.h:1.38 src/sys/arch/alpha/include/vmparam.h:1.39
--- src/sys/arch/alpha/include/vmparam.h:1.38	Mon Dec 10 16:12:19 2012
+++ src/sys/arch/alpha/include/vmparam.h	Sat Aug 29 20:08:08 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.38 2012/12/10 16:12:19 chs Exp $ */
+/* $NetBSD: vmparam.h,v 1.39 2020/08/29 20:08:08 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -58,6 +58,17 @@
 #define	PAGE_MASK	(PAGE_SIZE - 1)
 
 /*
+ * Defaults for Unified Buffer Cache parameters.
+ */
+
+#ifndef UBC_WINSHIFT
+#define	UBC_WINSHIFT	16	/* 64KB */
+#endif
+#ifndef	UBC_NWINS
+#define	UBC_NWINS	4096	/* for a total of 256MB */
+#endif
+
+/*
  * USRSTACK is the top (end) of the user stack.
  *
  * Digital UNIX (formerly DEC OSF/1) places the stack below the



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

2020-08-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Aug 29 20:08:08 UTC 2020

Modified Files:
src/sys/arch/alpha/include: vmparam.h

Log Message:
Bump UBC_WINSHIFT to 16 (64KB), and UBC_NWINS to 4096 (256MB total).
Alpha has plenty of KVA to use for this.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/include/vmparam.h

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



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

2020-07-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 23 19:23:27 UTC 2020

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
unifdef -U_LKM


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/alpha/include/pmap.h

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

Modified files:

Index: src/sys/arch/alpha/include/pmap.h
diff -u src/sys/arch/alpha/include/pmap.h:1.81 src/sys/arch/alpha/include/pmap.h:1.82
--- src/sys/arch/alpha/include/pmap.h:1.81	Sat Mar 14 14:05:42 2020
+++ src/sys/arch/alpha/include/pmap.h	Thu Jul 23 19:23:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.81 2020/03/14 14:05:42 ad Exp $ */
+/* $NetBSD: pmap.h,v 1.82 2020/07/23 19:23:27 skrll Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -188,7 +188,6 @@ typedef struct pv_entry {
 #define	_PMAP_MAY_USE_PROM_CONSOLE
 #endif
 
-#ifndef _LKM
 #if defined(MULTIPROCESSOR)
 struct cpu_info;
 struct trapframe;
@@ -206,7 +205,6 @@ void	pmap_do_tlb_shootdown(struct cpu_in
 #define	PMAP_TLB_SHOOTDOWN(pm, va, pte)		/* nothing */
 #define	PMAP_TLB_SHOOTNOW()			/* nothing */
 #endif /* MULTIPROCESSOR */
-#endif /* _LKM */
 
 #define	pmap_resident_count(pmap)	((pmap)->pm_stats.resident_count)
 #define	pmap_wired_count(pmap)		((pmap)->pm_stats.wired_count)



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

2020-07-23 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Jul 23 19:23:27 UTC 2020

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
unifdef -U_LKM


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/alpha/include/pmap.h

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



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

2020-04-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Apr 18 10:30:49 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Fix copy & pasto in previous (to fix the build)


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.37 src/sys/arch/alpha/include/asm.h:1.38
--- src/sys/arch/alpha/include/asm.h:1.37	Fri Apr 17 14:19:43 2020
+++ src/sys/arch/alpha/include/asm.h	Sat Apr 18 10:30:49 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.37 2020/04/17 14:19:43 joerg Exp $ */
+/* $NetBSD: asm.h,v 1.38 2020/04/18 10:30:49 martin Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -644,7 +644,7 @@ label:	ASCIZ msg;		\
  */
 #define	__SECTIONSTRING(_sec, _str)\
 	.pushsection _sec,"MS",@progbits,1;			\
-	.asciz x;		\
+	.asciz _str;		\
 	.popsection
 
 #ifdef _KERNEL



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

2020-04-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Apr 18 10:30:49 UTC 2020

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Fix copy & pasto in previous (to fix the build)


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/include/asm.h

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



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

2019-11-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov 29 20:05:08 UTC 2019

Modified Files:
src/sys/arch/alpha/include: lock.h mutex.h

Log Message:
Nix mb_* on alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/include/lock.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/alpha/include/mutex.h

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

Modified files:

Index: src/sys/arch/alpha/include/lock.h
diff -u src/sys/arch/alpha/include/lock.h:1.29 src/sys/arch/alpha/include/lock.h:1.30
--- src/sys/arch/alpha/include/lock.h:1.29	Sun Sep 17 00:01:07 2017
+++ src/sys/arch/alpha/include/lock.h	Fri Nov 29 20:05:07 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.29 2017/09/17 00:01:07 christos Exp $ */
+/* $NetBSD: lock.h,v 1.30 2019/11/29 20:05:07 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -174,23 +174,4 @@ do {	\
 #define	SPINLOCK_BACKOFF_HOOK	(void)nullop((void *)0)
 #endif /* MULTIPROCESSOR */
 
-static __inline void
-mb_read(void)
-{
-	__asm __volatile("mb" : : : "memory");
-}
-
-static __inline void
-mb_write(void)
-{
-	/* XXX wmb */
-	__asm __volatile("mb" : : : "memory");
-}
-
-static __inline void
-mb_memory(void)
-{
-	__asm __volatile("mb" : : : "memory");
-}
-
 #endif /* _ALPHA_LOCK_H_ */

Index: src/sys/arch/alpha/include/mutex.h
diff -u src/sys/arch/alpha/include/mutex.h:1.4 src/sys/arch/alpha/include/mutex.h:1.5
--- src/sys/arch/alpha/include/mutex.h:1.4	Mon Apr 28 20:23:11 2008
+++ src/sys/arch/alpha/include/mutex.h	Fri Nov 29 20:05:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mutex.h,v 1.4 2008/04/28 20:23:11 martin Exp $	*/
+/*	$NetBSD: mutex.h,v 1.5 2019/11/29 20:05:07 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc.
@@ -60,8 +60,8 @@ struct kmutex {
 #define	__HAVE_SIMPLE_MUTEXES		1
 #define	__HAVE_MUTEX_STUBS		1
 
-#define	MUTEX_RECEIVE(mtx)		mb_read()
-#define	MUTEX_GIVE(mtx)			mb_memory()
+#define	MUTEX_RECEIVE(mtx)		__asm __volatile("mb" : : : "memory")
+#define	MUTEX_GIVE(mtx)			__asm __volatile("mb" : : : "memory")
 
 #define	MUTEX_CAS(p, o, n)		_lock_cas((p), (o), (n))
 



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

2019-11-29 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov 29 20:05:08 UTC 2019

Modified Files:
src/sys/arch/alpha/include: lock.h mutex.h

Log Message:
Nix mb_* on alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/include/lock.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/alpha/include/mutex.h

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



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

2019-11-24 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Nov 24 15:40:24 UTC 2019

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Make ci_want_resched a u_int.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/alpha/include/cpu.h

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



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

2019-11-24 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Nov 24 15:40:24 UTC 2019

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
Make ci_want_resched a u_int.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.84 src/sys/arch/alpha/include/cpu.h:1.85
--- src/sys/arch/alpha/include/cpu.h:1.84	Wed Aug 22 01:05:21 2018
+++ src/sys/arch/alpha/include/cpu.h	Sun Nov 24 15:40:24 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.84 2018/08/22 01:05:21 msaitoh Exp $ */
+/* $NetBSD: cpu.h,v 1.85 2019/11/24 15:40:24 ad Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -121,7 +121,8 @@ struct cpu_info {
 	struct mchkinfo ci_mcinfo;	/* machine check info */
 	cpuid_t ci_cpuid;		/* our CPU ID */
 	struct cpu_softc *ci_softc;	/* pointer to our device */
-	u_long ci_want_resched;		/* preempt current process */
+	u_int ci_want_resched;		/* preempt current process */
+	u_int ci_unused;		/* unused */
 	u_long ci_intrdepth;		/* interrupt trap depth */
 	struct trapframe *ci_db_regs;	/* registers for debuggers */
 	uint64_t ci_pcc_freq;		/* cpu cycles/second */



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

2019-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 27 21:27:10 UTC 2019

Modified Files:
src/sys/arch/alpha/include: fenv.h

Log Message:
elide gcc-8 shadow warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/alpha/include/fenv.h

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



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

2019-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Oct 27 21:27:10 UTC 2019

Modified Files:
src/sys/arch/alpha/include: fenv.h

Log Message:
elide gcc-8 shadow warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/alpha/include/fenv.h

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

Modified files:

Index: src/sys/arch/alpha/include/fenv.h
diff -u src/sys/arch/alpha/include/fenv.h:1.2 src/sys/arch/alpha/include/fenv.h:1.3
--- src/sys/arch/alpha/include/fenv.h:1.2	Wed Aug 24 02:22:20 2016
+++ src/sys/arch/alpha/include/fenv.h	Sun Oct 27 17:27:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.2 2016/08/24 06:22:20 christos Exp $	*/
+/*	$NetBSD: fenv.h,v 1.3 2019/10/27 21:27:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004-2005 David Schultz 
@@ -72,6 +72,11 @@ __BEGIN_DECLS
 extern const fenv_t	__fe_dfl_env;
 #define	FE_DFL_ENV	(&__fe_dfl_env)
 
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
 static __inline int
 feclearexcept(int __excepts)
 {
@@ -169,6 +174,10 @@ fesetround(int __round)
 	return 0;
 }
 
+#if __GNUC_PREREQ__(8, 0)
+#pragma GCC diagnostic pop
+#endif
+
 int	fegetenv(fenv_t *);
 int	feholdexcept(fenv_t *);
 int	fesetenv(const fenv_t *);



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

2019-04-08 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Apr  8 14:08:16 UTC 2019

Modified Files:
src/sys/arch/alpha/include: elf_machdep.h

Log Message:
Add the R_ALPHA_BRSGP relocation type.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/elf_machdep.h

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

Modified files:

Index: src/sys/arch/alpha/include/elf_machdep.h
diff -u src/sys/arch/alpha/include/elf_machdep.h:1.13 src/sys/arch/alpha/include/elf_machdep.h:1.14
--- src/sys/arch/alpha/include/elf_machdep.h:1.13	Mon Nov  6 03:47:45 2017
+++ src/sys/arch/alpha/include/elf_machdep.h	Mon Apr  8 14:08:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: elf_machdep.h,v 1.13 2017/11/06 03:47:45 christos Exp $ */
+/* $NetBSD: elf_machdep.h,v 1.14 2019/04/08 14:08:16 thorpej Exp $ */
 
 #ifndef	_ALPHA_ELF_MACHDEP_H_
 #define	_ALPHA_ELF_MACHDEP_H_
@@ -55,6 +55,7 @@
 #define	R_ALPHA_GLOB_DAT	25	/* Create GOT entry */
 #define	R_ALPHA_JMP_SLOT	26	/* Create PLT entry */
 #define	R_ALPHA_RELATIVE	27	/* Adjust by program base */
+#define	R_ALPHA_BRSGP		28
 
 /* TLS relocations */
 #define	R_ALPHA_TLS_GD		29



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

2019-04-08 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Apr  8 14:08:16 UTC 2019

Modified Files:
src/sys/arch/alpha/include: elf_machdep.h

Log Message:
Add the R_ALPHA_BRSGP relocation type.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/include/elf_machdep.h

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



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

2018-05-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 19 20:04:41 UTC 2018

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
Implement PMAP_DIRECT / pmap_direct_process() in support of experimental
UBC optimizations.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/alpha/include/pmap.h

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

Modified files:

Index: src/sys/arch/alpha/include/pmap.h
diff -u src/sys/arch/alpha/include/pmap.h:1.79 src/sys/arch/alpha/include/pmap.h:1.80
--- src/sys/arch/alpha/include/pmap.h:1.79	Wed Jan  1 16:09:04 2014
+++ src/sys/arch/alpha/include/pmap.h	Sat May 19 20:04:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.79 2014/01/01 16:09:04 matt Exp $ */
+/* $NetBSD: pmap.h,v 1.80 2018/05/19 20:04:41 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -228,11 +228,24 @@ pmap_remove_all(struct pmap *pmap)
 #define	PMAP_STEAL_MEMORY		/* enable pmap_steal_memory() */
 #define	PMAP_GROWKERNEL			/* enable pmap_growkernel() */
 
+#define	PMAP_DIRECT
+#define	PMAP_DIRECT_MAP(pa)		ALPHA_PHYS_TO_K0SEG((pa))
+#define	PMAP_DIRECT_UNMAP(va)		ALPHA_K0SEG_TO_PHYS((va))
+
+static __inline int
+pmap_direct_process(paddr_t pa, voff_t pgoff, size_t len,
+int (*process)(void *, size_t, void *), void *arg)
+{
+	vaddr_t va = PMAP_DIRECT_MAP(pa);
+
+	return process((void *)(va + pgoff), len, arg);
+}
+
 /*
  * Alternate mapping hooks for pool pages.  Avoids thrashing the TLB.
  */
-#define	PMAP_MAP_POOLPAGE(pa)		ALPHA_PHYS_TO_K0SEG((pa))
-#define	PMAP_UNMAP_POOLPAGE(va)		ALPHA_K0SEG_TO_PHYS((va))
+#define	PMAP_MAP_POOLPAGE(pa)		PMAP_DIRECT_MAP(pa)
+#define	PMAP_UNMAP_POOLPAGE(va)		PMAP_DIRECT_UNMAP(va)
 
 /*
  * Other hooks for the pool allocator.



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

2018-05-19 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 19 20:04:41 UTC 2018

Modified Files:
src/sys/arch/alpha/include: pmap.h

Log Message:
Implement PMAP_DIRECT / pmap_direct_process() in support of experimental
UBC optimizations.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/alpha/include/pmap.h

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



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

2017-10-16 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Oct 17 00:26:35 UTC 2017

Modified Files:
src/sys/arch/alpha/include: fpu.h

Log Message:
Explain our implementation choice for implementation-defined values


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/include/fpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/fpu.h
diff -u src/sys/arch/alpha/include/fpu.h:1.6 src/sys/arch/alpha/include/fpu.h:1.7
--- src/sys/arch/alpha/include/fpu.h:1.6	Sat May 10 15:31:04 2008
+++ src/sys/arch/alpha/include/fpu.h	Tue Oct 17 00:26:35 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.h,v 1.6 2008/05/10 15:31:04 martin Exp $ */
+/* $NetBSD: fpu.h,v 1.7 2017/10/17 00:26:35 maya Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -91,8 +91,8 @@
 #define	IEEE_TRAP_ENABLE_INV _FP_C_DEF(1)
 
 #define	IEEE_INHERIT _FP_C_DEF(14)
-#define	IEEE_MAP_UMZ _FP_C_DEF(13)
-#define	IEEE_MAP_DMZ _FP_C_DEF(12)
+#define	IEEE_MAP_UMZ _FP_C_DEF(13)	/* Map underflowed outputs to zero */
+#define	IEEE_MAP_DMZ _FP_C_DEF(12)	/* Map denormal inputs to zero */
 
 #define FP_C_MIRRORED (IEEE_STATUS_INE | IEEE_STATUS_UNF | IEEE_STATUS_OVF\
 | IEEE_STATUS_DZE | IEEE_STATUS_INV)



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

2017-01-15 Thread Christos Zoulas
On Jan 15, 12:41pm, mar...@duskware.de (Martin Husemann) wrote:
-- Subject: Re: CVS commit: src/sys/arch/alpha/include

| On Sat, Jan 14, 2017 at 09:12:19PM +, Christos Zoulas wrote:
| > No, this is the wrong fix! All asm.h files do that. Please back it out.
| > I've fixed it differently (by not including asm.h in crtbegin.h).
| 
| OK (but other asm.h seem to do it as well).

I did not check all of them, but the ones I did (x86) did not. Nevertheless
this header is only useful in .S files and including it in c compilation
does not make sense.

christos


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

2017-01-15 Thread Martin Husemann
On Sat, Jan 14, 2017 at 09:12:19PM +, Christos Zoulas wrote:
> No, this is the wrong fix! All asm.h files do that. Please back it out.
> I've fixed it differently (by not including asm.h in crtbegin.h).

OK (but other asm.h seem to do it as well).

Martin


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

2017-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 21:58:17 UTC 2017

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Undo; the correct fix was applied in csu/arch/alpha/crtbegin.h


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/include/asm.h

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



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

2017-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 21:58:17 UTC 2017

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Undo; the correct fix was applied in csu/arch/alpha/crtbegin.h


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.35 src/sys/arch/alpha/include/asm.h:1.36
--- src/sys/arch/alpha/include/asm.h:1.35	Sat Jan 14 11:15:10 2017
+++ src/sys/arch/alpha/include/asm.h	Sat Jan 14 16:58:17 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.35 2017/01/14 16:15:10 martin Exp $ */
+/* $NetBSD: asm.h,v 1.36 2017/01/14 21:58:17 christos Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -133,7 +133,6 @@
 /*
  * Useful stuff.
  */
-#undef __CONCAT
 #ifdef __STDC__
 #define	__CONCAT(a,b)	a ## b
 #else
@@ -643,7 +642,6 @@ label:	ASCIZ msg;		\
 /*
  * Kernel RCS ID tag and copyright macros
  */
-#undef __SECTIONSTRING
 #define	__SECTIONSTRING(_sec, _str)\
 	.pushsection _sec ; .asciz _str ; .popsection
 



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

2017-01-14 Thread Christos Zoulas
In article <20170114161510.b8f2ff...@cvs.netbsd.org>,
Martin Husemann  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  martin
>Date:  Sat Jan 14 16:15:10 UTC 2017
>
>Modified Files:
>   src/sys/arch/alpha/include: asm.h
>
>Log Message:
>Avoid stupid gcc redefinition warnings by #undef before redefine.

No, this is the wrong fix! All asm.h files do that. Please back it out.
I've fixed it differently (by not including asm.h in crtbegin.h).

christos



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

2017-01-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan 14 16:15:10 UTC 2017

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Avoid stupid gcc redefinition warnings by #undef before redefine.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/include/asm.h

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

Modified files:

Index: src/sys/arch/alpha/include/asm.h
diff -u src/sys/arch/alpha/include/asm.h:1.34 src/sys/arch/alpha/include/asm.h:1.35
--- src/sys/arch/alpha/include/asm.h:1.34	Thu Jul 11 19:50:55 2013
+++ src/sys/arch/alpha/include/asm.h	Sat Jan 14 16:15:10 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.34 2013/07/11 19:50:55 matt Exp $ */
+/* $NetBSD: asm.h,v 1.35 2017/01/14 16:15:10 martin Exp $ */
 
 /*
  * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -133,6 +133,7 @@
 /*
  * Useful stuff.
  */
+#undef __CONCAT
 #ifdef __STDC__
 #define	__CONCAT(a,b)	a ## b
 #else
@@ -642,6 +643,7 @@ label:	ASCIZ msg;		\
 /*
  * Kernel RCS ID tag and copyright macros
  */
+#undef __SECTIONSTRING
 #define	__SECTIONSTRING(_sec, _str)\
 	.pushsection _sec ; .asciz _str ; .popsection
 



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

2017-01-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan 14 16:15:10 UTC 2017

Modified Files:
src/sys/arch/alpha/include: asm.h

Log Message:
Avoid stupid gcc redefinition warnings by #undef before redefine.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/include/asm.h

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



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

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 00:35:37 UTC 2017

Modified Files:
src/sys/arch/alpha/include: intr.h

Log Message:
fix types.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/alpha/include/intr.h

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



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

2017-01-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 00:35:37 UTC 2017

Modified Files:
src/sys/arch/alpha/include: intr.h

Log Message:
fix types.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/alpha/include/intr.h

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

Modified files:

Index: src/sys/arch/alpha/include/intr.h
diff -u src/sys/arch/alpha/include/intr.h:1.71 src/sys/arch/alpha/include/intr.h:1.72
--- src/sys/arch/alpha/include/intr.h:1.71	Mon May 19 18:47:53 2014
+++ src/sys/arch/alpha/include/intr.h	Fri Jan 13 19:35:37 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.71 2014/05/19 22:47:53 rmind Exp $ */
+/* $NetBSD: intr.h,v 1.72 2017/01/14 00:35:37 christos Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -147,7 +147,7 @@ static __inline int
 _splraise(int s)
 {
 	int cur = alpha_pal_rdps() & ALPHA_PSL_IPL_MASK;
-	return (s > cur ? alpha_pal_swpipl(s) : cur);
+	return (s > cur ? (int)alpha_pal_swpipl(s) : cur);
 }
 
 #define	splraiseipl(icookie)	_splraise((icookie)._psl)



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 07:39:55 UTC 2016

Modified Files:
src/sys/arch/alpha/include: ieeefp.h

Log Message:
match the name with the FE_ constant from fenv.h


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/ieeefp.h

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

Modified files:

Index: src/sys/arch/alpha/include/ieeefp.h
diff -u src/sys/arch/alpha/include/ieeefp.h:1.9 src/sys/arch/alpha/include/ieeefp.h:1.10
--- src/sys/arch/alpha/include/ieeefp.h:1.9	Tue Aug 23 05:59:26 2016
+++ src/sys/arch/alpha/include/ieeefp.h	Thu Aug 25 03:39:55 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.9 2016/08/23 09:59:26 christos Exp $ */
+/* $NetBSD: ieeefp.h,v 1.10 2016/08/25 07:39:55 christos Exp $ */
 
 /*
  * Written by J.T. Conklin, Apr 28, 1995
@@ -44,7 +44,7 @@ typedef int fp_except;
 #define	FP_X_OFL	FE_OVERFLOW	/* overflow exception */
 #define	FP_X_UFL	FE_UNDERFLOW	/* underflow exception */
 #define	FP_X_IMP	FE_INEXACT	/* imprecise (prec. loss; "inexact") */
-#define	FP_X_IOV	FE_IOVERFLOW	/* integer overflow */
+#define	FP_X_IOV	FE_INTOVF	/* integer overflow */
 
 /*
  * fp_rnd bits match the fpcr, below, as well as bits 12:11



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

2016-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 25 07:39:55 UTC 2016

Modified Files:
src/sys/arch/alpha/include: ieeefp.h

Log Message:
match the name with the FE_ constant from fenv.h


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/ieeefp.h

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



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

2016-08-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 24 06:22:20 UTC 2016

Modified Files:
src/sys/arch/alpha/include: fenv.h

Log Message:
restore the constants to the old values to match what the kernel expects
internally.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/fenv.h

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

Modified files:

Index: src/sys/arch/alpha/include/fenv.h
diff -u src/sys/arch/alpha/include/fenv.h:1.1 src/sys/arch/alpha/include/fenv.h:1.2
--- src/sys/arch/alpha/include/fenv.h:1.1	Tue Aug 23 05:59:26 2016
+++ src/sys/arch/alpha/include/fenv.h	Wed Aug 24 02:22:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.1 2016/08/23 09:59:26 christos Exp $	*/
+/*	$NetBSD: fenv.h,v 1.2 2016/08/24 06:22:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004-2005 David Schultz 
@@ -37,12 +37,12 @@ typedef	__uint64_t	fenv_t;
 typedef	__uint16_t	fexcept_t;
 
 /* Exception flags */
-#define	FE_INVALID	0x02
-#define	FE_DIVBYZERO	0x04
-#define	FE_OVERFLOW	0x08
-#define	FE_UNDERFLOW	0x10
-#define	FE_INEXACT	0x20
-#define	FE_INTOVF	0x40	/* not maskable */
+#define	FE_INVALID	0x01
+#define	FE_DIVBYZERO	0x02
+#define	FE_OVERFLOW	0x04
+#define	FE_UNDERFLOW	0x08
+#define	FE_INEXACT	0x10
+#define	FE_INTOVF	0x20	/* not maskable */
 #define	FE_ALL_EXCEPT	(FE_DIVBYZERO | FE_INEXACT | FE_INTOVF | \
 			 FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
 
@@ -55,7 +55,7 @@ typedef	__uint16_t	fexcept_t;
 			 FE_UPWARD | FE_TOWARDZERO)
 #define	_ROUND_SHIFT	58
 
-#define	_FPUSW_SHIFT	51
+#define	_FPUSW_SHIFT	52
 
 #define	__excb()	__asm __volatile("excb")
 #define	__mf_fpcr(__cw)	__asm __volatile("mf_fpcr %0" : "=f" (*(__cw)))



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

2016-08-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 24 06:22:20 UTC 2016

Modified Files:
src/sys/arch/alpha/include: fenv.h

Log Message:
restore the constants to the old values to match what the kernel expects
internally.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/fenv.h

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



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

2016-08-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 23 09:59:26 UTC 2016

Modified Files:
src/sys/arch/alpha/include: Makefile ieeefp.h
Added Files:
src/sys/arch/alpha/include: fenv.h

Log Message:
fenv.h for alpha


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/alpha/include/fenv.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/include/ieeefp.h

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

Modified files:

Index: src/sys/arch/alpha/include/Makefile
diff -u src/sys/arch/alpha/include/Makefile:1.32 src/sys/arch/alpha/include/Makefile:1.33
--- src/sys/arch/alpha/include/Makefile:1.32	Fri Aug 12 18:22:49 2011
+++ src/sys/arch/alpha/include/Makefile	Tue Aug 23 05:59:26 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.32 2011/08/12 22:22:49 dyoung Exp $
+#	$NetBSD: Makefile,v 1.33 2016/08/23 09:59:26 christos Exp $
 
 INCSDIR= /usr/include/alpha
 
@@ -7,7 +7,7 @@ INCS=	alpha_cpu.h ansi.h aout_machdep.h 
 	cdefs.h cfbreg.h cpu.h cpuconf.h \
 	disklabel.h \
 	ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \
-	float.h fpu.h frame.h \
+	fenv.h float.h fpu.h frame.h \
 	ieee.h ieeefp.h \
 	int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \
 	intr.h \

Index: src/sys/arch/alpha/include/ieeefp.h
diff -u src/sys/arch/alpha/include/ieeefp.h:1.8 src/sys/arch/alpha/include/ieeefp.h:1.9
--- src/sys/arch/alpha/include/ieeefp.h:1.8	Sun Feb  5 21:14:13 2012
+++ src/sys/arch/alpha/include/ieeefp.h	Tue Aug 23 05:59:26 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ieeefp.h,v 1.8 2012/02/06 02:14:13 matt Exp $ */
+/* $NetBSD: ieeefp.h,v 1.9 2016/08/23 09:59:26 christos Exp $ */
 
 /*
  * Written by J.T. Conklin, Apr 28, 1995
@@ -12,26 +12,7 @@
 
 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
 
-typedef int fenv_t;
-typedef int fexcept_t;
-
-#define	FE_INVALID	0x01	/* invalid operation exception */
-#define	FE_DIVBYZERO	0x02	/* divide-by-zero exception */
-#define	FE_OVERFLOW	0x04	/* overflow exception */
-#define	FE_UNDERFLOW	0x08	/* underflow exception */
-#define	FE_INEXACT	0x10	/* imprecise (loss of precision; "inexact") */
-#define	FE_IOVERFLOW	0x20/* integer overflow */
-
-#define	FE_ALL_EXCEPT	0x3f
-
-/*
- * These bits match the fpcr as well as bits 12:11
- * in fp operate instructions
- */
-#define	FE_TOWARDZERO	0	/* round to zero (truncate) */
-#define	FE_DOWNWARD	1	/* round toward negative infinity */
-#define	FE_TONEAREST	2	/* round to nearest representable number */
-#define	FE_UPWARD	3	/* round toward positive infinity */
+#include 
 
 #if !defined(_ISOC99_SOURCE)
 

Added files:

Index: src/sys/arch/alpha/include/fenv.h
diff -u /dev/null src/sys/arch/alpha/include/fenv.h:1.1
--- /dev/null	Tue Aug 23 05:59:26 2016
+++ src/sys/arch/alpha/include/fenv.h	Tue Aug 23 05:59:26 2016
@@ -0,0 +1,186 @@
+/*	$NetBSD: fenv.h,v 1.1 2016/08/23 09:59:26 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2004-2005 David Schultz 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/lib/msun/alpha/fenv.h,v 1.3 2005/03/16 19:03:44 das Exp $
+ */
+
+#ifndef	_ALPHA_FENV_H_
+#define	_ALPHA_FENV_H_
+
+#include 
+
+typedef	__uint64_t	fenv_t;
+typedef	__uint16_t	fexcept_t;
+
+/* Exception flags */
+#define	FE_INVALID	0x02
+#define	FE_DIVBYZERO	0x04
+#define	FE_OVERFLOW	0x08
+#define	FE_UNDERFLOW	0x10
+#define	FE_INEXACT	0x20
+#define	FE_INTOVF	0x40	/* not maskable */
+#define	FE_ALL_EXCEPT	(FE_DIVBYZERO | FE_INEXACT | FE_INTOVF | \
+			 FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
+
+/* Rounding modes */
+#define	FE_TOWARDZERO	0x00
+#define	FE_DOWNWARD	

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

2016-08-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 23 09:59:26 UTC 2016

Modified Files:
src/sys/arch/alpha/include: Makefile ieeefp.h
Added Files:
src/sys/arch/alpha/include: fenv.h

Log Message:
fenv.h for alpha


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/include/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/alpha/include/fenv.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/include/ieeefp.h

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



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

2016-01-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 24 16:47:50 UTC 2016

Modified Files:
src/sys/arch/alpha/include: bus_user.h types.h

Log Message:
use __paddr_t since this is a userland API.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/bus_user.h
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/include/types.h

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

Modified files:

Index: src/sys/arch/alpha/include/bus_user.h
diff -u src/sys/arch/alpha/include/bus_user.h:1.1 src/sys/arch/alpha/include/bus_user.h:1.2
--- src/sys/arch/alpha/include/bus_user.h:1.1	Fri Aug 12 18:23:12 2011
+++ src/sys/arch/alpha/include/bus_user.h	Sun Jan 24 11:47:50 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_user.h,v 1.1 2011/08/12 22:23:12 dyoung Exp $ */
+/* $NetBSD: bus_user.h,v 1.2 2016/01/24 16:47:50 christos Exp $ */
 /*
  * XXX This file is a stopgap intended to keep NetBSD/alpha buildable
  * XXX while developers figure out whether/how to expose to userland
@@ -24,8 +24,8 @@ typedef u_long bus_size_t;
 struct alpha_bus_space_translation {
 	bus_addr_t	abst_bus_start;	/* start of bus window */
 	bus_addr_t	abst_bus_end;	/* end of bus window */
-	paddr_t		abst_sys_start;	/* start of sysBus window */
-	paddr_t		abst_sys_end;	/* end of sysBus window */
+	__paddr_t	abst_sys_start;	/* start of sysBus window */
+	__paddr_t	abst_sys_end;	/* end of sysBus window */
 	int		abst_addr_shift;/* address shift */
 	int		abst_size_shift;/* size shift */
 	int		abst_flags;	/* flags; see below */

Index: src/sys/arch/alpha/include/types.h
diff -u src/sys/arch/alpha/include/types.h:1.53 src/sys/arch/alpha/include/types.h:1.54
--- src/sys/arch/alpha/include/types.h:1.53	Sat Jan 23 17:31:19 2016
+++ src/sys/arch/alpha/include/types.h	Sun Jan 24 11:47:50 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.53 2016/01/23 22:31:19 christos Exp $ */
+/* $NetBSD: types.h,v 1.54 2016/01/24 16:47:50 christos Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -44,8 +44,13 @@ typedef struct label_t {
 } label_t;
 #endif
 
+typedef	int		__cpu_simple_lock_nv_t;
+typedef long int	__register_t;
+typedef unsigned long	__paddr_t;	/* XXX: For bus_user.h */
+
+
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
-typedef unsigned long	paddr_t;
+typedef __paddr_t	paddr_t;
 typedef unsigned long	psize_t;
 typedef unsigned long	vaddr_t;
 typedef unsigned long	vsize_t;
@@ -56,13 +61,10 @@ typedef unsigned long	vsize_t;
 #define	PRIxVSIZE	"lx"
 #define	PRIuVSIZE	"lu"
 
-typedef long int	register_t;
+typedef __register_t	register_t;
 #define	PRIxREGISTER	"lx"
 #endif
 
-typedef	int		__cpu_simple_lock_nv_t;
-typedef long int	__register_t;
-
 #define	__SIMPLELOCK_LOCKED	1
 #define	__SIMPLELOCK_UNLOCKED	0
 



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

2016-01-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 24 16:47:50 UTC 2016

Modified Files:
src/sys/arch/alpha/include: bus_user.h types.h

Log Message:
use __paddr_t since this is a userland API.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/alpha/include/bus_user.h
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/alpha/include/types.h

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



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

2015-08-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Aug 28 09:30:01 UTC 2015

Modified Files:
src/sys/arch/alpha/include: types.h

Log Message:
Convert to __cpu_simple_lock_nv_t.  Somehow missed alpha in the earlier
commit.  Thanks to uebs for pointing it out.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/include/types.h

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



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

2015-08-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Aug 28 09:30:01 UTC 2015

Modified Files:
src/sys/arch/alpha/include: types.h

Log Message:
Convert to __cpu_simple_lock_nv_t.  Somehow missed alpha in the earlier
commit.  Thanks to uebs for pointing it out.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/include/types.h

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

Modified files:

Index: src/sys/arch/alpha/include/types.h
diff -u src/sys/arch/alpha/include/types.h:1.50 src/sys/arch/alpha/include/types.h:1.51
--- src/sys/arch/alpha/include/types.h:1.50	Thu Jan  8 22:27:17 2015
+++ src/sys/arch/alpha/include/types.h	Fri Aug 28 09:30:01 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.50 2015/01/08 22:27:17 riastradh Exp $ */
+/* $NetBSD: types.h,v 1.51 2015/08/28 09:30:01 pooka Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -63,7 +63,7 @@ typedef long int	register_t;
 #define	PRIxREGISTER	lx
 #endif
 
-typedef	volatile int		__cpu_simple_lock_t;
+typedef	int		__cpu_simple_lock_nv_t;
 
 #define	__SIMPLELOCK_LOCKED	1
 #define	__SIMPLELOCK_UNLOCKED	0



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

2014-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jan 22 22:52:04 UTC 2014

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
undo rump workaround


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/alpha/include/cpu.h

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



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

2014-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 21 20:18:46 UTC 2014

Modified Files:
src/sys/arch/alpha/include: cpu.h

Log Message:
rumpkernel needs ci_pcc_freq


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/alpha/include/cpu.h

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

Modified files:

Index: src/sys/arch/alpha/include/cpu.h
diff -u src/sys/arch/alpha/include/cpu.h:1.80 src/sys/arch/alpha/include/cpu.h:1.81
--- src/sys/arch/alpha/include/cpu.h:1.80	Sat Nov  9 19:50:13 2013
+++ src/sys/arch/alpha/include/cpu.h	Tue Jan 21 15:18:46 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.80 2013/11/10 00:50:13 christos Exp $ */
+/* $NetBSD: cpu.h,v 1.81 2014/01/21 20:18:46 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -109,7 +109,7 @@ struct cpu_info {
 	 */
 	struct lwp *ci_curlwp;		/* current owner of the processor */
 	struct cpu_data ci_data;	/* MI per-cpu data */
-#ifndef _KMEMUSER
+#if !defined(_KMEMUSER) || defined(_RUMPKERNEL)
 	struct cctr_state ci_cc;	/* cycle counter state */
 	struct cpu_info *ci_next;	/* next cpu_info structure */
 	int ci_mtx_count;
@@ -130,7 +130,7 @@ struct cpu_info {
 	volatile u_long ci_flags;	/* flags; see below */
 	volatile u_long ci_ipis;	/* interprocessor interrupts pending */
 #endif
-#endif /* _KMEMUSER */
+#endif /* !_KMEMUSER || _RUMPKERNEL */
 };
 
 #endif /* _KERNEL || _KMEMUSER */



  1   2   >