Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Collect cpu_info and friends and move to m68k/inclu...



details:   https://anonhg.NetBSD.org/src/rev/e150e75f7885
branches:  trunk
changeset: 759960:e150e75f7885
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Dec 22 02:42:27 2010 +0000

description:
Collect cpu_info and friends and move to m68k/include/cpu.h
Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first
member in struct cpu_info.

diffstat:

 sys/arch/amiga/include/cpu.h   |  24 +-----------------------
 sys/arch/atari/include/cpu.h   |  21 +--------------------
 sys/arch/cesfic/include/cpu.h  |  23 +----------------------
 sys/arch/hp300/include/cpu.h   |  23 +----------------------
 sys/arch/luna68k/include/cpu.h |  23 +----------------------
 sys/arch/m68k/include/cpu.h    |  27 ++++++++++++++++++++++++---
 sys/arch/m68k/include/types.h  |   3 ++-
 sys/arch/mac68k/include/cpu.h  |  24 +-----------------------
 sys/arch/mvme68k/include/cpu.h |  23 +----------------------
 sys/arch/news68k/include/cpu.h |  23 +----------------------
 sys/arch/next68k/include/cpu.h |  24 +-----------------------
 sys/arch/sun68k/include/cpu.h  |  23 +----------------------
 sys/arch/x68k/include/cpu.h    |  23 +----------------------
 13 files changed, 37 insertions(+), 247 deletions(-)

diffs (truncated from 469 to 300 lines):

diff -r 5098a1d45120 -r e150e75f7885 sys/arch/amiga/include/cpu.h
--- a/sys/arch/amiga/include/cpu.h      Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/amiga/include/cpu.h      Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.75 2010/02/09 18:13:10 phx Exp $     */
+/*     $NetBSD: cpu.h,v 1.76 2010/12/22 02:42:27 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -94,28 +94,6 @@
 #include <m68k/cpu.h>
 #define        M68K_MMU_MOTOROLA
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;
-       int     ci_mtx_count;
-        int    ci_mtx_oldspl;
-        int    ci_want_resched;
-};
-
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()        (&cpu_info_store)
-
-/*
- * definitions of cpu-dependent requirements
- * referenced in generic code
- */
-#define        cpu_number()                    0
-
-void   cpu_proc_fork(struct proc *, struct proc *);
-
-
 extern volatile unsigned int interrupt_depth;
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/atari/include/cpu.h
--- a/sys/arch/atari/include/cpu.h      Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/atari/include/cpu.h      Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.64 2009/11/23 00:11:43 rmind Exp $   */
+/*     $NetBSD: cpu.h,v 1.65 2010/12/22 02:42:27 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -95,25 +95,6 @@
 #include <m68k/cpu.h>
 #define        M68K_MMU_MOTOROLA
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;
-       int     ci_want_resched;
-       int     ci_mtx_count;
-       int     ci_mtx_oldspl;
-};
-
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()        (&cpu_info_store)
-
-/*
- * definitions of cpu-dependent requirements
- * referenced in generic code
- */
-#define        cpu_number()                    0
-
 void   cpu_proc_fork(struct proc *, struct proc *);
 
 /*
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/cesfic/include/cpu.h
--- a/sys/arch/cesfic/include/cpu.h     Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/cesfic/include/cpu.h     Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.24 2010/06/06 04:50:06 mrg Exp $     */
+/*     $NetBSD: cpu.h,v 1.25 2010/12/22 02:42:27 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -91,27 +91,6 @@
  */
 #include <m68k/cpu.h>
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;
-       int     ci_mtx_count;
-       int     ci_mtx_oldspl;
-       int     ci_want_resched;
-};
-
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()        (&cpu_info_store)
-
-/*
- * definitions of cpu-dependent requirements
- * referenced in generic code
- */
-#define cpu_number()                   0
-
-void   cpu_proc_fork(struct proc *, struct proc *);
-
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
  * machine state in an opaque clockframe.  One the hp300, we use
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/hp300/include/cpu.h
--- a/sys/arch/hp300/include/cpu.h      Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/hp300/include/cpu.h      Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.62 2009/12/11 19:43:18 tsutsui Exp $ */
+/*     $NetBSD: cpu.h,v 1.63 2010/12/22 02:42:27 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -100,27 +100,6 @@
  */
 #include <machine/intr.h>
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;
-       int     ci_mtx_count;
-       int     ci_mtx_oldspl;
-       int     ci_want_resched;
-};
-
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()        (&cpu_info_store)
-
-/*
- * definitions of cpu-dependent requirements
- * referenced in generic code
- */
-#define        cpu_number()                    0
-
-void   cpu_proc_fork(struct proc *, struct proc *);
-
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
  * machine state in an opaque clockframe.  One the hp300, we use
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/luna68k/include/cpu.h
--- a/sys/arch/luna68k/include/cpu.h    Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/luna68k/include/cpu.h    Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.27 2009/10/21 21:12:00 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.28 2010/12/22 02:42:27 matt Exp $ */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -91,27 +91,6 @@
 #include <m68k/cpu.h>
 #define M68K_MMU_MOTOROLA
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;
-       int     ci_mtx_count;
-       int     ci_mtx_oldspl;
-       int     ci_want_resched;
-};
-
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()                        (&cpu_info_store)
-
-/*
- * definitions of cpu-dependent requirements
- * referenced in generic code
- */
-#define cpu_number()                   0
-
-void   cpu_proc_fork(struct proc *, struct proc *);
-
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
  * machine state in an opaque clockframe.  One the luna68k, we use
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/m68k/include/cpu.h
--- a/sys/arch/m68k/include/cpu.h       Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/m68k/include/cpu.h       Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.11 2005/12/11 12:17:53 christos Exp $        */
+/*     $NetBSD: cpu.h,v 1.12 2010/12/22 02:42:28 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -197,11 +197,32 @@
 #define        CACHE60_ON      (CACHE40_ON|IC60_CABC|IC60_EBC|DC60_ESB)
 #define        CACHE60_OFF     (CACHE40_OFF|IC60_CABC)
 
+#include <sys/cpu_data.h>
+
+#if defined(_KERNEL) || defined(_KMEMUSER)
+struct cpu_info {
+       struct cpu_data ci_data;        /* MI per-cpu data */
+       cpuid_t ci_cpuid;
+       int     ci_mtx_count;
+       int     ci_mtx_oldspl;
+       volatile int    ci_want_resched;
+       volatile int    ci_idepth;
+};
+#endif /* _KERNEL || _KMEMUSER */
+
 #ifdef _KERNEL
+extern struct cpu_info cpu_info_store;
+
+struct proc;
+void   cpu_proc_fork(struct proc *, struct proc *);
+
+#define        curcpu()        (&cpu_info_store)
+
 /*
- * From m68k/syscall.c
+ * definitions of cpu-dependent requirements
+ * referenced in generic code
  */
-/* extern void syscall(register_t, struct frame); Only called from locore.s */
+#define cpu_number()                   0
 
 #define LWP_PC(l)      (((struct trapframe *)((l)->l_md.md_regs))->tf_pc)
 #endif /* _KERNEL */
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/m68k/include/types.h
--- a/sys/arch/m68k/include/types.h     Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/m68k/include/types.h     Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.28 2009/12/11 05:52:03 matt Exp $  */
+/*     $NetBSD: types.h,v 1.29 2010/12/22 02:42:28 matt Exp $  */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -72,6 +72,7 @@
 #define        __NO_STRICT_ALIGNMENT
 
 #define        __HAVE_SYSCALL_INTERN
+#define        __HAVE_CPU_DATA_FIRST
 
 #if defined(_KERNEL)
 #define        __HAVE_RAS
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/mac68k/include/cpu.h
--- a/sys/arch/mac68k/include/cpu.h     Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/mac68k/include/cpu.h     Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.93 2009/10/21 21:12:00 rmind Exp $   */
+/*     $NetBSD: cpu.h,v 1.94 2010/12/22 02:42:28 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -115,28 +115,6 @@
  */
 #include <machine/intr.h>
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;
-       int     ci_mtx_oldspl;
-       int     ci_mtx_count;
-       int     ci_want_resched;
-};
-
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()                        (&cpu_info_store)
-
-/*
- * definitions of cpu-dependent requirements
- * referenced in generic code
- */
-#define        cpu_number()                    0
-
-void   cpu_proc_fork(struct proc *, struct proc *);
-
-
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
  * machine state in an opaque clockframe.  One the hp300, we use
diff -r 5098a1d45120 -r e150e75f7885 sys/arch/mvme68k/include/cpu.h
--- a/sys/arch/mvme68k/include/cpu.h    Wed Dec 22 02:41:12 2010 +0000
+++ b/sys/arch/mvme68k/include/cpu.h    Wed Dec 22 02:42:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.44 2010/06/06 04:50:07 mrg Exp $     */
+/*     $NetBSD: cpu.h,v 1.45 2010/12/22 02:42:28 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -96,27 +96,6 @@
 #include <m68k/cpu.h>
 #define        M68K_MMU_MOTOROLA
 
-#include <sys/cpu_data.h>
-struct cpu_info {
-       struct cpu_data ci_data;        /* MI per-cpu data */
-       cpuid_t ci_cpuid;



Home | Main Index | Thread Index | Old Index