summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-09-21 05:51:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-09-21 05:51:16 +0000
commit9d8acb5845f4f49b3066987640a2e0e079dc2ccb (patch)
tree69bb31723f36cefad59f6fbbeedaf8deeebaac49 /sys/arch/mips64
parentf8c817b871a5392d69073e0981ee36c88c871f13 (diff)
Nuke commons.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/include/cpu.h34
-rw-r--r--sys/arch/mips64/include/db_machdep.h4
-rw-r--r--sys/arch/mips64/include/vmparam.h4
-rw-r--r--sys/arch/mips64/mips64/cpu.c19
-rw-r--r--sys/arch/mips64/mips64/interrupt.c21
-rw-r--r--sys/arch/mips64/mips64/trap.c3
6 files changed, 60 insertions, 25 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[] = {