Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/fdt Add 'const char *xname' arg to fdtbus_interrupt_...



details:   https://anonhg.NetBSD.org/src/rev/a93db5f0ecc2
branches:  trunk
changeset: 1017886:a93db5f0ecc2
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Jan 15 00:38:22 2021 +0000

description:
Add 'const char *xname' arg to fdtbus_interrupt_controller_func .establish

diffstat:

 sys/arch/arm/broadcom/bcm2835_gpio.c   |   8 ++++----
 sys/arch/arm/broadcom/bcm2835_intr.c   |  29 +++++++++++++++--------------
 sys/arch/arm/fdt/gic_fdt.c             |  16 ++++++++--------
 sys/arch/arm/fdt/gicv3_fdt.c           |  16 ++++++++--------
 sys/arch/arm/nvidia/tegra_lic.c        |  11 ++++++-----
 sys/arch/arm/nxp/imx6_gpc.c            |  11 ++++++-----
 sys/arch/arm/nxp/imx7_gpc.c            |  10 +++++-----
 sys/arch/arm/nxp/imx_gpio.c            |  11 ++++++-----
 sys/arch/arm/rockchip/rk3399_pcie.c    |   9 +++++----
 sys/arch/arm/samsung/exynos_combiner.c |  18 +++++++++---------
 sys/arch/arm/sunxi/sunxi_gpio.c        |   6 +++---
 sys/arch/arm/sunxi/sunxi_intc.c        |   9 +++++----
 sys/arch/arm/sunxi/sunxi_nmi.c         |   6 +++---
 sys/arch/arm/ti/ti_gpio.c              |   6 +++---
 sys/arch/arm/ti/ti_omapintc.c          |   9 +++++----
 sys/arch/mips/cavium/dev/octeon_cib.c  |   8 ++++----
 sys/arch/mips/cavium/dev/octeon_intc.c |   8 ++++----
 sys/dev/fdt/fdt_intr.c                 |   6 +++---
 sys/dev/fdt/fdtvar.h                   |   4 ++--
 19 files changed, 104 insertions(+), 97 deletions(-)

diffs (truncated from 779 to 300 lines):

diff -r 787c7e73e86b -r a93db5f0ecc2 sys/arch/arm/broadcom/bcm2835_gpio.c
--- a/sys/arch/arm/broadcom/bcm2835_gpio.c      Thu Jan 14 23:32:12 2021 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_gpio.c      Fri Jan 15 00:38:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_gpio.c,v 1.16 2019/10/12 09:46:18 mlelstv Exp $        */
+/*     $NetBSD: bcm2835_gpio.c,v 1.17 2021/01/15 00:38:22 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2013, 2014, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio.c,v 1.16 2019/10/12 09:46:18 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio.c,v 1.17 2021/01/15 00:38:22 jmcneill Exp $");
 
 /*
  * Driver for BCM2835 GPIO
@@ -150,7 +150,7 @@
 };
 
 static void *  bcmgpio_fdt_intr_establish(device_t, u_int *, int, int,
-                   int (*func)(void *), void *);
+                   int (*func)(void *), void *, const char *);
 static void    bcmgpio_fdt_intr_disestablish(device_t, void *);
 static bool    bcmgpio_fdt_intrstr(device_t, u_int *, char *, size_t);
 
@@ -567,7 +567,7 @@
 
 static void *
 bcmgpio_fdt_intr_establish(device_t dev, u_int *specifier, int ipl, int flags,
-    int (*func)(void *), void *arg)
+    int (*func)(void *), void *arg, const char *xname)
 {
        struct bcmgpio_softc * const sc = device_private(dev);
        int eint_flags = (flags & FDT_INTR_MPSAFE) ? BCMGPIO_INTR_MPSAFE : 0;
diff -r 787c7e73e86b -r a93db5f0ecc2 sys/arch/arm/broadcom/bcm2835_intr.c
--- a/sys/arch/arm/broadcom/bcm2835_intr.c      Thu Jan 14 23:32:12 2021 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_intr.c      Fri Jan 15 00:38:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_intr.c,v 1.33 2020/12/16 19:49:04 christos Exp $       */
+/*     $NetBSD: bcm2835_intr.c,v 1.34 2021/01/15 00:38:22 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2012, 2015, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.33 2020/12/16 19:49:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.34 2021/01/15 00:38:22 jmcneill Exp $");
 
 #define _INTR_PRIVATE
 
@@ -83,7 +83,7 @@
 
 static int bcm2835_icu_fdt_decode_irq(u_int *);
 static void *bcm2835_icu_fdt_establish(device_t, u_int *, int, int,
-    int (*)(void *), void *);
+    int (*)(void *), void *, const char *);
 static void bcm2835_icu_fdt_disestablish(device_t, void *);
 static bool bcm2835_icu_fdt_intrstr(device_t, u_int *, char *, size_t);
 
@@ -91,7 +91,7 @@
 
 static int bcm2836mp_icu_fdt_decode_irq(u_int *);
 static void *bcm2836mp_icu_fdt_establish(device_t, u_int *, int, int,
-    int (*)(void *), void *);
+    int (*)(void *), void *, const char *);
 static void bcm2836mp_icu_fdt_disestablish(device_t, void *);
 static bool bcm2836mp_icu_fdt_intrstr(device_t, u_int *, char *, size_t);
 
@@ -467,7 +467,7 @@
 
 static void *
 bcm2835_icu_fdt_establish(device_t dev, u_int *specifier, int ipl, int flags,
-    int (*func)(void *), void *arg)
+    int (*func)(void *), void *arg, const char *xname)
 {
        struct bcm2835icu_softc * const sc = device_private(dev);
        struct bcm2835icu_irq *firq;
@@ -493,11 +493,11 @@
                firq->intr_irq = irq;
                TAILQ_INIT(&firq->intr_handlers);
                if (arg == NULL) {
-                       firq->intr_ih = intr_establish(irq, ipl,
-                           IST_LEVEL | iflags, func, NULL);
+                       firq->intr_ih = intr_establish_xname(irq, ipl,
+                           IST_LEVEL | iflags, func, NULL, xname);
                } else {
-                       firq->intr_ih = intr_establish(irq, ipl,
-                           IST_LEVEL | iflags, bcm2835_icu_intr, firq);
+                       firq->intr_ih = intr_establish_xname(irq, ipl,
+                           IST_LEVEL | iflags, bcm2835_icu_intr, firq, xname);
                }
                if (firq->intr_ih == NULL) {
                        kmem_free(firq, sizeof(*firq));
@@ -864,7 +864,7 @@
 
 static void *
 bcm2836mp_icu_fdt_establish(device_t dev, u_int *specifier, int ipl, int flags,
-    int (*func)(void *), void *arg)
+    int (*func)(void *), void *arg, const char *xname)
 {
        int iflags = (flags & FDT_INTR_MPSAFE) ? IST_MPSAFE : 0;
        struct bcm2836mp_interrupt *bip;
@@ -896,8 +896,9 @@
         */
        if (!cold) {
                for (cpuid_t cpuid = 0; cpuid < BCM2836_NCPUS; cpuid++) {
-                       ih = intr_establish(BCM2836_INT_BASECPUN(cpuid) + irq, ipl,
-                           IST_LEVEL | iflags, func, arg);
+                       ih = intr_establish_xname(
+                           BCM2836_INT_BASECPUN(cpuid) + irq, ipl,
+                           IST_LEVEL | iflags, func, arg, xname);
                        if (!ih) {
                                kmem_free(bip, sizeof(*bip));
                                return NULL;
@@ -915,8 +916,8 @@
         * delay until bcm2836mp_intr_init is called for each AP, e.g.
         * gtmr
         */
-       ih = intr_establish(BCM2836_INT_BASECPUN(0) + irq, ipl,
-           IST_LEVEL | iflags, func, arg);
+       ih = intr_establish_xname(BCM2836_INT_BASECPUN(0) + irq, ipl,
+           IST_LEVEL | iflags, func, arg, xname);
        if (!ih) {
                kmem_free(bip, sizeof(*bip));
                return NULL;
diff -r 787c7e73e86b -r a93db5f0ecc2 sys/arch/arm/fdt/gic_fdt.c
--- a/sys/arch/arm/fdt/gic_fdt.c        Thu Jan 14 23:32:12 2021 +0000
+++ b/sys/arch/arm/fdt/gic_fdt.c        Fri Jan 15 00:38:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic_fdt.c,v 1.19 2020/11/25 20:59:20 jmcneill Exp $ */
+/* $NetBSD: gic_fdt.c,v 1.20 2021/01/15 00:38:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "pci.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic_fdt.c,v 1.19 2020/11/25 20:59:20 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic_fdt.c,v 1.20 2021/01/15 00:38:22 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -66,7 +66,7 @@
 static int     gic_fdt_intr(void *);
 
 static void *  gic_fdt_establish(device_t, u_int *, int, int,
-                   int (*)(void *), void *);
+                   int (*)(void *), void *, const char *);
 static void    gic_fdt_disestablish(device_t, void *);
 static bool    gic_fdt_intrstr(device_t, u_int *, char *, size_t);
 
@@ -235,7 +235,7 @@
 
 static void *
 gic_fdt_establish(device_t dev, u_int *specifier, int ipl, int flags,
-    int (*func)(void *), void *arg)
+    int (*func)(void *), void *arg, const char *xname)
 {
        struct gic_fdt_softc * const sc = device_private(dev);
        struct gic_fdt_irq *firq;
@@ -266,11 +266,11 @@
                TAILQ_INIT(&firq->intr_handlers);
                firq->intr_irq = irq;
                if (arg == NULL) {
-                       firq->intr_ih = intr_establish(irq, ipl, level | mpsafe,
-                           func, NULL);
+                       firq->intr_ih = intr_establish_xname(irq, ipl,
+                           level | mpsafe, func, NULL, xname);
                } else {
-                       firq->intr_ih = intr_establish(irq, ipl, level | mpsafe,
-                           gic_fdt_intr, firq);
+                       firq->intr_ih = intr_establish_xname(irq, ipl,
+                           level | mpsafe, gic_fdt_intr, firq, xname);
                }
                if (firq->intr_ih == NULL) {
                        kmem_free(firq, sizeof(*firq));
diff -r 787c7e73e86b -r a93db5f0ecc2 sys/arch/arm/fdt/gicv3_fdt.c
--- a/sys/arch/arm/fdt/gicv3_fdt.c      Thu Jan 14 23:32:12 2021 +0000
+++ b/sys/arch/arm/fdt/gicv3_fdt.c      Fri Jan 15 00:38:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_fdt.c,v 1.10 2020/11/25 21:02:35 jmcneill Exp $ */
+/* $NetBSD: gicv3_fdt.c,v 1.11 2021/01/15 00:38:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #define        _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3_fdt.c,v 1.10 2020/11/25 21:02:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_fdt.c,v 1.11 2021/01/15 00:38:22 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -70,7 +70,7 @@
 static int     gicv3_fdt_intr(void *);
 
 static void *  gicv3_fdt_establish(device_t, u_int *, int, int,
-                   int (*)(void *), void *);
+                   int (*)(void *), void *, const char *);
 static void    gicv3_fdt_disestablish(device_t, void *);
 static bool    gicv3_fdt_intrstr(device_t, u_int *, char *, size_t);
 
@@ -336,7 +336,7 @@
 
 static void *
 gicv3_fdt_establish(device_t dev, u_int *specifier, int ipl, int flags,
-    int (*func)(void *), void *arg)
+    int (*func)(void *), void *arg, const char *xname)
 {
        struct gicv3_fdt_softc * const sc = device_private(dev);
        struct gicv3_fdt_irq *firq;
@@ -368,11 +368,11 @@
                TAILQ_INIT(&firq->intr_handlers);
                firq->intr_irq = irq;
                if (arg == NULL) {
-                       firq->intr_ih = intr_establish(irq, ipl, level | mpsafe,
-                           func, NULL);
+                       firq->intr_ih = intr_establish_xname(irq, ipl,
+                           level | mpsafe, func, NULL, xname);
                } else {
-                       firq->intr_ih = intr_establish(irq, ipl, level | mpsafe,
-                           gicv3_fdt_intr, firq);
+                       firq->intr_ih = intr_establish_xname(irq, ipl,
+                           level | mpsafe, gicv3_fdt_intr, firq, xname);
                }
                if (firq->intr_ih == NULL) {
                        kmem_free(firq, sizeof(*firq));
diff -r 787c7e73e86b -r a93db5f0ecc2 sys/arch/arm/nvidia/tegra_lic.c
--- a/sys/arch/arm/nvidia/tegra_lic.c   Thu Jan 14 23:32:12 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_lic.c   Fri Jan 15 00:38:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_lic.c,v 1.6 2019/01/26 14:38:29 thorpej Exp $ */
+/* $NetBSD: tegra_lic.c,v 1.7 2021/01/15 00:38:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_lic.c,v 1.6 2019/01/26 14:38:29 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_lic.c,v 1.7 2021/01/15 00:38:22 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -51,7 +51,7 @@
 static void    tegra_lic_attach(device_t, device_t, void *);
 
 static void *  tegra_lic_establish(device_t, u_int *, int, int,
-                   int (*)(void *), void *);
+                   int (*)(void *), void *, const char *);
 static void    tegra_lic_disestablish(device_t, void *);
 static bool    tegra_lic_intrstr(device_t, u_int *, char *, size_t);
 
@@ -130,7 +130,7 @@
 
 static void *
 tegra_lic_establish(device_t dev, u_int *specifier, int ipl, int flags,
-    int (*func)(void *), void *arg)
+    int (*func)(void *), void *arg, const char *xname)
 {
        int iflags = (flags & FDT_INTR_MPSAFE) ? IST_MPSAFE : 0;
 
@@ -145,7 +145,8 @@
        const u_int level = (trig & FDT_INTR_TYPE_DOUBLE_EDGE)
            ? IST_EDGE : IST_LEVEL;
 
-       return intr_establish(irq, ipl, level | iflags, func, arg);
+       return intr_establish_xname(irq, ipl, level | iflags, func, arg,
+           xname);
 }
 
 static void
diff -r 787c7e73e86b -r a93db5f0ecc2 sys/arch/arm/nxp/imx6_gpc.c
--- a/sys/arch/arm/nxp/imx6_gpc.c       Thu Jan 14 23:32:12 2021 +0000
+++ b/sys/arch/arm/nxp/imx6_gpc.c       Fri Jan 15 00:38:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx6_gpc.c,v 1.1 2020/12/23 14:42:38 skrll Exp $       */
+/*     $NetBSD: imx6_gpc.c,v 1.2 2021/01/15 00:38:22 jmcneill Exp $    */
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx6_gpc.c,v 1.1 2020/12/23 14:42:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_gpc.c,v 1.2 2021/01/15 00:38:22 jmcneill Exp $");
 
 #include "opt_fdt.h"
 
@@ -51,7 +51,7 @@
 static void imxgpc_attach(device_t, device_t, void *);
 



Home | Main Index | Thread Index | Old Index