summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pci-dma.c
diff options
context:
space:
mode:
authorGlauber Costa2008-04-08 18:20:51 +0200
committerIngo Molnar2008-04-19 19:19:57 +0200
commitcb5867a5d8ca20e16ddc3397c36ee9c2e4cba219 (patch)
treeab6e1e7bc608574b9f8d7266a7f86321a53d4235 /arch/x86/kernel/pci-dma.c
parentx86: unify pci-nommu (diff)
downloadkernel-qcow2-linux-cb5867a5d8ca20e16ddc3397c36ee9c2e4cba219.tar.gz
kernel-qcow2-linux-cb5867a5d8ca20e16ddc3397c36ee9c2e4cba219.tar.xz
kernel-qcow2-linux-cb5867a5d8ca20e16ddc3397c36ee9c2e4cba219.zip
x86: move initialization functions to pci-dma.c
initcalls that triggers the various possibiities for dma subsys are moved to pci-dma.c. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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 @@
#include <linux/dma-mapping.h>
+#include <linux/dmar.h>
+
+#include <asm/gart.h>
+#include <asm/calgary.h>
const struct dma_mapping_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
@@ -22,4 +26,25 @@ int dma_set_mask(struct device *dev, u64 mask)
}
EXPORT_SYMBOL(dma_set_mask);
+static int __init pci_iommu_init(void)
+{
+#ifdef CONFIG_CALGARY_IOMMU
+ calgary_iommu_init();
+#endif
+
+ intel_iommu_init();
+
+#ifdef CONFIG_GART_IOMMU
+ gart_iommu_init();
+#endif
+ no_iommu_init();
+ return 0;
+}
+
+void pci_iommu_shutdown(void)
+{
+ gart_iommu_shutdown();
+}
+/* Must execute after PCI subsystem */
+fs_initcall(pci_iommu_init);