Module Name: src
Committed By: jdolecek
Date: Sun Jun 24 11:51:15 UTC 2018
Modified Files:
src/sys/arch/x86/pci: pci_intr_machdep.c
src/sys/dev/pci: pci_stub.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/pci/pci_intr_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/pci_stub.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/arch/x86/pci/pci_intr_machdep.c
diff -u src/sys/arch/x86/pci/pci_intr_machdep.c:1.42 src/sys/arch/x86/pci/pci_intr_machdep.c:1.43
--- src/sys/arch/x86/pci/pci_intr_machdep.c:1.42 Thu Jan 4 01:01:59 2018
+++ src/sys/arch/x86/pci/pci_intr_machdep.c Sun Jun 24 11:51:15 2018
@@ -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.
@@ -73,7 +73,7 @@
*/
#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/param.h>
@@ -348,7 +348,6 @@ pci_intr_establish(pci_chipset_tag_t pc,
return pci_intr_establish_xname_internal(pc, ih, level, func, arg, "unknown");
}
-#ifdef __HAVE_PCI_MSI_MSIX
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)
@@ -356,7 +355,6 @@ pci_intr_establish_xname(pci_chipset_tag
return pci_intr_establish_xname_internal(pc, ih, level, func, arg, xname);
}
-#endif
void
Index: src/sys/dev/pci/pci_stub.c
diff -u src/sys/dev/pci/pci_stub.c:1.7 src/sys/dev/pci/pci_stub.c:1.8
--- src/sys/dev/pci/pci_stub.c:1.7 Thu Jun 1 02:45:11 2017
+++ src/sys/dev/pci/pci_stub.c Sun Jun 24 11:51:15 2018
@@ -1,5 +1,5 @@
#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
#include "opt_pci.h"
@@ -17,10 +17,14 @@ int default_pci_bus_devorder(pci_chipset
int default_pci_chipset_tag_create(pci_chipset_tag_t, uint64_t,
const struct pci_overrides *, void *, 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_chipset_tag_create, default_pci_chipset_tag_create);
__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
default_pci_bus_devorder(pci_chipset_tag_t pc, int bus, uint8_t *devs,
@@ -47,6 +51,14 @@ default_pci_chipset_tag_create(pci_chips
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
pci_intr_type_t
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, p
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
pci_intx_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihp)
{