Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use more descriptive interrupt names.



details:   https://anonhg.NetBSD.org/src/rev/cfac22919816
branches:  trunk
changeset: 534587:cfac22919816
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jul 30 04:45:41 2002 +0000

description:
Use more descriptive interrupt names.

diffstat:

 sys/arch/arm/xscale/i80321_icu.c      |  43 ++++++++++++++++++++++++++++++++--
 sys/arch/arm/xscale/i80321var.h       |   4 +-
 sys/arch/evbarm/iq80321/iq80321_pci.c |   6 +---
 3 files changed, 44 insertions(+), 9 deletions(-)

diffs (111 lines):

diff -r 12d40c02cb12 -r cfac22919816 sys/arch/arm/xscale/i80321_icu.c
--- a/sys/arch/arm/xscale/i80321_icu.c  Tue Jul 30 04:10:36 2002 +0000
+++ b/sys/arch/arm/xscale/i80321_icu.c  Tue Jul 30 04:45:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321_icu.c,v 1.2 2002/03/28 03:19:31 thorpej Exp $   */
+/*     $NetBSD: i80321_icu.c,v 1.3 2002/07/30 04:45:41 thorpej Exp $   */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -99,6 +99,44 @@
        IPL_SOFTSERIAL,         /* SI_SOFTSERIAL */
 };
 
+/*
+ * Interrupt bit names.
+ */
+const char *i80321_irqnames[] = {
+       "DMA0 EOT",
+       "DMA0 EOC",
+       "DMA1 EOT",
+       "DMA1 EOC",
+       "irq 4",
+       "irq 5",
+       "AAU EOT",
+       "AAU EOC",
+       "core PMU",
+       "TMR0 (hardclock)",
+       "TMR1",
+       "I2C0",
+       "I2C1",
+       "MU",
+       "BIST",
+       "periph PMU",
+       "XScale PMU",
+       "BIU error",
+       "ATU error",
+       "MCU error",
+       "DMA0 error",
+       "DMA1 error",
+       "irq 22",
+       "AAU error",
+       "MU error",
+       "SSP",
+       "irq 26",
+       "irq 27",
+       "irq 28",
+       "irq 29",
+       "irq 30",
+       "irq 31",
+};
+
 void   i80321_intr_dispatch(struct clockframe *frame);
 
 static __inline uint32_t
@@ -396,9 +434,8 @@
                iq = &intrq[i];
                TAILQ_INIT(&iq->iq_list);
 
-               sprintf(iq->iq_name, "irq %d", i);
                evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
-                   NULL, "iop321", iq->iq_name);
+                   NULL, "iop321", i80321_irqnames[i]);
        }
 
        i80321_intr_calculate_masks();
diff -r 12d40c02cb12 -r cfac22919816 sys/arch/arm/xscale/i80321var.h
--- a/sys/arch/arm/xscale/i80321var.h   Tue Jul 30 04:10:36 2002 +0000
+++ b/sys/arch/arm/xscale/i80321var.h   Tue Jul 30 04:45:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321var.h,v 1.3 2002/07/29 17:37:15 thorpej Exp $    */
+/*     $NetBSD: i80321var.h,v 1.4 2002/07/30 04:45:42 thorpej Exp $    */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -62,7 +62,6 @@
        int iq_mask;                    /* IRQs to mask while handling */
        int iq_levels;                  /* IPL_*'s this IRQ has */
        int iq_ist;                     /* share type */
-       char iq_name[IRQNAMESIZE];      /* interrupt name */
 };
 
 struct i80321_softc {
@@ -151,6 +150,7 @@
 
 extern struct bus_space i80321_bs_tag;
 extern struct i80321_softc *i80321_softc;
+extern const char *i80321_irqnames[];
 
 extern void (*i80321_hardclock_hook)(void);
 
diff -r 12d40c02cb12 -r cfac22919816 sys/arch/evbarm/iq80321/iq80321_pci.c
--- a/sys/arch/evbarm/iq80321/iq80321_pci.c     Tue Jul 30 04:10:36 2002 +0000
+++ b/sys/arch/evbarm/iq80321/iq80321_pci.c     Tue Jul 30 04:45:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iq80321_pci.c,v 1.1 2002/03/27 21:51:29 thorpej Exp $  */
+/*     $NetBSD: iq80321_pci.c,v 1.2 2002/07/30 04:45:42 thorpej Exp $  */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -133,10 +133,8 @@
 const char *
 iq80321_pci_intr_string(void *v, pci_intr_handle_t ih)
 {
-       static char irqstr[IRQNAMESIZE];
 
-       sprintf(irqstr, "iop321 irq %ld", ih);
-       return (irqstr);
+       return (i80321_irqnames[ih]);
 }
 
 const struct evcnt *



Home | Main Index | Thread Index | Old Index