Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use the badaddr() prototype in mips/include/cpu.h b...



details:   https://anonhg.NetBSD.org/src/rev/d9d8600d7f23
branches:  trunk
changeset: 480323:d9d8600d7f23
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Jan 09 13:24:14 2000 +0000

description:
Use the badaddr() prototype in mips/include/cpu.h by including
<machine/cpu.h> in mips/include/mips_param.h.  Remove duplicate
badaddr() prototypes from some pmax header files.

diffstat:

 sys/arch/mips/include/cpu.h        |  39 ++++++++++++++++++++-----------------
 sys/arch/mips/include/mips_param.h |   4 ++-
 sys/arch/pmax/ibus/ibusvar.h       |   4 +--
 sys/arch/pmax/include/autoconf.h   |   3 +-
 sys/arch/pmax/include/tc_machdep.h |   4 +--
 sys/arch/pmax/tc/mcclock_ioasic.c  |   7 ++---
 6 files changed, 30 insertions(+), 31 deletions(-)

diffs (170 lines):

diff -r 1fe4e397e22f -r d9d8600d7f23 sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h       Sun Jan 09 13:19:19 2000 +0000
+++ b/sys/arch/mips/include/cpu.h       Sun Jan 09 13:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.32 1999/08/10 21:08:08 thorpej Exp $ */
+/*     $NetBSD: cpu.h,v 1.33 2000/01/09 13:24:14 simonb Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -46,6 +46,24 @@
  */
 
 /*
+ * CTL_MACHDEP definitions.
+ */
+#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
+#define        CPU_BOOTED_KERNEL       2       /* string: booted kernel name */
+#define        CPU_ROOT_DEVICE         3       /* string: root device name */
+#define        CPU_MAXID               4       /* number of valid machdep ids */
+
+#define CTL_MACHDEP_NAMES { \
+       { 0, 0 }, \
+       { "console_device", CTLTYPE_STRUCT }, \
+       { "booted_kernel", CTLTYPE_STRING }, \
+       { "root_device", CTLTYPE_STRING }, \
+}
+
+#ifdef _KERNEL
+#ifndef _LOCORE
+
+/*
  * Macros to find the CPU architecture we're on at run-time,
  * or if possible, at compile-time.
  */
@@ -120,7 +138,6 @@
 #endif
 
 
-
 /*
  * Preempt the current process if in interrupt from user mode,
  * or after the current trap/syscall if in system mode.
@@ -153,22 +170,7 @@
 extern u_int32_t mips3_intr_cycle_count;
 extern u_int32_t mips3_timer_delta;
 #endif
-#endif
-
-/*
- * CTL_MACHDEP definitions.
- */
-#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
-#define        CPU_BOOTED_KERNEL       2       /* string: booted kernel name */
-#define        CPU_MAXID               3       /* number of valid machdep ids */
-
-#define CTL_MACHDEP_NAMES { \
-       { 0, 0 }, \
-       { "console_device", CTLTYPE_STRUCT }, \
-       { "booted_kernel", CTLTYPE_STRING }, \
-}
-
-#ifdef _KERNEL
+#endif /* MIPS3 */
 
 /*
  * Misc prototypes.
@@ -194,6 +196,7 @@
 void   cpu_identify __P((void));
 void   mips_vector_init __P((void));
 
+#endif /* ! _LOCORE */
 #endif /* _KERNEL */
 
 #endif /* _CPU_H_ */
diff -r 1fe4e397e22f -r d9d8600d7f23 sys/arch/mips/include/mips_param.h
--- a/sys/arch/mips/include/mips_param.h        Sun Jan 09 13:19:19 2000 +0000
+++ b/sys/arch/mips/include/mips_param.h        Sun Jan 09 13:24:14 2000 +0000
@@ -1,4 +1,6 @@
-/*     $NetBSD: mips_param.h,v 1.15 1999/12/04 21:20:48 ragge Exp $    */
+/*     $NetBSD: mips_param.h,v 1.16 2000/01/09 13:24:15 simonb Exp $   */
+
+#include <machine/cpu.h>
 
 /*
  * On mips, UPAGES is fixed by sys/arch/mips/mips/locore code
diff -r 1fe4e397e22f -r d9d8600d7f23 sys/arch/pmax/ibus/ibusvar.h
--- a/sys/arch/pmax/ibus/ibusvar.h      Sun Jan 09 13:19:19 2000 +0000
+++ b/sys/arch/pmax/ibus/ibusvar.h      Sun Jan 09 13:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ibusvar.h,v 1.12 2000/01/08 01:02:37 simonb Exp $ */
+/* $NetBSD: ibusvar.h,v 1.13 2000/01/09 13:24:16 simonb Exp $ */
 
 #ifndef _IBUSVAR_H_
 #define _IBUSVAR_H_ 1
@@ -45,8 +45,6 @@
            int (*handler)(void *), void *arg));
 void   ibus_intr_disestablish __P((struct device *, void *));
 
-int    badaddr __P((void *, u_int));
-
 void   dec_3100_intr_establish __P((struct device *, void *,
            int, int (*)(void *), void *));
 void   dec_3100_intr_disestablish __P((struct device *, void *));
diff -r 1fe4e397e22f -r d9d8600d7f23 sys/arch/pmax/include/autoconf.h
--- a/sys/arch/pmax/include/autoconf.h  Sun Jan 09 13:19:19 2000 +0000
+++ b/sys/arch/pmax/include/autoconf.h  Sun Jan 09 13:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.h,v 1.15 2000/01/08 01:02:38 simonb Exp $ */
+/*     $NetBSD: autoconf.h,v 1.16 2000/01/09 13:24:16 simonb Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -37,5 +37,4 @@
                                           when attaching CPUs */
 };
 
-int    badaddr __P((void *, u_int));
 void   makebootdev __P((char *));
diff -r 1fe4e397e22f -r d9d8600d7f23 sys/arch/pmax/include/tc_machdep.h
--- a/sys/arch/pmax/include/tc_machdep.h        Sun Jan 09 13:19:19 2000 +0000
+++ b/sys/arch/pmax/include/tc_machdep.h        Sun Jan 09 13:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tc_machdep.h,v 1.14 2000/01/08 01:02:38 simonb Exp $ */
+/* $NetBSD: tc_machdep.h,v 1.15 2000/01/09 13:24:16 simonb Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -82,8 +82,6 @@
 #define TC_BUS_MATCHNAME(ta, name) \
                (strncmp( (ta)->ta_modname, (name), TC_ROM_LLEN+1) == 0)
 
-int    badaddr __P((void *, u_int));
-
 #define TC_KV(x) ((tc_addr_t)MIPS_PHYS_TO_KSEG1(x))
 #define TC_C(x)         ((void *)(u_long)(x))
 
diff -r 1fe4e397e22f -r d9d8600d7f23 sys/arch/pmax/tc/mcclock_ioasic.c
--- a/sys/arch/pmax/tc/mcclock_ioasic.c Sun Jan 09 13:19:19 2000 +0000
+++ b/sys/arch/pmax/tc/mcclock_ioasic.c Sun Jan 09 13:24:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcclock_ioasic.c,v 1.11 2000/01/09 03:56:06 simonb Exp $ */
+/* $NetBSD: mcclock_ioasic.c,v 1.12 2000/01/09 13:24:16 simonb Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.11 2000/01/09 03:56:06 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.12 2000/01/09 13:24:16 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -38,14 +38,13 @@
 
 #include <dev/dec/clockvar.h>
 #include <dev/dec/mcclockvar.h>
+#include <dev/dec/mcclock_pad32.h>
 #include <dev/ic/mc146818reg.h>
 
 #include <dev/tc/tcreg.h>
 #include <dev/tc/tcvar.h> 
 #include <dev/tc/ioasicvar.h>
 
-#include  <dev/dec/mcclock_pad32.h>
-
 static int     mcclock_ioasic_match __P((struct device *, struct cfdata *,
                    void *));
 static void    mcclock_ioasic_attach __P((struct device *, struct device *,



Home | Main Index | Thread Index | Old Index