Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mipsco/mipsco Changes to interrupt architecture for...



details:   https://anonhg.NetBSD.org/src/rev/1344be04b23d
branches:  trunk
changeset: 507756:1344be04b23d
user:      wdk <wdk%NetBSD.org@localhost>
date:      Fri Mar 30 23:51:14 2001 +0000

description:
Changes to interrupt architecture for softintr support

diffstat:

 sys/arch/mipsco/mipsco/mips_3x30.c |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (57 lines):

diff -r 3d418c8153ee -r 1344be04b23d sys/arch/mipsco/mipsco/mips_3x30.c
--- a/sys/arch/mipsco/mipsco/mips_3x30.c        Fri Mar 30 23:49:37 2001 +0000
+++ b/sys/arch/mipsco/mipsco/mips_3x30.c        Fri Mar 30 23:51:14 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_3x30.c,v 1.4 2000/12/03 04:51:04 matt Exp $       */
+/*     $NetBSD: mips_3x30.c,v 1.5 2001/03/30 23:51:14 wdk Exp $        */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -58,6 +58,8 @@
 void pizazz_level5_intr (int, int, int);
 void pizazz_intr_establish  (int, int (*)(void *), void *);
 
+#define INT_MASK_FPU MIPS_INT_MASK_3
+
 void
 pizazz_init(void)
 {
@@ -116,11 +118,10 @@
        _splset((status & ~cause & MIPS_HARD_INT_MASK) | MIPS_SR_INT_IE);
 
        /* FPU nofiticaition */
-       if (ipending & MIPS_INT_MASK_3) {
+       if (ipending & INT_MASK_FPU) {
                if (!USERMODE(status))
                        panic("kernel used FPU: PC %x, CR %x, SR %x",
                              pc, cause, status);
-               /* dealfpu(status, cause, pc); */
                MachFPInterrupt(status, cause, pc, curproc->p_md.md_regs);
        }
 }
@@ -140,6 +141,9 @@
        /* stat register is active low */
        stat = ~*(volatile u_char *)INTREG_0;
 
+       if (stat & INT_ExpSlot)
+               CALL_INTR(SYS_INTR_ATBUS);
+
        if (stat & INT_Lance)
                CALL_INTR(SYS_INTR_ETHER);
 
@@ -176,12 +180,9 @@
        if (level < 0 || level >= MAX_INTR_COOKIES)
                panic("invalid interrupt level");
 
-       if (intrtab[level].func != NULL)
+       if (intrtab[level].ih_fun != NULL)
                panic("cannot share interrupt %d", level);
 
-       intrtab[level].func = func;
-       intrtab[level].arg = arg;
+       intrtab[level].ih_fun = func;
+       intrtab[level].ih_arg = arg;
 }
-
-
-



Home | Main Index | Thread Index | Old Index