summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-05-13 22:25:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-05-13 22:25:34 +0000
commitd4d555e924e183fd9573e15c39d88d4bdd146f4d (patch)
tree43f020ad0d9c41e22528abc593fd4591ebaf20c1 /sys/arch/sparc
parent2d204f00c5992a23bb2b68a7599c51bf28112ff7 (diff)
Nuke a few simple commons.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/power.c3
-rw-r--r--sys/arch/sparc/dev/power.h4
-rw-r--r--sys/arch/sparc/include/db_machdep.h4
-rw-r--r--sys/arch/sparc/sparc/autoconf.c3
-rw-r--r--sys/arch/sparc/sparc/auxioreg.h6
-rw-r--r--sys/arch/sparc/sparc/auxreg.c4
-rw-r--r--sys/arch/sparc/sparc/db_interface.c5
-rw-r--r--sys/arch/sparc/sparc/memreg.c4
-rw-r--r--sys/arch/sparc/sparc/memreg.h4
9 files changed, 21 insertions, 16 deletions
diff --git a/sys/arch/sparc/dev/power.c b/sys/arch/sparc/dev/power.c
index 8e356a7f563..42cedacb7d5 100644
--- a/sys/arch/sparc/dev/power.c
+++ b/sys/arch/sparc/dev/power.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: power.c,v 1.6 2002/03/14 01:26:43 millert Exp $ */
+/* $OpenBSD: power.c,v 1.7 2003/05/13 22:25:30 miod Exp $ */
/* $NetBSD: power.c,v 1.2 1996/05/16 15:56:56 abrown Exp $ */
/*
@@ -62,6 +62,7 @@ struct cfdriver power_cd = {
};
static char power_attached = 0;
+volatile u_char *power_reg;
/*
* This is the driver for the "power" register available on some Sun4m
diff --git a/sys/arch/sparc/dev/power.h b/sys/arch/sparc/dev/power.h
index 48654220cde..15f28136164 100644
--- a/sys/arch/sparc/dev/power.h
+++ b/sys/arch/sparc/dev/power.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: power.h,v 1.3 2002/03/14 01:26:43 millert Exp $ */
+/* $OpenBSD: power.h,v 1.4 2003/05/13 22:25:30 miod Exp $ */
/* $NetBSD: power.h,v 1.2 1996/05/16 15:56:57 abrown Exp $ */
/*
@@ -54,7 +54,7 @@
#define POWER_BITS "\20\1POWEROFF"
#ifndef _LOCORE
-volatile u_char *power_reg;
+extern volatile u_char *power_reg;
#endif
void powerdown(void); /* power off function */
diff --git a/sys/arch/sparc/include/db_machdep.h b/sys/arch/sparc/include/db_machdep.h
index b73d1a1c311..a9e63ac0bc5 100644
--- a/sys/arch/sparc/include/db_machdep.h
+++ b/sys/arch/sparc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.9 2002/08/11 23:05:20 art Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.10 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: db_machdep.h,v 1.10 1997/08/31 21:23:40 pk Exp $ */
/*
@@ -51,7 +51,7 @@ typedef struct {
struct frame db_fr;
} db_regs_t;
-db_regs_t ddb_regs; /* register state */
+extern db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
#define DDB_TF (&ddb_regs.db_tf)
#define DDB_FR (&ddb_regs.db_fr)
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c
index 5cec5e5127e..c1030ec6c70 100644
--- a/sys/arch/sparc/sparc/autoconf.c
+++ b/sys/arch/sparc/sparc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.56 2003/04/06 18:54:19 ho Exp $ */
+/* $OpenBSD: autoconf.c,v 1.57 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
@@ -94,7 +94,6 @@
* the configuration process, and are used in initializing
* the machine.
*/
-int cold; /* if 1, still working on cold-start */
int fbnode; /* node ID of ROM's console frame buffer */
int optionsnode; /* node ID of ROM's options */
int mmu_3l; /* SUN4_400 models have a 3-level MMU */
diff --git a/sys/arch/sparc/sparc/auxioreg.h b/sys/arch/sparc/sparc/auxioreg.h
index 751cd09c3fa..f0b6207892d 100644
--- a/sys/arch/sparc/sparc/auxioreg.h
+++ b/sys/arch/sparc/sparc/auxioreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: auxioreg.h,v 1.2 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: auxioreg.h,v 1.3 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: auxreg.h,v 1.7 1997/05/17 17:52:52 pk Exp $ */
/*
@@ -123,8 +123,8 @@
)
#ifndef _LOCORE
-volatile u_char *auxio_reg; /* Copy of AUXIO_REG */
-u_char auxio_regval;
+extern volatile u_char *auxio_reg; /* Copy of AUXIO_REG */
+extern u_char auxio_regval;
unsigned int auxregbisc(int, int);
#endif
diff --git a/sys/arch/sparc/sparc/auxreg.c b/sys/arch/sparc/sparc/auxreg.c
index 27d3c4ce681..907a9be6312 100644
--- a/sys/arch/sparc/sparc/auxreg.c
+++ b/sys/arch/sparc/sparc/auxreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auxreg.c,v 1.9 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: auxreg.c,v 1.10 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: auxreg.c,v 1.21 1997/05/24 20:15:59 pk Exp $ */
/*
@@ -67,6 +67,8 @@ struct cfdriver auxreg_cd = {
0, "auxreg", DV_DULL
};
+volatile u_char *auxio_reg; /* Copy of AUXIO_REG */
+u_char auxio_regval;
extern int sparc_led_blink; /* from machdep */
struct timeout sparc_led_to;
diff --git a/sys/arch/sparc/sparc/db_interface.c b/sys/arch/sparc/sparc/db_interface.c
index 81e696a9536..333d62225ea 100644
--- a/sys/arch/sparc/sparc/db_interface.c
+++ b/sys/arch/sparc/sparc/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.10 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: db_interface.c,v 1.11 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: db_interface.c,v 1.18 1997/09/01 00:16:31 pk Exp $ */
/*
@@ -58,7 +58,6 @@
#include <machine/ctlreg.h>
#include <sparc/sparc/asm.h>
-
/*
* Read bytes from kernel address space for debugger.
*/
@@ -155,6 +154,8 @@ struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
extern label_t *db_recover;
+db_regs_t ddb_regs; /* register state */
+
int db_active = 0;
extern char *trap_type[];
diff --git a/sys/arch/sparc/sparc/memreg.c b/sys/arch/sparc/sparc/memreg.c
index fb74e9f3276..ec8d0ab2873 100644
--- a/sys/arch/sparc/sparc/memreg.c
+++ b/sys/arch/sparc/sparc/memreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memreg.c,v 1.10 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: memreg.c,v 1.11 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: memreg.c,v 1.21 1997/07/29 09:42:08 fair Exp $ */
/*
@@ -124,6 +124,8 @@ memregattach(parent, self, aux)
* and take the page out of the page pool, but for now...
*/
+volatile u_int *par_err_reg; /* virtual address; NULL if not yet mapped */
+
void
memerr4_4c(issync, ser, sva, aer, ava, tf)
unsigned int issync;
diff --git a/sys/arch/sparc/sparc/memreg.h b/sys/arch/sparc/sparc/memreg.h
index 595570c04b4..2841a1eb0a4 100644
--- a/sys/arch/sparc/sparc/memreg.h
+++ b/sys/arch/sparc/sparc/memreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: memreg.h,v 1.6 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: memreg.h,v 1.7 2003/05/13 22:25:33 miod Exp $ */
/* $NetBSD: memreg.h,v 1.4 1996/03/31 22:52:13 pk Exp $ */
/*
@@ -49,7 +49,7 @@
* Sun-4c memory error register.
* The register is a single word.
*/
-volatile u_int *par_err_reg; /* virtual address; NULL if not yet mapped */
+extern volatile u_int *par_err_reg; /* virtual address; NULL if not yet mapped */
/*
* Bits in parity error register.