From 24ddcc31624240fa93474234cda488665d34730c Mon Sep 17 00:00:00 2001 From: simonb Date: Sun, 9 Jan 2000 13:24:14 +0000 Subject: [PATCH] Use the badaddr() prototype in mips/include/cpu.h by including in mips/include/mips_param.h. Remove duplicate badaddr() prototypes from some pmax header files. --- 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(-) diff --git a/sys/arch/mips/include/cpu.h b/sys/arch/mips/include/cpu.h index 3b7d88a62253..d9af11543f00 100644 --- a/sys/arch/mips/include/cpu.h +++ b/sys/arch/mips/include/cpu.h @@ -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 @@ -45,6 +45,24 @@ * Exported definitions unique to NetBSD/mips cpu support. */ +/* + * 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 @@ struct clockframe { #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 int mips_L2CacheMixed; 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 @@ int badaddr __P((void *, size_t)); void cpu_identify __P((void)); void mips_vector_init __P((void)); +#endif /* ! _LOCORE */ #endif /* _KERNEL */ #endif /* _CPU_H_ */ diff --git a/sys/arch/mips/include/mips_param.h b/sys/arch/mips/include/mips_param.h index d25aa1ac01db..3ad8d43bcc81 100644 --- a/sys/arch/mips/include/mips_param.h +++ b/sys/arch/mips/include/mips_param.h @@ -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 /* * On mips, UPAGES is fixed by sys/arch/mips/mips/locore code diff --git a/sys/arch/pmax/ibus/ibusvar.h b/sys/arch/pmax/ibus/ibusvar.h index 2e377fbf219e..6d8f6ee15179 100644 --- a/sys/arch/pmax/ibus/ibusvar.h +++ b/sys/arch/pmax/ibus/ibusvar.h @@ -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 @@ void ibus_intr_establish __P((struct device *, void * cookie, int level, 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 --git a/sys/arch/pmax/include/autoconf.h b/sys/arch/pmax/include/autoconf.h index 348fd7bc9614..aaaf34dbc98f 100644 --- a/sys/arch/pmax/include/autoconf.h +++ b/sys/arch/pmax/include/autoconf.h @@ -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 @@ struct mainbus_attach_args { when attaching CPUs */ }; -int badaddr __P((void *, u_int)); void makebootdev __P((char *)); diff --git a/sys/arch/pmax/include/tc_machdep.h b/sys/arch/pmax/include/tc_machdep.h index 6c76b2ce0247..b081b8c401ae 100644 --- a/sys/arch/pmax/include/tc_machdep.h +++ b/sys/arch/pmax/include/tc_machdep.h @@ -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 @@ typedef int32_t tc_offset_t; #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 --git a/sys/arch/pmax/tc/mcclock_ioasic.c b/sys/arch/pmax/tc/mcclock_ioasic.c index ce24b1713c84..f16510291e9d 100644 --- a/sys/arch/pmax/tc/mcclock_ioasic.c +++ b/sys/arch/pmax/tc/mcclock_ioasic.c @@ -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 /* 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 #include @@ -38,14 +38,13 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.11 2000/01/09 03:56:06 simonb E #include #include +#include #include #include #include #include -#include - static int mcclock_ioasic_match __P((struct device *, struct cfdata *, void *)); static void mcclock_ioasic_attach __P((struct device *, struct device *,