Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/fdt use fdtbus_intr_establish_xname



details:   https://anonhg.NetBSD.org/src/rev/8db3968f7fc9
branches:  trunk
changeset: 958641:8db3968f7fc9
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Jan 15 22:35:39 2021 +0000

description:
use fdtbus_intr_establish_xname

diffstat:

 sys/dev/fdt/ahcisata_fdt.c    |  10 ++++++----
 sys/dev/fdt/dwc2_fdt.c        |   9 ++++-----
 sys/dev/fdt/dwiic_fdt.c       |   8 ++++----
 sys/dev/fdt/genet_fdt.c       |   8 ++++----
 sys/dev/fdt/ns8250_uart.c     |   8 ++++----
 sys/dev/fdt/virtio_mmio_fdt.c |   9 +++++----
 6 files changed, 27 insertions(+), 25 deletions(-)

diffs (178 lines):

diff -r 8c9df589b178 -r 8db3968f7fc9 sys/dev/fdt/ahcisata_fdt.c
--- a/sys/dev/fdt/ahcisata_fdt.c        Fri Jan 15 22:07:54 2021 +0000
+++ b/sys/dev/fdt/ahcisata_fdt.c        Fri Jan 15 22:35:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_fdt.c,v 1.1 2018/09/03 23:15:12 jmcneill Exp $ */
+/* $NetBSD: ahcisata_fdt.c,v 1.2 2021/01/15 22:35:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_fdt.c,v 1.1 2018/09/03 23:15:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_fdt.c,v 1.2 2021/01/15 22:35:39 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -103,8 +103,10 @@
        aprint_naive("\n");
        aprint_normal(": AHCI SATA controller\n");
 
-       if (fdtbus_intr_establish(phandle, 0, IPL_BIO, 0, ahci_intr, sc) == NULL) {
-               aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr);
+       if (fdtbus_intr_establish_xname(phandle, 0, IPL_BIO, 0,
+           ahci_intr, sc, device_xname(self)) == NULL) {
+               aprint_error_dev(self,
+                   "failed to establish interrupt on %s\n", intrstr);
                return;
        }
        aprint_normal_dev(self, "interrupting on %s\n", intrstr);
diff -r 8c9df589b178 -r 8db3968f7fc9 sys/dev/fdt/dwc2_fdt.c
--- a/sys/dev/fdt/dwc2_fdt.c    Fri Jan 15 22:07:54 2021 +0000
+++ b/sys/dev/fdt/dwc2_fdt.c    Fri Jan 15 22:35:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2_fdt.c,v 1.5 2019/03/02 13:21:08 jmcneill Exp $    */
+/*     $NetBSD: dwc2_fdt.c,v 1.6 2021/01/15 22:35:39 jmcneill Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.5 2019/03/02 13:21:08 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.6 2021/01/15 22:35:39 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -166,9 +166,8 @@
        aprint_naive("\n");
        aprint_normal(": DesignWare USB2 OTG\n");
 
-       sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE,
-           dwc2_intr, &sc->sc_dwc2);
-
+       sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM,
+           FDT_INTR_MPSAFE, dwc2_intr, &sc->sc_dwc2, device_xname(self));
        if (sc->sc_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt %s\n",
                    intrstr);
diff -r 8c9df589b178 -r 8db3968f7fc9 sys/dev/fdt/dwiic_fdt.c
--- a/sys/dev/fdt/dwiic_fdt.c   Fri Jan 15 22:07:54 2021 +0000
+++ b/sys/dev/fdt/dwiic_fdt.c   Fri Jan 15 22:35:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwiic_fdt.c,v 1.2 2020/12/23 16:02:11 thorpej Exp $ */
+/* $NetBSD: dwiic_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwiic_fdt.c,v 1.2 2020/12/23 16:02:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwiic_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -98,8 +98,8 @@
        }
        aprint_normal_dev(self, "interrupting on %s\n", intrstr);
 
-       sc->sc_dwiic.sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, 0,
-               dwiic_intr, &sc->sc_dwiic);
+       sc->sc_dwiic.sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, 0,
+               dwiic_intr, &sc->sc_dwiic, device_xname(self));
        if (sc->sc_dwiic.sc_ih == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt\n");
                goto out;
diff -r 8c9df589b178 -r 8db3968f7fc9 sys/dev/fdt/genet_fdt.c
--- a/sys/dev/fdt/genet_fdt.c   Fri Jan 15 22:07:54 2021 +0000
+++ b/sys/dev/fdt/genet_fdt.c   Fri Jan 15 22:35:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genet_fdt.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $ */
+/* $NetBSD: genet_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_net_mpsafe.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genet_fdt.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genet_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -125,8 +125,8 @@
        if (genet_attach(sc) != 0)
                return;
 
-       ih = fdtbus_intr_establish(phandle, 0, IPL_NET, FDT_INTR_FLAGS,
-           genet_intr, sc);
+       ih = fdtbus_intr_establish_xname(phandle, 0, IPL_NET, FDT_INTR_FLAGS,
+           genet_intr, sc, device_xname(self));
        if (ih == NULL) {
                aprint_error_dev(self, "couldn't establish interrupt on %s\n",
                    intrstr);
diff -r 8c9df589b178 -r 8db3968f7fc9 sys/dev/fdt/ns8250_uart.c
--- a/sys/dev/fdt/ns8250_uart.c Fri Jan 15 22:07:54 2021 +0000
+++ b/sys/dev/fdt/ns8250_uart.c Fri Jan 15 22:35:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns8250_uart.c,v 1.2 2020/07/16 16:38:40 jmcneill Exp $ */
+/* $NetBSD: ns8250_uart.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017-2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: ns8250_uart.c,v 1.2 2020/07/16 16:38:40 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ns8250_uart.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -163,8 +163,8 @@
                return;
        }
 
-       ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SERIAL,
-           FDT_INTR_MPSAFE, comintr, sc);
+       ih = fdtbus_intr_establish_xname(faa->faa_phandle, 0, IPL_SERIAL,
+           FDT_INTR_MPSAFE, comintr, sc, device_xname(self));
        if (ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt on %s\n",
                    intrstr);
diff -r 8c9df589b178 -r 8db3968f7fc9 sys/dev/fdt/virtio_mmio_fdt.c
--- a/sys/dev/fdt/virtio_mmio_fdt.c     Fri Jan 15 22:07:54 2021 +0000
+++ b/sys/dev/fdt/virtio_mmio_fdt.c     Fri Jan 15 22:35:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_mmio_fdt.c,v 1.3 2018/09/29 15:56:25 jmcneill Exp $ */
+/* $NetBSD: virtio_mmio_fdt.c,v 1.4 2021/01/15 22:35:39 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2018 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.3 2018/09/29 15:56:25 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.4 2021/01/15 22:35:39 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -167,8 +167,9 @@
        if (vsc->sc_flags & VIRTIO_F_PCI_INTR_MPSAFE)
                flags |= FDT_INTR_MPSAFE;
 
-       msc->sc_ih = fdtbus_intr_establish(fsc->sc_phandle, 0, vsc->sc_ipl,
-           flags, virtio_mmio_intr, msc);
+       msc->sc_ih = fdtbus_intr_establish_xname(fsc->sc_phandle, 0,
+           vsc->sc_ipl, flags, virtio_mmio_intr, msc,
+           device_xname(vsc->sc_dev));
        if (msc->sc_ih == NULL) {
                aprint_error_dev(vsc->sc_dev,
                    "failed to establish interrupt on %s\n", intrstr);



Home | Main Index | Thread Index | Old Index