Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add intr_establish_xname support to arm and expose it to...
details: https://anonhg.NetBSD.org/src/rev/0e2787be894e
branches: trunk
changeset: 445890:0e2787be894e
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Nov 16 15:06:21 2018 +0000
description:
Add intr_establish_xname support to arm and expose it to intrctl
diffstat:
sys/arch/arm/acpi/acpi_pci_machdep.c | 13 ++++++-----
sys/arch/arm/acpi/acpipchb.c | 8 +++---
sys/arch/arm/broadcom/bcm53xx_pax.c | 6 ++--
sys/arch/arm/cortex/gic_v2m.c | 8 +++---
sys/arch/arm/cortex/gicv3_its.c | 8 +++---
sys/arch/arm/fdt/pcihost_fdt.c | 11 +++++----
sys/arch/arm/gemini/gemini_pci.c | 12 +++++-----
sys/arch/arm/include/pci_machdep.h | 13 +++++++++--
sys/arch/arm/marvell/pci_machdep.c | 8 +++---
sys/arch/arm/nvidia/tegra_pcie.c | 9 ++++---
sys/arch/arm/pci/pci_msi_machdep.c | 8 +++---
sys/arch/arm/pci/pci_msi_machdep.h | 6 ++--
sys/arch/arm/pic/pic.c | 37 ++++++++++++++++++++++++++++++----
sys/arch/arm/pic/picvar.h | 7 ++++-
sys/arch/arm/s3c2xx0/s3c2800_pci.c | 10 ++++----
sys/arch/arm/xscale/becc_pci.c | 8 +++---
sys/arch/evbarm/cp3100/cp3100_pci.c | 8 +++---
sys/arch/evbarm/hdl_g/hdlg_pci.c | 8 +++---
sys/arch/evbarm/ifpga/ifpga_pci.c | 10 ++++----
sys/arch/evbarm/iq80310/iq80310_pci.c | 8 +++---
sys/arch/evbarm/iq80321/iq80321_pci.c | 8 +++---
sys/arch/evbarm/ixm1200/ixm1200_pci.c | 13 ++++++-----
sys/dev/marvell/if_mvgbe.c | 6 ++--
sys/dev/marvell/mvpex.c | 6 ++--
sys/dev/marvell/mvpexvar.h | 4 +-
25 files changed, 142 insertions(+), 101 deletions(-)
diffs (truncated from 962 to 300 lines):
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/acpi/acpi_pci_machdep.c
--- a/sys/arch/arm/acpi/acpi_pci_machdep.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/acpi/acpi_pci_machdep.c Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci_machdep.c,v 1.7 2018/11/03 12:03:05 jmcneill Exp $ */
+/* $NetBSD: acpi_pci_machdep.c,v 1.8 2018/11/16 15:06:21 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.7 2018/11/03 12:03:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.8 2018/11/16 15:06:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -88,7 +88,8 @@
static int acpi_pci_md_intr_setattr(void *, pci_intr_handle_t *, int,
uint64_t);
static void * acpi_pci_md_intr_establish(void *, pci_intr_handle_t,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *,
+ const char *);
static void acpi_pci_md_intr_disestablish(void *, void *);
struct arm32_pci_chipset arm_acpi_pci_chipset = {
@@ -381,17 +382,17 @@
static void *
acpi_pci_md_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
- int (*callback)(void *), void *arg)
+ int (*callback)(void *), void *arg, const char *xname)
{
struct acpi_pci_context * const ap = v;
if ((ih & (ARM_PCI_INTR_MSI | ARM_PCI_INTR_MSIX)) != 0)
- return arm_pci_msi_intr_establish(&ap->ap_pc, ih, ipl, callback, arg);
+ return arm_pci_msi_intr_establish(&ap->ap_pc, ih, ipl, callback, arg, xname);
const int irq = (int)__SHIFTOUT(ih, ARM_PCI_INTR_IRQ);
const int mpsafe = (ih & ARM_PCI_INTR_MPSAFE) ? IST_MPSAFE : 0;
- return intr_establish(irq, ipl, IST_LEVEL | mpsafe, callback, arg);
+ return intr_establish_xname(irq, ipl, IST_LEVEL | mpsafe, callback, arg, xname);
}
static void
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/acpi/acpipchb.c
--- a/sys/arch/arm/acpi/acpipchb.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/acpi/acpipchb.c Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpipchb.c,v 1.3 2018/10/21 11:05:24 jmcneill Exp $ */
+/* $NetBSD: acpipchb.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.3 2018/10/21 11:05:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -133,10 +133,10 @@
sc->sc_ap.ap_pc.pc_conf_v = &sc->sc_ap;
sc->sc_ap.ap_seg = seg;
- if (acpi_pci_ignore_boot_config(sc->sc_handle)) {
+// if (acpi_pci_ignore_boot_config(sc->sc_handle)) {
if (acpimcfg_configure_bus(self, &sc->sc_ap.ap_pc, sc->sc_handle, sc->sc_bus, PCIHOST_CACHELINE_SIZE) != 0)
aprint_error_dev(self, "failed to configure bus\n");
- }
+// }
memset(&pba, 0, sizeof(pba));
pba.pba_flags = aa->aa_pciflags;
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/broadcom/bcm53xx_pax.c
--- a/sys/arch/arm/broadcom/bcm53xx_pax.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/broadcom/bcm53xx_pax.c Fri Nov 16 15:06:21 2018 +0000
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.16 2018/09/03 16:29:23 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.17 2018/11/16 15:06:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -117,7 +117,7 @@
static const char *bcmpax_intr_string(void *, pci_intr_handle_t, char *, size_t);
static const struct evcnt *bcmpax_intr_evcnt(void *, pci_intr_handle_t);
static void *bcmpax_intr_establish(void *, pci_intr_handle_t, int,
- int (*)(void *), void *);
+ int (*)(void *), void *, const char *);
static void bcmpax_intr_disestablish(void *, void *);
static int bcmpax_conf_hook(void *, int, int, int, pcireg_t);
@@ -570,7 +570,7 @@
static void *
bcmpax_intr_establish(void *v, pci_intr_handle_t pih, int ipl,
- int (*func)(void *), void *arg)
+ int (*func)(void *), void *arg, const char *xname)
{
struct bcmpax_softc * const sc = v;
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/cortex/gic_v2m.c
--- a/sys/arch/arm/cortex/gic_v2m.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/cortex/gic_v2m.c Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic_v2m.c,v 1.3 2018/10/31 15:43:19 jmcneill Exp $ */
+/* $NetBSD: gic_v2m.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic_v2m.c,v 1.3 2018/10/31 15:43:19 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic_v2m.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -282,7 +282,7 @@
static void *
gic_v2m_msi_intr_establish(struct arm_pci_msi *msi,
- pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg)
+ pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg, const char *xname)
{
struct gic_v2m_frame * const frame = msi->msi_priv;
@@ -290,7 +290,7 @@
const int mpsafe = (ih & ARM_PCI_INTR_MPSAFE) ? IST_MPSAFE : 0;
return pic_establish_intr(frame->frame_pic, spi, ipl,
- IST_EDGE | mpsafe, func, arg);
+ IST_EDGE | mpsafe, func, arg, xname);
}
static void
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/cortex/gicv3_its.c
--- a/sys/arch/arm/cortex/gicv3_its.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/cortex/gicv3_its.c Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_its.c,v 1.2 2018/11/10 11:46:31 jmcneill Exp $ */
+/* $NetBSD: gicv3_its.c,v 1.3 2018/11/16 15:06:21 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.2 2018/11/10 11:46:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.3 2018/11/16 15:06:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -520,7 +520,7 @@
static void *
gicv3_its_msi_intr_establish(struct arm_pci_msi *msi,
- pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg)
+ pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg, const char *xname)
{
struct gicv3_its * const its = msi->msi_priv;
const struct pci_attach_args *pa;
@@ -530,7 +530,7 @@
const int mpsafe = (ih & ARM_PCI_INTR_MPSAFE) ? IST_MPSAFE : 0;
intrh = pic_establish_intr(its->its_pic, lpi - its->its_pic->pic_irqbase, ipl,
- IST_EDGE | mpsafe, func, arg);
+ IST_EDGE | mpsafe, func, arg, xname);
if (intrh == NULL)
return NULL;
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/fdt/pcihost_fdt.c
--- a/sys/arch/arm/fdt/pcihost_fdt.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/fdt/pcihost_fdt.c Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.3 2018/11/11 21:24:38 jmcneill Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.3 2018/11/11 21:24:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -122,7 +122,8 @@
static int pcihost_intr_setattr(void *, pci_intr_handle_t *, int,
uint64_t);
static void * pcihost_intr_establish(void *, pci_intr_handle_t,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *,
+ const char *);
static void pcihost_intr_disestablish(void *, void *);
CFATTACH_DECL_NEW(pcihost_fdt, sizeof(struct pcihost_softc),
@@ -573,7 +574,7 @@
static void *
pcihost_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
- int (*callback)(void *), void *arg)
+ int (*callback)(void *), void *arg, const char *xname)
{
struct pcihost_softc *sc = v;
const int flags = (ih & IH_MPSAFE) ? FDT_INTR_MPSAFE : 0;
@@ -581,7 +582,7 @@
int ihandle;
if ((ih & (ARM_PCI_INTR_MSI | ARM_PCI_INTR_MSIX)) != 0)
- return arm_pci_msi_intr_establish(&sc->sc_pc, ih, ipl, callback, arg);
+ return arm_pci_msi_intr_establish(&sc->sc_pc, ih, ipl, callback, arg, xname);
specifier = pcihost_find_intr(sc, ih & IH_INDEX_MASK, &ihandle);
if (specifier == NULL)
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/gemini/gemini_pci.c
--- a/sys/arch/arm/gemini/gemini_pci.c Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/gemini/gemini_pci.c Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gemini_pci.c,v 1.18 2015/10/02 05:22:50 msaitoh Exp $ */
+/* $NetBSD: gemini_pci.c,v 1.19 2018/11/16 15:06:22 jmcneill Exp $ */
/* adapted from:
* NetBSD: i80312_pci.c,v 1.9 2005/12/11 12:16:51 christos Exp
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gemini_pci.c,v 1.18 2015/10/02 05:22:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_pci.c,v 1.19 2018/11/16 15:06:22 jmcneill Exp $");
#include "opt_gemini.h"
#include "opt_pci.h"
@@ -89,7 +89,7 @@
char *, size_t);
const struct evcnt *gemini_pci_intr_evcnt(void *, pci_intr_handle_t);
void *gemini_pci_intr_establish(void *, pci_intr_handle_t,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *, const char *);
void gemini_pci_intr_disestablish(void *, void *);
int gemini_pci_intr_handler(void *v);
@@ -388,7 +388,7 @@
void *
gemini_pci_intr_establish(void *v, pci_intr_handle_t pci_ih, int ipl,
- int (*func)(void *), void *arg)
+ int (*func)(void *), void *arg, const char *xname)
{
pcireg_t r;
void *ih=NULL;
@@ -402,8 +402,8 @@
gemini_pci_conf_write(v, 0, GEMINI_PCI_CFG_REG_CTL2, r);
if (gemini_pci_intrq_empty())
- ih = intr_establish(irq, ipl, IST_LEVEL_HIGH,
- gemini_pci_intr_handler, v);
+ ih = intr_establish_xname(irq, ipl, IST_LEVEL_HIGH,
+ gemini_pci_intr_handler, v, xname);
cookie = gemini_pci_intrq_insert(ih, func, arg);
if (cookie == NULL) {
diff -r f2b076898ff6 -r 0e2787be894e sys/arch/arm/include/pci_machdep.h
--- a/sys/arch/arm/include/pci_machdep.h Fri Nov 16 14:58:54 2018 +0000
+++ b/sys/arch/arm/include/pci_machdep.h Fri Nov 16 15:06:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.15 2018/11/02 15:01:18 jmcneill Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.16 2018/11/16 15:06:22 jmcneill Exp $ */
/*
* Modified for arm32 by Mark Brinicombe
@@ -104,7 +104,7 @@
int (*pc_intr_setattr)(void *, pci_intr_handle_t *,
int, uint64_t);
void *(*pc_intr_establish)(void *, pci_intr_handle_t,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *, const char *);
void (*pc_intr_disestablish)(void *, void *);
#ifdef __HAVE_PCI_CONF_HOOK
@@ -159,7 +159,7 @@
#define pci_intr_evcnt(c, ih) \
(*(c)->pc_intr_evcnt)((c)->pc_intr_v, (ih))
#define pci_intr_establish(c, ih, l, h, a) \
- (*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a))
+ (*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a), NULL)
#define pci_intr_disestablish(c, iv) \
Home |
Main Index |
Thread Index |
Old Index