Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh5/sh5 Get the correct evcnt structure and ipl num...



details:   https://anonhg.NetBSD.org/src/rev/d160fa1a60eb
branches:  trunk
changeset: 536213:d160fa1a60eb
user:      scw <scw%NetBSD.org@localhost>
date:      Wed Sep 11 10:56:43 2002 +0000

description:
Get the correct evcnt structure and ipl number when initialising softints.

diffstat:

 sys/arch/sh5/sh5/softintr.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 0747df99cd8b -r d160fa1a60eb sys/arch/sh5/sh5/softintr.c
--- a/sys/arch/sh5/sh5/softintr.c       Wed Sep 11 10:55:05 2002 +0000
+++ b/sys/arch/sh5/sh5/softintr.c       Wed Sep 11 10:56:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: softintr.c,v 1.2 2002/08/31 08:42:00 scw Exp $ */
+/*     $NetBSD: softintr.c,v 1.3 2002/09/11 10:56:43 scw Exp $ */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -127,8 +127,8 @@
                TAILQ_INIT(&si->si_q);
 
                simple_lock_init(&si->si_slock);
-               si->si_evcnt = &_sh5_intr_events[i];
-               si->si_ipl = soft_intr_prio[i] - 1;
+               si->si_evcnt = &_sh5_intr_events[soft_intr_prio[i]];
+               si->si_ipl = soft_intr_prio[i];
        }
 
        ssir = 0;
@@ -177,7 +177,7 @@
                sih->sih_pending = 0;
                TAILQ_REMOVE(&si->si_q, sih, sih_q);
                if (TAILQ_EMPTY(&si->si_q))
-                       ssir &= ~(1 << si->si_ipl);
+                       ssir &= ~(1 << (si->si_ipl - 1));
        }
        splx(s);
 
@@ -196,7 +196,7 @@
        if (__predict_true(sih->sih_pending == 0)) {
                sih->sih_pending = 1;
                if (TAILQ_EMPTY(&si->si_q))
-                       ssir |= (1 << si->si_ipl);
+                       ssir |= (1 << (si->si_ipl - 1));
                TAILQ_INSERT_TAIL(&si->si_q, sih, sih_q);
        }
        splx(s);
@@ -291,7 +291,7 @@
                 * Clear the "pending" status for soft interrupts at
                 * this level.
                 */
-               ssir &= ~(1 << si->si_ipl);
+               ssir &= ~(1 << (si->si_ipl - 1));
        }
 
        /*



Home | Main Index | Thread Index | Old Index