run spl6 for dz SAE
authorBill Joy <bill@ucbvax.Berkeley.EDU>
Sat, 10 May 1980 11:55:40 +0000 (03:55 -0800)
committerBill Joy <bill@ucbvax.Berkeley.EDU>
Sat, 10 May 1980 11:55:40 +0000 (03:55 -0800)
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
usr/src/sys/vax/uba/dh.c
usr/src/sys/vax/uba/dz.c
usr/src/sys/vax/vax/cons.c

index 675990c..3ca2d55 100644 (file)
@@ -1,4 +1,4 @@
-/*     tty.c   3.2     %H%     */
+/*     tty.c   3.3     %H%     */
 
 /*
  * general TTY subroutines
 
 /*
  * general TTY subroutines
 
 char   partab[];
 
 
 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
 
 /*
  * Input mapping table-- if an entry is non-zero, when the
index 37f414b..a81cb2e 100644 (file)
@@ -1,4 +1,4 @@
-/*     dh.c    3.5     %H%     */
+/*     dh.c    3.6     %H%     */
 
 /*
  *     DH-11 driver
 
 /*
  *     DH-11 driver
 #include "../h/uba.h"
 #include "../h/bk.h"
 
 #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))
 #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;
        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;
        d = minor(dev) & 0177;
        addr = DHADDR + d;
        addr->un.dhcsr &= (short)~XINT;
@@ -339,6 +353,7 @@ dhxint(dev)
                                dhstart(tp);
                }
        }
                                dhstart(tp);
                }
        }
+       splx(s);
 }
 
 /*
 }
 
 /*
index 1c94895..ab288f2 100644 (file)
@@ -1,4 +1,4 @@
-/*     dz.c    3.4     %H%     */
+/*     dz.c    3.5     %H%     */
 
 /*
  *  DZ-11 Driver
 
 /*
  *  DZ-11 Driver
 #include "../h/conf.h"
 #include "../h/pdma.h"
 #include "../h/bk.h"
 #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
  
 #define DZADDR  (UBA0_DEV + 0160100)
 #ifdef ERNIE
@@ -260,6 +272,8 @@ dzxint(tp)
 register struct tty *tp;
 {
        register struct pdma *dp;
 register struct tty *tp;
 {
        register struct pdma *dp;
+       register s;
+       s = spl6();     /* block the clock */
  
        dp = &dzpdma[tp-dz_tty];
        tp->t_state &= ~BUSY;
  
        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));
                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)
 }
 
 dzstart(tp)
index 9b0450d..7a10615 100644 (file)
@@ -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"
  */
 #include "../h/param.h"
 #include "../h/conf.h"
 #include "../h/cons.h"
 #include "../h/mtpr.h"
 
 #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
 #define        NL1     000400
 #define        NL2     001000
 #define        CR2     020000