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

2021-01-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jan 25 20:05:30 UTC 2021

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

Log Message:
avoid needing .  fixes sparc64 build.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/sparc/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/sparc/include/pmap.h
diff -u src/sys/arch/sparc/include/pmap.h:1.96 src/sys/arch/sparc/include/pmap.h:1.97
--- src/sys/arch/sparc/include/pmap.h:1.96	Sun Jan 24 07:36:54 2021
+++ src/sys/arch/sparc/include/pmap.h	Mon Jan 25 20:05:29 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.96 2021/01/24 07:36:54 mrg Exp $ */
+/*	$NetBSD: pmap.h,v 1.97 2021/01/25 20:05:29 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -55,8 +55,6 @@ struct vm_page;
 #include 
 #include 
 
-#include 
-
 #include 
 
 /*
@@ -190,6 +188,7 @@ struct segmap {
 #define PMAP_NULL	((pmap_t)0)
 
 /* Mostly private data exported for a few key consumers. */
+struct memarr;
 extern struct memarr *pmemarr;
 extern int npmemarr;
 extern vaddr_t prom_vstart;



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

2020-12-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Dec 18 00:45:53 UTC 2020

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

Log Message:
remove unused and #if 0'd since introduced in 1996 struct kvm_cpustate.
sparc kvm was handled differently for the sun4m port.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc/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/sparc/include/pmap.h
diff -u src/sys/arch/sparc/include/pmap.h:1.94 src/sys/arch/sparc/include/pmap.h:1.95
--- src/sys/arch/sparc/include/pmap.h:1.94	Sun Sep  6 10:48:21 2020
+++ src/sys/arch/sparc/include/pmap.h	Fri Dec 18 00:45:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.94 2020/09/06 10:48:21 mrg Exp $ */
+/*	$NetBSD: pmap.h,v 1.95 2020/12/18 00:45:52 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -183,15 +183,6 @@ struct segmap {
 	int8_t	sg_nwired;		/* number of wired pages */
 };
 
-#if 0
-struct kvm_cpustate {
-	int		kvm_npmemarr;
-	struct memarr	kvm_pmemarr[MA_SIZE];
-	int		kvm_seginval;			/* [4,4c] */
-	struct segmap	kvm_segmap_store[NKREG*NSEGRG];	/* [4,4c] */
-}/*not yet used*/;
-#endif
-
 #ifdef _KERNEL
 
 #define PMAP_NULL	((pmap_t)0)



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

2020-12-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  6 03:19:15 UTC 2020

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

Log Message:
undo previous; __register_t is already defined


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sparc/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/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.69 src/sys/arch/sparc/include/types.h:1.70
--- src/sys/arch/sparc/include/types.h:1.69	Sat Dec  5 21:23:12 2020
+++ src/sys/arch/sparc/include/types.h	Sat Dec  5 22:19:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.69 2020/12/06 02:23:12 christos Exp $ */
+/*	$NetBSD: types.h,v 1.70 2020/12/06 03:19:14 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,10 +57,9 @@
 #include 
 #include 
 
-typedef unsigned long int	__register_t;
 /* The following are unsigned to prevent annoying sign extended pointers. */
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
-typedef __register_t		register_t;
+typedef unsigned long int	register_t;
 #define	PRIxREGISTER		"lx"
 typedef unsigned int		register32_t;
 #define	PRIxREGISTER32		"x"



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

2020-09-14 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 14 09:47:43 UTC 2020

Modified Files:
src/sys/arch/sparc/include: ptrace.h

Log Message:
Switch from register_t to unsigned long int

Removes dependency on _KERNTYPES.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/include/ptrace.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/sparc/include/ptrace.h
diff -u src/sys/arch/sparc/include/ptrace.h:1.15 src/sys/arch/sparc/include/ptrace.h:1.16
--- src/sys/arch/sparc/include/ptrace.h:1.15	Tue Dec 24 14:50:59 2019
+++ src/sys/arch/sparc/include/ptrace.h	Mon Sep 14 09:47:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.15 2019/12/24 14:50:59 kamil Exp $ */
+/*	$NetBSD: ptrace.h,v 1.16 2020/09/14 09:47:43 kamil Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,14 +55,14 @@
 	"PT_SETFPREGS",
 
 #include 
-#define PTRACE_REG_PC(r)	((register_t)(r)->r_pc)
+#define PTRACE_REG_PC(r)	((unsigned long int)(r)->r_pc)
 #define PTRACE_REG_FP(r)	0 /* not stored in struct reg */
 #define PTRACE_REG_SET_PC(r, v)	do {	\
 	(r)->r_pc = (v);		\
 	(r)->r_npc = (v) + 4;		\
 } while (/*CONSTCOND*/0)
-#define PTRACE_REG_SP(r)	((register_t)(r)->r_out[6])
-#define PTRACE_REG_INTRV(r)	((register_t)(r)->r_out[0])
+#define PTRACE_REG_SP(r)	((unsigned long int)(r)->r_out[6])
+#define PTRACE_REG_INTRV(r)	((unsigned long int)(r)->r_out[0])
 
 #define PTRACE_ILLEGAL_ASM	__asm __volatile (".word 0" : : : "memory")
 



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

2020-05-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun May 17 06:30:44 UTC 2020

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

Log Message:
__HAVE_CPU_DATA_FIRST is still true for sparc64 (which shares this file)


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sparc/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/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.67 src/sys/arch/sparc/include/types.h:1.68
--- src/sys/arch/sparc/include/types.h:1.67	Sat May 16 17:52:42 2020
+++ src/sys/arch/sparc/include/types.h	Sun May 17 06:30:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.67 2020/05/16 17:52:42 ad Exp $ */
+/*	$NetBSD: types.h,v 1.68 2020/05/17 06:30:44 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -127,6 +127,7 @@ typedef unsigned long int	__register_t;
 #define	__HAVE_RAS
 
 #ifdef __sparc_v9__
+#define	__HAVE_CPU_DATA_FIRST
 #define	__HAVE_DEVICE_REGISTER_POSTCONFIG
 #define	__HAVE_ATOMIC64_OPS
 #define	__HAVE_CPU_COUNTER	/* sparc v9 CPUs have %tick */



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

2020-05-16 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat May 16 17:52:42 UTC 2020

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

Log Message:
PR port-sparc/55261: sparc still panics running ATF tests

Reinstate the cpu_info change and remove __HAVE_CPU_DATA_FIRST to fix
build failure.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/sparc/include/cpu.h
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/sparc/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/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.107 src/sys/arch/sparc/include/cpu.h:1.108
--- src/sys/arch/sparc/include/cpu.h:1.107	Sat May 16 17:37:28 2020
+++ src/sys/arch/sparc/include/cpu.h	Sat May 16 17:52:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.107 2020/05/16 17:37:28 ad Exp $ */
+/*	$NetBSD: cpu.h,v 1.108 2020/05/16 17:52:42 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -175,8 +175,6 @@ struct xpmsg {
  */
 
 struct cpu_info {
-	struct cpu_data ci_data;	/* MI per-cpu data */
-
 	/*
 	 * Primary Inter-processor message area.  Keep this aligned
 	 * to a cache line boundary if possible, as the structure
@@ -395,6 +393,8 @@ struct cpu_info {
 	struct evcnt ci_xpmsg_bogus;
 	struct evcnt ci_intrcnt[16];
 	struct evcnt ci_sintrcnt[16];
+
+	struct cpu_data ci_data;	/* MI per-cpu data */
 };
 
 #endif /* _KERNEL || _KMEMUSER */

Index: src/sys/arch/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.66 src/sys/arch/sparc/include/types.h:1.67
--- src/sys/arch/sparc/include/types.h:1.66	Sat Jan 23 22:31:20 2016
+++ src/sys/arch/sparc/include/types.h	Sat May 16 17:52:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.66 2016/01/23 22:31:20 christos Exp $ */
+/*	$NetBSD: types.h,v 1.67 2020/05/16 17:52:42 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -123,7 +123,6 @@ typedef unsigned long int	__register_t;
 #define	__HAVE_NEW_STYLE_BUS_H
 #define	__HAVE_SYSCALL_INTERN
 #define	__GENERIC_SOFT_INTERRUPTS_ALL_LEVELS
-#define __HAVE_CPU_DATA_FIRST
 #define	__HAVE_CPU_VMSPACE_EXEC
 #define	__HAVE_RAS
 



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

2020-05-16 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat May 16 17:37:28 UTC 2020

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

Log Message:
Back out previous - it doesn't work.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/sparc/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/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.106 src/sys/arch/sparc/include/cpu.h:1.107
--- src/sys/arch/sparc/include/cpu.h:1.106	Fri May 15 18:45:08 2020
+++ src/sys/arch/sparc/include/cpu.h	Sat May 16 17:37:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.106 2020/05/15 18:45:08 ad Exp $ */
+/*	$NetBSD: cpu.h,v 1.107 2020/05/16 17:37:28 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -175,6 +175,8 @@ struct xpmsg {
  */
 
 struct cpu_info {
+	struct cpu_data ci_data;	/* MI per-cpu data */
+
 	/*
 	 * Primary Inter-processor message area.  Keep this aligned
 	 * to a cache line boundary if possible, as the structure
@@ -393,8 +395,6 @@ struct cpu_info {
 	struct evcnt ci_xpmsg_bogus;
 	struct evcnt ci_intrcnt[16];
 	struct evcnt ci_sintrcnt[16];
-
-	struct cpu_data ci_data;	/* MI per-cpu data */
 };
 
 #endif /* _KERNEL || _KMEMUSER */



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

2020-05-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri May 15 18:45:08 UTC 2020

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

Log Message:
PR port-sparc/55261: sparc still panics running ATF tests

Put cpu_data at the end of cpu_info to see how that modifies the symptom.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/sparc/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/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.105 src/sys/arch/sparc/include/cpu.h:1.106
--- src/sys/arch/sparc/include/cpu.h:1.105	Tue Mar 10 03:48:05 2020
+++ src/sys/arch/sparc/include/cpu.h	Fri May 15 18:45:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.105 2020/03/10 03:48:05 christos Exp $ */
+/*	$NetBSD: cpu.h,v 1.106 2020/05/15 18:45:08 ad Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -175,8 +175,6 @@ struct xpmsg {
  */
 
 struct cpu_info {
-	struct cpu_data ci_data;	/* MI per-cpu data */
-
 	/*
 	 * Primary Inter-processor message area.  Keep this aligned
 	 * to a cache line boundary if possible, as the structure
@@ -395,6 +393,8 @@ struct cpu_info {
 	struct evcnt ci_xpmsg_bogus;
 	struct evcnt ci_intrcnt[16];
 	struct evcnt ci_sintrcnt[16];
+
+	struct cpu_data ci_data;	/* MI per-cpu data */
 };
 
 #endif /* _KERNEL || _KMEMUSER */



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

2020-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar 10 03:48:05 UTC 2020

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

Log Message:
tuck curproc/curlwp under _KERNEL only (no _KMEMUSER)


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/sparc/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/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.104 src/sys/arch/sparc/include/cpu.h:1.105
--- src/sys/arch/sparc/include/cpu.h:1.104	Mon Dec 30 17:13:47 2019
+++ src/sys/arch/sparc/include/cpu.h	Mon Mar  9 23:48:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.104 2019/12/30 22:13:47 ad Exp $ */
+/*	$NetBSD: cpu.h,v 1.105 2020/03/10 03:48:05 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -397,6 +397,11 @@ struct cpu_info {
 	struct evcnt ci_sintrcnt[16];
 };
 
+#endif /* _KERNEL || _KMEMUSER */
+
+/* Kernel only things. */
+#if defined(_KERNEL)
+
 /*
  * definitions of cpu-dependent requirements
  * referenced in generic code
@@ -408,10 +413,6 @@ struct cpu_info {
 
 #define	cpu_number()		(cpuinfo.ci_cpuid)
 
-#endif /* _KERNEL || _KMEMUSER */
-
-/* Kernel only things. */
-#if defined(_KERNEL)
 void	cpu_proc_fork(struct proc *, struct proc *);
 
 #if defined(MULTIPROCESSOR)



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

2019-04-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Apr 17 15:42:02 UTC 2019

Modified Files:
src/sys/arch/sparc/include: ptrace.h

Log Message:
Make the illegal instruction macro safe, so the compiler does not fear it
would be an illegal instruction when compiling with certain cpu options.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sparc/include/ptrace.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/sparc/include/ptrace.h
diff -u src/sys/arch/sparc/include/ptrace.h:1.12 src/sys/arch/sparc/include/ptrace.h:1.13
--- src/sys/arch/sparc/include/ptrace.h:1.12	Tue Apr 16 11:38:21 2019
+++ src/sys/arch/sparc/include/ptrace.h	Wed Apr 17 15:42:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.12 2019/04/16 11:38:21 martin Exp $ */
+/*	$NetBSD: ptrace.h,v 1.13 2019/04/17 15:42:02 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -63,7 +63,7 @@
 #define PTRACE_REG_SP(r)	((register_t)(r)->r_out[6])
 #define PTRACE_REG_INTRV(r)	((register_t)(r)->r_out[0])
 
-#define PTRACE_ILLEGAL_ASM	__asm __volatile ("illtrap 0" : : : "memory")
+#define PTRACE_ILLEGAL_ASM	__asm __volatile (".word 0" : : : "memory")
 
 #define PTRACE_BREAKPOINT	((const uint8_t[]) { 0x91, 0xd0, 0x20, 0x01 })
 #define PTRACE_BREAKPOINT_ASM	__asm __volatile("ta 1")



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

2019-04-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 16 11:38:21 UTC 2019

Modified Files:
src/sys/arch/sparc/include: ptrace.h

Log Message:
Add PTRACE_ILLEGAL_ASM


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc/include/ptrace.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/sparc/include/ptrace.h
diff -u src/sys/arch/sparc/include/ptrace.h:1.11 src/sys/arch/sparc/include/ptrace.h:1.12
--- src/sys/arch/sparc/include/ptrace.h:1.11	Wed Apr 12 18:18:00 2017
+++ src/sys/arch/sparc/include/ptrace.h	Tue Apr 16 11:38:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.11 2017/04/12 18:18:00 kamil Exp $ */
+/*	$NetBSD: ptrace.h,v 1.12 2019/04/16 11:38:21 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -63,6 +63,8 @@
 #define PTRACE_REG_SP(r)	((register_t)(r)->r_out[6])
 #define PTRACE_REG_INTRV(r)	((register_t)(r)->r_out[0])
 
+#define PTRACE_ILLEGAL_ASM	__asm __volatile ("illtrap 0" : : : "memory")
+
 #define PTRACE_BREAKPOINT	((const uint8_t[]) { 0x91, 0xd0, 0x20, 0x01 })
 #define PTRACE_BREAKPOINT_ASM	__asm __volatile("ta 1")
 #define PTRACE_BREAKPOINT_SIZE	4



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

2019-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 20:18:09 UTC 2019

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

Log Message:
remove extra token


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/sparc/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/sparc/include/vmparam.h
diff -u src/sys/arch/sparc/include/vmparam.h:1.47 src/sys/arch/sparc/include/vmparam.h:1.48
--- src/sys/arch/sparc/include/vmparam.h:1.47	Fri Mar 29 08:51:15 2019
+++ src/sys/arch/sparc/include/vmparam.h	Fri Mar 29 16:18:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.47 2019/03/29 12:51:15 christos Exp $ */
+/*	$NetBSD: vmparam.h,v 1.48 2019/03/29 20:18:09 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -74,7 +74,7 @@
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4
 #endif
 
-#ifdef	PAGE_SHIFT		PAGE_SHIFT_SUN4
+#ifdef	PAGE_SHIFT
 #define	PAGE_SIZE		(1 << PAGE_SHIFT)
 #define	PAGE_MASK		(PAGE_SIZE - 1)
 #endif



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

2019-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 29 00:08:14 UTC 2019

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

Log Message:
add more exceptions for standalone and modules


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sparc/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/sparc/include/vmparam.h
diff -u src/sys/arch/sparc/include/vmparam.h:1.45 src/sys/arch/sparc/include/vmparam.h:1.46
--- src/sys/arch/sparc/include/vmparam.h:1.45	Thu Mar 28 11:44:51 2019
+++ src/sys/arch/sparc/include/vmparam.h	Thu Mar 28 20:08:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.45 2019/03/28 15:44:51 christos Exp $ */
+/*	$NetBSD: vmparam.h,v 1.46 2019/03/29 00:08:13 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -72,7 +72,8 @@
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4CM
 #elif CPU_NTYPES == 1 && defined(SUN4)
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4
-#elif defined(_KERNEL) && !defined(_RUMPKERNEL)
+#elif defined(_KERNEL) && !defined(_RUMPKERNEL) \
+&& !defined(STANDALONE) && !defined(_MODULE)
 #error "Cannot determine page size"
 #else
 /* Default to max for userland */



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

2019-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 28 15:44:51 UTC 2019

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

Log Message:
make rump work again..


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sparc/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/sparc/include/vmparam.h
diff -u src/sys/arch/sparc/include/vmparam.h:1.44 src/sys/arch/sparc/include/vmparam.h:1.45
--- src/sys/arch/sparc/include/vmparam.h:1.44	Wed Mar 27 15:01:44 2019
+++ src/sys/arch/sparc/include/vmparam.h	Thu Mar 28 11:44:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.44 2019/03/27 19:01:44 christos Exp $ */
+/*	$NetBSD: vmparam.h,v 1.45 2019/03/28 15:44:51 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -72,7 +72,7 @@
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4CM
 #elif CPU_NTYPES == 1 && defined(SUN4)
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4
-#elif defined(_KERNEL)
+#elif defined(_KERNEL) && !defined(_RUMPKERNEL)
 #error "Cannot determine page size"
 #else
 /* Default to max for userland */



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

2019-03-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 27 19:01:44 UTC 2019

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

Log Message:
provide the max page size for userland


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sparc/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/sparc/include/vmparam.h
diff -u src/sys/arch/sparc/include/vmparam.h:1.43 src/sys/arch/sparc/include/vmparam.h:1.44
--- src/sys/arch/sparc/include/vmparam.h:1.43	Mon Jan  7 11:59:18 2013
+++ src/sys/arch/sparc/include/vmparam.h	Wed Mar 27 15:01:44 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.43 2013/01/07 16:59:18 chs Exp $ */
+/*	$NetBSD: vmparam.h,v 1.44 2019/03/27 19:01:44 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -62,18 +62,25 @@
 #define	PAGE_SHIFT_SUN4		13
 #define	PAGE_SHIFT_SUN4CM	12
 
-#define	MIN_PAGE_SIZE		(1 << PAGE_SHIFT_SUN4CM)
-#define	MAX_PAGE_SIZE		(1 << PAGE_SHIFT_SUN4)
+#define MAX_PAGE_SHIFT		PAGE_SHIFT_SUN4
+#define MIN_PAGE_SHIFT		PAGE_SHIFT_SUN4CM
+
+#define	MIN_PAGE_SIZE		(1 << MIN_PAGE_SHIFT)
+#define	MAX_PAGE_SIZE		(1 << MAX_PAGE_SHIFT)
 
 #if CPU_NTYPES != 0 && !defined(SUN4)
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4CM
-#define	PAGE_SIZE		(1 << PAGE_SHIFT)
-#define	PAGE_MASK		(PAGE_SIZE - 1)
 #elif CPU_NTYPES == 1 && defined(SUN4)
 #define	PAGE_SHIFT		PAGE_SHIFT_SUN4
+#elif defined(_KERNEL)
+#error "Cannot determine page size"
+#else
+/* Default to max for userland */
+#define	PAGE_SHIFT		MAX_PAGE_SHIFT
+#endif
+
 #define	PAGE_SIZE		(1 << PAGE_SHIFT)
 #define	PAGE_MASK		(PAGE_SIZE - 1)
-#endif
 
 /*
  * USRSTACK is the top (end) of the user stack.



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

2018-04-11 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Apr 11 19:37:58 UTC 2018

Modified Files:
src/sys/arch/sparc/include: frame.h

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/include/frame.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/sparc/include/frame.h
diff -u src/sys/arch/sparc/include/frame.h:1.9 src/sys/arch/sparc/include/frame.h:1.10
--- src/sys/arch/sparc/include/frame.h:1.9	Tue Oct  6 20:03:05 2015
+++ src/sys/arch/sparc/include/frame.h	Wed Apr 11 19:37:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.9 2015/10/06 20:03:05 martin Exp $ */
+/*	$NetBSD: frame.h,v 1.10 2018/04/11 19:37:58 palle Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -104,7 +104,7 @@ struct frame32 {
  * of the frame, you must first force the kernel to write any such
  * windows to the stack.
  *
- * V9 frames have an odd bias, so you can tall a v9 frame from
+ * V9 frames have an odd bias, so you can tell a v9 frame from
  * a v8 frame by testing the stack pointer's lsb.
  */
 #if !defined(_LOCORE) && !defined(_LIBC)



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

2018-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 18 15:29:29 UTC 2018

Modified Files:
src/sys/arch/sparc/include: mcontext.h

Log Message:
Make _UC_MACHINE_FP() compile again and fix it so that it does not add
the offset twice.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/include/mcontext.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/sparc/include/mcontext.h
diff -u src/sys/arch/sparc/include/mcontext.h:1.15 src/sys/arch/sparc/include/mcontext.h:1.16
--- src/sys/arch/sparc/include/mcontext.h:1.15	Sat Feb 17 10:22:22 2018
+++ src/sys/arch/sparc/include/mcontext.h	Sun Feb 18 10:29:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.15 2018/02/17 15:22:22 kamil Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.16 2018/02/18 15:29:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -145,33 +145,19 @@ typedef struct {
 
 #ifdef __arch64__
 #define _UC_MACHINE_PAD	8		/* Padding appended to ucontext_t */
-#define	_UC_MACHINE_SP(uc)	(((uc)->uc_mcontext.__gregs[_REG_O6])+0x7ff)
-#define	_UC_MACHINE_FP(uc)	(_uc_machine_fp((uc), 2047))
+#define	_UC_MACHINE_SP(uc)	(((uc)->uc_mcontext.__gregs[_REG_O6]) + 0x7ff)
+#define	_UC_MACHINE_FP(uc)	(((__greg_t *)_UC_MACHINE_SP(uc))[15])
 #define _UC_MACHINE32_PAD	43	/* compat_netbsd32 variant */
 #define	_UC_MACHINE32_SP(uc)	((uc)->uc_mcontext.__gregs[_REG_O6])
-#define	_UC_MACHINE32_FP(uc)	(_uc_machine_fp((uc), 0))
+#define	_UC_MACHINE32_FP(uc)	(((__greg_t *)_UC_MACHINE32_SP(uc))[15])
 #else
 #define _UC_MACHINE_PAD	43		/* Padding appended to ucontext_t */
 #define	_UC_MACHINE_SP(uc)	((uc)->uc_mcontext.__gregs[_REG_O6])
-#define	_UC_MACHINE_FP(uc)	(_uc_machine_fp((uc), 0))
+#define	_UC_MACHINE_FP(uc)	(((__greg_t *)_UC_MACHINE_SP(uc))[15])
 #endif
 #define	_UC_MACHINE_PC(uc)	((uc)->uc_mcontext.__gregs[_REG_PC])
 #define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.__gregs[_REG_O0])
 
-static inline long
-_uc_machine_fp(ucontext_t *ucontext, long shift)
-{
-	long *sptr;
-	long *sp;
-	long fp;
-
-	sp = (long *)_UC_MACHINE_SP(ucontext);
-	sptr = (long *)(*sp + shift);
-	fp = sptr[15];
-
-	return fp;
-}
-
 #define	_UC_MACHINE_SET_PC(uc, pc)	\
 do {	\
 	(uc)->uc_mcontext.__gregs[_REG_PC] = (pc);			\



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

2018-02-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Feb 17 15:22:22 UTC 2018

Modified Files:
src/sys/arch/sparc/include: mcontext.h

Log Message:
Improve _UC_MACHINE_FP() for SPARC/SPARC64

Introduce a static inline function _uc_machine_fp() that contains improved
caluclation of a frame pointer.

Algorithm:

  uptr *stk_ptr;
#  if defined (__arch64__)
  stk_ptr = (uptr *) (*sp + 2047);
#  else
  stk_ptr = (uptr *) *sp;
#  endif
  *bp = stk_ptr[15];

Noted by 


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc/include/mcontext.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/sparc/include/mcontext.h
diff -u src/sys/arch/sparc/include/mcontext.h:1.14 src/sys/arch/sparc/include/mcontext.h:1.15
--- src/sys/arch/sparc/include/mcontext.h:1.14	Thu Feb 15 15:53:57 2018
+++ src/sys/arch/sparc/include/mcontext.h	Sat Feb 17 15:22:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.14 2018/02/15 15:53:57 kamil Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.15 2018/02/17 15:22:22 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -146,18 +146,32 @@ typedef struct {
 #ifdef __arch64__
 #define _UC_MACHINE_PAD	8		/* Padding appended to ucontext_t */
 #define	_UC_MACHINE_SP(uc)	(((uc)->uc_mcontext.__gregs[_REG_O6])+0x7ff)
-#define	_UC_MACHINE_FP(uc)	(((uc)->uc_mcontext.__gregs[_REG_O6])+0x80e)
+#define	_UC_MACHINE_FP(uc)	(_uc_machine_fp((uc), 2047))
 #define _UC_MACHINE32_PAD	43	/* compat_netbsd32 variant */
 #define	_UC_MACHINE32_SP(uc)	((uc)->uc_mcontext.__gregs[_REG_O6])
-#define	_UC_MACHINE32_FP(uc)	(((uc)->uc_mcontext.__gregs[_REG_O6])+0xf)
+#define	_UC_MACHINE32_FP(uc)	(_uc_machine_fp((uc), 0))
 #else
 #define _UC_MACHINE_PAD	43		/* Padding appended to ucontext_t */
 #define	_UC_MACHINE_SP(uc)	((uc)->uc_mcontext.__gregs[_REG_O6])
-#define	_UC_MACHINE_FP(uc)	(((uc)->uc_mcontext.__gregs[_REG_O6])+0xf)
+#define	_UC_MACHINE_FP(uc)	(_uc_machine_fp((uc), 0))
 #endif
 #define	_UC_MACHINE_PC(uc)	((uc)->uc_mcontext.__gregs[_REG_PC])
 #define	_UC_MACHINE_INTRV(uc)	((uc)->uc_mcontext.__gregs[_REG_O0])
 
+static inline long
+_uc_machine_fp(ucontext_t *ucontext, long shift)
+{
+	long *sptr;
+	long *sp;
+	long fp;
+
+	sp = (long *)_UC_MACHINE_SP(ucontext);
+	sptr = (long *)(*sp + shift);
+	fp = sptr[15];
+
+	return fp;
+}
+
 #define	_UC_MACHINE_SET_PC(uc, pc)	\
 do {	\
 	(uc)->uc_mcontext.__gregs[_REG_PC] = (pc);			\



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

2018-01-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 15 10:06:49 UTC 2018

Modified Files:
src/sys/arch/sparc/include: reg.h

Log Message:
Redo previous: apply the alignement to the whole struct fpstate - everything
in there is properly aligned, and we need to have fs_queue double aligned
as well.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/include/reg.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/sparc/include/reg.h
diff -u src/sys/arch/sparc/include/reg.h:1.10 src/sys/arch/sparc/include/reg.h:1.11
--- src/sys/arch/sparc/include/reg.h:1.10	Sun Jan 14 11:55:33 2018
+++ src/sys/arch/sparc/include/reg.h	Mon Jan 15 10:06:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: reg.h,v 1.10 2018/01/14 11:55:33 martin Exp $ */
+/*	$NetBSD: reg.h,v 1.11 2018/01/15 10:06:49 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -106,18 +106,19 @@ struct fp_qentry {
 struct fpreg {
 	u_int	fr_regs[32];		/* our view is 32 32-bit registers */
 	int	fr_fsr;			/* %fsr */
-}
-#ifdef _KERNEL
- __aligned(8)/* asm code uses std instructions */
-#endif
-;
+};
+
 struct fpstate {
 	struct fpreg fs_reg;
 #define fs_regs fs_reg.fr_regs
 #define fs_fsr	fs_reg.fr_fsr
 	int	fs_qsize;		/* actual queue depth */
 	struct	fp_qentry fs_queue[FP_QSIZE];	/* queue contents */
-};
+}
+#ifdef _KERNEL
+ __aligned(8)/* asm code uses std instructions */
+#endif
+;
 
 /*
  * The actual FP registers are made accessible (c.f. ptrace(2)) through



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

2018-01-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 14 11:55:33 UTC 2018

Modified Files:
src/sys/arch/sparc/include: reg.h

Log Message:
Force explicit alignment for fpstate in the kernel, to match what our
asm code assumes.
We use a stack variable at least once (in fpu_init).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/include/reg.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/sparc/include/reg.h
diff -u src/sys/arch/sparc/include/reg.h:1.9 src/sys/arch/sparc/include/reg.h:1.10
--- src/sys/arch/sparc/include/reg.h:1.9	Fri Dec 30 17:54:43 2016
+++ src/sys/arch/sparc/include/reg.h	Sun Jan 14 11:55:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: reg.h,v 1.9 2016/12/30 17:54:43 christos Exp $ */
+/*	$NetBSD: reg.h,v 1.10 2018/01/14 11:55:33 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -106,7 +106,11 @@ struct fp_qentry {
 struct fpreg {
 	u_int	fr_regs[32];		/* our view is 32 32-bit registers */
 	int	fr_fsr;			/* %fsr */
-};
+}
+#ifdef _KERNEL
+ __aligned(8)/* asm code uses std instructions */
+#endif
+;
 struct fpstate {
 	struct fpreg fs_reg;
 #define fs_regs fs_reg.fr_regs



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

2017-12-01 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Dec  1 23:14:20 UTC 2017

Modified Files:
src/sys/arch/sparc/include: pte.h

Log Message:
- normalise some tab/space issues.
- fix (debugger-only useful) struct srmmu_pte::pg_pfnum to be the
  right size.
- add SRMMU_TEPTERBO as a PTE type -- supersparc-II only feature
  of mapping pages in reverse-byte-order (eg little endian by
  default, but there's also a global RBO flag, that makes this
  flag big-endian.)  we don't use it (yet?)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/include/pte.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/sparc/include/pte.h
diff -u src/sys/arch/sparc/include/pte.h:1.31 src/sys/arch/sparc/include/pte.h:1.32
--- src/sys/arch/sparc/include/pte.h:1.31	Thu Feb 16 20:17:15 2006
+++ src/sys/arch/sparc/include/pte.h	Fri Dec  1 23:14:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.31 2006/02/16 20:17:15 perry Exp $ */
+/*	$NetBSD: pte.h,v 1.32 2017/12/01 23:14:20 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -187,32 +187,32 @@ typedef u_char smeg_t;		/* 8 bits needed
 #error "configuration error"
 #endif
 
-#define	NBPRG	(1 << 24)	/* bytes per region */
-#define	RGSHIFT	24		/* log2(NBPRG) */
-#define	RGOFSET	(NBPRG - 1)	/* mask for region offset */
+#define NBPRG	(1 << 24)	/* bytes per region */
+#define RGSHIFT	24		/* log2(NBPRG) */
+#define RGOFSET	(NBPRG - 1)	/* mask for region offset */
 #define NSEGRG	(NBPRG / NBPSG)	/* segments per region */
 
-#define	NBPSG	(1 << 18)	/* bytes per segment */
-#define	SGSHIFT	18		/* log2(NBPSG) */
-#define	SGOFSET	(NBPSG - 1)	/* mask for segment offset */
+#define NBPSG	(1 << 18)	/* bytes per segment */
+#define SGSHIFT	18		/* log2(NBPSG) */
+#define SGOFSET	(NBPSG - 1)	/* mask for segment offset */
 
 /* number of PTEs that map one segment (not number that fit in one segment!) */
 #if defined(SUN4) && (defined(SUN4C) || defined(SUN4M) || defined(SUN4D))
 extern int nptesg;
-#define	NPTESG	nptesg		/* (which someone will have to initialize) */
+#define NPTESG	nptesg		/* (which someone will have to initialize) */
 #else
-#define	NPTESG	(NBPSG / NBPG)
+#define NPTESG	(NBPSG / NBPG)
 #endif
 
 /* virtual address to virtual region number */
-#define	VA_VREG(va)	(((unsigned int)(va) >> RGSHIFT) & 255)
+#define VA_VREG(va)	(((unsigned int)(va) >> RGSHIFT) & 255)
 
 /* virtual address to virtual segment number */
-#define	VA_VSEG(va)	(((unsigned int)(va) >> SGSHIFT) & 63)
+#define VA_VSEG(va)	(((unsigned int)(va) >> SGSHIFT) & 63)
 
 /* virtual address to virtual page number, for Sun-4 and Sun-4c */
-#define	VA_SUN4_VPG(va)		(((int)(va) >> 13) & 31)
-#define	VA_SUN4C_VPG(va)	(((int)(va) >> 12) & 63)
+#define VA_SUN4_VPG(va)		(((int)(va) >> 13) & 31)
+#define VA_SUN4C_VPG(va)	(((int)(va) >> 12) & 63)
 #define VA_SUN4M_VPG(va)	(((int)(va) >> 12) & 63)
 #define VA_VPG(va)	\
 	(PGSHIFT==SUN4_PGSHIFT ? VA_SUN4_VPG(va) : VA_SUN4C_VPG(va))
@@ -226,16 +226,16 @@ extern int nptesg;
 
 
 /* truncate virtual address to region base */
-#define	VA_ROUNDDOWNTOREG(va)	((int)(va) & ~RGOFSET)
+#define VA_ROUNDDOWNTOREG(va)	((int)(va) & ~RGOFSET)
 
 /* truncate virtual address to segment base */
-#define	VA_ROUNDDOWNTOSEG(va)	((int)(va) & ~SGOFSET)
+#define VA_ROUNDDOWNTOSEG(va)	((int)(va) & ~SGOFSET)
 
 /* virtual segment to virtual address (must sign extend on holy MMUs!) */
-#define	VRTOVA(vr)	((CPU_HAS_SRMMU || HASSUN4_MMU3L)	\
+#define VRTOVA(vr)	((CPU_HAS_SRMMU || HASSUN4_MMU3L)	\
 	? ((int)(vr) << RGSHIFT)\
 	: (((int)(vr) << (RGSHIFT+2)) >> 2))
-#define	VSTOVA(vr,vs)	((CPU_HAS_SRMMU || HASSUN4_MMU3L)	\
+#define VSTOVA(vr,vs)	((CPU_HAS_SRMMU || HASSUN4_MMU3L)	\
 	? (((int)(vr) << RGSHIFT) + ((int)(vs) << SGSHIFT))	\
 	: int)(vr) << (RGSHIFT+2)) >> 2) + ((int)(vs) << SGSHIFT)))
 
@@ -249,38 +249,38 @@ extern int mmu_has_hole;
 #define MMU_HOLE_END	0xe000
 
 /* there is no `struct pte'; we just use `int'; this is for non-4M only */
-#define	PG_V		0x8000
-#define	PG_PROT		0x6000	/* both protection bits */
-#define	PG_W		0x4000	/* allowed to write */
-#define	PG_S		0x2000	/* supervisor only */
-#define	PG_NC		0x1000	/* non-cacheable */
-#define	PG_TYPE		0x0c00	/* both type bits */
-
-#define	PG_OBMEM	0x	/* on board memory */
-#define	PG_OBIO		0x0400	/* on board I/O (incl. Sbus on 4c) */
-#define	PG_VME16	0x0800	/* 16-bit-data VME space */
-#define	PG_VME32	0x0c00	/* 32-bit-data VME space */
+#define PG_V		0x8000
+#define PG_PROT		0x6000	/* both protection bits */
+#define PG_W		0x4000	/* allowed to write */
+#define PG_S		0x2000	/* supervisor only */
+#define PG_NC		0x1000	/* non-cacheable */
+#define PG_TYPE		0x0c00	/* both type bits */
+
+#define PG_OBMEM	0x	/* on board memory */
+#define PG_OBIO		0x0400	/* on board I/O (incl. Sbus on 4c) */
+#define PG_VME16	

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

2017-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 29 17:49:04 UTC 2017

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

Log Message:
include  for sigset_t


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sparc/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/sparc/include/signal.h
diff -u src/sys/arch/sparc/include/signal.h:1.22 src/sys/arch/sparc/include/signal.h:1.23
--- src/sys/arch/sparc/include/signal.h:1.22	Wed Nov 19 13:36:00 2008
+++ src/sys/arch/sparc/include/signal.h	Wed Nov 29 12:49:03 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: signal.h,v 1.22 2008/11/19 18:36:00 ad Exp $ */
+/*	$NetBSD: signal.h,v 1.23 2017/11/29 17:49:03 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -51,7 +51,7 @@ typedef int sig_atomic_t;
 
 #if defined(_NETBSD_SOURCE)
 #ifndef _LOCORE
-
+#include 
 /*
  * Information pushed on stack when a signal is delivered.
  * This is used by the kernel to restore state following



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

2017-05-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 31 11:09:22 UTC 2017

Modified Files:
src/sys/arch/sparc/include: profile.h

Log Message:
Fix __PIC__ profiled binaries


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sparc/include/profile.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/sparc/include/profile.h
diff -u src/sys/arch/sparc/include/profile.h:1.16 src/sys/arch/sparc/include/profile.h:1.17
--- src/sys/arch/sparc/include/profile.h:1.16	Thu Sep 12 15:36:17 2013
+++ src/sys/arch/sparc/include/profile.h	Wed May 31 11:09:22 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: profile.h,v 1.16 2013/09/12 15:36:17 joerg Exp $ */
+/*	$NetBSD: profile.h,v 1.17 2017/05/31 11:09:22 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,7 +57,6 @@
 	__asm("add %o7, 8, %o1");\
 	__asm("1: rd %pc, %o2");\
 	__asm("add %o2," _MCOUNT_SYM "-1b, %o2");\
-	__asm("ld [%o2], %o2");\
 	__asm("jmpl %o2, %g0");\
 	__asm("add %i7, 8, %o0");
 #else
@@ -65,9 +64,10 @@
 	__asm(".global " _MCOUNT_ENTRY);\
 	__asm(_MCOUNT_ENTRY ":");\
 	__asm("add %o7, 8, %o1");\
+	__asm("mov %o7, %o3");\
 	__asm("1: call 2f; nop; 2:");\
 	__asm("add %o7," _MCOUNT_SYM "-1b, %o2");\
-	__asm("ld [%o2], %o2");\
+	__asm("mov %o3, %o7");\
 	__asm("jmpl %o2, %g0");\
 	__asm("add %i7, 8, %o0");
 #endif



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

2017-02-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb  2 08:12:08 UTC 2017

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

Log Message:
PR port-sparc64/51925: cosmetic cleanup, no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/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/sparc/include/elf_machdep.h
diff -u src/sys/arch/sparc/include/elf_machdep.h:1.7 src/sys/arch/sparc/include/elf_machdep.h:1.8
--- src/sys/arch/sparc/include/elf_machdep.h:1.7	Sat May 30 05:56:53 2009
+++ src/sys/arch/sparc/include/elf_machdep.h	Thu Feb  2 08:12:08 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_machdep.h,v 1.7 2009/05/30 05:56:53 skrll Exp $	*/
+/*	$NetBSD: elf_machdep.h,v 1.8 2017/02/02 08:12:08 martin Exp $	*/
 
 #define ELF32_MACHDEP_ENDIANNESS	ELFDATA2MSB
 #define	ELF32_MACHDEP_ID_CASES		\
@@ -6,13 +6,11 @@
 		case EM_SPARC32PLUS:	\
 			break;
 
-#define	ELF64_MACHDEP_ENDIANNESS	ELFDATA2MSB
+#define	ELF64_MACHDEP_ENDIANNESS	XXX	/* break compilation */
 #define	ELF64_MACHDEP_ID_CASES		\
-		case EM_SPARC32PLUS:	\
-		case EM_SPARCV9:	\
 		/* no 64-bit ELF machine types supported */
 
-#define	ELF32_MACHDEP_ID	EM_SPARC	/* XXX right? */
+#define	ELF32_MACHDEP_ID	EM_SPARC
 
 #define ARCH_ELFSIZE		32	/* MD native binary size */
 



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

2017-01-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 14 16:07:53 UTC 2017

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

Log Message:
remove dup definitions


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/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/sparc/include/ieeefp.h
diff -u src/sys/arch/sparc/include/ieeefp.h:1.9 src/sys/arch/sparc/include/ieeefp.h:1.10
--- src/sys/arch/sparc/include/ieeefp.h:1.9	Sat Jan  3 13:12:12 2015
+++ src/sys/arch/sparc/include/ieeefp.h	Sat Jan 14 11:07:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieeefp.h,v 1.9 2015/01/03 18:12:12 martin Exp $	*/
+/*	$NetBSD: ieeefp.h,v 1.10 2017/01/14 16:07:53 christos Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -9,15 +9,9 @@
 #define _SPARC_IEEEFP_H_
 
 #include 
+#include 
 
-#if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
-
-#define	FE_TONEAREST	0	/* round to nearest representable number */
-#define	FE_TOWARDZERO	1	/* round to zero (truncate) */
-#define	FE_UPWARD	2	/* round toward positive infinity */
-#define	FE_DOWNWARD	3	/* round toward negative infinity */
-
-#if !defined(_ISOC99_SOURCE)
+#if defined(_NETBSD_SOURCE) && !defined(_ISOC99_SOURCE)
 
 typedef unsigned int fp_except;
 #define FP_X_IMP	0x01		/* imprecise (loss of precision) */
@@ -33,8 +27,6 @@ typedef enum {
 FP_RM=3			/* round toward negative infinity */
 } fp_rnd;
 
-#endif /* !_ISOC99_SOURCE */
-
-#endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */
+#endif /* _NETBSD_SOURCE || !_ISOC99_SOURCE */
 
 #endif /* _SPARC_IEEEFP_H_ */



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

2017-01-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan 14 12:00:13 UTC 2017

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

Log Message:
Make the copies of the FE_* macros match verbatim to avoid a gcc warning
when both ieeefp.h and fenv.h are included.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc/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/sparc/include/fenv.h
diff -u src/sys/arch/sparc/include/fenv.h:1.1 src/sys/arch/sparc/include/fenv.h:1.2
--- src/sys/arch/sparc/include/fenv.h:1.1	Fri May 20 21:42:49 2011
+++ src/sys/arch/sparc/include/fenv.h	Sat Jan 14 12:00:13 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: fenv.h,v 1.1 2011/05/20 21:42:49 nakayama Exp $	*/
+/*	$NetBSD: fenv.h,v 1.2 2017/01/14 12:00:13 martin Exp $	*/
 
 /*-
  * Copyright (c) 2004-2005 David Schultz 
@@ -62,10 +62,10 @@ typedef	uint32_t	fexcept_t;
  * We can't just use the hardware bit values here, because that would
  * make FE_UPWARD and FE_DOWNWARD negative, which is not allowed.
  */
-#define	FE_TONEAREST	0x0
-#define	FE_TOWARDZERO	0x1
-#define	FE_UPWARD	0x2
-#define	FE_DOWNWARD	0x3
+#define	FE_TONEAREST	0	/* round to nearest representable number */
+#define	FE_TOWARDZERO	1	/* round to zero (truncate) */
+#define	FE_UPWARD	2	/* round toward positive infinity */
+#define	FE_DOWNWARD	3	/* round toward negative infinity */
 #define	_ROUND_MASK	(FE_TONEAREST | FE_DOWNWARD | \
 FE_UPWARD | FE_TOWARDZERO)
 #define	_ROUND_SHIFT	30



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

2016-11-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 25 14:10:31 UTC 2016

Modified Files:
src/sys/arch/sparc/include: ptrace.h

Log Message:
cast to register_t because not all 'struct reg' members are the right type.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/include/ptrace.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/sparc/include/ptrace.h
diff -u src/sys/arch/sparc/include/ptrace.h:1.9 src/sys/arch/sparc/include/ptrace.h:1.10
--- src/sys/arch/sparc/include/ptrace.h:1.9	Fri Sep 25 12:05:17 2015
+++ src/sys/arch/sparc/include/ptrace.h	Fri Nov 25 09:10:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.9 2015/09/25 16:05:17 christos Exp $ */
+/*	$NetBSD: ptrace.h,v 1.10 2016/11/25 14:10:31 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,13 +55,13 @@
 	"PT_SETFPREGS",
 
 #include 
-#define PTRACE_REG_PC(r)	(r)->r_pc
+#define PTRACE_REG_PC(r)	((register_t)(r)->r_pc)
 #define PTRACE_REG_SET_PC(r, v)	do {	\
 	(r)->r_pc = (v);		\
 	(r)->r_npc = (v) + 4;		\
 } while (/*CONSTCOND*/0)
-#define PTRACE_REG_SP(r)	(r)->r_out[6]
-#define PTRACE_REG_INTRV(r)	(r)->r_out[0]
+#define PTRACE_REG_SP(r)	((register_t)(r)->r_out[6])
+#define PTRACE_REG_INTRV(r)	((register_t)(r)->r_out[0])
 
 #define PTRACE_BREAKPOINT	((const uint8_t[]) { 0x91, 0xd0, 0x20, 0x01 })
 #define PTRACE_BREAKPOINT_SIZE	4



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

2016-10-08 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Oct  8 20:30:55 UTC 2016

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

Log Message:
Macros expanding to defined() expression is not actually correct ISO C
behavior. Since it is not clear whether someone might decide to define
the macros to random non-1 values, introduce a level of indirection and
count the same of the helper macros.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc/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/sparc/include/cpuconf.h
diff -u src/sys/arch/sparc/include/cpuconf.h:1.4 src/sys/arch/sparc/include/cpuconf.h:1.5
--- src/sys/arch/sparc/include/cpuconf.h:1.4	Sun Dec 11 12:19:05 2005
+++ src/sys/arch/sparc/include/cpuconf.h	Sat Oct  8 20:30:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuconf.h,v 1.4 2005/12/11 12:19:05 christos Exp $	*/
+/*	$NetBSD: cpuconf.h,v 1.5 2016/10/08 20:30:54 joerg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -76,8 +76,28 @@ extern int cputyp;
  * Step 1: Count the number of CPU types configured into the kernel.
  */
 #if defined(_KERNEL_OPT)
-#define	CPU_NTYPES	(defined(SUN4) + defined(SUN4C) + \
-			 defined(SUN4M) + defined(SUN4D))
+#ifdef SUN4
+#define	_CPU_NTYPES_SUN4 1
+#else
+#define	_CPU_NTYPES_SUN4 0
+#endif
+#ifdef SUN4C
+#define	_CPU_NTYPES_SUN4C 1
+#else
+#define	_CPU_NTYPES_SUN4C 0
+#endif
+#ifdef SUN4M
+#define	_CPU_NTYPES_SUN4M 1
+#else
+#define	_CPU_NTYPES_SUN4M 0
+#endif
+#ifdef SUN4D
+#define	_CPU_NTYPES_SUN4D 1
+#else
+#define	_CPU_NTYPES_SUN4D 0
+#endif
+#define	CPU_NTYPES	(_CPU_NTYPES_SUN4 + _CPU_NTYPES_SUN4C + \
+			 _CPU_NTYPES_SUN4M + _CPU_NTYPES_SUN4D)
 #else
 #define	CPU_NTYPES	0
 #endif



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

2016-05-30 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Mon May 30 09:05:32 UTC 2016

Modified Files:
src/sys/arch/sparc/include: sljit_machdep.h

Log Message:
Adapt to new sljit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc/include/sljit_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/sparc/include/sljit_machdep.h
diff -u src/sys/arch/sparc/include/sljit_machdep.h:1.1 src/sys/arch/sparc/include/sljit_machdep.h:1.2
--- src/sys/arch/sparc/include/sljit_machdep.h:1.1	Wed Jul 23 18:19:45 2014
+++ src/sys/arch/sparc/include/sljit_machdep.h	Mon May 30 09:05:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljit_machdep.h,v 1.1 2014/07/23 18:19:45 alnsn Exp $	*/
+/*	$NetBSD: sljit_machdep.h,v 1.2 2016/05/30 09:05:32 nakayama Exp $	*/
 
 /*-
  * Copyright (c) 2012-2013 The NetBSD Foundation, Inc.
@@ -35,5 +35,6 @@
 
 #define SLJIT_CACHE_FLUSH(from, to) \
 	sparc_cache_flush((sljit_ins *)(from), (sljit_ins *)(to))
+#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
 
 #endif



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

2016-05-18 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Wed May 18 08:16:04 UTC 2016

Modified Files:
src/sys/arch/sparc/include: psl.h

Log Message:
Fix (unused) pstate mask bits in tstate and comment.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h
diff -u src/sys/arch/sparc/include/psl.h:1.48 src/sys/arch/sparc/include/psl.h:1.49
--- src/sys/arch/sparc/include/psl.h:1.48	Sun Aug 28 22:30:09 2011
+++ src/sys/arch/sparc/include/psl.h	Wed May 18 08:16:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.48 2011/08/28 22:30:09 mrg Exp $ */
+/*	$NetBSD: psl.h,v 1.49 2016/05/18 08:16:04 nakayama Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -146,14 +146,14 @@
 /*
  * SPARC V9 TSTATE register
  *
- *   39 32 31 24 23 18  17   8	7 5 4   0
+ *   39 32 31 24 23 20  19   8	7 5 4   0
  *  +-+-+-++---+-+
  *  | CCR | ASI |  -  | PSTATE | - | CWP |
  *  +-+-+-++---+-+
  */
 
 #define TSTATE_CWP		0x01f
-#define TSTATE_PSTATE		0x6ff00
+#define TSTATE_PSTATE		0xfff00
 #define TSTATE_PSTATE_SHIFT	8
 #define TSTATE_ASI		0xff00LL
 #define TSTATE_ASI_SHIFT	24



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

2015-10-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct  6 20:03:06 UTC 2015

Modified Files:
src/sys/arch/sparc/include: frame.h openfirm.h types.h

Log Message:
Do not use #ifdef SUN4U when testing for cpu features of post-v8 CPUs,
it is not good for SUN4V-only kernels. Instead use __sparc_v9__ (which
is also defined by the sparc compiler when called with cpu=ultrasparc).
ok: mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc/include/frame.h \
src/sys/arch/sparc/include/openfirm.h
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sparc/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/sparc/include/frame.h
diff -u src/sys/arch/sparc/include/frame.h:1.8 src/sys/arch/sparc/include/frame.h:1.9
--- src/sys/arch/sparc/include/frame.h:1.8	Tue Apr 12 07:54:16 2011
+++ src/sys/arch/sparc/include/frame.h	Tue Oct  6 20:03:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.8 2011/04/12 07:54:16 mrg Exp $ */
+/*	$NetBSD: frame.h,v 1.9 2015/10/06 20:03:05 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -56,7 +56,7 @@
  * windows to the stack.
  */
 #ifndef _LOCORE
-#ifndef SUN4U
+#ifndef __sparc_v9__
 struct frame {
 	int32_t	fr_local[8];	/* space to save locals (%l0..%l7) */
 	int32_t	fr_arg[6];	/* space to save arguments (%i0..%i5) */
Index: src/sys/arch/sparc/include/openfirm.h
diff -u src/sys/arch/sparc/include/openfirm.h:1.8 src/sys/arch/sparc/include/openfirm.h:1.9
--- src/sys/arch/sparc/include/openfirm.h:1.8	Fri Mar 27 06:10:25 2015
+++ src/sys/arch/sparc/include/openfirm.h	Tue Oct  6 20:03:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirm.h,v 1.8 2015/03/27 06:10:25 nakayama Exp $	*/
+/*	$NetBSD: openfirm.h,v 1.9 2015/10/06 20:03:05 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -39,7 +39,7 @@
 
 #include 
 
-#ifdef SUN4U
+#ifdef __sparc_v9__
 /* All cells are 8 byte slots */
 typedef uint64_t cell_t;
 #ifdef __arch64__
@@ -52,14 +52,14 @@ typedef uint64_t cell_t;
 #define HDQ2CELL_HI(x)	(cell_t)(0)
 #define HDQ2CELL_LO(x)	(cell_t)(x)
 #define CELL2HDQ(hi,lo)	(lo)
-#else /* SUN4U */
+#else /* __sparc_v9__ */
 /* All cells are 4 byte slots */
 typedef uint32_t cell_t;
 #define HDL2CELL(x)	(cell_t)(x)
 #define ADR2CELL(x)	(cell_t)(x)
 #define HDQ2CELL_HI(x)	(cell_t)((x) >> 32)
 #define HDQ2CELL_LO(x)	(cell_t)(x)
-#endif /* SUN4U */
+#endif /* __sparc_v9__ */
 
 int	OF_test(const char *);
 int	OF_test_method(int, const char *);

Index: src/sys/arch/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.63 src/sys/arch/sparc/include/types.h:1.64
--- src/sys/arch/sparc/include/types.h:1.63	Thu Aug 27 12:30:51 2015
+++ src/sys/arch/sparc/include/types.h	Tue Oct  6 20:03:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.63 2015/08/27 12:30:51 pooka Exp $ */
+/*	$NetBSD: types.h,v 1.64 2015/10/06 20:03:05 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -73,7 +73,7 @@ typedef unsigned long long int	register6
 
 #if defined(_KERNEL)
 typedef struct label_t {
-#ifdef SUN4U
+#ifdef __sparc_v9__
 	register64_t val[2];
 #else
 	register_t val[3];
@@ -87,7 +87,7 @@ typedef vaddr_t			vsize_t;
 #define	PRIxVADDR		"lx"
 #define	PRIxVSIZE		"lx"
 #define	PRIuVSIZE		"lu"
-#ifdef SUN4U
+#ifdef __sparc_v9__
 #ifdef __arch64__
 typedef unsigned long int	paddr_t;
 #define	PRIxPADDR		"lx"
@@ -102,7 +102,7 @@ typedef unsigned long long int	paddr_t;
 typedef unsigned long int	paddr_t;
 #define	PRIxPADDR		"lx"
 #define	PRIuPSIZE		"lu"
-#endif /* SUN4U */
+#endif /* __sparc_v9__ */
 typedef paddr_t			psize_t;
 #define	PRIxPSIZE		PRIxPADDR
 #endif
@@ -124,7 +124,7 @@ typedef	unsigned char		__cpu_simple_lock
 #define	__HAVE_CPU_VMSPACE_EXEC
 #define	__HAVE_RAS
 
-#ifdef SUN4U
+#ifdef __sparc_v9__
 #define	__HAVE_DEVICE_REGISTER_POSTCONFIG
 #define	__HAVE_ATOMIC64_OPS
 #define	__HAVE_CPU_COUNTER	/* sparc v9 CPUs have %tick */



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

2015-08-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Aug 23 11:01:24 UTC 2015

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

Log Message:
Use .word for data that is known to be aligned.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sparc/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/sparc/include/asm.h
diff -u src/sys/arch/sparc/include/asm.h:1.21 src/sys/arch/sparc/include/asm.h:1.22
--- src/sys/arch/sparc/include/asm.h:1.21	Sun Aug 23 10:59:15 2015
+++ src/sys/arch/sparc/include/asm.h	Sun Aug 23 11:01:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.21 2015/08/23 10:59:15 joerg Exp $ */
+/*	$NetBSD: asm.h,v 1.22 2015/08/23 11:01:24 joerg Exp $ */
 
 /*
  * Copyright (c) 1994 Allen Briggs
@@ -120,7 +120,7 @@
 #ifdef __ELF__
 #ifdef __arch64__
 #define _PROF_PROLOGUE \
-	.data; .align 8; 1: .uaword 0; .uaword 0; \
+	.data; .align 8; 1: .word 0; .word 0; \
 	.text; save %sp,-CC64FSZ,%sp; sethi %hi(1b),%o0; call _mcount; \
 	or %o0,%lo(1b),%o0; restore
 #else
@@ -132,7 +132,7 @@
 #else
 #ifdef __arch64__
 #define _PROF_PROLOGUE \
-	.data; .align 8; 1: .uaword 0; .uaword 0; \
+	.data; .align 8; 1: .word 0; .word 0; \
 	.text; save %sp,-CC64FSZ,%sp; sethi %hi(1b),%o0; call mcount; \
 	or %o0,%lo(1b),%o0; restore
 #else



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

2015-01-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jan  3 18:12:12 UTC 2015

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

Log Message:
Avoid defining macros from the fenv.h namespace here (especially with
different values).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc/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/sparc/include/ieeefp.h
diff -u src/sys/arch/sparc/include/ieeefp.h:1.8 src/sys/arch/sparc/include/ieeefp.h:1.9
--- src/sys/arch/sparc/include/ieeefp.h:1.8	Tue Mar 20 23:57:57 2012
+++ src/sys/arch/sparc/include/ieeefp.h	Sat Jan  3 18:12:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieeefp.h,v 1.8 2012/03/20 23:57:57 christos Exp $	*/
+/*	$NetBSD: ieeefp.h,v 1.9 2015/01/03 18:12:12 martin Exp $	*/
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -12,14 +12,6 @@
 
 #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)
 
-#define	FE_INEXACT	0x01	/* imprecise (loss of precision) */
-#define	FE_DIVBYZERO	0x02	/* divide-by-zero exception */
-#define	FE_UNDERFLOW	0x04	/* overflow exception */
-#define	FE_OVERFLOW	0x08	/* underflow exception */
-#define	FE_INVALID	0x10	/* invalid operation exception */
-
-#define	FE_ALL_EXCEPT	0x1f
-
 #define	FE_TONEAREST	0	/* round to nearest representable number */
 #define	FE_TOWARDZERO	1	/* round to zero (truncate) */
 #define	FE_UPWARD	2	/* round toward positive infinity */
@@ -28,17 +20,17 @@
 #if !defined(_ISOC99_SOURCE)
 
 typedef unsigned int fp_except;
-#define FP_X_IMP	FE_INEXACT	/* imprecise (loss of precision) */
-#define FP_X_DZ		FE_DIVBYZERO	/* divide-by-zero exception */
-#define FP_X_UFL	FE_UNDERFLOW	/* underflow exception */
-#define FP_X_OFL	FE_OVERFLOW	/* overflow exception */
-#define FP_X_INV	FE_INVALID	/* invalid operation exception */
+#define FP_X_IMP	0x01		/* imprecise (loss of precision) */
+#define FP_X_DZ		0x02		/* divide-by-zero exception */
+#define FP_X_UFL	0x04		/* underflow exception */
+#define FP_X_OFL	0x08		/* overflow exception */
+#define FP_X_INV	0x10		/* invalid operation exception */
 
 typedef enum {
-FP_RN=FE_TONEAREST,		/* round to nearest representable number */
-FP_RZ=FE_TOWARDZERO,	/* round to zero (truncate) */
-FP_RP=FE_UPWARD,		/* round toward positive infinity */
-FP_RM=FE_DOWNWARD		/* round toward negative infinity */
+FP_RN=0,			/* round to nearest representable number */
+FP_RZ=1,			/* round to zero (truncate) */
+FP_RP=2,			/* round toward positive infinity */
+FP_RM=3			/* round toward negative infinity */
 } fp_rnd;
 
 #endif /* !_ISOC99_SOURCE */



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

2014-08-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Aug 21 15:27:37 UTC 2014

Modified Files:
src/sys/arch/sparc/include: int_fmtio.h

Log Message:
Revert previous, we have restores ABI for {u,}int_fast_*_t.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc/include/int_fmtio.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/sparc/include/int_fmtio.h
diff -u src/sys/arch/sparc/include/int_fmtio.h:1.6 src/sys/arch/sparc/include/int_fmtio.h:1.7
--- src/sys/arch/sparc/include/int_fmtio.h:1.6	Fri Aug 15 07:45:31 2014
+++ src/sys/arch/sparc/include/int_fmtio.h	Thu Aug 21 15:27:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: int_fmtio.h,v 1.6 2014/08/15 07:45:31 martin Exp $	*/
+/*	$NetBSD: int_fmtio.h,v 1.7 2014/08/21 15:27:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -57,12 +57,15 @@
 #else
 #define	PRIdLEAST64	lld	/* int_least64_t	*/
 #endif
-#define	PRIdFAST8	d	/* int_fast8_t		*/
-#define	PRIdFAST16	d	/* int_fast16_t		*/
-#define	PRIdFAST32	d	/* int_fast32_t		*/
 #ifdef __arch64__
+#define	PRIdFAST8	ld	/* int_fast8_t		*/
+#define	PRIdFAST16	ld	/* int_fast16_t		*/
+#define	PRIdFAST32	ld	/* int_fast32_t		*/
 #define	PRIdFAST64	ld	/* int_fast64_t		*/
 #else
+#define	PRIdFAST8	d	/* int_fast8_t		*/
+#define	PRIdFAST16	d	/* int_fast16_t		*/
+#define	PRIdFAST32	d	/* int_fast32_t		*/
 #define	PRIdFAST64	lld	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -88,12 +91,15 @@
 #else
 #define	PRIiLEAST64	lli	/* int_least64_t	*/
 #endif
-#define	PRIiFAST8	i	/* int_fast8_t		*/
-#define	PRIiFAST16	i	/* int_fast16_t		*/
-#define	PRIiFAST32	i	/* int_fast32_t		*/
 #ifdef __arch64__
+#define	PRIiFAST8	li	/* int_fast8_t		*/
+#define	PRIiFAST16	li	/* int_fast16_t		*/
+#define	PRIiFAST32	li	/* int_fast32_t		*/
 #define	PRIiFAST64	li	/* int_fast64_t		*/
 #else
+#define	PRIiFAST8	i	/* int_fast8_t		*/
+#define	PRIiFAST16	i	/* int_fast16_t		*/
+#define	PRIiFAST32	i	/* int_fast32_t		*/
 #define	PRIiFAST64	lli	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -247,12 +253,15 @@
 #else
 #define	SCNdLEAST64	lld	/* int_least64_t	*/
 #endif
-#define	SCNdFAST8	d	/* int_fast8_t		*/
-#define	SCNdFAST16	d	/* int_fast16_t		*/
-#define	SCNdFAST32	d	/* int_fast32_t		*/
 #ifdef __arch64__
+#define	SCNdFAST8	ld	/* int_fast8_t		*/
+#define	SCNdFAST16	ld	/* int_fast16_t		*/
+#define	SCNdFAST32	ld	/* int_fast32_t		*/
 #define	SCNdFAST64	ld	/* int_fast64_t		*/
 #else
+#define	SCNdFAST8	d	/* int_fast8_t		*/
+#define	SCNdFAST16	d	/* int_fast16_t		*/
+#define	SCNdFAST32	d	/* int_fast32_t		*/
 #define	SCNdFAST64	lld	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -278,12 +287,15 @@
 #else
 #define	SCNiLEAST64	lli	/* int_least64_t	*/
 #endif
-#define	SCNiFAST8	i	/* int_fast8_t		*/
-#define	SCNiFAST16	i	/* int_fast16_t		*/
-#define	SCNiFAST32	i	/* int_fast32_t		*/
 #ifdef __arch64__
+#define	SCNiFAST8	li	/* int_fast8_t		*/
+#define	SCNiFAST16	li	/* int_fast16_t		*/
+#define	SCNiFAST32	li	/* int_fast32_t		*/
 #define	SCNiFAST64	li	/* int_fast64_t		*/
 #else
+#define	SCNiFAST8	i	/* int_fast8_t		*/
+#define	SCNiFAST16	i	/* int_fast16_t		*/
+#define	SCNiFAST32	i	/* int_fast32_t		*/
 #define	SCNiFAST64	lli	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -311,12 +323,15 @@
 #else
 #define	SCNoLEAST64	llo	/* uint_least64_t	*/
 #endif
-#define	SCNoFAST8	o	/* uint_fast8_t		*/
-#define	SCNoFAST16	o	/* uint_fast16_t	*/
-#define	SCNoFAST32	o	/* uint_fast32_t	*/
 #ifdef __arch64__
+#define	SCNoFAST8	hho	/* uint_fast8_t		*/
+#define	SCNoFAST16	ho	/* uint_fast16_t	*/
+#define	SCNoFAST32	o	/* uint_fast32_t	*/
 #define	SCNoFAST64	lo	/* uint_fast64_t	*/
 #else
+#define	SCNoFAST8	o	/* uint_fast8_t		*/
+#define	SCNoFAST16	o	/* uint_fast16_t	*/
+#define	SCNoFAST32	o	/* uint_fast32_t	*/
 #define	SCNoFAST64	llo	/* uint_fast64_t	*/
 #endif
 #ifdef __arch64__
@@ -342,12 +357,15 @@
 #else
 #define	SCNuLEAST64	llu	/* uint_least64_t	*/
 #endif
-#define	SCNuFAST8	u	/* uint_fast8_t		*/
-#define	SCNuFAST16	u	/* uint_fast16_t	*/
-#define	SCNuFAST32	u	/* uint_fast32_t	*/
 #ifdef __arch64__
+#define	SCNuFAST8	hhu	/* uint_fast8_t		*/
+#define	SCNuFAST16	hu	/* uint_fast16_t	*/
+#define	SCNuFAST32	u	/* uint_fast32_t	*/
 #define	SCNuFAST64	lu	/* uint_fast64_t	*/
 #else
+#define	SCNuFAST8	u	/* uint_fast8_t		*/
+#define	SCNuFAST16	u	/* uint_fast16_t	*/
+#define	SCNuFAST32	u	/* uint_fast32_t	*/
 #define	SCNuFAST64	llu	/* uint_fast64_t	*/
 #endif
 #ifdef __arch64__
@@ -373,12 +391,15 @@
 #else
 #define	SCNxLEAST64	llx	/* uint_least64_t	*/
 #endif
-#define	SCNxFAST8	x	/* uint_fast8_t		*/
-#define	SCNxFAST16	x	/* uint_fast16_t	*/
-#define	SCNxFAST32	x	/* uint_fast32_t	*/
 #ifdef __arch64__
+#define	SCNxFAST8	hhx	/* uint_fast8_t		*/
+#define	SCNxFAST16	hx	/* uint_fast16_t	*/
+#define	SCNxFAST32	x	/* uint_fast32_t	*/
 #define	SCNxFAST64	lx	/* uint_fast64_t	*/
 #else
+#define	SCNxFAST8	x	/* uint_fast8_t		*/
+#define	SCNxFAST16	

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

2014-08-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Aug 15 07:45:31 UTC 2014

Modified Files:
src/sys/arch/sparc/include: int_fmtio.h

Log Message:
All FAST datatypes are int (32 bit) on both sparc and sparc64, only FAST64
variants are long (sparc64) or long long (sparc).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc/include/int_fmtio.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/sparc/include/int_fmtio.h
diff -u src/sys/arch/sparc/include/int_fmtio.h:1.5 src/sys/arch/sparc/include/int_fmtio.h:1.6
--- src/sys/arch/sparc/include/int_fmtio.h:1.5	Wed Aug 13 19:48:17 2014
+++ src/sys/arch/sparc/include/int_fmtio.h	Fri Aug 15 07:45:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: int_fmtio.h,v 1.5 2014/08/13 19:48:17 matt Exp $	*/
+/*	$NetBSD: int_fmtio.h,v 1.6 2014/08/15 07:45:31 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -57,15 +57,12 @@
 #else
 #define	PRIdLEAST64	lld	/* int_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	PRIdFAST8	ld	/* int_fast8_t		*/
-#define	PRIdFAST16	ld	/* int_fast16_t		*/
-#define	PRIdFAST32	ld	/* int_fast32_t		*/
-#define	PRIdFAST64	ld	/* int_fast64_t		*/
-#else
 #define	PRIdFAST8	d	/* int_fast8_t		*/
 #define	PRIdFAST16	d	/* int_fast16_t		*/
 #define	PRIdFAST32	d	/* int_fast32_t		*/
+#ifdef __arch64__
+#define	PRIdFAST64	ld	/* int_fast64_t		*/
+#else
 #define	PRIdFAST64	lld	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -91,15 +88,12 @@
 #else
 #define	PRIiLEAST64	lli	/* int_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	PRIiFAST8	li	/* int_fast8_t		*/
-#define	PRIiFAST16	li	/* int_fast16_t		*/
-#define	PRIiFAST32	li	/* int_fast32_t		*/
-#define	PRIiFAST64	li	/* int_fast64_t		*/
-#else
 #define	PRIiFAST8	i	/* int_fast8_t		*/
 #define	PRIiFAST16	i	/* int_fast16_t		*/
 #define	PRIiFAST32	i	/* int_fast32_t		*/
+#ifdef __arch64__
+#define	PRIiFAST64	li	/* int_fast64_t		*/
+#else
 #define	PRIiFAST64	lli	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -253,15 +247,12 @@
 #else
 #define	SCNdLEAST64	lld	/* int_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	SCNdFAST8	ld	/* int_fast8_t		*/
-#define	SCNdFAST16	ld	/* int_fast16_t		*/
-#define	SCNdFAST32	ld	/* int_fast32_t		*/
-#define	SCNdFAST64	ld	/* int_fast64_t		*/
-#else
 #define	SCNdFAST8	d	/* int_fast8_t		*/
 #define	SCNdFAST16	d	/* int_fast16_t		*/
 #define	SCNdFAST32	d	/* int_fast32_t		*/
+#ifdef __arch64__
+#define	SCNdFAST64	ld	/* int_fast64_t		*/
+#else
 #define	SCNdFAST64	lld	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -287,15 +278,12 @@
 #else
 #define	SCNiLEAST64	lli	/* int_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	SCNiFAST8	li	/* int_fast8_t		*/
-#define	SCNiFAST16	li	/* int_fast16_t		*/
-#define	SCNiFAST32	li	/* int_fast32_t		*/
-#define	SCNiFAST64	li	/* int_fast64_t		*/
-#else
 #define	SCNiFAST8	i	/* int_fast8_t		*/
 #define	SCNiFAST16	i	/* int_fast16_t		*/
 #define	SCNiFAST32	i	/* int_fast32_t		*/
+#ifdef __arch64__
+#define	SCNiFAST64	li	/* int_fast64_t		*/
+#else
 #define	SCNiFAST64	lli	/* int_fast64_t		*/
 #endif
 #ifdef __arch64__
@@ -323,15 +311,12 @@
 #else
 #define	SCNoLEAST64	llo	/* uint_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	SCNoFAST8	hho	/* uint_fast8_t		*/
-#define	SCNoFAST16	ho	/* uint_fast16_t	*/
-#define	SCNoFAST32	o	/* uint_fast32_t	*/
-#define	SCNoFAST64	lo	/* uint_fast64_t	*/
-#else
 #define	SCNoFAST8	o	/* uint_fast8_t		*/
 #define	SCNoFAST16	o	/* uint_fast16_t	*/
 #define	SCNoFAST32	o	/* uint_fast32_t	*/
+#ifdef __arch64__
+#define	SCNoFAST64	lo	/* uint_fast64_t	*/
+#else
 #define	SCNoFAST64	llo	/* uint_fast64_t	*/
 #endif
 #ifdef __arch64__
@@ -357,15 +342,12 @@
 #else
 #define	SCNuLEAST64	llu	/* uint_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	SCNuFAST8	hhu	/* uint_fast8_t		*/
-#define	SCNuFAST16	hu	/* uint_fast16_t	*/
-#define	SCNuFAST32	u	/* uint_fast32_t	*/
-#define	SCNuFAST64	lu	/* uint_fast64_t	*/
-#else
 #define	SCNuFAST8	u	/* uint_fast8_t		*/
 #define	SCNuFAST16	u	/* uint_fast16_t	*/
 #define	SCNuFAST32	u	/* uint_fast32_t	*/
+#ifdef __arch64__
+#define	SCNuFAST64	lu	/* uint_fast64_t	*/
+#else
 #define	SCNuFAST64	llu	/* uint_fast64_t	*/
 #endif
 #ifdef __arch64__
@@ -391,15 +373,12 @@
 #else
 #define	SCNxLEAST64	llx	/* uint_least64_t	*/
 #endif
-#ifdef __arch64__
-#define	SCNxFAST8	hhx	/* uint_fast8_t		*/
-#define	SCNxFAST16	hx	/* uint_fast16_t	*/
-#define	SCNxFAST32	x	/* uint_fast32_t	*/
-#define	SCNxFAST64	lx	/* uint_fast64_t	*/
-#else
 #define	SCNxFAST8	x	/* uint_fast8_t		*/
 #define	SCNxFAST16	x	/* uint_fast16_t	*/
 #define	SCNxFAST32	x	/* uint_fast32_t	*/
+#ifdef __arch64__
+#define	SCNxFAST64	lx	/* uint_fast64_t	*/
+#else
 #define	SCNxFAST64	llx	/* uint_fast64_t	*/
 #endif
 #ifdef __arch64__



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

2014-07-22 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jul 22 20:41:37 UTC 2014

Modified Files:
src/sys/arch/sparc/include: sljitarch.h

Log Message:
Cast to sparc_cache_flush() argument types. This change makes it clear
thatr sparc_cache_flush() is defined by sljit (unlike other ports).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc/include/sljitarch.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/sparc/include/sljitarch.h
diff -u src/sys/arch/sparc/include/sljitarch.h:1.2 src/sys/arch/sparc/include/sljitarch.h:1.3
--- src/sys/arch/sparc/include/sljitarch.h:1.2	Sun Nov 17 12:01:58 2013
+++ src/sys/arch/sparc/include/sljitarch.h	Tue Jul 22 20:41:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljitarch.h,v 1.2 2013/11/17 12:01:58 alnsn Exp $	*/
+/*	$NetBSD: sljitarch.h,v 1.3 2014/07/22 20:41:37 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2012-2013 The NetBSD Foundation, Inc.
@@ -34,6 +34,6 @@
 #endif
 
 #define SLJIT_CACHE_FLUSH(from, to) \
-	sparc_cache_flush((from), (to))
+	sparc_cache_flush((sljit_ins *)(from), (sljit_ins *)(to))
 
 #endif



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

2014-02-01 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb  1 16:10:12 UTC 2014

Modified Files:
src/sys/arch/sparc/include: math.h

Log Message:
Export __HAVE_LONG_DOUBLE 128 to kernel for emulation


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc/include/math.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/sparc/include/math.h
diff -u src/sys/arch/sparc/include/math.h:1.6 src/sys/arch/sparc/include/math.h:1.7
--- src/sys/arch/sparc/include/math.h:1.6	Fri Jan 31 19:38:06 2014
+++ src/sys/arch/sparc/include/math.h	Sat Feb  1 16:10:12 2014
@@ -1,7 +1,7 @@
-/*	$NetBSD: math.h,v 1.6 2014/01/31 19:38:06 matt Exp $	*/
+/*	$NetBSD: math.h,v 1.7 2014/02/01 16:10:12 matt Exp $	*/
 
 #define	__HAVE_NANF
 
-#ifdef _LP64
+#if defined(_LP64) || defined(_KERNEL)
 #define	__HAVE_LONG_DOUBLE	128
 #endif



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

2013-12-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 03:45:07 UTC 2013

Modified Files:
src/sys/arch/sparc/include: ieee.h

Log Message:
Add linted comments.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sparc/include/ieee.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/sparc/include/ieee.h
diff -u src/sys/arch/sparc/include/ieee.h:1.16 src/sys/arch/sparc/include/ieee.h:1.17
--- src/sys/arch/sparc/include/ieee.h:1.16	Wed Nov 20 17:22:20 2013
+++ src/sys/arch/sparc/include/ieee.h	Sat Dec 14 22:45:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee.h,v 1.16 2013/11/20 22:22:20 martin Exp $	*/
+/*	$NetBSD: ieee.h,v 1.17 2013/12/15 03:45:07 christos Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -62,9 +62,9 @@
 #define	EXT_FRACBITS	(EXT_FRACLBITS + EXT_FRACHBITS)
 
 struct ieee_ext {
-	uint64_t	ext_sign:1;
-	uint64_t	ext_exp:EXT_EXPBITS;
-	uint64_t	ext_frach:EXT_FRACHBITS;
+	/*LINTED35*/	uint64_t	ext_sign:1;
+	/*LINTED35*/	uint64_t	ext_exp:EXT_EXPBITS;
+	/*LINTED35*/	uint64_t	ext_frach:EXT_FRACHBITS;
 	uint64_t	ext_fracl;
 };
 __CTASSERT(sizeof(struct ieee_ext) == 16);



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

2013-12-04 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Wed Dec  4 18:44:14 UTC 2013

Modified Files:
src/sys/arch/sparc/include: ctlreg.h

Log Message:
Clarify comment about SER_SZERR.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc/include/ctlreg.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/sparc/include/ctlreg.h
diff -u src/sys/arch/sparc/include/ctlreg.h:1.28 src/sys/arch/sparc/include/ctlreg.h:1.29
--- src/sys/arch/sparc/include/ctlreg.h:1.28	Sun Dec 11 12:19:05 2005
+++ src/sys/arch/sparc/include/ctlreg.h	Wed Dec  4 18:44:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctlreg.h,v 1.28 2005/12/11 12:19:05 christos Exp $ */
+/*	$NetBSD: ctlreg.h,v 1.29 2013/12/04 18:44:14 jdc Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -145,7 +145,7 @@
 #define	SER_TIMEOUT	0x20		/* bus timeout (non-existent mem) */
 #define	SER_SBUSERR	0x10		/* S-Bus bus error */
 #define	SER_MEMERR	0x08		/* memory ecc/parity error */
-#define	SER_SZERR	0x02		/* [4/vme?] size error, whatever that is */
+#define	SER_SZERR	0x02		/* [4/vme] size error (r/w too large) */
 #define	SER_WATCHDOG	0x01		/* watchdog reset (never see this) */
 
 #define	SER_BITS \



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

2012-03-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Mar 17 21:45:39 UTC 2012

Modified Files:
src/sys/arch/sparc/include: aout_machdep.h

Log Message:
mark reloc bitfield linted


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/include/aout_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/sparc/include/aout_machdep.h
diff -u src/sys/arch/sparc/include/aout_machdep.h:1.9 src/sys/arch/sparc/include/aout_machdep.h:1.10
--- src/sys/arch/sparc/include/aout_machdep.h:1.9	Tue Dec 10 17:14:20 2002
+++ src/sys/arch/sparc/include/aout_machdep.h	Sat Mar 17 21:45:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: aout_machdep.h,v 1.9 2002/12/10 17:14:20 thorpej Exp $ */
+/*	$NetBSD: aout_machdep.h,v 1.10 2012/03/17 21:45:39 martin Exp $ */
 
 /*
  * Copyright (c) 1993 Christopher G. Demetriou
@@ -52,6 +52,7 @@ struct relocation_info_sparc {
 	unsigned int r_symbolnum : 24,	/* ordinal number of add symbol */
 			r_extern :  1,	/* 1 if need to add symbol to value */
  :  2;	/* unused bits */
+	/*BITFIELDTYPE*/
 	enum reloc_type r_type   :  5;	/* relocation type time copy */
 	long r_addend;			/* relocation addend */
 };



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

2011-08-28 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Aug 28 22:30:09 UTC 2011

Modified Files:
src/sys/arch/sparc/include: psl.h

Log Message:
apply some always_inline attribute to setpsr and spl*.  while i am
not yet sure exactly why this is necessary, but does avoid crashes
seen on sparc INSTALL with gcc 4.5.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h
diff -u src/sys/arch/sparc/include/psl.h:1.47 src/sys/arch/sparc/include/psl.h:1.48
--- src/sys/arch/sparc/include/psl.h:1.47	Sat Jul 16 11:15:52 2011
+++ src/sys/arch/sparc/include/psl.h	Sun Aug 28 22:30:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.47 2011/07/16 11:15:52 nakayama Exp $ */
+/*	$NetBSD: psl.h,v 1.48 2011/08/28 22:30:09 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -232,7 +232,7 @@
 /*
  * GCC pseudo-functions for manipulating PSR (primarily PIL field).
  */
-static __inline int
+static __inline __attribute__((__always_inline__)) int
 getpsr(void)
 {
 	int psr;
@@ -241,7 +241,7 @@
 	return (psr);
 }
 
-static __inline int
+static __inline __attribute__((__always_inline__)) int
 getmid(void)
 {
 	int mid;
@@ -250,14 +250,14 @@
 	return ((mid  20)  0x3);
 }
 
-static __inline void
+static __inline __attribute__((__always_inline__)) void
 setpsr(int newpsr)
 {
 	__asm volatile(wr %0,0,%%psr : : r (newpsr) : memory);
 	__asm volatile(nop; nop; nop);
 }
 
-static __inline void
+static __inline __attribute__((__always_inline__)) void
 spl0(void)
 {
 	int psr, oldipl;
@@ -284,7 +284,7 @@
  * into the ipl field.)
  */
 #define	_SPLSET(name, newipl) \
-static __inline void name(void) \
+static __inline __attribute__((__always_inline__)) void name(void) \
 { \
 	int psr; \
 	__asm volatile(rd %%psr,%0 : =r (psr)); \
@@ -341,7 +341,7 @@
 #define	splzs()		splraiseipl(makeiplcookie(IPL_ZS))
 
 /* splx does not have a return value */
-static __inline void
+static __inline __attribute__((__always_inline__)) void
 splx(int newipl)
 {
 	int psr;



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

2011-07-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Jul 16 11:15:52 UTC 2011

Modified Files:
src/sys/arch/sparc/include: psl.h

Log Message:
Bring some fixes and minor differences from sparc64 version.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h
diff -u src/sys/arch/sparc/include/psl.h:1.46 src/sys/arch/sparc/include/psl.h:1.47
--- src/sys/arch/sparc/include/psl.h:1.46	Fri Jul 15 19:30:08 2011
+++ src/sys/arch/sparc/include/psl.h	Sat Jul 16 11:15:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.46 2011/07/15 19:30:08 riz Exp $ */
+/*	$NetBSD: psl.h,v 1.47 2011/07/16 11:15:52 nakayama Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -142,6 +142,7 @@
 #define PSTATE_USER	(PSTATE_MM_TSO|PSTATE_AM|PSTATE_IE)
 #endif
 
+
 /*
  * SPARC V9 TSTATE register
  *
@@ -149,7 +150,7 @@
  *  +-+-+-++---+-+
  *  | CCR | ASI |  -  | PSTATE | - | CWP |
  *  +-+-+-++---+-+
- * */
+ */
 
 #define TSTATE_CWP		0x01f
 #define TSTATE_PSTATE		0x6ff00
@@ -159,8 +160,8 @@
 #define TSTATE_CCR		0xffLL
 #define TSTATE_CCR_SHIFT	32
 
-#define PSRCC_TO_TSTATE(x)	(((int64_t)(x)PSR_ICC)(TSTATE_CCR_SHIFT-19))
-#define TSTATECCR_TO_PSR(x)	(((x)TSTATE_CCR)(TSTATE_CCR_SHIFT-19))
+#define PSRCC_TO_TSTATE(x)	(((int64_t)(x)PSR_ICC)(TSTATE_CCR_SHIFT-20))
+#define TSTATECCR_TO_PSR(x)	(((x)TSTATE_CCR)(TSTATE_CCR_SHIFT-20))
 
 /*
  * These are here to simplify life.
@@ -182,8 +183,8 @@
 
 #define TSTATE_BITS \20\14IG\13MG\12CLE\11TLE\10\7MM\6RED\5PEF\4AM\3PRIV\2IE\1AG
 
-#define TSTATE_KERN	((TSTATE_KERN)TSTATE_PSTATE_SHIFT)
-#define TSTATE_USER	((TSTATE_USER)TSTATE_PSTATE_SHIFT)
+#define TSTATE_KERN	((PSTATE_KERN)TSTATE_PSTATE_SHIFT)
+#define TSTATE_USER	((PSTATE_USER)TSTATE_PSTATE_SHIFT)
 /*
  * SPARC V9 VER version register.
  *



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

2011-07-15 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Jul 15 19:30:08 UTC 2011

Modified Files:
src/sys/arch/sparc/include: psl.h

Log Message:
BLOCK_SIZE-SPARC64_BLOCK_SIZE
BLOCK_ALIGN-SPARC64_BLOCK_ALIGN

XXX these values are unused in sparc;  this is merely to keep the sparc
and sparc64 versions of psl.h in sync, and to allow sparc to build again.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h
diff -u src/sys/arch/sparc/include/psl.h:1.45 src/sys/arch/sparc/include/psl.h:1.46
--- src/sys/arch/sparc/include/psl.h:1.45	Sat May 16 17:16:12 2009
+++ src/sys/arch/sparc/include/psl.h	Fri Jul 15 19:30:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.45 2009/05/16 17:16:12 martin Exp $ */
+/*	$NetBSD: psl.h,v 1.46 2011/07/15 19:30:08 riz Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -223,8 +223,8 @@
 #define CWP		0x01f
 
 /* 64-byte alignment -- this seems the best place to put this. */
-#define BLOCK_SIZE	64
-#define BLOCK_ALIGN	0x3f
+#define SPARC64_BLOCK_SIZE	64
+#define SPARC64_BLOCK_ALIGN	0x3f
 
 #if defined(_KERNEL)  !defined(_LOCORE)
 



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

2011-07-01 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jul  1 21:00:57 UTC 2011

Modified Files:
src/sys/arch/sparc/include: autoconf.h z8530var.h

Log Message:
#include sys/bus.h instead of machine/bus.h.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc/include/autoconf.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc/include/z8530var.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/sparc/include/autoconf.h
diff -u src/sys/arch/sparc/include/autoconf.h:1.46 src/sys/arch/sparc/include/autoconf.h:1.47
--- src/sys/arch/sparc/include/autoconf.h:1.46	Mon Apr 28 20:23:36 2008
+++ src/sys/arch/sparc/include/autoconf.h	Fri Jul  1 21:00:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.46 2008/04/28 20:23:36 martin Exp $ */
+/*	$NetBSD: autoconf.h,v 1.47 2011/07/01 21:00:57 dyoung Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  * Autoconfiguration information.
  */
 
-#include machine/bus.h
+#include sys/bus.h
 #include machine/bsd_openprom.h
 #include machine/promlib.h
 #include dev/sbus/sbusvar.h

Index: src/sys/arch/sparc/include/z8530var.h
diff -u src/sys/arch/sparc/include/z8530var.h:1.10 src/sys/arch/sparc/include/z8530var.h:1.11
--- src/sys/arch/sparc/include/z8530var.h:1.10	Sat Jun 26 16:10:00 2010
+++ src/sys/arch/sparc/include/z8530var.h	Fri Jul  1 21:00:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: z8530var.h,v 1.10 2010/06/26 16:10:00 tsutsui Exp $	*/
+/*	$NetBSD: z8530var.h,v 1.11 2011/07/01 21:00:57 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
  *	@(#)zsvar.h	8.1 (Berkeley) 6/11/93
  */
 
-#include machine/bus.h
+#include sys/bus.h
 #include dev/ic/z8530sc.h
 
 struct zsc_softc {



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

2011-04-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Apr 12 07:54:16 UTC 2011

Modified Files:
src/sys/arch/sparc/include: frame.h

Log Message:
make sparc/frame.h idempotent.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/include/frame.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/sparc/include/frame.h
diff -u src/sys/arch/sparc/include/frame.h:1.7 src/sys/arch/sparc/include/frame.h:1.8
--- src/sys/arch/sparc/include/frame.h:1.7	Sat Mar  4 02:56:21 2006
+++ src/sys/arch/sparc/include/frame.h	Tue Apr 12 07:54:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.7 2006/03/04 02:56:21 uwe Exp $ */
+/*	$NetBSD: frame.h,v 1.8 2011/04/12 07:54:16 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -40,6 +40,9 @@
  *	@(#)frame.h	8.1 (Berkeley) 6/11/93
  */
 
+#ifndef _SPARC_FRAME_H_
+#define _SPARC_FRAME_H_
+
 #if defined(_KERNEL_OPT)
 #include opt_sparc_arch.h
 #endif
@@ -132,3 +135,4 @@
  */
 #define BIAS	(2048-1)
 
+#endif /* _SPARC_FRAME_H_ */



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

2011-03-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Mar 30 09:23:26 UTC 2011

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

Log Message:
Enable TLS on sparc and sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/sparc/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/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.56 src/sys/arch/sparc/include/types.h:1.57
--- src/sys/arch/sparc/include/types.h:1.56	Thu Feb 24 04:28:48 2011
+++ src/sys/arch/sparc/include/types.h	Wed Mar 30 09:23:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.56 2011/02/24 04:28:48 joerg Exp $ */
+/*	$NetBSD: types.h,v 1.57 2011/03/30 09:23:26 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -128,8 +128,8 @@
 #endif
 
 #define	__HAVE_CPU_LWP_SETPRIVATE
-#if 0
 #define	__HAVE___LWP_GETPRIVATE_FAST
-#endif
+#define	__HAVE_TLS_VARIANT_II
+#define	__HAVE_COMMON___TLS_GET_ADDR
 
 #endif	/* _MACHTYPES_H_ */



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

2011-02-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Feb 14 10:22:19 UTC 2011

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

Log Message:
Provide a macro for pmap_mmap_flags() since we define PMAP_EXCLUDE_DECLS
here.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/sparc/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/sparc/include/pmap.h
diff -u src/sys/arch/sparc/include/pmap.h:1.89 src/sys/arch/sparc/include/pmap.h:1.90
--- src/sys/arch/sparc/include/pmap.h:1.89	Sun Nov 14 13:33:23 2010
+++ src/sys/arch/sparc/include/pmap.h	Mon Feb 14 10:22:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.89 2010/11/14 13:33:23 uebayasi Exp $ */
+/*	$NetBSD: pmap.h,v 1.90 2011/02/14 10:22:19 he Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -271,6 +271,7 @@
 void		pmap_writetext(unsigned char *, int);
 void		pmap_globalize_boot_cpuinfo(struct cpu_info *);
 void		pmap_remove_all(struct pmap *pm);
+#define 	pmap_mmap_flags(x)	0	/* dummy so far */
 
 /* SUN4/SUN4C SPECIFIC DECLARATIONS */
 



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

2011-01-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 24 10:05:22 UTC 2011

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

Log Message:
Provide LWP_PC


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sparc/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/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.90 src/sys/arch/sparc/include/cpu.h:1.91
--- src/sys/arch/sparc/include/cpu.h:1.90	Thu Jan 13 05:20:27 2011
+++ src/sys/arch/sparc/include/cpu.h	Mon Jan 24 10:05:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.90 2011/01/13 05:20:27 mrg Exp $ */
+/*	$NetBSD: cpu.h,v 1.91 2011/01/24 10:05:22 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -151,6 +151,9 @@
 /* Number of CPUs in the system */
 extern int sparc_ncpus;
 
+/* Provide %pc of a lwp */
+#define LWP_PC(l)   ((l)-l_md.md_tf-tf_pc)
+
 /*
  * Interrupt handler chains.  Interrupt handlers should return 0 for
  * ``not me'' or 1 (``I took care of it'').  intr_establish() inserts a



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

2010-12-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 22 00:05:33 UTC 2010

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

Log Message:
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sparc/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/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.52 src/sys/arch/sparc/include/types.h:1.53
--- src/sys/arch/sparc/include/types.h:1.52	Sun Jan 10 08:52:06 2010
+++ src/sys/arch/sparc/include/types.h	Tue Dec 21 19:05:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.52 2010/01/10 13:52:06 martin Exp $ */
+/*	$NetBSD: types.h,v 1.53 2010/12/22 00:05:33 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -116,6 +116,7 @@
 #define	__HAVE_DEVICE_REGISTER
 #define	__HAVE_SYSCALL_INTERN
 #define	__GENERIC_SOFT_INTERRUPTS_ALL_LEVELS
+#define __HAVE_CPU_DATA_FIRST
 
 #ifdef SUN4U
 #define __HAVE_DEVICE_REGISTER_POSTCONFIG



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

2010-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 26 16:10:00 UTC 2010

Modified Files:
src/sys/arch/sparc/include: z8530var.h

Log Message:
Forgot to commit this one that should have been done with zs.c rev 1.119:
 Establish interrupt handlers with proper softc per each zs device
 rather than sharing them among all zs devices and searching softc
 in handlers.

 The latter method is derived from ancient sun3 zs driver which tried
 to reduce overhead on autovectored interrupts, but nowadays such hack
 might cause recursive global locks on modern SMP capable framework.

 Fixes 5.99.30 sparc panic during startup reported by Hauke Fath
 on tech-kern@:
 http://mail-index.NetBSD.org/tech-kern/2010/06/19/msg008374.html
 and also tested by Jochen Kunz on SS20 with both serial and kbd console.

 Ok'ed by mrg@ and dyo...@.

Noticed by mar...@.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/include/z8530var.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/sparc/include/z8530var.h
diff -u src/sys/arch/sparc/include/z8530var.h:1.9 src/sys/arch/sparc/include/z8530var.h:1.10
--- src/sys/arch/sparc/include/z8530var.h:1.9	Sat Mar 29 19:15:35 2008
+++ src/sys/arch/sparc/include/z8530var.h	Sat Jun 26 16:10:00 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: z8530var.h,v 1.9 2008/03/29 19:15:35 tsutsui Exp $	*/
+/*	$NetBSD: z8530var.h,v 1.10 2010/06/26 16:10:00 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -54,6 +54,7 @@
 	int			zsc_node;	/* PROM node, if any */
 	struct evcnt		zsc_intrcnt;	/* count interrupts */
 	struct zs_chanstate	zsc_cs_store[2];
+	void			*zsc_sicookie;	/* softint(9) cookie */
 };
 
 /*



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

2009-11-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 25 08:43:16 UTC 2009

Modified Files:
src/sys/arch/sparc/include: float.h

Log Message:
Remove double include that prevented the right machdep LDBL_* constants
to be used.

Noticed by Masao Uebayashi.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc/include/float.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/sparc/include/float.h
diff -u src/sys/arch/sparc/include/float.h:1.11 src/sys/arch/sparc/include/float.h:1.12
--- src/sys/arch/sparc/include/float.h:1.11	Sat Oct 25 09:23:50 2008
+++ src/sys/arch/sparc/include/float.h	Wed Nov 25 08:43:15 2009
@@ -1,6 +1,4 @@
-/*	$NetBSD: float.h,v 1.11 2008/10/25 09:23:50 mrg Exp $ */
-
-#include sys/float_ieee754.h
+/*	$NetBSD: float.h,v 1.12 2009/11/25 08:43:15 martin Exp $ */
 
 #ifndef _SPARC_FLOAT_H_
 #define _SPARC_FLOAT_H_



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

2009-05-26 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed May 27 01:35:28 UTC 2009

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

Log Message:
avoid a local variable in a do {} while (0) macro.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/sparc/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/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.84 src/sys/arch/sparc/include/cpu.h:1.85
--- src/sys/arch/sparc/include/cpu.h:1.84	Wed Feb 27 18:26:16 2008
+++ src/sys/arch/sparc/include/cpu.h	Wed May 27 01:35:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.84 2008/02/27 18:26:16 xtraeme Exp $ */
+/*	$NetBSD: cpu.h,v 1.85 2009/05/27 01:35:28 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -140,12 +140,11 @@
  * process as soon as possible.
  */
 #define cpu_signotify(l) do {		\
-	struct cpu_info *_ci = (l)-l_cpu;\
-	_ci-ci_want_ast = 1;		\
+	(l)-l_cpu-ci_want_ast = 1;	\
 	\
 	/* Just interrupt the target CPU, so it can notice its AST */	\
-	if (_ci-ci_cpuid != cpu_number())\
-		XCALL0(sparc_noop, 1U  _ci-ci_cpuid);		\
+	if ((l)-l_cpu-ci_cpuid != cpu_number())			\
+		XCALL0(sparc_noop, 1U  (l)-l_cpu-ci_cpuid);		\
 } while (/*CONSTCOND*/0)
 
 /* CPU architecture version */



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

2009-05-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May 16 17:16:12 UTC 2009

Modified Files:
src/sys/arch/sparc/include: psl.h

Log Message:
Add memory clobbers to the inline assembler modifying/testing the %psr
register, to avoid the compiler reordering instructions out of critical
sections. Should fix PR port-sparc/41372.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h
diff -u src/sys/arch/sparc/include/psl.h:1.44 src/sys/arch/sparc/include/psl.h:1.45
--- src/sys/arch/sparc/include/psl.h:1.44	Mon Feb 19 02:57:40 2007
+++ src/sys/arch/sparc/include/psl.h	Sat May 16 17:16:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.44 2007/02/19 02:57:40 mrg Exp $ */
+/*	$NetBSD: psl.h,v 1.45 2009/05/16 17:16:12 martin Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -252,7 +252,7 @@
 static __inline void
 setpsr(int newpsr)
 {
-	__asm volatile(wr %0,0,%%psr : : r (newpsr));
+	__asm volatile(wr %0,0,%%psr : : r (newpsr) : memory);
 	__asm volatile(nop; nop; nop);
 }
 
@@ -266,7 +266,7 @@
 	 * which gives us the same value as the old psr but with all
 	 * the old PIL bits turned off.
 	 */
-	__asm volatile(rd %%psr,%0 : =r (psr));
+	__asm volatile(rd %%psr,%0 : =r (psr) : : memory);
 	oldipl = psr  PSR_PIL;
 	__asm volatile(wr %0,%1,%%psr : : r (psr), r (oldipl));
 
@@ -290,7 +290,7 @@
 	psr = ~PSR_PIL; \
 	__asm volatile(wr %0,%1,%%psr : : \
 	r (psr), n ((newipl)  8)); \
-	__asm volatile(nop; nop; nop); \
+	__asm volatile(nop; nop; nop : : : memory); \
 }
 
 _SPLSET(spllowerschedclock, IPL_SCHED)
@@ -324,7 +324,7 @@
 	psr = (psr  ~oldipl) | newipl;
 
 	__asm volatile(wr %0,0,%%psr : : r (psr));
-	__asm volatile(nop; nop; nop);
+	__asm volatile(nop; nop; nop : : : memory);
 
 	return (oldipl);
 }
@@ -345,7 +345,7 @@
 {
 	int psr;
 
-	__asm volatile(rd %%psr,%0 : =r (psr));
+	__asm volatile(rd %%psr,%0 : =r (psr) : : memory);
 	__asm volatile(wr %0,%1,%%psr : : \
 	r (psr  ~PSR_PIL), rn (newipl));
 	__asm volatile(nop; nop; nop);