summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-05-12 19:59:03 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-05-12 19:59:03 +0000
commit7e92e16acfb2ee4d356e317a3427223129ceb20b (patch)
tree05be3bf4bedd4d8814c4e86fcfd910c663439422
parent17dc320291ccb98d89f1c757a0aaa5e578defed8 (diff)
Remove unused code and definitions pasted over from mvme188 support, which do
not apply to luna88k.
-rw-r--r--sys/arch/luna88k/include/board.h21
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c50
2 files changed, 4 insertions, 67 deletions
diff --git a/sys/arch/luna88k/include/board.h b/sys/arch/luna88k/include/board.h
index 898ec1722c1..b0212f2951e 100644
--- a/sys/arch/luna88k/include/board.h
+++ b/sys/arch/luna88k/include/board.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: board.h,v 1.6 2006/05/04 19:27:36 miod Exp $ */
+/* $OpenBSD: board.h,v 1.7 2007/05/12 19:59:01 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -66,9 +66,6 @@
#define MAXU_ADDR U(0x40000000) /* size of user virtual space */
#define MAXPHYSMEM U(0x10000000) /* max physical memory */
-/* #define ILLADDRESS U(0x0F000000) */ /* any faulty address */
-/* #define ILLADDRESS U(0x3FFFFFF0) */ /* any faulty address for LUNA-88K2 */
-
#define PROM_ADDR U(0x41000000) /* PROM */
#define PROM_SPACE U(0x00040000)
#define NVRAM_ADDR U(0x45000000) /* Non Volatile */
@@ -118,22 +115,6 @@
#define INT_SET_LV0 U(0xFC000000) /* enable interrupts */
#define INT_SLAVE_MASK U(0x84000000) /* slave can only enable 6 and 1 */
#define INT_CLOCK_MASK 0xBFFFFFFF /* mask clock */
-#define INT_LV6 U(0x00800000) /* level 6 enabled */
-#define INT_LV5 U(0x00400000) /* level 5 enabled */
-#define INT_LV4 U(0x00200000) /* level 4 enabled */
-#define INT_LV3 U(0x00100000) /* level 3 enabled */
-#define INT_LV2 U(0x00080000) /* level 2 enabled */
-#define INT_LV1 U(0x00040000) /* level 1 enabled */
-#define INT_ST U(0xE0000000) /* interrupt status */
-#define INT_MASK_LV0 INT_LV6 | INT_LV5 | INT_LV4 | INT_LV3 | INT_LV2 | INT_LV1
-#define INT_MASK_LV1 INT_LV6 | INT_LV5 | INT_LV4 | INT_LV3 | INT_LV2
-#define INT_MASK_LV2 INT_LV6 | INT_LV5 | INT_LV4 | INT_LV3
-#define INT_MASK_LV3 INT_LV6 | INT_LV5 | INT_LV4
-#define INT_MASK_LV4 INT_LV6 | INT_LV5
-#define INT_MASK_LV5 INT_LV6
-#define INT_MASK_LV6 0
-#define INT_MASK_LV7 0
-#define SLAVE_MASK INT_LV6 | INT_LV1
#define NON_MASKABLE_LEVEL 7 /* non-maskable-interrupt (abort) */
#define CLOCK_INT_LEVEL 6 /* clock interrupt level */
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index eee1b12b19b..2895ca8607f 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.37 2007/02/09 14:26:09 aoyama Exp $ */
+/* $OpenBSD: machdep.c,v 1.38 2007/05/12 19:59:02 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -111,7 +111,6 @@ int getcpuspeed(void);
u_int getipl(void);
void identifycpu(void);
void luna88k_bootstrap(void);
-u_int safe_level(u_int, u_int);
void savectx(struct pcb *);
void secondary_main(void);
void secondary_pre_main(void);
@@ -138,17 +137,6 @@ unsigned int *volatile int_mask_reg[] = {
unsigned int luna88k_curspl[] = {0, 0, 0, 0};
-unsigned int int_mask_val[INT_LEVEL] = {
- INT_MASK_LV0,
- INT_MASK_LV1,
- INT_MASK_LV2,
- INT_MASK_LV3,
- INT_MASK_LV4,
- INT_MASK_LV5,
- INT_MASK_LV6,
- INT_MASK_LV7
-};
-
unsigned int int_set_val[INT_LEVEL] = {
INT_SET_LV0,
INT_SET_LV1,
@@ -916,7 +904,9 @@ luna88k_ext_int(u_int v, struct trapframe *eframe)
* Spurious interrupts - may be caused by debug output clearing
* serial port interrupts.
*/
+#ifdef DEBUG
printf("luna88k_ext_int(): Spurious interrupts?\n");
+#endif
flush_pipeline();
goto out;
}
@@ -933,23 +923,6 @@ luna88k_ext_int(u_int v, struct trapframe *eframe)
/* XXX: This is very rough. Should be considered more. (aoyama) */
do {
level = (cur_int > old_spl ? cur_int : old_spl);
- if (level >= 8) {
- register int i;
-
- printf("safe level %d <= old level %d\n", level, old_spl);
- printf("cur_int = 0x%x\n", cur_int);
-
- for (i = 0; i < 4; i++)
- printf("IEN%d = 0x%x ", i, *int_mask_reg[i]);
- printf("\nCPU0 spl %d CPU1 spl %d CPU2 spl %d CPU3 spl %d\n",
- luna88k_curspl[0], luna88k_curspl[1],
- luna88k_curspl[2], luna88k_curspl[3]);
- for (i = 0; i < 8; i++)
- printf("int_mask[%d] = 0x%08x\n", i, int_mask_val[i]);
- printf("--CPU %d halted--\n", cpu_number());
- setipl(IPL_ABORT);
- for(;;) ;
- }
#ifdef DEBUG
if (level > 7 || (char)level < 0) {
@@ -1333,23 +1306,6 @@ nvram_by_symbol(symbol)
return value;
}
-/*
- * return next safe spl to reenable interrupts.
- */
-u_int
-safe_level(u_int mask, u_int curlevel)
-{
- int i;
-
- for (i = curlevel; i < 8; i++)
- if (!(int_mask_val[i] & mask))
- return i;
-
- panic("safe_level: no safe level for mask 0x%08x level %d found",
- mask, curlevel);
- /* NOTREACHED */
-}
-
void
setlevel(unsigned int level)
{