Source-Changes-HG archive

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

[src/trunk]: src/sys Revamp the VAX interrupt handling code. Make it compati...



details:   https://anonhg.NetBSD.org/src/rev/7472e29a29eb
branches:  trunk
changeset: 481167:7472e29a29eb
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jan 24 02:40:28 2000 +0000

description:
Revamp the VAX interrupt handling code.  Make it compatible with all the
other ports.  Clean up some things.

diffstat:

 sys/arch/vax/include/ioa.h     |    5 +-
 sys/arch/vax/include/ka630.h   |   13 +-
 sys/arch/vax/include/ka820.h   |   12 +--
 sys/arch/vax/include/nexus.h   |   11 ++-
 sys/arch/vax/include/scb.h     |   11 +-
 sys/arch/vax/include/trap.h    |   24 ++---
 sys/arch/vax/include/vsbus.h   |    7 +-
 sys/arch/vax/mba/mba.c         |   15 +--
 sys/arch/vax/uba/uba.c         |   11 +-
 sys/arch/vax/uba/uba_sbi.c     |   22 ++---
 sys/arch/vax/uba/ubareg.h      |   16 +++-
 sys/arch/vax/vax/crl.c         |   14 +--
 sys/arch/vax/vax/crx.c         |    5 +-
 sys/arch/vax/vax/ctu.c         |   14 +-
 sys/arch/vax/vax/gencons.c     |   43 +++++-----
 sys/arch/vax/vax/ibus.c        |    9 +-
 sys/arch/vax/vax/ka46.c        |    8 +-
 sys/arch/vax/vax/ka49.c        |    6 +-
 sys/arch/vax/vax/ka820.c       |   27 +++---
 sys/arch/vax/vax/scb.c         |   28 +++---
 sys/arch/vax/vax/subr.s        |   18 +----
 sys/arch/vax/vsa/dz_ibus.c     |    8 +-
 sys/arch/vax/vsa/if_ze_vsbus.c |   22 +----
 sys/arch/vax/vsa/ncr.c         |   15 +--
 sys/arch/vax/vsa/vsbus.c       |   19 +++-
 sys/dev/qbus/dhu.c             |   28 +++---
 sys/dev/qbus/dl.c              |   25 +++---
 sys/dev/qbus/dz.c              |   16 ++--
 sys/dev/qbus/dz_uba.c          |    8 +-
 sys/dev/qbus/dzvar.h           |    6 +-
 sys/dev/qbus/if_qe.c           |   15 ++-
 sys/dev/qbus/qd.c              |  163 ++++++++++++++++++++--------------------
 sys/dev/qbus/uba.c             |   17 +++-
 sys/dev/qbus/ubavar.h          |   10 +-
 sys/dev/qbus/uda.c             |   31 ++-----
 35 files changed, 352 insertions(+), 350 deletions(-)

diffs (truncated from 1995 to 300 lines):

diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/ioa.h
--- a/sys/arch/vax/include/ioa.h        Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/ioa.h        Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioa.h,v 1.5 1999/04/12 20:57:52 pk Exp $       */
+/*     $NetBSD: ioa.h,v 1.6 2000/01/24 02:40:32 matt Exp $     */
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
  * All rights reserved.
@@ -58,6 +58,7 @@
  *                                                             *
  ****************************************************************/
 
+#include "opt_vax8600.h"
 #if VAX8600
 #define        MAXNIOA         4
 #define        NIOA8600        2
@@ -115,4 +116,4 @@
 #define IOA_TYPMSK 0xf0
 #define IOA_SBIA       0x10
 
-#endif VAX8600
+#endif /* VAX8600 */
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/ka630.h
--- a/sys/arch/vax/include/ka630.h      Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/ka630.h      Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ka630.h,v 1.3 1998/04/13 12:12:59 ragge Exp $ */
+/*     $NetBSD: ka630.h,v 1.4 2000/01/24 02:40:32 matt Exp $ */
 /*-
  * Copyright (c) 1986, 1988 The Regents of the University of California.
  * All rights reserved.
@@ -34,7 +34,9 @@
  *     @(#)uvaxII.h    7.4 (Berkeley) 5/9/91
  */
 
-#if VAX630 || VAX410
+#ifndef _VAX_INCLUDE_KA630_H_
+#define        _VAX_INCLUDE_KA630_H_
+
 #define UVAXIISID      ((u_long *)0x20040004)
 #define UVAXIICPU      ((struct uvaxIIcpu *)0x20080000)
 
@@ -61,13 +63,11 @@
 /* Mem. error address regs. */
 #define        UVAXIICEAR_PG   0x00007fff
 #define        UVAXIIDEAR_PG   0x00007fff
-#endif
 
 /*
  * Definitions specific to the ka630 MicroVAXII Q22 bus cpu card. Includes the
  * tod clock chip and the cpu registers.
  */
-#if VAX630
 #define KA630CLK       ((struct ka630clock *)0x200b8000)
 
 /* Bdr register bits */
@@ -118,6 +118,7 @@
        u_short csr3;
        u_short cpmbx;  /* CPMBX is used by the boot rom. see ka630-ug-3.3.3 */
 };
+#endif
 
-#endif
-#endif
+#endif /* _VAX_INCLUDE_KA630_H_ */
+
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/ka820.h
--- a/sys/arch/vax/include/ka820.h      Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/ka820.h      Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ka820.h,v 1.2 1999/01/19 21:04:48 ragge Exp $  */
+/*     $NetBSD: ka820.h,v 1.3 2000/01/24 02:40:32 matt Exp $   */
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -139,13 +139,5 @@
        u_short csr3;
 };
 
-/*
- * Prototypes.
- */
-void   ka820_conf __P((struct device *, struct device *, void *));
-void   ka820_memerr __P((void));
-int    ka820_mchk __P((caddr_t));
-void   ka820_steal_pages __P((void));
-int    ka820_clkread __P((time_t));
-void   ka820_clkwrite __P((void));
+void   crxintr __P((void *arg));
 #endif
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/nexus.h
--- a/sys/arch/vax/include/nexus.h      Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/nexus.h      Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nexus.h,v 1.15 1999/08/07 10:36:46 ragge Exp $ */
+/*     $NetBSD: nexus.h,v 1.16 2000/01/24 02:40:32 matt Exp $  */
 
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -37,6 +37,13 @@
 
 #ifndef _VAX_NEXUS_H_
 #define _VAX_NEXUS_H_
+
+#ifdef _KERNEL
+#include "opt_vax8600.h"
+#include "opt_vax780.h"
+#include "opt_vax750.h"
+#include "opt_vax730.h"
+#endif
 /*
  * Different definitions for nicer autoconf probing.
  */
@@ -135,7 +142,7 @@
 #define        NEX_CFGFLT      (0xfc000000)
 
 #ifndef _LOCORE
-#if defined(VAX780) || defined(VAX8600)
+#if VAX780 || VAX8600
 #define        NEXFLT_BITS \
 "\20\40PARFLT\37WSQFLT\36URDFLT\35ISQFLT\34MXTFLT\33XMTFLT"
 #endif
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/scb.h
--- a/sys/arch/vax/include/scb.h        Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/scb.h        Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scb.h,v 1.5 1999/01/19 21:04:48 ragge Exp $    */
+/*     $NetBSD: scb.h,v 1.6 2000/01/24 02:40:32 matt Exp $     */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -29,7 +29,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
+#ifndef _VAX_SCB_H
+#define        _VAX_SCB_H
 
 /*
  * Definition of the System Control Block. More about it can be
@@ -112,5 +113,7 @@
 extern paddr_t scb_init __P((paddr_t));
 extern int scb_vecref __P((int *, int *));
 extern void scb_fake __P((int, int));
-extern void scb_vecalloc __P((int, void(*)(int), int, int));
-#endif
+extern void scb_vecalloc __P((int, void(*)(void *), void *, int));
+#endif /* _KERNEL */
+
+#endif /* _VAX_SCB_H */
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/trap.h
--- a/sys/arch/vax/include/trap.h       Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/trap.h       Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: trap.h,v 1.16 1997/07/28 21:48:36 ragge Exp $     */
+/*      $NetBSD: trap.h,v 1.17 2000/01/24 02:40:32 matt Exp $     */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -99,20 +99,18 @@
  */
 struct ivec_dsp {
        char    pushr;          /* pushr */
-       char    pushrarg;       /* $3f */
-       char    pushl;          /* pushl */
-       char    pushlarg;       /* $? */
-       char    nop;            /* nop, for foolish gcc */
-       char    calls[3];       /* calls $1,? */
-       void    (*hoppaddr) __P((int)); /* jump for calls */
-       char    popr;           /* popr $0x3f */
-       char    poprarg;
-       char    rei;            /* rei */
-       char    pad;            /* sizeof(struct ivec_dsp) == 16 */
+       char    pushrarg;       /* $0x3f */
+       char    jsb;
+       char    mode;
+       long    displacement;
+       void    (*hoppaddr) __P((void *));
+       void    *pushlarg;
 };
 
-extern struct ivec_dsp idsptch;
+#ifdef _KERNEL
+extern const struct ivec_dsp idsptch;
+#endif
 
 #endif /* _LOCORE */
 
-#endif _VAX_TRAP_H_
+#endif /* _VAX_TRAP_H_ */
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/include/vsbus.h
--- a/sys/arch/vax/include/vsbus.h      Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/include/vsbus.h      Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vsbus.h,v 1.9 1999/10/22 21:10:13 ragge Exp $ */
+/*     $NetBSD: vsbus.h,v 1.10 2000/01/24 02:40:33 matt Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -45,10 +45,10 @@
 struct vsbus_attach_args {
        vaddr_t va_addr;                /* virtual CSR address */
        paddr_t va_paddr;               /* physical CSR address */
-       void    (*va_ivec) __P((int));  /* Interrupt routine */
        short   va_br;                  /* Interrupt level */
        short   va_cvec;                /* Interrupt vector address */
        u_char  va_maskno;              /* Interrupt vector in mask */
+       bus_space_tag_t va_iot;
        bus_dma_tag_t va_dmat;
 };
 
@@ -70,8 +70,11 @@
 #define        SMADDR          0x30000000
 #define        SMSIZE          0x20000         /* Actually 256k, only 128k used */
 
+#ifdef _KERNEL
+uint32_t *vsbus_iomap;
 u_char vsbus_setmask __P((unsigned char));
 void   vsbus_clrintr __P((unsigned char));
 void   vsbus_copytoproc(struct proc *, caddr_t, caddr_t, int);
 void   vsbus_copyfromproc(struct proc *, caddr_t, caddr_t, int);
+#endif
 #endif /* _VAX_VSBUS_H_ */
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/mba/mba.c
--- a/sys/arch/vax/mba/mba.c    Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/mba/mba.c    Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mba.c,v 1.17 2000/01/21 23:39:56 thorpej Exp $ */
+/*     $NetBSD: mba.c,v 1.18 2000/01/24 02:40:36 matt Exp $ */
 /*
  * Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -74,7 +74,7 @@
 
 int    mbamatch __P((struct device *, struct cfdata *, void *));
 void   mbaattach __P((struct device *, struct device *, void *));
-void   mbaintr __P((int));
+void   mbaintr __P((void *));
 int    mbaprint __P((void *, const char *));
 void   mbaqueue __P((struct mba_device *));
 void   mbastart __P((struct mba_softc *));
@@ -123,19 +123,18 @@
        struct  sbi_attach_args *sa = (struct sbi_attach_args *)aux;
        volatile struct mba_regs *mbar = (struct mba_regs *)sa->nexaddr;
        struct  mba_attach_args ma;
-       extern  struct  ivec_dsp idsptch;
        int     i, j;
 
        printf("\n");
        /*
         * Set up interrupt vectors for this MBA.
         */
-       bcopy(&idsptch, &sc->sc_dsp, sizeof(struct ivec_dsp));
+       sc->sc_dsp = idsptch;
+       sc->sc_dsp.pushlarg = sc;
+       sc->sc_dsp.hoppaddr = mbaintr;
        scb->scb_nexvec[0][sa->nexnum] = scb->scb_nexvec[1][sa->nexnum] =
            scb->scb_nexvec[2][sa->nexnum] = scb->scb_nexvec[3][sa->nexnum] =
            &sc->sc_dsp;
-       sc->sc_dsp.pushlarg = sc->sc_dev.dv_unit;
-       sc->sc_dsp.hoppaddr = mbaintr;
 
        sc->sc_physnr = sa->nexnum - 8; /* MBA's have TR between 8 - 11... */
 #if VAX750
@@ -171,9 +170,9 @@
  */
 void
 mbaintr(mba)
-       int     mba;
+       void    *mba;
 {
-       struct  mba_softc *sc = mba_cd.cd_devs[mba];
+       struct  mba_softc *sc = mba;
        volatile struct mba_regs *mr = sc->sc_mbareg;
        struct  mba_device *md;
        struct  buf *bp;
diff -r 0088c9fff068 -r 7472e29a29eb sys/arch/vax/uba/uba.c
--- a/sys/arch/vax/uba/uba.c    Mon Jan 24 02:03:37 2000 +0000
+++ b/sys/arch/vax/uba/uba.c    Mon Jan 24 02:40:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uba.c,v 1.42 1999/02/02 18:37:20 ragge Exp $      */
+/*     $NetBSD: uba.c,v 1.43 2000/01/24 02:40:36 matt Exp $       */
 /*
  * Copyright (c) 1996 Jonathan Stone.
  * Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@@ -200,10 +200,9 @@
 uba_dw780int(uba)
        int     uba;
 {
-       int     br, vec, arg;
+       int     br, vec;
        struct  uba_softc *sc = uba_cd.cd_devs[uba];
        struct  uba_regs *ur = sc->uh_uba;
-       void    (*func) __P((int));
 
        br = mfpr(PR_IPL);
        vec = ur->uba_brrvr[br - 0x14];
@@ -215,10 +214,8 @@



Home | Main Index | Thread Index | Old Index