diff options
author | Chris Wright <chrisw@sous-sol.org> | 2009-12-04 15:15:21 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-12-04 19:19:24 -0500 |
commit | 5d990b627537e59a3a2f039ff588a4750e9c1a6a (patch) | |
tree | 8c0e723c3f9146da52b30c087a80fc417df2b41b /arch/x86 | |
parent | b26a34aa4792b3db2500b8a98cb7702765c1a92e (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 'arch/x86')
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index b4b61d462dcc..e60530a5f524 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -1330,6 +1330,8 @@ void __init amd_iommu_detect(void) | |||
1330 | gart_iommu_aperture_disabled = 1; | 1330 | gart_iommu_aperture_disabled = 1; |
1331 | gart_iommu_aperture = 0; | 1331 | gart_iommu_aperture = 0; |
1332 | #endif | 1332 | #endif |
1333 | /* Make sure ACS will be enabled */ | ||
1334 | pci_request_acs(); | ||
1333 | } | 1335 | } |
1334 | } | 1336 | } |
1335 | 1337 | ||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 5bccd706232c..e2511bccbc8d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/page-flags.h> | 27 | #include <linux/page-flags.h> |
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/console.h> | 29 | #include <linux/console.h> |
30 | #include <linux/pci.h> | ||
30 | 31 | ||
31 | #include <xen/xen.h> | 32 | #include <xen/xen.h> |
32 | #include <xen/interface/xen.h> | 33 | #include <xen/interface/xen.h> |
@@ -1170,7 +1171,11 @@ asmlinkage void __init xen_start_kernel(void) | |||
1170 | add_preferred_console("xenboot", 0, NULL); | 1171 | add_preferred_console("xenboot", 0, NULL); |
1171 | add_preferred_console("tty", 0, NULL); | 1172 | add_preferred_console("tty", 0, NULL); |
1172 | add_preferred_console("hvc", 0, NULL); | 1173 | add_preferred_console("hvc", 0, NULL); |
1174 | } else { | ||
1175 | /* Make sure ACS will be enabled */ | ||
1176 | pci_request_acs(); | ||
1173 | } | 1177 | } |
1178 | |||
1174 | 1179 | ||
1175 | xen_raw_console_write("about to get started...\n"); | 1180 | xen_raw_console_write("about to get started...\n"); |
1176 | 1181 | ||