diff options
Diffstat (limited to 'arch/x86/xen/pci-swiotlb-xen.c')
-rw-r--r-- | arch/x86/xen/pci-swiotlb-xen.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/xen/pci-swiotlb-xen.c b/arch/x86/xen/pci-swiotlb-xen.c index a013ec9d0c54..b480d4207a4c 100644 --- a/arch/x86/xen/pci-swiotlb-xen.c +++ b/arch/x86/xen/pci-swiotlb-xen.c | |||
@@ -1,10 +1,12 @@ | |||
1 | /* Glue code to lib/swiotlb-xen.c */ | 1 | /* Glue code to lib/swiotlb-xen.c */ |
2 | 2 | ||
3 | #include <linux/dma-mapping.h> | 3 | #include <linux/dma-mapping.h> |
4 | #include <linux/pci.h> | ||
4 | #include <xen/swiotlb-xen.h> | 5 | #include <xen/swiotlb-xen.h> |
5 | 6 | ||
6 | #include <asm/xen/hypervisor.h> | 7 | #include <asm/xen/hypervisor.h> |
7 | #include <xen/xen.h> | 8 | #include <xen/xen.h> |
9 | #include <asm/iommu_table.h> | ||
8 | 10 | ||
9 | int xen_swiotlb __read_mostly; | 11 | int xen_swiotlb __read_mostly; |
10 | 12 | ||
@@ -34,7 +36,7 @@ int __init pci_xen_swiotlb_detect(void) | |||
34 | 36 | ||
35 | /* If running as PV guest, either iommu=soft, or swiotlb=force will | 37 | /* If running as PV guest, either iommu=soft, or swiotlb=force will |
36 | * activate this IOMMU. If running as PV privileged, activate it | 38 | * activate this IOMMU. If running as PV privileged, activate it |
37 | * irregardlesss. | 39 | * irregardless. |
38 | */ | 40 | */ |
39 | if ((xen_initial_domain() || swiotlb || swiotlb_force) && | 41 | if ((xen_initial_domain() || swiotlb || swiotlb_force) && |
40 | (xen_pv_domain())) | 42 | (xen_pv_domain())) |
@@ -54,5 +56,12 @@ void __init pci_xen_swiotlb_init(void) | |||
54 | if (xen_swiotlb) { | 56 | if (xen_swiotlb) { |
55 | xen_swiotlb_init(1); | 57 | xen_swiotlb_init(1); |
56 | dma_ops = &xen_swiotlb_dma_ops; | 58 | dma_ops = &xen_swiotlb_dma_ops; |
59 | |||
60 | /* Make sure ACS will be enabled */ | ||
61 | pci_request_acs(); | ||
57 | } | 62 | } |
58 | } | 63 | } |
64 | IOMMU_INIT_FINISH(pci_xen_swiotlb_detect, | ||
65 | 0, | ||
66 | pci_xen_swiotlb_init, | ||
67 | 0); | ||