summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/macintr.c8
-rw-r--r--sys/arch/macppc/dev/openpic.c8
-rw-r--r--sys/arch/macppc/dev/zs.c5
-rw-r--r--sys/arch/macppc/include/intr.h5
-rw-r--r--sys/arch/macppc/macppc/machdep.c19
5 files changed, 36 insertions, 9 deletions
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index 455fcf27275..606697c90d3 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.3 2001/09/11 06:47:00 mickey Exp $ */
+/* $OpenBSD: macintr.c,v 1.4 2001/09/28 04:13:12 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -597,7 +597,11 @@ mac_intr_do_pending_int()
ipending &= ~SINT_NET;
softnet(pisr);
}
- } while (ipending & (SINT_NET|SINT_CLOCK) & ~cpl);
+ if((ipending & SINT_TTY) & ~pcpl) {
+ ipending &= ~SINT_TTY;
+ softtty();
+ }
+ } while (ipending & (SINT_NET|SINT_CLOCK|SINT_TTY) & ~cpl);
ipending &= pcpl;
cpl = pcpl; /* Don't use splx... we are here already! */
asm volatile("mtmsr %0" :: "r"(emsr));
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index e4e4edab415..c5144f6b2d2 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.4 2001/09/11 06:47:00 mickey Exp $ */
+/* $OpenBSD: openpic.c,v 1.5 2001/09/28 04:13:12 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -504,7 +504,11 @@ openpic_do_pending_int()
ipending &= ~SINT_NET;
softnet(pisr);
}
- } while (ipending & (SINT_NET|SINT_CLOCK) & ~cpl);
+ if((ipending & SINT_TTY) & ~pcpl) {
+ ipending &= ~SINT_TTY;
+ softtty();
+ }
+ } while (ipending & (SINT_NET|SINT_CLOCK|SINT_TTY) & ~cpl);
ipending &= pcpl;
cpl = pcpl; /* Don't use splx... we are here already! */
asm volatile("mtmsr %0" :: "r"(emsr));
diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c
index 25376a01982..4603e537e3c 100644
--- a/sys/arch/macppc/dev/zs.c
+++ b/sys/arch/macppc/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.3 2001/09/27 22:36:23 drahn Exp $ */
+/* $OpenBSD: zs.c,v 1.4 2001/09/28 04:13:12 drahn Exp $ */
/* $NetBSD: zs.c,v 1.17 2001/06/19 13:42:15 wiz Exp $ */
/*
@@ -377,7 +377,6 @@ zsc_attach(parent, self, aux)
/* master interrupt control (enable) */
zs_write_reg(cs, 9, zs_init_reg[9]);
splx(s);
- timeout_set(&zsc->zsc_timeout, (void (*)(void*))zssoft, zsc);
}
int
@@ -453,7 +452,7 @@ zshard(arg)
if (zssoftpending == 0) {
zssoftpending = 1;
/* XXX setsoftserial(); */
- timeout_add(&zsc->zsc_timeout, 0);
+ setsofttty(); /* UGLY HACK!!! */
}
}
}
diff --git a/sys/arch/macppc/include/intr.h b/sys/arch/macppc/include/intr.h
index b90e8aa7f79..9d36710188d 100644
--- a/sys/arch/macppc/include/intr.h
+++ b/sys/arch/macppc/include/intr.h
@@ -1,3 +1,6 @@
-/* $OpenBSD: intr.h,v 1.1 2001/09/01 15:49:06 drahn Exp $ */
+/* $OpenBSD: intr.h,v 1.2 2001/09/28 04:13:12 drahn Exp $ */
#include <powerpc/intr.h>
+#ifndef _LOCORE
+void softtty(void);
+#endif
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index bfd934755a8..3fde3768caf 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.8 2001/09/20 13:02:30 drahn Exp $ */
+/* $OpenBSD: machdep.c,v 1.9 2001/09/28 04:13:12 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -80,6 +80,7 @@
#include <machine/autoconf.h>
#include <machine/bus.h>
#include <machine/pio.h>
+#include <machine/intr.h>
#include "adb.h"
#if NADB > 0
@@ -826,6 +827,22 @@ dumpsys()
volatile int cpl, ipending, astpending, tickspending;
int imask[7];
+/*
+ * this is a hack interface to allow zs to work better until
+ * a true soft interrupt mechanism is created.
+ */
+#include "zstty.h"
+#if NZSTTY > 0
+ extern void zssoft(void *);
+#endif
+void
+softtty()
+{
+#if NZSTTY > 0
+ zssoft(0);
+#endif
+}
+
/*
* Soft networking interrupts.
*/