Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Only put interrupts into the list f...



details:   https://anonhg.NetBSD.org/src/rev/393cea5e2528
branches:  trunk
changeset: 526585:393cea5e2528
user:      eeh <eeh%NetBSD.org@localhost>
date:      Mon May 06 19:19:48 2002 +0000

description:
Only put interrupts into the list for that interrupt level if the handler
is not shared.  Otherwise put the shared interrupt dispatcher in the list.

diffstat:

 sys/arch/sparc64/sparc64/intr.c |  20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r a164c5273d8d -r 393cea5e2528 sys/arch/sparc64/sparc64/intr.c
--- a/sys/arch/sparc64/sparc64/intr.c   Mon May 06 19:05:00 2002 +0000
+++ b/sys/arch/sparc64/sparc64/intr.c   Mon May 06 19:19:48 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.41 2001/09/25 00:06:55 eeh Exp $ */
+/*     $NetBSD: intr.c,v 1.42 2002/05/06 19:19:48 eeh Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -237,7 +237,7 @@
        int level;
        struct intrhand *ih;
 {
-       register struct intrhand **p, *q;
+       register struct intrhand **p, *q = NULL;
        int s;
 
        s = splhigh();
@@ -248,9 +248,7 @@
        ih->ih_pil = level; /* XXXX caller should have done this before */
        ih->ih_pending = 0; /* XXXX caller should have done this before */
        ih->ih_next = NULL;
-       for (p = &intrhand[level]; (q = *p) != NULL; p = &q->ih_next)
-               ;
-       *p = ih;
+
        /*
         * Store in fast lookup table
         */
@@ -285,9 +283,9 @@
                        /* Add the ih to the head of the list */
                        ih->ih_next = (struct intrhand *)q->ih_arg;
                        q->ih_arg = (void *)ih;
+               } else {
+                       intrlev[ih->ih_number] = ih;
                }
-               else
-                       intrlev[ih->ih_number] = ih;
 #ifdef NOT_DEBUG
                printf("\nintr_establish: vector %x pil %x mapintr %p "
                        "clrintr %p fun %p arg %p\n",
@@ -298,6 +296,14 @@
 #endif
        } else
                panic("intr_establish: bad intr number %x", ih->ih_number);
+
+       /* If it's not shared, stick it in the intrhand list for that level. */
+       if (q != NULL) {
+               for (p = &intrhand[level]; (q = *p) != NULL; p = &q->ih_next)
+                       ;
+               *p = ih;
+       }
+
        splx(s);
 }
 



Home | Main Index | Thread Index | Old Index