summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-07-16 22:40:45 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-07-16 22:40:45 +0000
commit6626e2fe6d63bc4f09f17b2f0cf8c7889efce808 (patch)
treeb56e9c5d9031c861edb6a44f6c14f63b8c4cf901
parentd47066e7d08c28707f6255bd1b3751a5bbf599d9 (diff)
Fix splassert false positives on older VAXstation with devices wired to
ipl 0x14 instead of the expected 0x15.
-rw-r--r--sys/arch/vax/vax/machdep.c13
-rw-r--r--sys/arch/vax/vsa/vsbus.c12
2 files changed, 23 insertions, 2 deletions
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 200043da1d2..5992e61675d 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.80 2006/06/11 22:09:33 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.81 2006/07/16 22:40:42 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -1063,8 +1063,19 @@ generic_reboot(int arg)
void
splassert_check(int wantipl, const char *func)
{
+ extern int oldvsbus;
int oldipl = mfpr(PR_IPL);
+ /*
+ * Do not complain for older vsbus systems where vsbus interrupts
+ * at 0x14, instead of the expected 0x15. Since these systems are
+ * not expandable and all their devices interrupt at the same
+ * level, there is no risk of them interrupting each other while
+ * they are servicing an interrupt, even at level 0x14.
+ */
+ if (oldvsbus != 0 && oldipl == 0x14)
+ oldipl = 0x15;
+
if (oldipl < wantipl) {
splassert_fail(wantipl, oldipl, func);
/*
diff --git a/sys/arch/vax/vsa/vsbus.c b/sys/arch/vax/vsa/vsbus.c
index 5d9e57c6d18..1d4ab0daca8 100644
--- a/sys/arch/vax/vsa/vsbus.c
+++ b/sys/arch/vax/vsa/vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsbus.c,v 1.15 2004/07/07 23:10:46 deraadt Exp $ */
+/* $OpenBSD: vsbus.c,v 1.16 2006/07/16 22:40:44 miod Exp $ */
/* $NetBSD: vsbus.c,v 1.29 2000/06/29 07:14:37 mrg Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
@@ -106,6 +106,8 @@ struct cfdriver vsbus_cd = {
NULL, "vsbus", DV_DULL
};
+int oldvsbus;
+
int
vsbus_print(aux, name)
void *aux;
@@ -261,6 +263,14 @@ vsbus_search(parent, cfd, aux)
if (vec == 0)
goto fail;
+ /*
+ * For proper splassert operation, we need to know if we are on
+ * a vsbus system where its devices interrupt at level 0x14 instead
+ * of 0x15.
+ */
+ if (br == 0x14)
+ oldvsbus = 1;
+
va.va_br = br;
va.va_cvec = vec;
va.va_dmaaddr = sc->sc_dmaaddr;