Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch make
details: https://anonhg.NetBSD.org/src/rev/7faacf509993
branches: trunk
changeset: 995008:7faacf509993
user: cherry <cherry%NetBSD.org@localhost>
date: Sun Dec 02 08:19:44 2018 +0000
description:
make
options NO_PCI_MSI_MSIX
work again for arch/x86/
diffstat:
sys/arch/amd64/amd64/mainbus.c | 12 +++++++++---
sys/arch/i386/i386/mainbus.c | 6 ++++--
sys/arch/x86/pci/pci_intr_machdep.c | 12 +++++++++---
sys/arch/x86/x86/intr.c | 8 +++++---
4 files changed, 27 insertions(+), 11 deletions(-)
diffs (186 lines):
diff -r ddefcb3cf118 -r 7faacf509993 sys/arch/amd64/amd64/mainbus.c
--- a/sys/arch/amd64/amd64/mainbus.c Sun Dec 02 00:40:40 2018 +0000
+++ b/sys/arch/amd64/amd64/mainbus.c Sun Dec 02 08:19:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.38 2017/05/23 08:54:38 nonaka Exp $ */
+/* $NetBSD: mainbus.c,v 1.39 2018/12/02 08:19:44 cherry Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.38 2017/05/23 08:54:38 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.39 2018/12/02 08:19:44 cherry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -74,7 +74,9 @@
#include <arch/x86/pci/pci_addr_fixup.h>
#endif
#endif
+#ifdef __HAVE_PCI_MSI_MSIX
#include <arch/x86/pci/msipic.h>
+#endif /* __HAVE_PCI_MSI_MSIX */
#endif
/*
@@ -179,7 +181,9 @@
#endif
#if NPCI > 0
+#ifdef __HAVE_PCI_MSI_MSIX
msipic_init();
+#endif
/*
* ACPI needs to be able to access PCI configuration space.
@@ -209,9 +213,9 @@
*/
if (acpi_present)
mpacpi_active = mpacpi_scan_apics(self, &numcpus) != 0;
-#endif
if (!mpacpi_active) {
+#endif
#ifdef MPBIOS
if (mpbios_present)
mpbios_scan(self, &numcpus);
@@ -227,7 +231,9 @@
config_found_ia(self, "cpubus", &caa, mainbus_print);
}
+#if NACPICA > 0
}
+#endif
#if NISADMA > 0 && NACPICA > 0
/*
diff -r ddefcb3cf118 -r 7faacf509993 sys/arch/i386/i386/mainbus.c
--- a/sys/arch/i386/i386/mainbus.c Sun Dec 02 00:40:40 2018 +0000
+++ b/sys/arch/i386/i386/mainbus.c Sun Dec 02 08:19:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.103 2017/05/23 08:54:38 nonaka Exp $ */
+/* $NetBSD: mainbus.c,v 1.104 2018/12/02 08:19:44 cherry Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.103 2017/05/23 08:54:38 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.104 2018/12/02 08:19:44 cherry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -86,7 +86,9 @@
#include <arch/x86/pci/pci_addr_fixup.h>
#endif
#endif
+#ifdef __HAVE_PCI_MSI_MSIX
#include <arch/x86/pci/msipic.h>
+#endif /* __HAVE_PCI_MSI_MSIX */
#endif
void mainbus_childdetached(device_t, device_t);
diff -r ddefcb3cf118 -r 7faacf509993 sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c Sun Dec 02 00:40:40 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c Sun Dec 02 08:19:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_intr_machdep.c,v 1.47 2018/11/27 21:03:50 jdolecek Exp $ */
+/* $NetBSD: pci_intr_machdep.c,v 1.48 2018/12/02 08:19:44 cherry 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.47 2018/11/27 21:03:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.48 2018/12/02 08:19:44 cherry Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -102,6 +102,8 @@
#include <machine/mpbiosvar.h>
#include <machine/pic.h>
#include <x86/pci/pci_msi_machdep.h>
+#else
+#include <machine/i82093var.h>
#endif
#ifdef MPBIOS
@@ -232,8 +234,10 @@
buf, len);
}
+#if defined(__HAVE_PCI_MSI_MSIX)
if (INT_VIA_MSI(ih))
return x86_pci_msi_string(pc, ih, buf, len);
+#endif
return intr_string(ih & ~MPSAFE_MASK, buf, len);
}
@@ -319,6 +323,8 @@
pc, ih, level, func, arg);
}
+
+#ifdef __HAVE_PCI_MSI_MSIX
if (INT_VIA_MSI(ih)) {
if (MSI_INT_IS_MSIX(ih))
return x86_pci_msix_establish(pc, ih, level, func, arg,
@@ -327,7 +333,7 @@
return x86_pci_msi_establish(pc, ih, level, func, arg,
xname);
}
-
+#endif
if (pci_intr_find_intx_irq(ih, &irq, &pic, &pin)) {
aprint_normal("%s: bad pic %d\n", __func__,
APIC_IRQ_APIC(ih));
diff -r ddefcb3cf118 -r 7faacf509993 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c Sun Dec 02 00:40:40 2018 +0000
+++ b/sys/arch/x86/x86/intr.c Sun Dec 02 08:19:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.135 2018/10/24 03:51:21 cherry Exp $ */
+/* $NetBSD: intr.c,v 1.136 2018/12/02 08:19:44 cherry Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.135 2018/10/24 03:51:21 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.136 2018/12/02 08:19:44 cherry Exp $");
#include "opt_intrdebug.h"
#include "opt_multiprocessor.h"
@@ -184,7 +184,7 @@
#include <x86/pci/msipic.h>
#include <x86/pci/pci_msi_machdep.h>
-#if NPCI == 0
+#if NPCI == 0 || !defined(__HAVE_PCI_MSI_MSIX)
#define msipic_is_msi_pic(PIC) (false)
#endif
@@ -500,6 +500,7 @@
int ih = 0;
#if NPCI > 0
+#if defined(__HAVE_PCI_MSI_MSIX)
if ((pic->pic_type == PIC_MSI) || (pic->pic_type == PIC_MSIX)) {
uint64_t pih;
int dev, vec;
@@ -516,6 +517,7 @@
return x86_pci_msi_string(NULL, pih, buf, len);
}
+#endif /* __HAVE_PCI_MSI_MSIX */
#endif
#if defined(XEN)
Home |
Main Index |
Thread Index |
Old Index