provide pci_intr_establish_xname() on x86 independantly from MSI,
so it's available on XEN too; change also the stub to use weak symbol instead #ifdef
This commit is contained in:
parent
a04d8edaee
commit
081e12698b
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: pci_intr_machdep.c,v 1.42 2018/01/04 01:01:59 knakahara Exp $ */
|
/* $NetBSD: pci_intr_machdep.c,v 1.43 2018/06/24 11:51:15 jdolecek Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
|
* Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.42 2018/01/04 01:01:59 knakahara Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.43 2018/06/24 11:51:15 jdolecek Exp $");
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -348,7 +348,6 @@ pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih,
|
||||||
return pci_intr_establish_xname_internal(pc, ih, level, func, arg, "unknown");
|
return pci_intr_establish_xname_internal(pc, ih, level, func, arg, "unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __HAVE_PCI_MSI_MSIX
|
|
||||||
void *
|
void *
|
||||||
pci_intr_establish_xname(pci_chipset_tag_t pc, pci_intr_handle_t ih,
|
pci_intr_establish_xname(pci_chipset_tag_t pc, pci_intr_handle_t ih,
|
||||||
int level, int (*func)(void *), void *arg, const char *xname)
|
int level, int (*func)(void *), void *arg, const char *xname)
|
||||||
|
@ -356,7 +355,6 @@ pci_intr_establish_xname(pci_chipset_tag_t pc, pci_intr_handle_t ih,
|
||||||
|
|
||||||
return pci_intr_establish_xname_internal(pc, ih, level, func, arg, xname);
|
return pci_intr_establish_xname_internal(pc, ih, level, func, arg, xname);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: pci_stub.c,v 1.7 2017/06/01 02:45:11 chs Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: pci_stub.c,v 1.8 2018/06/24 11:51:15 jdolecek Exp $");
|
||||||
|
|
||||||
#ifdef _KERNEL_OPT
|
#ifdef _KERNEL_OPT
|
||||||
#include "opt_pci.h"
|
#include "opt_pci.h"
|
||||||
|
@ -17,10 +17,14 @@ int default_pci_bus_devorder(pci_chipset_tag_t, int, uint8_t *, int);
|
||||||
int default_pci_chipset_tag_create(pci_chipset_tag_t, uint64_t,
|
int default_pci_chipset_tag_create(pci_chipset_tag_t, uint64_t,
|
||||||
const struct pci_overrides *, void *, pci_chipset_tag_t *);
|
const struct pci_overrides *, void *, pci_chipset_tag_t *);
|
||||||
void default_pci_chipset_tag_destroy(pci_chipset_tag_t);
|
void default_pci_chipset_tag_destroy(pci_chipset_tag_t);
|
||||||
|
void *default_pci_intr_establish_xname(pci_chipset_tag_t, pci_intr_handle_t,
|
||||||
|
int, int (*)(void *), void *, const char *);
|
||||||
|
|
||||||
__strict_weak_alias(pci_bus_devorder, default_pci_bus_devorder);
|
__strict_weak_alias(pci_bus_devorder, default_pci_bus_devorder);
|
||||||
__strict_weak_alias(pci_chipset_tag_create, default_pci_chipset_tag_create);
|
__strict_weak_alias(pci_chipset_tag_create, default_pci_chipset_tag_create);
|
||||||
__strict_weak_alias(pci_chipset_tag_destroy, default_pci_chipset_tag_destroy);
|
__strict_weak_alias(pci_chipset_tag_destroy, default_pci_chipset_tag_destroy);
|
||||||
|
__strict_weak_alias(pci_intr_establish_xname,
|
||||||
|
default_pci_intr_establish_xname);
|
||||||
|
|
||||||
int
|
int
|
||||||
default_pci_bus_devorder(pci_chipset_tag_t pc, int bus, uint8_t *devs,
|
default_pci_bus_devorder(pci_chipset_tag_t pc, int bus, uint8_t *devs,
|
||||||
|
@ -47,6 +51,14 @@ default_pci_chipset_tag_create(pci_chipset_tag_t opc, const uint64_t present,
|
||||||
return EOPNOTSUPP;
|
return EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
default_pci_intr_establish_xname(pci_chipset_tag_t pc, pci_intr_handle_t ih,
|
||||||
|
int level, int (*func)(void *), void *arg, const char *__nouse)
|
||||||
|
{
|
||||||
|
|
||||||
|
return pci_intr_establish(pc, ih, level, func, arg);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __HAVE_PCI_MSI_MSIX
|
#ifndef __HAVE_PCI_MSI_MSIX
|
||||||
pci_intr_type_t
|
pci_intr_type_t
|
||||||
pci_intr_type(pci_chipset_tag_t pc, pci_intr_handle_t ih)
|
pci_intr_type(pci_chipset_tag_t pc, pci_intr_handle_t ih)
|
||||||
|
@ -73,14 +85,6 @@ pci_intr_release(pci_chipset_tag_t pc, pci_intr_handle_t *pih, int count)
|
||||||
kmem_free(pih, sizeof(*pih));
|
kmem_free(pih, sizeof(*pih));
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
|
||||||
pci_intr_establish_xname(pci_chipset_tag_t pc, pci_intr_handle_t ih, int level,
|
|
||||||
int (*func)(void *), void *arg, const char *__nouse)
|
|
||||||
{
|
|
||||||
|
|
||||||
return pci_intr_establish(pc, ih, level, func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pci_intx_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihp)
|
pci_intx_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue