From d3ebf5eefa47248bd1041ba5181de0919f904ed8 Mon Sep 17 00:00:00 2001 From: Bill Joy Date: Sat, 10 May 1980 03:55:40 -0800 Subject: [PATCH] run spl6 for dz SAE SCCS-vsn: sys/vax/vax/cons.c 3.3 SCCS-vsn: sys/vax/uba/dh.c 3.6 SCCS-vsn: sys/vax/uba/dz.c 3.5 SCCS-vsn: sys/kern/tty.c 3.3 --- usr/src/sys/kern/tty.c | 13 ++++++++++++- usr/src/sys/vax/uba/dh.c | 17 ++++++++++++++++- usr/src/sys/vax/uba/dz.c | 17 ++++++++++++++++- usr/src/sys/vax/vax/cons.c | 16 ++++++++++++++-- 4 files changed, 58 insertions(+), 5 deletions(-) diff --git a/usr/src/sys/kern/tty.c b/usr/src/sys/kern/tty.c index 675990c525..3ca2d55bc6 100644 --- a/usr/src/sys/kern/tty.c +++ b/usr/src/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* tty.c 3.2 %H% */ +/* tty.c 3.3 %H% */ /* * general TTY subroutines @@ -18,6 +18,17 @@ char partab[]; +/* + * When running dz's using only SAE (silo alarm) on input + * it is necessary to call dzrint() at clock interrupt time. + * This is unsafe unless spl5()s in tty code are changed to + * spl6()s to block clock interrupts. Note that the dh driver + * currently in use works the same way as the dz, even though + * we could try to more intelligently manage its silo. + * Thus don't take this out if you have no dz's unless you + * change clock.c and dhtimer(). + */ +#define spl5 spl6 /* * Input mapping table-- if an entry is non-zero, when the diff --git a/usr/src/sys/vax/uba/dh.c b/usr/src/sys/vax/uba/dh.c index 37f414b640..a81cb2e357 100644 --- a/usr/src/sys/vax/uba/dh.c +++ b/usr/src/sys/vax/uba/dh.c @@ -1,4 +1,4 @@ -/* dh.c 3.5 %H% */ +/* dh.c 3.6 %H% */ /* * DH-11 driver @@ -18,6 +18,18 @@ #include "../h/uba.h" #include "../h/bk.h" +/* + * When running dz's using only SAE (silo alarm) on input + * it is necessary to call dzrint() at clock interrupt time. + * This is unsafe unless spl5()s in tty code are changed to + * spl6()s to block clock interrupts. Note that the dh driver + * currently in use works the same way as the dz, even though + * we could try to more intelligently manage its silo. + * Thus don't take this out if you have no dz's unless you + * change clock.c and dhtimer(). + */ +#define spl5 spl6 + #define DHADDR ((struct device *)(UBA0_DEV + 0160020)) #define NDH11 16 /* number of lines */ #define UBACVT(x) (cbase + (short)((x)-(char *)cfree)) @@ -309,7 +321,9 @@ dhxint(dev) register struct device *addr; register d; short ttybit, bar, *sbar; + int s; + s = spl6(); /* block the clock */ d = minor(dev) & 0177; addr = DHADDR + d; addr->un.dhcsr &= (short)~XINT; @@ -339,6 +353,7 @@ dhxint(dev) dhstart(tp); } } + splx(s); } /* diff --git a/usr/src/sys/vax/uba/dz.c b/usr/src/sys/vax/uba/dz.c index 1c9489541c..ab288f2460 100644 --- a/usr/src/sys/vax/uba/dz.c +++ b/usr/src/sys/vax/uba/dz.c @@ -1,4 +1,4 @@ -/* dz.c 3.4 %H% */ +/* dz.c 3.5 %H% */ /* * DZ-11 Driver @@ -14,6 +14,18 @@ #include "../h/conf.h" #include "../h/pdma.h" #include "../h/bk.h" + +/* + * When running dz's using only SAE (silo alarm) on input + * it is necessary to call dzrint() at clock interrupt time. + * This is unsafe unless spl5()s in tty code are changed to + * spl6()s to block clock interrupts. Note that the dh driver + * currently in use works the same way as the dz, even though + * we could try to more intelligently manage its silo. + * Thus don't take this out if you have no dz's unless you + * change clock.c and dhtimer(). + */ +#define spl5 spl6 #define DZADDR (UBA0_DEV + 0160100) #ifdef ERNIE @@ -260,6 +272,8 @@ dzxint(tp) register struct tty *tp; { register struct pdma *dp; + register s; + s = spl6(); /* block the clock */ dp = &dzpdma[tp-dz_tty]; tp->t_state &= ~BUSY; @@ -273,6 +287,7 @@ register struct tty *tp; dzstart(tp); if (tp->t_outq.c_cc == 0 || (tp->t_state&BUSY)==0) dp->p_addr->dztcr &= ~(1 << ((tp-dz_tty) % 8)); + splx(s); } dzstart(tp) diff --git a/usr/src/sys/vax/vax/cons.c b/usr/src/sys/vax/vax/cons.c index 9b0450d39a..7a106158cc 100644 --- a/usr/src/sys/vax/vax/cons.c +++ b/usr/src/sys/vax/vax/cons.c @@ -1,7 +1,7 @@ -/* cons.c 3.2 %H% */ +/* cons.c 3.3 %H% */ /* - * Vax console driver and floppy interface + * Vax console driver and floppy interface */ #include "../h/param.h" #include "../h/conf.h" @@ -12,6 +12,18 @@ #include "../h/cons.h" #include "../h/mtpr.h" +/* + * When running dz's using only SAE (silo alarm) on input + * it is necessary to call dzrint() at clock interrupt time. + * This is unsafe unless spl5()s in tty code are changed to + * spl6()s to block clock interrupts. Note that the dh driver + * currently in use works the same way as the dz, even though + * we could try to more intelligently manage its silo. + * Thus don't take this out if you have no dz's unless you + * change clock.c and dhtimer(). + */ +#define spl5 spl6 + #define NL1 000400 #define NL2 001000 #define CR2 020000 -- 2.20.1