Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Don't set and check absent interrupts o...



details:   https://anonhg.NetBSD.org/src/rev/87c7236cf4c7
branches:  trunk
changeset: 550801:87c7236cf4c7
user:      petrov <petrov%NetBSD.org@localhost>
date:      Fri Aug 22 00:46:25 2003 +0000

description:
Don't set and check absent interrupts on sabre.

diffstat:

 sys/arch/sparc64/dev/psycho.c |  34 +++++++++++++---------------------
 1 files changed, 13 insertions(+), 21 deletions(-)

diffs (79 lines):

diff -r fcdb1711501b -r 87c7236cf4c7 sys/arch/sparc64/dev/psycho.c
--- a/sys/arch/sparc64/dev/psycho.c     Fri Aug 22 00:45:40 2003 +0000
+++ b/sys/arch/sparc64/dev/psycho.c     Fri Aug 22 00:46:25 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psycho.c,v 1.64 2003/07/15 03:36:06 lukem Exp $        */
+/*     $NetBSD: psycho.c,v 1.65 2003/08/22 00:46:25 petrov Exp $       */
 
 /*
  * Copyright (c) 2001, 2002 Eduardo E. Horvath
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.64 2003/07/15 03:36:06 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.65 2003/08/22 00:46:25 petrov Exp $");
 
 #include "opt_ddb.h"
 
@@ -463,17 +463,19 @@
                psycho_set_intr(sc, 15, psycho_bus_a,
                        &sc->sc_regs->pciaerr_int_map, 
                        &sc->sc_regs->pciaerr_clr_int);
-               psycho_set_intr(sc, 15, psycho_bus_b,
-                       &sc->sc_regs->pciberr_int_map, 
-                       &sc->sc_regs->pciberr_clr_int);
                psycho_set_intr(sc, 15, psycho_powerfail,
                        &sc->sc_regs->power_int_map, 
                        &sc->sc_regs->power_clr_int);
-               psycho_register_power_button(sc);
-               psycho_set_intr(sc, 1, psycho_wakeup,
-                       &sc->sc_regs->pwrmgt_int_map, 
-                       &sc->sc_regs->pwrmgt_clr_int);
-
+               if (sc->sc_mode != PSYCHO_MODE_SABRE) {
+                       /* sabre doesn't have these interrups */
+                       psycho_set_intr(sc, 15, psycho_bus_b,
+                                       &sc->sc_regs->pciberr_int_map, 
+                                       &sc->sc_regs->pciberr_clr_int);
+                       psycho_register_power_button(sc);
+                       psycho_set_intr(sc, 1, psycho_wakeup,
+                                       &sc->sc_regs->pwrmgt_int_map, 
+                                       &sc->sc_regs->pwrmgt_clr_int);
+               }
 
                /*
                 * Apparently a number of machines with psycho and psycho+
@@ -1223,7 +1225,6 @@
         * interrupt which has a full vector that can be set arbitrarily.  
         */
 
-
        DPRINTF(PDB_INTR, ("\npsycho_intr_establish: ihandle %x vec %lx", ihandle, vec));
        ino = INTINO(vec);
        DPRINTF(PDB_INTR, (" ino %x", ino));
@@ -1242,7 +1243,7 @@
        /* Hunt thru obio first */
        for (intrmapptr = &sc->sc_regs->scsi_int_map,
                     intrclrptr = &sc->sc_regs->scsi_clr_int;
-            intrmapptr < &sc->sc_regs->ffb0_int_map;
+            intrmapptr < &sc->sc_regs->ue_int_map;
             intrmapptr++, intrclrptr++) {
                if (INTINO(*intrmapptr) == ino)
                        goto found;
@@ -1276,15 +1277,6 @@
        ih->ih_map = intrmapptr;
        ih->ih_clr = intrclrptr;
 
-#ifdef NOT_DEBUG
-       if (psycho_debug & PDB_INTR) {
-               long i;
-
-               for (i = 0; i < 500000000; i++)
-                       continue;
-       }
-#endif
-
        ih->ih_fun = handler;
        ih->ih_arg = arg;
        ih->ih_pil = level;



Home | Main Index | Thread Index | Old Index