Source-Changes-HG archive

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

[src/trunk]: src/sys provide pci_intr_establish_xname() on x86 independantly ...



details:   https://anonhg.NetBSD.org/src/rev/b79407a6648b
branches:  trunk
changeset: 833412:b79407a6648b
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Jun 24 11:51:15 2018 +0000

description:
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

diffstat:

 sys/arch/x86/pci/pci_intr_machdep.c |   6 ++----
 sys/dev/pci/pci_stub.c              |  22 +++++++++++++---------
 2 files changed, 15 insertions(+), 13 deletions(-)

diffs (89 lines):

diff -r 49c6cece0422 -r b79407a6648b sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c       Sun Jun 24 09:38:45 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c       Sun Jun 24 11:51:15 2018 +0000
@@ -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 @@
        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 @@
 
        return pci_intr_establish_xname_internal(pc, ih, level, func, arg, xname);
 }
-#endif
 
 
 void
diff -r 49c6cece0422 -r b79407a6648b sys/dev/pci/pci_stub.c
--- a/sys/dev/pci/pci_stub.c    Sun Jun 24 09:38:45 2018 +0000
+++ b/sys/dev/pci/pci_stub.c    Sun Jun 24 11:51:15 2018 +0000
@@ -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_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 @@
        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 @@
        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)
 {



Home | Main Index | Thread Index | Old Index