aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pci-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/pci-dma.c')
-rw-r--r--arch/x86/kernel/pci-dma.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 37a558a96153..6b77fd872a7a 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -1,4 +1,8 @@
1#include <linux/dma-mapping.h> 1#include <linux/dma-mapping.h>
2#include <linux/dmar.h>
3
4#include <asm/gart.h>
5#include <asm/calgary.h>
2 6
3const struct dma_mapping_ops *dma_ops; 7const struct dma_mapping_ops *dma_ops;
4EXPORT_SYMBOL(dma_ops); 8EXPORT_SYMBOL(dma_ops);
@@ -22,4 +26,25 @@ int dma_set_mask(struct device *dev, u64 mask)
22} 26}
23EXPORT_SYMBOL(dma_set_mask); 27EXPORT_SYMBOL(dma_set_mask);
24 28
29static int __init pci_iommu_init(void)
30{
31#ifdef CONFIG_CALGARY_IOMMU
32 calgary_iommu_init();
33#endif
34
35 intel_iommu_init();
36
37#ifdef CONFIG_GART_IOMMU
38 gart_iommu_init();
39#endif
25 40
41 no_iommu_init();
42 return 0;
43}
44
45void pci_iommu_shutdown(void)
46{
47 gart_iommu_shutdown();
48}
49/* Must execute after PCI subsystem */
50fs_initcall(pci_iommu_init);