Add intr_establish_xname support to arm and expose it to intrctl
This commit is contained in:
parent
730f9ec0e6
commit
cce19cc266
|
@ -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 const struct evcnt *acpi_pci_md_intr_evcnt(void *, pci_intr_handle_t);
|
|||
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 @@ acpi_pci_md_intr_setattr(void *v, pci_intr_handle_t *ih, int attr, uint64_t data
|
|||
|
||||
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
|
||||
|
|
|
@ -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 @@ acpipchb_attach(device_t parent, device_t self, void *aux)
|
|||
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;
|
||||
|
|
|
@ -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 int bcmpax_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
|
|||
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 @@ bcmpax_intr_evcnt(void *v, pci_intr_handle_t pih)
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
@ -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 @@ gic_v2m_msix_alloc(struct arm_pci_msi *msi, u_int *table_indexes, int *count,
|
|||
|
||||
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 @@ gic_v2m_msi_intr_establish(struct arm_pci_msi *msi,
|
|||
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
|
||||
|
|
|
@ -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 @@ gicv3_its_msix_alloc(struct arm_pci_msi *msi, u_int *table_indexes, int *count,
|
|||
|
||||
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 @@ gicv3_its_msi_intr_establish(struct arm_pci_msi *msi,
|
|||
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;
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
@ -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 @@ const struct evcnt *pcihost_intr_evcnt(void *, pci_intr_handle_t);
|
|||
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 @@ pcihost_intr_setattr(void *v, pci_intr_handle_t *ih, int attr, uint64_t data)
|
|||
|
||||
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 @@ pcihost_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
|
|||
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)
|
||||
|
|
|
@ -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 @@ const char *gemini_pci_intr_string(void *, pci_intr_handle_t,
|
|||
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 @@ gemini_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
|
||||
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_intr_establish(void *v, pci_intr_handle_t pci_ih, int ipl,
|
|||
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) {
|
||||
|
|
|
@ -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 @@ struct arm32_pci_chipset {
|
|||
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 @@ struct arm32_pci_chipset {
|
|||
#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) \
|
||||
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
|
||||
#ifdef __HAVE_PCI_CONF_HOOK
|
||||
|
@ -178,6 +178,13 @@ pci_intr_setattr(pci_chipset_tag_t pc, pci_intr_handle_t *ihp,
|
|||
return pc->pc_intr_setattr(pc, ihp, attr, data);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
pci_intr_establish_xname(pci_chipset_tag_t pc, pci_intr_handle_t ih,
|
||||
int level, int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
return pc->pc_intr_establish(pc->pc_intr_v, ih, level, func, arg, xname);
|
||||
}
|
||||
|
||||
#ifdef __HAVE_PCI_MSI_MSIX
|
||||
pci_intr_type_t pci_intr_type(pci_chipset_tag_t, pci_intr_handle_t);
|
||||
int pci_intr_alloc(const struct pci_attach_args *, pci_intr_handle_t **,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_machdep.c,v 1.13 2018/11/03 17:26:41 jmcneill Exp $ */
|
||||
/* $NetBSD: pci_machdep.c,v 1.14 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.13 2018/11/03 17:26:41 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.14 2018/11/16 15:06:22 jmcneill Exp $");
|
||||
|
||||
#include "opt_mvsoc.h"
|
||||
#include "gtpci.h"
|
||||
|
@ -73,7 +73,7 @@ static int gtpci_gpp_intr_map(const struct pci_attach_args *,
|
|||
static const char *gtpci_gpp_intr_string(void *, pci_intr_handle_t,
|
||||
char *, size_t);
|
||||
static const struct evcnt *gtpci_gpp_intr_evcnt(void *, pci_intr_handle_t);
|
||||
static void *gtpci_gpp_intr_establish(void *, pci_intr_handle_t, int, int (*)(void *), void *);
|
||||
static void *gtpci_gpp_intr_establish(void *, pci_intr_handle_t, int, int (*)(void *), void *, const char *);
|
||||
static void gtpci_gpp_intr_disestablish(void *, void *);
|
||||
|
||||
struct arm32_pci_chipset arm32_gtpci_chipset = {
|
||||
|
@ -381,7 +381,7 @@ gtpci_gpp_intr_evcnt(void *v, pci_intr_handle_t pin)
|
|||
|
||||
static void *
|
||||
gtpci_gpp_intr_establish(void *v, pci_intr_handle_t int_pin, int ipl,
|
||||
int (*intrhand)(void *), void *intrarg)
|
||||
int (*intrhand)(void *), void *intrarg, const char *xname)
|
||||
{
|
||||
struct gtpci_softc *sc = v;
|
||||
prop_array_t int2gpp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tegra_pcie.c,v 1.24 2018/04/01 04:35:04 ryo Exp $ */
|
||||
/* $NetBSD: tegra_pcie.c,v 1.25 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.24 2018/04/01 04:35:04 ryo Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.25 2018/11/16 15:06:22 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
|
@ -122,7 +122,8 @@ const struct evcnt *tegra_pcie_intr_evcnt(void *, pci_intr_handle_t);
|
|||
static int tegra_pcie_intr_setattr(void *, pci_intr_handle_t *, int,
|
||||
uint64_t);
|
||||
static void * tegra_pcie_intr_establish(void *, pci_intr_handle_t,
|
||||
int, int (*)(void *), void *);
|
||||
int, int (*)(void *), void *,
|
||||
const char *);
|
||||
static void tegra_pcie_intr_disestablish(void *, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(tegra_pcie, sizeof(struct tegra_pcie_softc),
|
||||
|
@ -770,7 +771,7 @@ tegra_pcie_intr_setattr(void *v, pci_intr_handle_t *ih, int attr, uint64_t data)
|
|||
|
||||
static void *
|
||||
tegra_pcie_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 tegra_pcie_softc *sc = v;
|
||||
struct tegra_pcie_ih *pcie_ih;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_msi_machdep.c,v 1.2 2018/10/31 15:42:17 jmcneill Exp $ */
|
||||
/* $NetBSD: pci_msi_machdep.c,v 1.3 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2018 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.2 2018/10/31 15:42:17 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.3 2018/11/16 15:06:22 jmcneill Exp $");
|
||||
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/kmem.h>
|
||||
|
@ -117,7 +117,7 @@ arm_pci_msi_add(struct arm_pci_msi *msi)
|
|||
|
||||
void *
|
||||
arm_pci_msi_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t pih,
|
||||
int ipl, int (*func)(void *), void *arg)
|
||||
int ipl, int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
struct arm_pci_msi *msi;
|
||||
|
||||
|
@ -125,7 +125,7 @@ arm_pci_msi_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t pih,
|
|||
if (msi == NULL)
|
||||
return NULL;
|
||||
|
||||
return msi->msi_intr_establish(msi, pih, ipl, func, arg);
|
||||
return msi->msi_intr_establish(msi, pih, ipl, func, arg, xname);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_msi_machdep.h,v 1.2 2018/10/31 15:42:17 jmcneill Exp $ */
|
||||
/* $NetBSD: pci_msi_machdep.h,v 1.3 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2018 The NetBSD Foundation, Inc.
|
||||
|
@ -44,7 +44,7 @@ struct arm_pci_msi {
|
|||
pci_intr_handle_t * (*msi_alloc)(struct arm_pci_msi *, int *, const struct pci_attach_args *, bool);
|
||||
pci_intr_handle_t * (*msix_alloc)(struct arm_pci_msi *, u_int *, int *, const struct pci_attach_args *, bool);
|
||||
void * (*msi_intr_establish)(struct arm_pci_msi *,
|
||||
pci_intr_handle_t, int, int (*)(void *), void *);
|
||||
pci_intr_handle_t, int, int (*)(void *), void *, const char *);
|
||||
void (*msi_intr_release)(struct arm_pci_msi *,
|
||||
pci_intr_handle_t *, int);
|
||||
|
||||
|
@ -53,6 +53,6 @@ struct arm_pci_msi {
|
|||
|
||||
int arm_pci_msi_add(struct arm_pci_msi *);
|
||||
void * arm_pci_msi_intr_establish(pci_chipset_tag_t, pci_intr_handle_t,
|
||||
int, int (*)(void *), void *);
|
||||
int, int (*)(void *), void *, const char *);
|
||||
|
||||
#endif /* !_ARM_PCI_MSI_MACHDEP_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pic.c,v 1.47 2018/11/13 20:24:48 jmcneill Exp $ */
|
||||
/* $NetBSD: pic.c,v 1.48 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -33,7 +33,7 @@
|
|||
#include "opt_multiprocessor.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.47 2018/11/13 20:24:48 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.48 2018/11/16 15:06:22 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/atomic.h>
|
||||
|
@ -742,7 +742,7 @@ pic_percpu_evcnt_attach(void *v0, void *v1, struct cpu_info *ci)
|
|||
|
||||
void *
|
||||
pic_establish_intr(struct pic_softc *pic, int irq, int ipl, int type,
|
||||
int (*func)(void *), void *arg)
|
||||
int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
struct intrsource *is;
|
||||
int off, nipl;
|
||||
|
@ -819,6 +819,14 @@ unblock:
|
|||
(*pic->pic_ops->pic_unblock_irqs)(pic, is->is_irq & ~0x1f,
|
||||
__BIT(is->is_irq & 0x1f));
|
||||
|
||||
if (xname) {
|
||||
if (is->is_xname == NULL)
|
||||
is->is_xname = kmem_zalloc(INTRDEVNAMEBUF, KM_SLEEP);
|
||||
if (is->is_xname[0] != '\0')
|
||||
strlcat(is->is_xname, ", ", INTRDEVNAMEBUF);
|
||||
strlcat(is->is_xname, xname, INTRDEVNAMEBUF);
|
||||
}
|
||||
|
||||
/* We're done. */
|
||||
return is;
|
||||
}
|
||||
|
@ -844,6 +852,10 @@ pic_disestablish_source(struct intrsource *is)
|
|||
(*pic->pic_ops->pic_block_irqs)(pic, irq & ~0x1f, __BIT(irq & 0x1f));
|
||||
pic->pic_sources[irq] = NULL;
|
||||
pic__iplsources[pic_ipl_offset[is->is_ipl] + is->is_iplidx] = NULL;
|
||||
if (is->is_xname != NULL) {
|
||||
kmem_free(is->is_xname, INTRDEVNAMEBUF);
|
||||
is->is_xname = NULL;
|
||||
}
|
||||
/*
|
||||
* Now detach the per-cpu evcnts.
|
||||
*/
|
||||
|
@ -854,6 +866,13 @@ pic_disestablish_source(struct intrsource *is)
|
|||
|
||||
void *
|
||||
intr_establish(int irq, int ipl, int type, int (*func)(void *), void *arg)
|
||||
{
|
||||
return intr_establish_xname(irq, ipl, type, func, arg, NULL);
|
||||
}
|
||||
|
||||
void *
|
||||
intr_establish_xname(int irq, int ipl, int type, int (*func)(void *), void *arg,
|
||||
const char *xname)
|
||||
{
|
||||
KASSERT(!cpu_intr_p());
|
||||
KASSERT(!cpu_softintr_p());
|
||||
|
@ -865,7 +884,7 @@ intr_establish(int irq, int ipl, int type, int (*func)(void *), void *arg)
|
|||
if (pic->pic_irqbase <= irq
|
||||
&& irq < pic->pic_irqbase + pic->pic_maxsources) {
|
||||
return pic_establish_intr(pic, irq - pic->pic_irqbase,
|
||||
ipl, type, func, arg);
|
||||
ipl, type, func, arg, xname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1000,7 +1019,15 @@ interrupt_get_available(kcpuset_t *cpuset)
|
|||
void
|
||||
interrupt_get_devname(const char *intrid, char *buf, size_t len)
|
||||
{
|
||||
buf[0] = '\0';
|
||||
struct intrsource *is;
|
||||
|
||||
mutex_enter(&cpu_lock);
|
||||
is = intr_get_source(intrid);
|
||||
if (is == NULL || is->is_xname == NULL)
|
||||
buf[0] = '\0';
|
||||
else
|
||||
strlcpy(buf, is->is_xname, len);
|
||||
mutex_exit(&cpu_lock);
|
||||
}
|
||||
|
||||
struct interrupt_get_count_arg {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: picvar.h,v 1.21 2018/11/09 23:34:20 jmcneill Exp $ */
|
||||
/* $NetBSD: picvar.h,v 1.22 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -75,7 +75,7 @@ uint32_t pic_mark_pending_sources(struct pic_softc *pic, size_t irq_base,
|
|||
uint32_t pending);
|
||||
#endif /* __HAVE_PIC_PENDING_INTRS */
|
||||
void *pic_establish_intr(struct pic_softc *pic, int irq, int ipl, int type,
|
||||
int (*func)(void *), void *arg);
|
||||
int (*func)(void *), void *arg, const char *);
|
||||
int pic_alloc_irq(struct pic_softc *pic);
|
||||
void pic_disestablish_source(struct intrsource *is);
|
||||
#ifdef MULTIPROCESSOR
|
||||
|
@ -87,6 +87,8 @@ void pic_dispatch(struct intrsource *is, void *frame);
|
|||
|
||||
void *intr_establish(int irq, int ipl, int type, int (*func)(void *),
|
||||
void *arg);
|
||||
void *intr_establish_xname(int irq, int ipl, int type, int (*func)(void *),
|
||||
void *arg, const char *xname);
|
||||
void intr_disestablish(void *);
|
||||
const char *intr_string(intr_handle_t, char *, size_t);
|
||||
#ifdef MULTIPROCESSOR
|
||||
|
@ -121,6 +123,7 @@ struct intrsource {
|
|||
uint8_t is_iplidx;
|
||||
bool is_mpsafe;
|
||||
char is_source[16];
|
||||
char *is_xname;
|
||||
};
|
||||
|
||||
struct pic_percpu {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: s3c2800_pci.c,v 1.24 2018/11/08 06:49:09 skrll Exp $ */
|
||||
/* $NetBSD: s3c2800_pci.c,v 1.25 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Fujitsu Component Limited
|
||||
|
@ -100,7 +100,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: s3c2800_pci.c,v 1.24 2018/11/08 06:49:09 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: s3c2800_pci.c,v 1.25 2018/11/16 15:06:22 jmcneill Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
#include "pci.h"
|
||||
|
@ -152,7 +152,7 @@ int s3c2800_pci_intr_map(const struct pci_attach_args *,
|
|||
const char *s3c2800_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *s3c2800_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *s3c2800_pci_intr_establish(void *, pci_intr_handle_t, int,
|
||||
int (*) (void *), void *);
|
||||
int (*) (void *), void *, const char *);
|
||||
void s3c2800_pci_intr_disestablish(void *, void *);
|
||||
|
||||
#define PCI_CONF_LOCK(s) (s) = disable_interrupts(I32_bit)
|
||||
|
@ -515,7 +515,7 @@ s3c2800_pci_conf_write(void *v, pcitag_t tag, int offset, pcireg_t val)
|
|||
|
||||
void *
|
||||
s3c2800_pci_intr_establish(void *pcv, pci_intr_handle_t ih, int level,
|
||||
int (*func) (void *), void *arg)
|
||||
int (*func) (void *), void *arg, const char *xname)
|
||||
{
|
||||
struct sspci_softc *sc = pcv;
|
||||
struct sspci_irq_handler *handler;
|
||||
|
@ -523,7 +523,7 @@ s3c2800_pci_intr_establish(void *pcv, pci_intr_handle_t ih, int level,
|
|||
|
||||
#ifdef PCI_DEBUG
|
||||
printf("s3c2800_pci_intr_establish(pcv=%p, ih=0x%lx, level=%d, "
|
||||
"func=%p, arg=%p)\n", pcv, ih, level, func, arg);
|
||||
"func=%p, arg=%p, xname=%s)\n", pcv, ih, level, func, arg, xname);
|
||||
#endif
|
||||
|
||||
handler = malloc(sizeof *handler, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: becc_pci.c,v 1.18 2015/10/02 05:22:50 msaitoh Exp $ */
|
||||
/* $NetBSD: becc_pci.c,v 1.19 2018/11/16 15:06:22 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: becc_pci.c,v 1.18 2015/10/02 05:22:50 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: becc_pci.c,v 1.19 2018/11/16 15:06:22 jmcneill Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
#include "pci.h"
|
||||
|
@ -80,7 +80,7 @@ const char *becc_pci_intr_string(void *, pci_intr_handle_t,
|
|||
char *, size_t);
|
||||
const struct evcnt *becc_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *becc_pci_intr_establish(void *, pci_intr_handle_t,
|
||||
int, int (*)(void *), void *);
|
||||
int, int (*)(void *), void *, const char *);
|
||||
void becc_pci_intr_disestablish(void *, void *);
|
||||
|
||||
#define PCI_CONF_LOCK(s) (s) = disable_interrupts(I32_bit)
|
||||
|
@ -394,7 +394,7 @@ becc_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
|
||||
void *
|
||||
becc_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
|
||||
int (*func)(void *), void *arg)
|
||||
int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
|
||||
return (becc_intr_establish(ih, ipl, func, arg));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cp3100_pci.c,v 1.4 2014/03/29 19:28:27 christos Exp $ */
|
||||
/* $NetBSD: cp3100_pci.c,v 1.5 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2006 Wasabi Systems, Inc.
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cp3100_pci.c,v 1.4 2014/03/29 19:28:27 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cp3100_pci.c,v 1.5 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,7 +63,7 @@ int iq80321_pci_intr_map(const struct pci_attach_args *,
|
|||
const char *iq80321_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *iq80321_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *iq80321_pci_intr_establish(void *, pci_intr_handle_t,
|
||||
int, int (*func)(void *), void *);
|
||||
int, int (*func)(void *), void *, const char *);
|
||||
void iq80321_pci_intr_disestablish(void *, void *);
|
||||
|
||||
void
|
||||
|
@ -148,7 +148,7 @@ iq80321_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
|
||||
void *
|
||||
iq80321_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
|
||||
int (*func)(void *), void *arg)
|
||||
int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
|
||||
return (i80321_intr_establish(ih, ipl, func, arg));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hdlg_pci.c,v 1.4 2014/03/29 19:28:27 christos Exp $ */
|
||||
/* $NetBSD: hdlg_pci.c,v 1.5 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdlg_pci.c,v 1.4 2014/03/29 19:28:27 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdlg_pci.c,v 1.5 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -58,7 +58,7 @@ int hdlg_pci_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
|
|||
const char *hdlg_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *hdlg_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *hdlg_pci_intr_establish(void *, pci_intr_handle_t,
|
||||
int, int (*func)(void *), void *);
|
||||
int, int (*func)(void *), void *, const char *);
|
||||
void hdlg_pci_intr_disestablish(void *, void *);
|
||||
|
||||
void
|
||||
|
@ -156,7 +156,7 @@ hdlg_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
|
||||
void *
|
||||
hdlg_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
|
||||
int (*func)(void *), void *arg)
|
||||
int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
|
||||
return i80321_intr_establish(ih, ipl, func, arg);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ifpga_pci.c,v 1.23 2018/11/08 06:49:09 skrll Exp $ */
|
||||
/* $NetBSD: ifpga_pci.c,v 1.24 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 ARM Ltd
|
||||
|
@ -64,7 +64,7 @@
|
|||
#define _ARM32_BUS_DMA_PRIVATE
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.23 2018/11/08 06:49:09 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ifpga_pci.c,v 1.24 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -98,7 +98,7 @@ int ifpga_pci_intr_map (const struct pci_attach_args *,
|
|||
const char *ifpga_pci_intr_string (void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *ifpga_pci_intr_evcnt (void *, pci_intr_handle_t);
|
||||
void *ifpga_pci_intr_establish (void *, pci_intr_handle_t, int,
|
||||
int (*)(void *), void *);
|
||||
int (*)(void *), void *, const char *);
|
||||
void ifpga_pci_intr_disestablish (void *, void *);
|
||||
|
||||
struct arm32_pci_chipset ifpga_pci_chipset = {
|
||||
|
@ -355,13 +355,13 @@ ifpga_pci_intr_evcnt(void *pcv, pci_intr_handle_t ih)
|
|||
|
||||
void *
|
||||
ifpga_pci_intr_establish(void *pcv, pci_intr_handle_t ih, int level,
|
||||
int (*func) (void *), void *arg)
|
||||
int (*func) (void *), void *arg, const char *xname)
|
||||
{
|
||||
void *intr;
|
||||
|
||||
#ifdef PCI_DEBUG
|
||||
printf("ifpga_pci_intr_establish(pcv=%p, ih=0x%" PRIu64 ", level=%d, "
|
||||
"func=%p, arg=%p)\n", pcv, ih, level, func, arg);
|
||||
"func=%p, arg=%p, xname=%s)\n", pcv, ih, level, func, arg, xname);
|
||||
#endif
|
||||
|
||||
intr = ifpga_intr_establish(ih, level, func, arg);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: iq80310_pci.c,v 1.14 2018/10/23 08:38:18 jmcneill Exp $ */
|
||||
/* $NetBSD: iq80310_pci.c,v 1.15 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80310_pci.c,v 1.14 2018/10/23 08:38:18 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80310_pci.c,v 1.15 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,7 +63,7 @@ int iq80310_pci_intr_map(const struct pci_attach_args *,
|
|||
const char *iq80310_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *iq80310_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *iq80310_pci_intr_establish(void *, pci_intr_handle_t,
|
||||
int, int (*func)(void *), void *);
|
||||
int, int (*func)(void *), void *, const char *);
|
||||
void iq80310_pci_intr_disestablish(void *, void *);
|
||||
|
||||
void
|
||||
|
@ -246,7 +246,7 @@ iq80310_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
|
||||
void *
|
||||
iq80310_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
|
||||
int (*func)(void *), void *arg)
|
||||
int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
|
||||
return (iq80310_intr_establish(ih, ipl, func, arg));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: iq80321_pci.c,v 1.9 2014/03/29 19:28:27 christos Exp $ */
|
||||
/* $NetBSD: iq80321_pci.c,v 1.10 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80321_pci.c,v 1.9 2014/03/29 19:28:27 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80321_pci.c,v 1.10 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -65,7 +65,7 @@ int iq80321_pci_intr_map(const struct pci_attach_args *,
|
|||
const char *iq80321_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *iq80321_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *iq80321_pci_intr_establish(void *, pci_intr_handle_t,
|
||||
int, int (*func)(void *), void *);
|
||||
int, int (*func)(void *), void *, const char *);
|
||||
void iq80321_pci_intr_disestablish(void *, void *);
|
||||
|
||||
void
|
||||
|
@ -157,7 +157,7 @@ iq80321_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
|
||||
void *
|
||||
iq80321_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
|
||||
int (*func)(void *), void *arg)
|
||||
int (*func)(void *), void *arg, const char *xname)
|
||||
{
|
||||
|
||||
return (i80321_intr_establish(ih, ipl, func, arg));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ixm1200_pci.c,v 1.12 2018/10/23 08:38:18 jmcneill Exp $ */
|
||||
/* $NetBSD: ixm1200_pci.c,v 1.13 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
#define PCI_DEBUG
|
||||
/*
|
||||
* Copyright (c) 2002, 2003
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixm1200_pci.c,v 1.12 2018/10/23 08:38:18 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixm1200_pci.c,v 1.13 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
/*
|
||||
* IXM1200 PCI interrupt support.
|
||||
|
@ -56,7 +56,7 @@ int ixm1200_pci_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
|
|||
const char *ixm1200_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *ixm1200_pci_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *ixm1200_pci_intr_establish(void *, pci_intr_handle_t, int,
|
||||
int (*func)(void *), void *);
|
||||
int (*func)(void *), void *, const char *);
|
||||
void ixm1200_pci_intr_disestablish(void *, void *);
|
||||
|
||||
void
|
||||
|
@ -103,11 +103,12 @@ ixm1200_pci_intr_evcnt(void *v, pci_intr_handle_t ih)
|
|||
}
|
||||
|
||||
void *
|
||||
ixm1200_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg)
|
||||
ixm1200_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl, int (*func)(void *),
|
||||
void *arg, const char *xname)
|
||||
{
|
||||
#ifdef PCI_DEBUG
|
||||
printf("ixm1200_pci_intr_establish(v=%p, irq=%d, ipl=%d, func=%p, arg=%p)\n",
|
||||
v, (int) ih, ipl, func, arg);
|
||||
printf("ixm1200_pci_intr_establish(v=%p, irq=%d, ipl=%d, func=%p, arg=%p, xname=%s)\n",
|
||||
v, (int) ih, ipl, func, arg, xname);
|
||||
#endif
|
||||
|
||||
return (ixp12x0_intr_establish(ih, ipl, func, arg));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_mvgbe.c,v 1.51 2018/09/03 16:29:31 riastradh Exp $ */
|
||||
/* $NetBSD: if_mvgbe.c,v 1.52 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2007, 2008, 2013 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
|
@ -25,7 +25,7 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.51 2018/09/03 16:29:31 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_mvgbe.c,v 1.52 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -2053,7 +2053,7 @@ mvgbe_rxeof(struct mvgbe_softc *sc)
|
|||
if (mvgbe_newbuf(sc, cur, NULL, dmamap) == ENOBUFS) {
|
||||
struct mbuf *m0;
|
||||
|
||||
m0 = m_devget(mtod(m, char *), total_len, 0, ifp, NULL);
|
||||
m0 = m_devget(mtod(m, char *), total_len, 0, ifp);
|
||||
mvgbe_newbuf(sc, cur, m, dmamap);
|
||||
if (m0 == NULL) {
|
||||
aprint_error_ifnet(ifp,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mvpex.c,v 1.16 2015/11/27 00:08:43 nonaka Exp $ */
|
||||
/* $NetBSD: mvpex.c,v 1.17 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.16 2015/11/27 00:08:43 nonaka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mvpex.c,v 1.17 2018/11/16 15:06:23 jmcneill Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
#include "pci.h"
|
||||
|
@ -659,7 +659,7 @@ mvpex_intr_evcnt(void *v, pci_intr_handle_t pin)
|
|||
/* ARGSUSED */
|
||||
void *
|
||||
mvpex_intr_establish(void *v, pci_intr_handle_t pin, int ipl,
|
||||
int (*intrhand)(void *), void *intrarg)
|
||||
int (*intrhand)(void *), void *intrarg, const char *xname)
|
||||
{
|
||||
struct mvpex_softc *sc = (struct mvpex_softc *)v;
|
||||
struct mvpex_intrtab *intrtab;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mvpexvar.h,v 1.6 2015/06/24 10:00:37 knakahara Exp $ */
|
||||
/* $NetBSD: mvpexvar.h,v 1.7 2018/11/16 15:06:23 jmcneill Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2009 KIYOHARA Takashi
|
||||
* All rights reserved.
|
||||
|
@ -74,7 +74,7 @@ int mvpex_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
|
|||
const char *mvpex_intr_string(void *, pci_intr_handle_t, char *, size_t);
|
||||
const struct evcnt *mvpex_intr_evcnt(void *, pci_intr_handle_t);
|
||||
void *mvpex_intr_establish(void *, pci_intr_handle_t, int, int (*)(void *),
|
||||
void *);
|
||||
void *, const char *);
|
||||
void mvpex_intr_disestablish(void *, void *);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue