aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2009-12-04 15:15:21 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-12-04 19:19:24 -0500
commit5d990b627537e59a3a2f039ff588a4750e9c1a6a (patch)
tree8c0e723c3f9146da52b30c087a80fc417df2b41b /drivers/pci/probe.c
parentb26a34aa4792b3db2500b8a98cb7702765c1a92e (diff)
PCI: add pci_request_acs
Commit ae21ee65e8bc228416bbcc8a1da01c56a847a60c "PCI: acs p2p upsteram forwarding enabling" doesn't actually enable ACS. Add a function to pci core to allow an IOMMU to request that ACS be enabled. The existing mechanism of using iommu_found() in the pci core to know when ACS should be enabled doesn't actually work due to initialization order; iommu has only been detected not initialized. Have Intel and AMD IOMMUs request ACS, and Xen does as well during early init of dom0. Cc: Allen Kay <allen.m.kay@intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2fdffc02a308..98ffb2de22e9 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -10,9 +10,7 @@
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/cpumask.h> 11#include <linux/cpumask.h>
12#include <linux/pci-aspm.h> 12#include <linux/pci-aspm.h>
13#include <linux/iommu.h>
14#include <acpi/acpi_hest.h> 13#include <acpi/acpi_hest.h>
15#include <xen/xen.h>
16#include "pci.h" 14#include "pci.h"
17 15
18#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ 16#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
@@ -1029,8 +1027,7 @@ static void pci_init_capabilities(struct pci_dev *dev)
1029 pci_iov_init(dev); 1027 pci_iov_init(dev);
1030 1028
1031 /* Enable ACS P2P upstream forwarding */ 1029 /* Enable ACS P2P upstream forwarding */
1032 if (iommu_found() || xen_initial_domain()) 1030 pci_enable_acs(dev);
1033 pci_enable_acs(dev);
1034} 1031}
1035 1032
1036void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) 1033void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)