summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-01-27 20:14:13 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-01-27 20:14:13 +0000
commit4b8295848c9404b58e43741cd4c4dba454d704e4 (patch)
treec9131aa756edcc02db59dc9f5abea2fe5c3f14f4 /sys/arch/sparc
parentb1f982a28a9f7ee48c3708555882e7ba072c70df (diff)
reduce global symbol pollution
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/include/cpu.h18
-rw-r--r--sys/arch/sparc/sparc/cpu.c5
-rw-r--r--sys/arch/sparc/sparc/intr.c2
-rw-r--r--sys/arch/sparc/sparc/trap.c3
4 files changed, 16 insertions, 12 deletions
diff --git a/sys/arch/sparc/include/cpu.h b/sys/arch/sparc/include/cpu.h
index ce4679565d6..e80925c85cb 100644
--- a/sys/arch/sparc/include/cpu.h
+++ b/sys/arch/sparc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.6 1999/07/23 19:11:27 jason Exp $ */
+/* $OpenBSD: cpu.h,v 1.7 2000/01/27 20:14:12 art Exp $ */
/* $NetBSD: cpu.h,v 1.24 1997/03/15 22:25:15 pk Exp $ */
/*
@@ -103,7 +103,8 @@ extern int eintstack[];
union sir {
int sir_any;
char sir_which[4];
-} sir;
+};
+extern union sir sir;
#define SIR_NET 0
#define SIR_CLOCK 1
@@ -122,14 +123,13 @@ extern void raise __P((int, int));
#define setsoftnet() (sir.sir_which[SIR_NET] = 1, setsoftint())
#define setsoftclock() (sir.sir_which[SIR_CLOCK] = 1, setsoftint())
-int want_ast;
-
/*
* Preempt the current process if in interrupt from user mode,
* or after the current trap/syscall if in system mode.
*/
-int want_resched; /* resched() was called */
+extern int want_resched; /* resched() was called */
#define need_resched() (want_resched = 1, want_ast = 1)
+extern int want_ast;
/*
* Give a profiling tick to the current process when the user profiling
@@ -149,8 +149,8 @@ int want_resched; /* resched() was called */
*
* XXX this must be per-cpu (eventually)
*/
-struct proc *fpproc; /* FPU owner */
-int foundfpu; /* true => we have an FPU */
+extern struct proc *fpproc; /* FPU owner */
+extern int foundfpu; /* true => we have an FPU */
/*
* Interrupt handler chains. Interrupt handlers should return 0 for
@@ -162,8 +162,8 @@ struct intrhand {
int (*ih_fun) __P((void *));
void *ih_arg;
struct intrhand *ih_next;
-} *intrhand[15];
-
+};
+extern struct intrhand *intrhand[15];
void intr_establish __P((int level, struct intrhand *));
void vmeintr_establish __P((int vec, int level, struct intrhand *));
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index 4ba5adf405c..07106c79ef2 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.20 1999/12/09 21:35:29 art Exp $ */
+/* $OpenBSD: cpu.c,v 1.21 2000/01/27 20:14:11 art Exp $ */
/* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */
/*
@@ -80,6 +80,9 @@ char cpu_model[130];
char cpu_hotfix[40];
extern char mainbus_model[]; /* from autoconf.c */
+int foundfpu; /* from machine/cpu.h */
+struct proc *fpproc; /* XXX - should be in cpuinfo */
+
/* The CPU configuration driver. */
void cpu_attach __P((struct device *, struct device *, void *));
int cpu_match __P((struct device *, void *, void *));
diff --git a/sys/arch/sparc/sparc/intr.c b/sys/arch/sparc/sparc/intr.c
index 1596300fce8..047322effad 100644
--- a/sys/arch/sparc/sparc/intr.c
+++ b/sys/arch/sparc/sparc/intr.c
@@ -106,7 +106,7 @@ strayintr(fp)
static struct intrhand level10 = { clockintr };
static struct intrhand level14 = { statintr };
-
+union sir sir;
/*
* Level 1 software interrupt (could also be Sbus level 1 interrupt).
* Three possible reasons:
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c
index 66db2e86a76..ab949248f87 100644
--- a/sys/arch/sparc/sparc/trap.c
+++ b/sys/arch/sparc/sparc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.19 1999/08/17 16:09:21 art Exp $ */
+/* $OpenBSD: trap.c,v 1.20 2000/01/27 20:14:11 art Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
@@ -205,6 +205,7 @@ void syscall __P((register_t, struct trapframe *, register_t));
int ignore_bogus_traps = 0;
+int want_ast = 0;
/*
* Define the code needed before returning to user mode, for
* trap, mem_access_fault, and syscall.