aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/dmar.c5
-rw-r--r--drivers/pci/pci.c13
-rw-r--r--drivers/pci/probe.c5
3 files changed, 18 insertions, 5 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index e01ca4d6b3e..0e98f6b6f51 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -614,8 +614,11 @@ void __init detect_intel_iommu(void)
#endif
#ifdef CONFIG_DMAR
if (ret && !no_iommu && !iommu_detected && !swiotlb &&
- !dmar_disabled)
+ !dmar_disabled) {
iommu_detected = 1;
+ /* Make sure ACS will be enabled */
+ pci_request_acs();
+ }
#endif
}
early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6af212c509c..cd9b375f49d 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1550,6 +1550,16 @@ void pci_enable_ari(struct pci_dev *dev)
bridge->ari_enabled = 1;
}
+static int pci_acs_enable;
+
+/**
+ * pci_request_acs - ask for ACS to be enabled if supported
+ */
+void pci_request_acs(void)
+{
+ pci_acs_enable = 1;
+}
+
/**
* pci_enable_acs - enable ACS if hardware support it
* @dev: the PCI device
@@ -1560,6 +1570,9 @@ void pci_enable_acs(struct pci_dev *dev)
u16 cap;
u16 ctrl;
+ if (!pci_acs_enable)
+ return;
+
if (!pci_is_pcie(dev))
return;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2fdffc02a30..98ffb2de22e 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -10,9 +10,7 @@
#include <linux/module.h>
#include <linux/cpumask.h>
#include <linux/pci-aspm.h>
-#include <linux/iommu.h>
#include <acpi/acpi_hest.h>
-#include <xen/xen.h>
#include "pci.h"
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
@@ -1029,8 +1027,7 @@ static void pci_init_capabilities(struct pci_dev *dev)
pci_iov_init(dev);
/* Enable ACS P2P upstream forwarding */
- if (iommu_found() || xen_initial_domain())
- pci_enable_acs(dev);
+ pci_enable_acs(dev);
}
void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)