Module Name:    src
Committed By:   jmcneill
Date:           Fri Jan 15 22:35:40 UTC 2021

Modified Files:
        src/sys/dev/fdt: ahcisata_fdt.c dwc2_fdt.c dwiic_fdt.c genet_fdt.c
            ns8250_uart.c virtio_mmio_fdt.c

Log Message:
use fdtbus_intr_establish_xname


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/ahcisata_fdt.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/dwc2_fdt.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/dwiic_fdt.c \
    src/sys/dev/fdt/genet_fdt.c src/sys/dev/fdt/ns8250_uart.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/virtio_mmio_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fdt/ahcisata_fdt.c
diff -u src/sys/dev/fdt/ahcisata_fdt.c:1.1 src/sys/dev/fdt/ahcisata_fdt.c:1.2
--- src/sys/dev/fdt/ahcisata_fdt.c:1.1	Mon Sep  3 23:15:12 2018
+++ src/sys/dev/fdt/ahcisata_fdt.c	Fri Jan 15 22:35:39 2021
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ ahcisata_fdt_attach(device_t parent, dev
 	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);

Index: src/sys/dev/fdt/dwc2_fdt.c
diff -u src/sys/dev/fdt/dwc2_fdt.c:1.5 src/sys/dev/fdt/dwc2_fdt.c:1.6
--- src/sys/dev/fdt/dwc2_fdt.c:1.5	Sat Mar  2 13:21:08 2019
+++ src/sys/dev/fdt/dwc2_fdt.c	Fri Jan 15 22:35:39 2021
@@ -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 @@ dwc2_fdt_attach(device_t parent, device_
 	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);

Index: src/sys/dev/fdt/dwiic_fdt.c
diff -u src/sys/dev/fdt/dwiic_fdt.c:1.2 src/sys/dev/fdt/dwiic_fdt.c:1.3
--- src/sys/dev/fdt/dwiic_fdt.c:1.2	Wed Dec 23 16:02:11 2020
+++ src/sys/dev/fdt/dwiic_fdt.c	Fri Jan 15 22:35:39 2021
@@ -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 @@ dwiic_fdt_attach(device_t parent, device
 	}
 	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;
Index: src/sys/dev/fdt/genet_fdt.c
diff -u src/sys/dev/fdt/genet_fdt.c:1.2 src/sys/dev/fdt/genet_fdt.c:1.3
--- src/sys/dev/fdt/genet_fdt.c:1.2	Mon May 25 19:49:28 2020
+++ src/sys/dev/fdt/genet_fdt.c	Fri Jan 15 22:35:39 2021
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ genet_fdt_attach(device_t parent, device
 	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);
Index: src/sys/dev/fdt/ns8250_uart.c
diff -u src/sys/dev/fdt/ns8250_uart.c:1.2 src/sys/dev/fdt/ns8250_uart.c:1.3
--- src/sys/dev/fdt/ns8250_uart.c:1.2	Thu Jul 16 16:38:40 2020
+++ src/sys/dev/fdt/ns8250_uart.c	Fri Jan 15 22:35:39 2021
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ ns8250_uart_attach(device_t parent, devi
 		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);

Index: src/sys/dev/fdt/virtio_mmio_fdt.c
diff -u src/sys/dev/fdt/virtio_mmio_fdt.c:1.3 src/sys/dev/fdt/virtio_mmio_fdt.c:1.4
--- src/sys/dev/fdt/virtio_mmio_fdt.c:1.3	Sat Sep 29 15:56:25 2018
+++ src/sys/dev/fdt/virtio_mmio_fdt.c	Fri Jan 15 22:35:39 2021
@@ -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 @@ virtio_mmio_fdt_setup_interrupts(struct 
 	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);

Reply via email to