summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-09-28 04:13:13 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-09-28 04:13:13 +0000
commit015dbad8fb31d377285e003a1df3f7df99d95acb (patch)
tree388ec52d207cbd4efec159655f07966cc98ae258 /sys/arch/macppc/dev
parentdd55465c4b8d4431ef8765df00f9c91a9a774a56 (diff)
Commit a ugly, widespread change.
Problem: no MI soft interrupts. Bad solution: use old hack that was never fully implemented to hook in zs soft interrupts. This allows zs to work almost reasonably. Still has issues with getty (carrier detect) and modems on newer machines (power control). Post 3.0 this must be cleaned up with real soft interrupts.
Diffstat (limited to 'sys/arch/macppc/dev')
-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
3 files changed, 14 insertions, 7 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!!! */
}
}
}