Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha Use a software interrupt for tty input proces...



details:   https://anonhg.NetBSD.org/src/rev/82d0100aa748
branches:  trunk
changeset: 484008:82d0100aa748
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Mar 23 01:04:10 2000 +0000

description:
Use a software interrupt for tty input processing, not a callout.

diffstat:

 sys/arch/alpha/alpha/machdep.c  |  11 +++++++++--
 sys/arch/alpha/conf/files.alpha |   4 ++--
 sys/arch/alpha/tc/zs_ioasic.c   |  27 +++++++++++++++++++--------
 3 files changed, 30 insertions(+), 12 deletions(-)

diffs (116 lines):

diff -r 5c53dcba1f01 -r 82d0100aa748 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Wed Mar 22 22:33:47 2000 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Thu Mar 23 01:04:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.199 2000/03/13 23:52:26 soren Exp $ */
+/* $NetBSD: machdep.c,v 1.200 2000/03/23 01:04:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.199 2000/03/13 23:52:26 soren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.200 2000/03/23 01:04:10 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -181,6 +181,10 @@
 #if NCOM > 0
 extern void comsoft __P((void));
 #endif
+#include "zsc_ioasic.h"
+#if NZSC_IOASIC > 0
+extern void zs_ioasic_softintr __P((void));
+#endif
 
 vm_map_t exec_map = NULL;
 vm_map_t mb_map = NULL;
@@ -1865,6 +1869,9 @@
 #if NCOM > 0
                DO_SIR(SIR_SERIAL, comsoft());
 #endif
+#if NZSC_IOASIC > 0
+               DO_SIR(SIR_SERIAL, zs_ioasic_softintr());
+#endif
 
 #undef COUNT_SOFT
 #undef DO_SIR
diff -r 5c53dcba1f01 -r 82d0100aa748 sys/arch/alpha/conf/files.alpha
--- a/sys/arch/alpha/conf/files.alpha   Wed Mar 22 22:33:47 2000 +0000
+++ b/sys/arch/alpha/conf/files.alpha   Thu Mar 23 01:04:10 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.alpha,v 1.109 2000/03/14 15:56:51 oster Exp $
+# $NetBSD: files.alpha,v 1.110 2000/03/23 01:04:11 thorpej Exp $
 #
 # alpha-specific configuration info
 
@@ -173,7 +173,7 @@
 # 8530 UARTs using the MI 8530 driver   
 device zsc { channel = -1 }
 attach zsc at ioasic with zsc_ioasic
-file   arch/alpha/tc/zs_ioasic.c       zsc_ioasic
+file   arch/alpha/tc/zs_ioasic.c       zsc_ioasic      needs-flag
 file   dev/ic/z8530sc.c                zsc
 
 device zstty: tty
diff -r 5c53dcba1f01 -r 82d0100aa748 sys/arch/alpha/tc/zs_ioasic.c
--- a/sys/arch/alpha/tc/zs_ioasic.c     Wed Mar 22 22:33:47 2000 +0000
+++ b/sys/arch/alpha/tc/zs_ioasic.c     Thu Mar 23 01:04:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zs_ioasic.c,v 1.9 2000/03/06 21:36:05 thorpej Exp $ */
+/* $NetBSD: zs_ioasic.c,v 1.10 2000/03/23 01:04:11 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.9 2000/03/06 21:36:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.10 2000/03/23 01:04:11 thorpej Exp $");
 
 /*
  * Zilog Z8530 Dual UART driver (machine-dependent part).  This driver
@@ -443,7 +443,7 @@
        softreq = zs->zsc_cs[0]->cs_softreq | zs->zsc_cs[1]->cs_softreq;
        if (softreq && (zs_ioasic_soft_scheduled == 0)) {
                zs_ioasic_soft_scheduled = 1;
-               timeout(zs_ioasic_softintr, (void *)zs, 1);
+               setsoftserial();
        }
        return (1);
 }
@@ -452,15 +452,26 @@
  * Software-level interrupt (character processing, lower priority).
  */
 void
-zs_ioasic_softintr(arg)
-       void *arg;
+zs_ioasic_softintr()
 {
-       struct zsc_softc *zs = arg;
-       int s;
+       struct zsc_softc *zsc;
+       int i, s;
 
        s = spltty();
+
+       if (zs_ioasic_soft_scheduled == 0) {
+               splx(s);
+               return;
+       }
+
        zs_ioasic_soft_scheduled = 0;
-       (void) zsc_intr_soft(zs);
+
+       for (i = 0; i < zsc_cd.cd_ndevs; i++) {
+               zsc = zsc_cd.cd_devs[i];
+               if (zsc == NULL)
+                       continue;
+               (void) zsc_intr_soft(zsc);
+       }
        splx(s);
 }
 



Home | Main Index | Thread Index | Old Index