Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Convert to intr_establish_xname().



details:   https://anonhg.NetBSD.org/src/rev/9950fa6e6720
branches:  trunk
changeset: 1019276:9950fa6e6720
user:      rin <rin%NetBSD.org@localhost>
date:      Fri Mar 05 07:15:53 2021 +0000

description:
Convert to intr_establish_xname().

diffstat:

 sys/arch/macppc/dev/adb.c               |  10 ++++++----
 sys/arch/macppc/dev/awacs.c             |  21 +++++++++++++++------
 sys/arch/macppc/dev/com_mainbus.c       |   3 ++-
 sys/arch/macppc/dev/cuda.c              |   7 ++++---
 sys/arch/macppc/dev/esp.c               |   7 ++++---
 sys/arch/macppc/dev/gpio.c              |   7 ++++---
 sys/arch/macppc/dev/if_bm.c             |  14 ++++++++++----
 sys/arch/macppc/dev/if_gm.c             |   7 ++++---
 sys/arch/macppc/dev/if_mc.c             |  16 ++++++++++++----
 sys/arch/macppc/dev/if_wi_obio.c        |   7 ++++---
 sys/arch/macppc/dev/kauai.c             |   7 ++++---
 sys/arch/macppc/dev/mediabay.c          |   7 ++++---
 sys/arch/macppc/dev/mesh.c              |   7 ++++---
 sys/arch/macppc/dev/pmu.c               |   7 ++++---
 sys/arch/macppc/dev/smu.c               |   3 ++-
 sys/arch/macppc/dev/snapper.c           |  26 ++++++++++++++++++--------
 sys/arch/macppc/dev/wdc_obio.c          |   7 ++++---
 sys/arch/macppc/dev/zs.c                |  19 +++++++++++++------
 sys/arch/macppc/macppc/ipi_hammerhead.c |   7 ++++---
 sys/arch/macppc/macppc/pic_ohare.c      |   7 ++++---
 sys/arch/macppc/macppc/pic_u3_ht.c      |   7 ++++---
 sys/arch/powerpc/pic/ipi_openpic.c      |   7 ++++---
 22 files changed, 134 insertions(+), 76 deletions(-)

diffs (truncated from 704 to 300 lines):

diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/adb.c
--- a/sys/arch/macppc/dev/adb.c Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/adb.c Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adb.c,v 1.34 2012/10/27 17:18:00 chs Exp $     */
+/*     $NetBSD: adb.c,v 1.35 2021/03/05 07:15:53 rin Exp $     */
 
 /*-
  * Copyright (C) 1994  Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.34 2012/10/27 17:18:00 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.35 2021/03/05 07:15:53 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -132,10 +132,12 @@
 
        switch (adbHardware) {
        case ADB_HW_CUDA:
-               intr_establish(irq, IST_LEVEL, IPL_TTY, adb_intr_cuda, sc);
+               intr_establish_xname(irq, IST_LEVEL, IPL_TTY, adb_intr_cuda, sc,
+                   device_xname(self));
                break;
        case ADB_HW_PMU:
-               intr_establish(irq, IST_LEVEL, IPL_TTY, pm_intr, sc);
+               intr_establish_xname(irq, IST_LEVEL, IPL_TTY, pm_intr, sc,
+                   device_xname(self));
                pm_init();
                break;
        }
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/awacs.c
--- a/sys/arch/macppc/dev/awacs.c       Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/awacs.c       Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awacs.c,v 1.50 2021/02/06 07:20:36 isaki Exp $ */
+/*     $NetBSD: awacs.c,v 1.51 2021/03/05 07:15:53 rin Exp $   */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.50 2021/02/06 07:20:36 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.51 2021/03/05 07:15:53 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -307,7 +307,7 @@
        int cirq, oirq, iirq, cirq_type, oirq_type, iirq_type;
        int len = -1, perch;
        int root_node;
-       char compat[256];
+       char compat[256], intr_xname[INTRDEVNAMEBUF];
 
        sc = device_private(self);
        sc->sc_dev = self;
@@ -361,9 +361,18 @@
                cirq_type = oirq_type = iirq_type = IST_EDGE;
        }
 
-       intr_establish(cirq, cirq_type, IPL_BIO, awacs_status_intr, sc);
-       intr_establish(oirq, oirq_type, IPL_AUDIO, awacs_intr, sc);
-       intr_establish(iirq, iirq_type, IPL_AUDIO, awacs_intr, sc);
+       snprintf(intr_xname, sizeof(intr_xname), "%s status",
+           device_xname(self));
+       intr_establish_xname(cirq, cirq_type, IPL_BIO, awacs_status_intr, sc,
+           intr_xname);
+
+       snprintf(intr_xname, sizeof(intr_xname), "%s out", device_xname(self));
+       intr_establish_xname(oirq, oirq_type, IPL_AUDIO, awacs_intr, sc,
+           intr_xname);
+
+       snprintf(intr_xname, sizeof(intr_xname), "%s in", device_xname(self));
+       intr_establish_xname(iirq, iirq_type, IPL_AUDIO, awacs_intr, sc,
+           intr_xname);
 
        mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
        mutex_init(&sc->sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/com_mainbus.c
--- a/sys/arch/macppc/dev/com_mainbus.c Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/com_mainbus.c Fri Mar 05 07:15:53 2021 +0000
@@ -108,7 +108,8 @@
     com_attach_subr(sc);
 #if 1
     msc->sc_ih =
-        intr_establish(interrupts[0], IST_LEVEL, IPL_SERIAL, comintr, sc);
+        intr_establish_xname(interrupts[0], IST_LEVEL, IPL_SERIAL, comintr, sc,
+           device_xname(self));
 
     if (msc->sc_ih == NULL)
         panic("failed to establish int handler");
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/cuda.c
--- a/sys/arch/macppc/dev/cuda.c        Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/cuda.c        Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cuda.c,v 1.26 2020/07/14 08:58:03 martin Exp $ */
+/*     $NetBSD: cuda.c,v 1.27 2021/03/05 07:15:53 rin Exp $ */
 
 /*-
  * Copyright (c) 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.26 2020/07/14 08:58:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.27 2021/03/05 07:15:53 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -203,7 +203,8 @@
                aprint_normal(": unable to map registers\n");
                return;
        }
-       sc->sc_ih = intr_establish(irq, IST_EDGE, IPL_TTY, cuda_intr, sc);
+       sc->sc_ih = intr_establish_xname(irq, IST_EDGE, IPL_TTY, cuda_intr, sc,
+           device_xname(self));
        printf("\n");
 
        for (i = 0; i < 16; i++) {
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/esp.c
--- a/sys/arch/macppc/dev/esp.c Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/esp.c Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esp.c,v 1.32 2016/07/15 22:10:47 macallan Exp $        */
+/*     $NetBSD: esp.c,v 1.33 2021/03/05 07:15:53 rin Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.32 2016/07/15 22:10:47 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.33 2021/03/05 07:15:53 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -232,7 +232,8 @@
        sc->sc_maxxfer = 64 * 1024;
 
        /* and the interuppts */
-       intr_establish(esc->sc_pri, IST_EDGE, IPL_BIO, ncr53c9x_intr, sc);
+       intr_establish_xname(esc->sc_pri, IST_EDGE, IPL_BIO, ncr53c9x_intr, sc,
+           device_xname(self));
 
        /* Do the common parts of attachment. */
        sc->sc_adapter.adapt_minphys = minphys;
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/gpio.c
--- a/sys/arch/macppc/dev/gpio.c        Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/gpio.c        Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gpio.c,v 1.12 2012/10/27 17:18:00 chs Exp $    */
+/*     $NetBSD: gpio.c,v 1.13 2021/03/05 07:15:53 rin Exp $    */
 
 /*-
  * Copyright (C) 1998  Internet Research Institute, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.12 2012/10/27 17:18:00 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.13 2021/03/05 07:15:53 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -159,7 +159,8 @@
 
 
        sc->sc_port = device_private(parent)->sc_port;
-       intr_establish(ca->ca_intr[0], IST_LEVEL, IPL_HIGH, gpio_intr, sc);
+       intr_establish_xname(ca->ca_intr[0], IST_LEVEL, IPL_HIGH, gpio_intr, sc,
+           device_xname(self));
 
        printf(" irq %d\n", ca->ca_intr[0]);
 }
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/if_bm.c
--- a/sys/arch/macppc/dev/if_bm.c       Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/if_bm.c       Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bm.c,v 1.63 2020/02/04 13:47:34 martin Exp $        */
+/*     $NetBSD: if_bm.c,v 1.64 2021/03/05 07:15:53 rin Exp $   */
 
 /*-
  * Copyright (C) 1998, 1999, 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.63 2020/02/04 13:47:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bm.c,v 1.64 2021/03/05 07:15:53 rin Exp $");
 
 #include "opt_inet.h"
 
@@ -178,6 +178,7 @@
        struct ifnet *ifp = &sc->sc_if;
        struct mii_data *mii = &sc->sc_mii;
        u_char laddr[6];
+       char intr_xname[INTRDEVNAMEBUF];
 
        callout_init(&sc->sc_tick_ch, 0);
 
@@ -224,8 +225,13 @@
            ca->ca_intr[0], ca->ca_intr[2],
            ether_sprintf(laddr));
 
-       intr_establish(ca->ca_intr[0], IST_EDGE, IPL_NET, bmac_intr, sc);
-       intr_establish(ca->ca_intr[2], IST_EDGE, IPL_NET, bmac_rint, sc);
+       snprintf(intr_xname, sizeof(intr_xname), "%s tx", device_xname(self));
+       intr_establish_xname(ca->ca_intr[0], IST_EDGE, IPL_NET, bmac_intr, sc,
+           intr_xname);
+
+       snprintf(intr_xname, sizeof(intr_xname), "%s rx", device_xname(self));
+       intr_establish_xname(ca->ca_intr[2], IST_EDGE, IPL_NET, bmac_rint, sc,
+           intr_xname);
 
        memcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
        ifp->if_softc = sc;
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/if_gm.c
--- a/sys/arch/macppc/dev/if_gm.c       Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/if_gm.c       Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gm.c,v 1.57 2020/02/04 07:36:36 skrll Exp $ */
+/*     $NetBSD: if_gm.c,v 1.58 2021/03/05 07:15:53 rin Exp $   */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.57 2020/02/04 07:36:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.58 2021/03/05 07:15:53 rin Exp $");
 
 #include "opt_inet.h"
 
@@ -173,7 +173,8 @@
        }
        intrstr = pci_intr_string(pa->pa_pc, ih, buf, sizeof(buf));
 
-       if (pci_intr_establish(pa->pa_pc, ih, IPL_NET, gmac_intr, sc) == NULL) {
+       if (pci_intr_establish_xname(pa->pa_pc, ih, IPL_NET, gmac_intr, sc,
+           device_xname(self)) == NULL) {
                printf(": unable to establish interrupt");
                if (intrstr)
                        printf(" at %s", intrstr);
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/if_mc.c
--- a/sys/arch/macppc/dev/if_mc.c       Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/if_mc.c       Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mc.c,v 1.26 2019/12/05 06:28:20 msaitoh Exp $       */
+/*     $NetBSD: if_mc.c,v 1.27 2021/03/05 07:15:53 rin Exp $   */
 
 /*-
  * Copyright (c) 1997 David Huang <khym%bga.com@localhost>
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.26 2019/12/05 06:28:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.27 2021/03/05 07:15:53 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -108,6 +108,7 @@
        struct mc_softc *sc = device_private(self);
        uint8_t myaddr[ETHER_ADDR_LEN];
        u_int *reg;
+       char intr_xname[INTRDEVNAMEBUF];
 
        sc->sc_dev = self;
        sc->sc_node = ca->ca_node;
@@ -169,9 +170,16 @@
        dbdma_reset(sc->sc_txdma);
 
        /* Install interrupt handlers */
+
        /*intr_establish(ca->ca_intr[1], IST_EDGE, IPL_NET, mc_dmaintr, sc);*/
-       intr_establish(ca->ca_intr[2], IST_EDGE, IPL_NET, mc_dmaintr, sc);
-       intr_establish(ca->ca_intr[0], IST_EDGE, IPL_NET, mcintr, sc);
+
+       snprintf(intr_xname, sizeof(intr_xname), "%s dma", device_xname(self));
+       intr_establish_xname(ca->ca_intr[2], IST_EDGE, IPL_NET, mc_dmaintr, sc,
+           intr_xname);
+
+       snprintf(intr_xname, sizeof(intr_xname), "%s pio", device_xname(self));
+       intr_establish_xname(ca->ca_intr[0], IST_EDGE, IPL_NET, mcintr, sc,
+           intr_xname);
 
        sc->sc_biucc = XMTSP_64;
        sc->sc_fifocc = XMTFW_16 | RCVFW_64 | XMTFWU | RCVFWU |
diff -r 695b3c57791e -r 9950fa6e6720 sys/arch/macppc/dev/if_wi_obio.c
--- a/sys/arch/macppc/dev/if_wi_obio.c  Fri Mar 05 07:11:24 2021 +0000
+++ b/sys/arch/macppc/dev/if_wi_obio.c  Fri Mar 05 07:15:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wi_obio.c,v 1.24 2012/10/27 17:18:00 chs Exp $      */
+/*     $NetBSD: if_wi_obio.c,v 1.25 2021/03/05 07:15:53 rin Exp $      */



Home | Main Index | Thread Index | Old Index