aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorYang Zhong <yang.zhong@intel.com>2019-01-23 14:56:03 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2019-03-07 21:45:53 +0100
commite9947d18df97e6c6584f020cf9cc995404cc8061 (patch)
tree5ea2ee400391117103533849bd1b06615c552be6 /hw
parent8f01b41e1098d8cb9491fa3ea7bd59cf187a5bd7 (diff)
hw/pci/Makefile.objs: make pcie configurable
Make pcie splited from pci and make it configurable. Signed-off-by: Yang Zhong <yang.zhong@intel.com> Cc: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190123065618.3520-30-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci/Kconfig4
-rw-r--r--hw/pci/Makefile.objs9
2 files changed, 11 insertions, 2 deletions
diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
index d3d2205577..4ca2537980 100644
--- a/hw/pci/Kconfig
+++ b/hw/pci/Kconfig
@@ -1,2 +1,6 @@
config PCI
bool
+
+config PCI_EXPRESS
+ bool
+ select PCI
diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
index 9f905e6344..c78f2fb24b 100644
--- a/hw/pci/Makefile.objs
+++ b/hw/pci/Makefile.objs
@@ -2,8 +2,13 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
common-obj-$(CONFIG_PCI) += msix.o msi.o
common-obj-$(CONFIG_PCI) += shpc.o
common-obj-$(CONFIG_PCI) += slotid_cap.o
-common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
-common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
+common-obj-$(CONFIG_PCI) += pci_host.o
+
+# The functions in these modules can be used by devices too. Since we
+# allow plugging PCIe devices into PCI buses, include them even if
+# CONFIG_PCI_EXPRESS=n.
+common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o
+common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
common-obj-$(CONFIG_ALL) += pci-stub.o