Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Centralise struct cpu_info declaration and related ...



details:   https://anonhg.NetBSD.org/src/rev/17bd06cd7767
branches:  trunk
changeset: 514506:17bd06cd7767
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Sep 04 06:19:21 2001 +0000

description:
Centralise struct cpu_info declaration and related info to <mips/cpu.h>.

diffstat:

 sys/arch/algor/include/cpu.h    |  29 +----------------------------
 sys/arch/arc/include/cpu.h      |  24 +-----------------------
 sys/arch/cobalt/include/cpu.h   |  29 +----------------------------
 sys/arch/hpcmips/include/cpu.h  |  29 +----------------------------
 sys/arch/mips/include/cpu.h     |  22 +++++++++++++++++++++-
 sys/arch/mipsco/include/cpu.h   |  30 +-----------------------------
 sys/arch/newsmips/include/cpu.h |  30 ++++--------------------------
 sys/arch/pmax/include/cpu.h     |  29 +----------------------------
 sys/arch/sgimips/include/cpu.h  |  29 +----------------------------
 9 files changed, 32 insertions(+), 219 deletions(-)

diffs (truncated from 346 to 300 lines):

diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/algor/include/cpu.h
--- a/sys/arch/algor/include/cpu.h      Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/algor/include/cpu.h      Tue Sep 04 06:19:21 2001 +0000
@@ -1,31 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.2 2001/05/30 12:28:37 mrg Exp $      */
-
-#ifndef _ALGOR_CPU_H_
-#define _ALGOR_CPU_H_
+/*     $NetBSD: cpu.h,v 1.3 2001/09/04 06:19:21 simonb Exp $   */
 
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
-
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};
-
-#ifdef _KERNEL
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()                (&cpu_info_store)
-#define        cpu_number()            (0)
-#endif
-#endif /* !_LOCORE */
-
-#endif /* !_ALGOR_CPU_H_ */
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/arc/include/cpu.h
--- a/sys/arch/arc/include/cpu.h        Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/arc/include/cpu.h        Tue Sep 04 06:19:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.16 2001/05/30 12:28:39 mrg Exp $     */
+/*     $NetBSD: cpu.h,v 1.17 2001/09/04 06:19:22 simonb Exp $  */
 /*     $OpenBSD: cpu.h,v 1.9 1998/01/28 13:46:10 pefo Exp $ */
 
 #ifndef _ARC_CPU_H_
@@ -12,28 +12,6 @@
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
 
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};
-
-#ifdef _KERNEL
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()        (&cpu_info_store)
-#define        cpu_number()    (0)
-#endif
-#endif /* !_LOCORE */
-
 /*
  * definitions of cpu-dependent requirements
  * referenced in generic code
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/cobalt/include/cpu.h
--- a/sys/arch/cobalt/include/cpu.h     Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/cobalt/include/cpu.h     Tue Sep 04 06:19:21 2001 +0000
@@ -1,31 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.8 2001/05/30 12:28:41 mrg Exp $      */
-
-#ifndef _COBALT_CPU_H
-#define _COBALT_CPU_H
+/*     $NetBSD: cpu.h,v 1.9 2001/09/04 06:19:22 simonb Exp $   */
 
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
-
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};
-
-#ifdef _KERNEL
-extern struct cpu_info cpu_info_store;
-
-#define        cpu_number()    (0)
-#define        curcpu()        (&cpu_info_store)
-#endif
-#endif /* !_LOCORE */
-
-#endif  /* !_COBALT_CPU_H_ */
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/hpcmips/include/cpu.h
--- a/sys/arch/hpcmips/include/cpu.h    Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/hpcmips/include/cpu.h    Tue Sep 04 06:19:21 2001 +0000
@@ -1,31 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.9 2001/08/31 04:18:52 simonb Exp $   */
-
-#ifndef __HPCMIPS_CPU_H
-#define __HPCMIPS_CPU_H
+/*     $NetBSD: cpu.h,v 1.10 2001/09/04 06:19:22 simonb Exp $  */
 
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
-
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};
-
-#ifdef _KERNEL
-extern struct cpu_info cpu_info_store;
-
-#define        cpu_number()    (0)
-#define        curcpu()        (&cpu_info_store)
-#endif
-#endif /* !_LOCORE */
-
-#endif /* __HPCMIPS_CPU_H */
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h       Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/mips/include/cpu.h       Tue Sep 04 06:19:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.52 2001/06/14 22:56:57 thorpej Exp $ */
+/*     $NetBSD: cpu.h,v 1.53 2001/09/04 06:19:22 simonb Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -41,10 +41,26 @@
 #ifndef _CPU_H_
 #define _CPU_H_
 
+#include <sys/sched.h>
+
 /*
  * Exported definitions unique to NetBSD/mips cpu support.
  */
 
+#ifndef _LOCORE
+#if defined(_KERNEL_OPT)
+#include "opt_lockdebug.h"
+#endif
+
+struct cpu_info {
+       struct schedstate_percpu ci_schedstate; /* scheduler state */
+#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
+       u_long ci_spin_locks;           /* # of spin locks held */
+       u_long ci_simple_locks;         /* # of simple locks held */
+#endif
+};
+#endif /* !defined(_LOCORE) */
+
 /*
  * CTL_MACHDEP definitions.
  */
@@ -69,6 +85,10 @@
 
 #ifdef _KERNEL
 #ifndef _LOCORE
+extern struct cpu_info cpu_info_store;
+
+#define        curcpu()        (&cpu_info_store)
+#define        cpu_number()    (0)
 
 /*
  * Macros to find the CPU architecture we're on at run-time,
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/mipsco/include/cpu.h
--- a/sys/arch/mipsco/include/cpu.h     Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/mipsco/include/cpu.h     Tue Sep 04 06:19:21 2001 +0000
@@ -1,32 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.5 2001/05/30 12:28:46 mrg Exp $      */
-
-#ifndef _MIPSCO_CPU_H_
-#define _MIPSCO_CPU_H_
+/*     $NetBSD: cpu.h,v 1.6 2001/09/04 06:19:22 simonb Exp $   */
 
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
-
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};
-
-#ifdef _KERNEL
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()                (&cpu_info_store)
-#define        cpu_number()            0
-
-#endif /* _KERNEL */
-#endif /* !_LOCORE */
-
-#endif /* !_MIPSCO_CPU_H_ */
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/newsmips/include/cpu.h
--- a/sys/arch/newsmips/include/cpu.h   Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/newsmips/include/cpu.h   Tue Sep 04 06:19:21 2001 +0000
@@ -1,36 +1,14 @@
-/*     $NetBSD: cpu.h,v 1.10 2001/05/30 12:28:48 mrg Exp $     */
+/*     $NetBSD: cpu.h,v 1.11 2001/09/04 06:19:23 simonb Exp $  */
 
-#ifndef _MACHINE_CPU_H_
-#define _MACHINE_CPU_H_
+#ifndef _NEWSMIPS_CPU_H_
+#define _NEWSMIPS_CPU_H_
 
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
 
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
 extern int systype;
 
 #define NEWS3400       1
 #define NEWS5000       2
 
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};
-
-#ifdef _KERNEL
-extern struct cpu_info cpu_info_store;
-
-#define        curcpu()                (&cpu_info_store)
-#define        cpu_number()            0
-#endif /* _KERNEL */
-
-#endif /* _LOCORE */
-#endif /* _MACHINE_CPU_H_ */
+#endif /* _NEWSMIPS_CPU_H_ */
diff -r 68232314fa37 -r 17bd06cd7767 sys/arch/pmax/include/cpu.h
--- a/sys/arch/pmax/include/cpu.h       Tue Sep 04 05:31:27 2001 +0000
+++ b/sys/arch/pmax/include/cpu.h       Tue Sep 04 06:19:21 2001 +0000
@@ -1,31 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.25 2001/05/30 12:28:49 mrg Exp $     */
-
-#ifndef _PMAX_CPU_H_
-#define _PMAX_CPU_H_
+/*     $NetBSD: cpu.h,v 1.26 2001/09/04 06:19:23 simonb Exp $  */
 
 #include <mips/cpu.h>
 #include <mips/cpuregs.h>
-
-#ifndef _LOCORE
-#if defined(_KERNEL_OPT)
-#include "opt_lockdebug.h"
-#endif
-
-#include <sys/sched.h>
-struct cpu_info {
-       struct schedstate_percpu ci_schedstate; /* scheduler state */
-#if defined(DIAGNOSTIC) || defined(LOCKDEBUG)
-       u_long ci_spin_locks;           /* # of spin locks held */
-       u_long ci_simple_locks;         /* # of simple locks held */
-#endif
-};



Home | Main Index | Thread Index | Old Index