Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/iq80310 Report stray interrupts.



details:   https://anonhg.NetBSD.org/src/rev/3a9f2f79049d
branches:  trunk
changeset: 533254:3a9f2f79049d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jun 26 01:06:44 2002 +0000

description:
Report stray interrupts.

diffstat:

 sys/arch/evbarm/iq80310/iq80310_intr.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (58 lines):

diff -r 4c4d62e77c32 -r 3a9f2f79049d sys/arch/evbarm/iq80310/iq80310_intr.c
--- a/sys/arch/evbarm/iq80310/iq80310_intr.c    Wed Jun 26 00:40:33 2002 +0000
+++ b/sys/arch/evbarm/iq80310/iq80310_intr.c    Wed Jun 26 01:06:44 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iq80310_intr.c,v 1.12 2002/04/14 21:32:24 thorpej Exp $        */
+/*     $NetBSD: iq80310_intr.c,v 1.13 2002/06/26 01:06:44 thorpej Exp $        */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -453,7 +453,9 @@
 {
        struct intrq *iq;
        struct intrhand *ih;
-       int oldirqstate, pcpl, irq, ibit, hwpend;
+       int oldirqstate, pcpl, irq, ibit, hwpend, rv, stray;
+
+       stray = 1;
 
        /* First, disable external IRQs. */
        i80200_intr_disable(INTCTL_IM);
@@ -464,6 +466,8 @@
                irq = ffs(hwpend) - 1;
                ibit = (1U << irq);
 
+               stray = 0;
+
                hwpend &= ~ibit;
 
                if (pcpl & ibit) {
@@ -477,6 +481,7 @@
                }
 
                ipending &= ~ibit;
+               rv = 0;
 
                iq = &intrq[irq];
                iq->iq_ev.ev_count++;
@@ -485,13 +490,19 @@
                oldirqstate = enable_interrupts(I32_bit);
                for (ih = TAILQ_FIRST(&iq->iq_list); ih != NULL;
                     ih = TAILQ_NEXT(ih, ih_list)) {
-                       (void) (*ih->ih_func)(ih->ih_arg ? ih->ih_arg : frame);
+                       rv |= (*ih->ih_func)(ih->ih_arg ? ih->ih_arg : frame);
                }
                restore_interrupts(oldirqstate);
 
                current_spl_level = pcpl;
+
+               if (rv == 0)
+                       printf("Stray interrupt: IRQ %d\n", irq);
        }
 
+       if (stray)
+               printf("Stray external interrupt\n");
+
        /* Check for pendings soft intrs. */
        if ((ipending & ~IRQ_BITS) & ~current_spl_level) {
                oldirqstate = enable_interrupts(I32_bit);



Home | Main Index | Thread Index | Old Index