diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-09-21 05:51:16 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-09-21 05:51:16 +0000 |
commit | 9d8acb5845f4f49b3066987640a2e0e079dc2ccb (patch) | |
tree | 69bb31723f36cefad59f6fbbeedaf8deeebaac49 | |
parent | f8c817b871a5392d69073e0981ee36c88c871f13 (diff) |
Nuke commons.
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 34 | ||||
-rw-r--r-- | sys/arch/mips64/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/mips64/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cpu.c | 19 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/interrupt.c | 21 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 3 | ||||
-rw-r--r-- | sys/arch/sgi/include/intr.h | 23 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macebus.c | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 6 |
9 files changed, 74 insertions, 43 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index 0e045f13c30..57ac780dfc3 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.6 2004/09/20 10:29:57 pefo Exp $ */ +/* $OpenBSD: cpu.h,v 1.7 2004/09/21 05:51:13 miod Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -356,7 +356,7 @@ #define aston() (astpending = 1) -int want_resched; /* resched() was called */ +extern int want_resched; /* resched() was called */ #endif /* !_LOCORE */ #endif /* _KERNEL */ @@ -406,21 +406,21 @@ int want_resched; /* resched() was called */ #if defined(_KERNEL) && !defined(_LOCORE) -u_int CpuPrimaryInstCacheSize; -u_int CpuPrimaryInstCacheLSize; -u_int CpuPrimaryInstSetSize; -u_int CpuPrimaryDataCacheSize; -u_int CpuPrimaryDataCacheLSize; -u_int CpuPrimaryDataSetSize; -u_int CpuCacheAliasMask; -u_int CpuSecondaryCacheSize; -u_int CpuTertiaryCacheSize; -u_int CpuNWayCache; -u_int CpuCacheType; /* R4K, R5K, RM7K */ -u_int CpuConfigRegister; -u_int CpuStatusRegister; -u_int CpuExternalCacheOn; /* R5K, RM7K */ -u_int CpuOnboardCacheOn; /* RM7K */ +extern u_int CpuPrimaryInstCacheSize; +extern u_int CpuPrimaryInstCacheLSize; +extern u_int CpuPrimaryInstSetSize; +extern u_int CpuPrimaryDataCacheSize; +extern u_int CpuPrimaryDataCacheLSize; +extern u_int CpuPrimaryDataSetSize; +extern u_int CpuCacheAliasMask; +extern u_int CpuSecondaryCacheSize; +extern u_int CpuTertiaryCacheSize; +extern u_int CpuNWayCache; +extern u_int CpuCacheType; /* R4K, R5K, RM7K */ +extern u_int CpuConfigRegister; +extern u_int CpuStatusRegister; +extern u_int CpuExternalCacheOn; /* R5K, RM7K */ +extern u_int CpuOnboardCacheOn; /* RM7K */ struct tlb; struct user; diff --git a/sys/arch/mips64/include/db_machdep.h b/sys/arch/mips64/include/db_machdep.h index 090c09b024c..54272538909 100644 --- a/sys/arch/mips64/include/db_machdep.h +++ b/sys/arch/mips64/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.4 2004/09/09 22:21:41 pefo Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.5 2004/09/21 05:51:13 miod Exp $ */ /* * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) @@ -38,7 +38,7 @@ #define DB_NO_AOUT /* For crying out loud! */ typedef struct trap_frame db_regs_t; -db_regs_t ddb_regs; +extern db_regs_t ddb_regs; typedef long db_expr_t; typedef vaddr_t db_addr_t; diff --git a/sys/arch/mips64/include/vmparam.h b/sys/arch/mips64/include/vmparam.h index e808f7ef88b..a17037a8930 100644 --- a/sys/arch/mips64/include/vmparam.h +++ b/sys/arch/mips64/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.5 2004/09/17 19:19:05 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.6 2004/09/21 05:51:13 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp $ */ /* @@ -123,7 +123,7 @@ #define VM_FREELIST_DEFAULT 0 /* Kernel page table size is variable. */ -vaddr_t virtual_end; +extern vaddr_t virtual_end; #define VM_MAX_KERNEL_ADDRESS virtual_end /* virtual sizes (bytes) for various kernel submaps */ diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c index 97d895f4160..eedf4851f45 100644 --- a/sys/arch/mips64/mips64/cpu.c +++ b/sys/arch/mips64/mips64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.8 2004/09/20 10:29:57 pefo Exp $ */ +/* $OpenBSD: cpu.c,v 1.9 2004/09/21 05:51:15 miod Exp $ */ /* * Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se) @@ -36,10 +36,25 @@ #include <machine/cpu.h> #include <machine/autoconf.h> - int cpumatch(struct device *, void *, void *); void cpuattach(struct device *, struct device *, void *); +u_int CpuPrimaryInstCacheSize; +u_int CpuPrimaryInstCacheLSize; +u_int CpuPrimaryInstSetSize; +u_int CpuPrimaryDataCacheSize; +u_int CpuPrimaryDataCacheLSize; +u_int CpuPrimaryDataSetSize; +u_int CpuCacheAliasMask; +u_int CpuSecondaryCacheSize; +u_int CpuTertiaryCacheSize; +u_int CpuNWayCache; +u_int CpuCacheType; /* R4K, R5K, RM7K */ +u_int CpuConfigRegister; +u_int CpuStatusRegister; +u_int CpuExternalCacheOn; /* R5K, RM7K */ +u_int CpuOnboardCacheOn; /* RM7K */ + int cpu_is_rm7k = 0; struct cfattach cpu_ca = { diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c index 4a1c3fb5eb2..cd6891c0eb2 100644 --- a/sys/arch/mips64/mips64/interrupt.c +++ b/sys/arch/mips64/mips64/interrupt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interrupt.c,v 1.5 2004/09/20 10:29:57 pefo Exp $ */ +/* $OpenBSD: interrupt.c,v 1.6 2004/09/21 05:51:15 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -56,6 +56,21 @@ #include <ddb/db_sym.h> #endif +volatile intrmask_t cpl; +volatile intrmask_t ipending, astpending; + +intrmask_t imask[NIPLS]; + +intrmask_t idle_mask; +int last_low_int; + +struct { + intrmask_t int_mask; + intrmask_t (*int_hand)(intrmask_t, struct trap_frame *); +} cpu_int_tab[NLOWINT]; + +void_f *pending_hand; + int netisr; /* @@ -566,4 +581,8 @@ splraise(int newcpl) __asm__ (" sync\n .set reorder\n"); return (oldcpl); } +volatile intrmask_t cpl; +volatile intrmask_t ipending, astpending; + +intrmask_t imask[NIPLS]; #endif diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index ba840ac097c..22580b85f1f 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.8 2004/09/17 19:19:08 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.9 2004/09/21 05:51:15 miod Exp $ */ /* tracked to 1.23 */ /* @@ -90,6 +90,7 @@ #include <sys/cdefs.h> #include <sys/syslog.h> +int want_resched; /* resched() was called */ struct proc *machFPCurProcPtr; /* pointer to last proc to use FP */ char *trap_type[] = { diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h index 4eb71d2a6ee..28822126337 100644 --- a/sys/arch/sgi/include/intr.h +++ b/sys/arch/sgi/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.6 2004/09/20 15:10:35 pefo Exp $ */ +/* $OpenBSD: intr.h,v 1.7 2004/09/21 05:51:15 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -135,11 +135,11 @@ void clearsoftnet(void); void clearsofttty(void); #endif +extern volatile intrmask_t cpl; +extern volatile intrmask_t ipending; +extern volatile intrmask_t astpending; -volatile intrmask_t cpl; -volatile intrmask_t ipending, astpending; - -intrmask_t imask[NIPLS]; +extern intrmask_t imask[NIPLS]; /* * A note on clock interrupts. Clock interrupts are always @@ -154,7 +154,7 @@ static __inline void splx(int newcpl); static __inline int spllower(int newcpl); typedef void (void_f) (void); -void_f *pending_hand; +extern void_f *pending_hand; static __inline void register_pending_int_handler(void(*pending)(void)) @@ -224,6 +224,8 @@ struct intrhand { void *frame; }; +extern struct intrhand *intrhand[INTMASKSIZE]; + /* * Low level interrupt dispatcher registration data. */ @@ -231,13 +233,8 @@ struct intrhand { struct trap_frame; -struct { - intrmask_t int_mask; - intrmask_t (*int_hand)(intrmask_t, struct trap_frame *); -} cpu_int_tab[NLOWINT]; - -intrmask_t idle_mask; -int last_low_int; +extern intrmask_t idle_mask; +extern int last_low_int; void set_intr(int, intrmask_t, intrmask_t(*)(intrmask_t, struct trap_frame *)); diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c index b65e5bbf8a8..7bd0bbcdf08 100644 --- a/sys/arch/sgi/localbus/macebus.c +++ b/sys/arch/sgi/localbus/macebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macebus.c,v 1.7 2004/09/20 10:31:16 pefo Exp $ */ +/* $OpenBSD: macebus.c,v 1.8 2004/09/21 05:51:15 miod Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -438,7 +438,6 @@ intrmask_t mace_intem = 0x0; static intrmask_t intrtype[INTMASKSIZE]; static intrmask_t intrmask[INTMASKSIZE]; static intrmask_t intrlevel[INTMASKSIZE]; -struct intrhand *intrhand[INTMASKSIZE]; static int fakeintr __P((void *)); static int fakeintr(void *a) {return 0;} diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index aabb33d0e2f..af255ce90d0 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.12 2004/09/20 10:31:16 pefo Exp $ */ +/* $OpenBSD: machdep.c,v 1.13 2004/09/21 05:51:15 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -116,7 +116,6 @@ int bufpages = BUFPAGES; vm_map_t exec_map; vm_map_t phys_map; -int msgbufmapped; /* set when safe to use msgbuf */ caddr_t msgbufbase; int physmem; /* max supported memory, changes to actual */ @@ -263,7 +262,7 @@ mips_init(int argc, int32_t *argv) continue; /* Outside kernel */ } - if (fp > firstkernpage) + if (fp > firstkernpage) fp = lastkernpage + 1; else if (lp < lastkernpage) lp = firstkernpage - 1; @@ -855,6 +854,7 @@ dumpconf() void dumpsys() { + extern int msgbufmapped; msgbufmapped = 0; if (dumpdev == NODEV) |