Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha Tweak how the IRQ description strings are gen...



details:   https://anonhg.NetBSD.org/src/rev/6703a963826c
branches:  trunk
changeset: 984169:6703a963826c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 25 18:08:34 2021 +0000

description:
Tweak how the IRQ description strings are generated to enable additional
duplicated code re-factoring.

diffstat:

 sys/arch/alpha/common/shared_intr.c     |  12 ++++++------
 sys/arch/alpha/jensenio/jensenio_intr.c |  12 ++++++------
 sys/arch/alpha/pci/pci_1000.c           |   8 ++++----
 sys/arch/alpha/pci/pci_1000a.c          |   8 ++++----
 sys/arch/alpha/pci/pci_2100_a500.c      |  20 ++++++++++----------
 sys/arch/alpha/pci/pci_550.c            |   8 ++++----
 sys/arch/alpha/pci/pci_6600.c           |   8 ++++----
 sys/arch/alpha/pci/pci_eb164.c          |   8 ++++----
 sys/arch/alpha/pci/pci_eb64plus.c       |   8 ++++----
 sys/arch/alpha/pci/pci_eb66.c           |   8 ++++----
 sys/arch/alpha/pci/pci_kn20aa.c         |   8 ++++----
 sys/arch/alpha/pci/pci_kn300.c          |  10 +++++-----
 sys/arch/alpha/pci/pci_machdep.c        |   6 +++---
 sys/arch/alpha/pci/sio_pic.c            |  12 ++++++------
 14 files changed, 68 insertions(+), 68 deletions(-)

diffs (truncated from 604 to 300 lines):

diff -r fe485f9bf330 -r 6703a963826c sys/arch/alpha/common/shared_intr.c
--- a/sys/arch/alpha/common/shared_intr.c       Fri Jun 25 16:10:07 2021 +0000
+++ b/sys/arch/alpha/common/shared_intr.c       Fri Jun 25 18:08:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: shared_intr.c,v 1.27 2021/05/07 16:58:33 thorpej Exp $ */
+/* $NetBSD: shared_intr.c,v 1.28 2021/06/25 18:08:34 thorpej Exp $ */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.27 2021/05/07 16:58:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.28 2021/06/25 18:08:34 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -170,7 +170,7 @@
        struct alpha_shared_intrhand *ih;
 
        if (intr[num].intr_sharetype == IST_UNUSABLE) {
-               printf("%s: %s %d: unusable\n", __func__,
+               printf("%s: %s irq %d: unusable\n", __func__,
                    basename, num);
                return NULL;
        }
@@ -249,12 +249,12 @@
        case IST_PULSE:
                if (type != IST_NONE) {
                        if (intr[num].intr_q.tqh_first == NULL) {
-                               printf("alpha_shared_intr_establish: %s %d: warning: using %s on %s\n",
+                               printf("alpha_shared_intr_establish: %s irq %d: warning: using %s on %s\n",
                                    basename, num, intr_typename(type),
                                    intr_typename(intr[num].intr_sharetype));
                                type = intr[num].intr_sharetype;
                        } else {
-                               printf("alpha_shared_intr_establish: %s %d: can't share %s with %s\n",
+                               printf("alpha_shared_intr_establish: %s irq %d: can't share %s with %s\n",
                                    basename, num, intr_typename(type),
                                    intr_typename(intr[num].intr_sharetype));
                                return (false);
@@ -381,7 +381,7 @@
                return;
 
        if (intr[num].intr_nstrays <= intr[num].intr_maxstrays)
-               log(LOG_ERR, "stray %s %d%s\n", basename, num,
+               log(LOG_ERR, "stray %s irq %d%s\n", basename, num,
                    intr[num].intr_nstrays >= intr[num].intr_maxstrays ?
                      "; stopped logging" : "");
 }
diff -r fe485f9bf330 -r 6703a963826c sys/arch/alpha/jensenio/jensenio_intr.c
--- a/sys/arch/alpha/jensenio/jensenio_intr.c   Fri Jun 25 16:10:07 2021 +0000
+++ b/sys/arch/alpha/jensenio/jensenio_intr.c   Fri Jun 25 18:08:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: jensenio_intr.c,v 1.14 2021/05/07 16:58:34 thorpej Exp $ */
+/* $NetBSD: jensenio_intr.c,v 1.15 2021/06/25 18:08:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.14 2021/05/07 16:58:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.15 2021/06/25 18:08:34 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -269,14 +269,14 @@
        }
 
        cookie = alpha_shared_intr_alloc_intrhand(jensenio_eisa_intr, irq,
-           type, level, 0, fn, arg, "eisa irq");
+           type, level, 0, fn, arg, "eisa");
 
        if (cookie == NULL)
                return NULL;
 
        mutex_enter(&cpu_lock);
 
-       if (! alpha_shared_intr_link(jensenio_eisa_intr, cookie, "eisa irq")) {
+       if (! alpha_shared_intr_link(jensenio_eisa_intr, cookie, "eisa")) {
                mutex_exit(&cpu_lock);
                alpha_shared_intr_free_intrhand(cookie);
                return NULL;
@@ -310,7 +310,7 @@
                scb_free(0x800 + SCB_IDXTOVEC(irq));
        }
 
-       alpha_shared_intr_unlink(jensenio_eisa_intr, cookie, "eisa irq");
+       alpha_shared_intr_unlink(jensenio_eisa_intr, cookie, "eisa");
 
        mutex_exit(&cpu_lock);
 
@@ -333,7 +333,7 @@
        irq = SCB_VECTOIDX(vec - 0x800);
 
        if (!alpha_shared_intr_dispatch(jensenio_eisa_intr, irq))
-               alpha_shared_intr_stray(jensenio_eisa_intr, irq, "eisa irq");
+               alpha_shared_intr_stray(jensenio_eisa_intr, irq, "eisa");
 
        jensenio_specific_eoi(irq);
 }
diff -r fe485f9bf330 -r 6703a963826c sys/arch/alpha/pci/pci_1000.c
--- a/sys/arch/alpha/pci/pci_1000.c     Fri Jun 25 16:10:07 2021 +0000
+++ b/sys/arch/alpha/pci/pci_1000.c     Fri Jun 25 18:08:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_1000.c,v 1.28 2021/06/19 16:59:07 thorpej Exp $ */
+/* $NetBSD: pci_1000.c,v 1.29 2021/06/25 18:08:34 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_1000.c,v 1.28 2021/06/19 16:59:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_1000.c,v 1.29 2021/06/25 18:08:34 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -119,7 +119,7 @@
 #define PCI_1000_IRQ_STR 8
        pc->pc_shared_intrs =
            alpha_shared_intr_alloc(PCI_NIRQ, PCI_1000_IRQ_STR);
-       pc->pc_intr_desc = "dec 1000 irq";
+       pc->pc_intr_desc = "dec 1000";
        pc->pc_vecbase = 0x900;
        pc->pc_nirq = PCI_NIRQ;
 
@@ -134,7 +134,7 @@
                snprintf(cp, PCI_1000_IRQ_STR, "irq %d", i);
                evcnt_attach_dynamic(alpha_shared_intr_evcnt(
                    pc->pc_shared_intrs, i), EVCNT_TYPE_INTR, NULL,
-                   "dec 1000", cp);
+                   pc->pc_intr_desc, cp);
        }
 
        pci_1000_imi();
diff -r fe485f9bf330 -r 6703a963826c sys/arch/alpha/pci/pci_1000a.c
--- a/sys/arch/alpha/pci/pci_1000a.c    Fri Jun 25 16:10:07 2021 +0000
+++ b/sys/arch/alpha/pci/pci_1000a.c    Fri Jun 25 18:08:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_1000a.c,v 1.30 2021/06/19 16:59:07 thorpej Exp $ */
+/* $NetBSD: pci_1000a.c,v 1.31 2021/06/25 18:08:34 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_1000a.c,v 1.30 2021/06/19 16:59:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_1000a.c,v 1.31 2021/06/25 18:08:34 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -123,7 +123,7 @@
 #define PCI_1000A_IRQ_STR      8
        pc->pc_shared_intrs = alpha_shared_intr_alloc(PCI_NIRQ,
            PCI_1000A_IRQ_STR);
-       pc->pc_intr_desc = "dec 1000a irq";
+       pc->pc_intr_desc = "dec 1000a";
        pc->pc_vecbase = 0x900;
        pc->pc_nirq = PCI_NIRQ;
 
@@ -138,7 +138,7 @@
                snprintf(cp, PCI_1000A_IRQ_STR, "irq %d", i);
                evcnt_attach_dynamic(alpha_shared_intr_evcnt(
                    pc->pc_shared_intrs, i), EVCNT_TYPE_INTR, NULL,
-                   "dec 1000a", cp);
+                   pc->pc_intr_desc, cp);
        }
 
        pci_1000a_imi();
diff -r fe485f9bf330 -r 6703a963826c sys/arch/alpha/pci/pci_2100_a500.c
--- a/sys/arch/alpha/pci/pci_2100_a500.c        Fri Jun 25 16:10:07 2021 +0000
+++ b/sys/arch/alpha/pci/pci_2100_a500.c        Fri Jun 25 18:08:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_2100_a500.c,v 1.15 2021/06/19 16:59:07 thorpej Exp $ */
+/* $NetBSD: pci_2100_a500.c,v 1.16 2021/06/25 18:08:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_2100_a500.c,v 1.15 2021/06/19 16:59:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_2100_a500.c,v 1.16 2021/06/25 18:08:34 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -206,7 +206,7 @@
        pc->pc_shared_intrs = alpha_shared_intr_alloc(SABLE_MAX_IRQ,
            PCI_2100_IRQ_STR);
 
-       pc->pc_intr_desc = "T2 irq";
+       pc->pc_intr_desc = "T2";
 
        /* 64 16-byte vectors per hose. */
        pc->pc_vecbase = 0x800 + ((64 * 16) * tcp->tc_hose);
@@ -438,14 +438,14 @@
        KASSERT(irq < SABLE_MAX_IRQ);
 
        cookie = alpha_shared_intr_alloc_intrhand(pc->pc_shared_intrs, irq,
-           dec_2100_a500_intr_deftype[irq], level, flags, func, arg, "T2 irq");
+           dec_2100_a500_intr_deftype[irq], level, flags, func, arg, "T2");
 
        if (cookie == NULL)
                return NULL;
 
        mutex_enter(&cpu_lock);
 
-       if (! alpha_shared_intr_link(pc->pc_shared_intrs, cookie, "T2 irq")) {
+       if (! alpha_shared_intr_link(pc->pc_shared_intrs, cookie, "T2")) {
                mutex_exit(&cpu_lock);
                alpha_shared_intr_free_intrhand(cookie);
                return NULL;
@@ -478,7 +478,7 @@
                scb_free(pc->pc_vecbase + SCB_IDXTOVEC(irq));
        }
 
-       alpha_shared_intr_unlink(pc->pc_shared_intrs, cookie, "T2 irq");
+       alpha_shared_intr_unlink(pc->pc_shared_intrs, cookie, "T2");
 
        mutex_exit(&cpu_lock);
 
@@ -573,14 +573,14 @@
        }
 
        cookie = alpha_shared_intr_alloc_intrhand(pc->pc_shared_intrs, irq,
-           type, level, 0, fn, arg, "T2 irq");
+           type, level, 0, fn, arg, "T2");
 
        if (cookie == NULL)
                return NULL;
 
        mutex_enter(&cpu_lock);
 
-       if (! alpha_shared_intr_link(pc->pc_shared_intrs, cookie, "T2 irq")) {
+       if (! alpha_shared_intr_link(pc->pc_shared_intrs, cookie, "T2")) {
                mutex_exit(&cpu_lock);
                alpha_shared_intr_free_intrhand(cookie);
                return NULL;
@@ -618,7 +618,7 @@
        }
 
        /* Remove it from the link. */
-       alpha_shared_intr_unlink(pc->pc_shared_intrs, cookie, "T2 irq");
+       alpha_shared_intr_unlink(pc->pc_shared_intrs, cookie, "T2");
 
        mutex_exit(&cpu_lock);
 
@@ -669,7 +669,7 @@
        rv = alpha_shared_intr_dispatch(pc->pc_shared_intrs, irq);
        (*tcp->tc_eoi)(tcp, irq);
        if (rv == 0) {
-               alpha_shared_intr_stray(pc->pc_shared_intrs, irq, "T2 irq");
+               alpha_shared_intr_stray(pc->pc_shared_intrs, irq, "T2");
                if (ALPHA_SHARED_INTR_DISABLE(pc->pc_shared_intrs, irq))
                        (*tcp->tc_enable_intr)(tcp, irq, 0);
        } else
diff -r fe485f9bf330 -r 6703a963826c sys/arch/alpha/pci/pci_550.c
--- a/sys/arch/alpha/pci/pci_550.c      Fri Jun 25 16:10:07 2021 +0000
+++ b/sys/arch/alpha/pci/pci_550.c      Fri Jun 25 18:08:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_550.c,v 1.39 2021/06/19 16:59:07 thorpej Exp $ */
+/* $NetBSD: pci_550.c,v 1.40 2021/06/25 18:08:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_550.c,v 1.39 2021/06/19 16:59:07 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_550.c,v 1.40 2021/06/25 18:08:34 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -145,7 +145,7 @@
 #define PCI_550_IRQ_STR        8
        pc->pc_shared_intrs = alpha_shared_intr_alloc(DEC_550_MAX_IRQ,
            PCI_550_IRQ_STR);
-       pc->pc_intr_desc = "dec 550 irq";
+       pc->pc_intr_desc = "dec 550";
        pc->pc_vecbase = 0x900;
        pc->pc_nirq = DEC_550_MAX_IRQ;
 
@@ -161,7 +161,7 @@
                snprintf(cp, PCI_550_IRQ_STR, "irq %d", i);
                evcnt_attach_dynamic(alpha_shared_intr_evcnt(
                    pc->pc_shared_intrs, i), EVCNT_TYPE_INTR, NULL,
-                   "dec 550", cp);
+                   pc->pc_intr_desc, cp);
        }
 
 #if NSIO



Home | Main Index | Thread Index | Old Index