x86: move definition to pci-dma.c
authorGlauber Costa <gcosta@redhat.com>
Tue, 8 Apr 2008 16:20:50 +0000 (13:20 -0300)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:19:57 +0000 (19:19 +0200)
Move dma_ops structure definition to pci-dma.c, where it
belongs.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/pci-base_32.c
arch/x86/kernel/pci-dma.c
arch/x86/mm/init_64.c

index 837bbe91043e57b3c9b6b76bba75fb6abc8d3d6c..b44ea517fcf0417b977115f9a5b9d4dc92304e79 100644 (file)
@@ -37,7 +37,7 @@ static int pci32_map_error(dma_addr_t dma_addr)
        return 0;
 }
 
-static const struct dma_mapping_ops pci32_dma_ops = {
+const struct dma_mapping_ops pci32_dma_ops = {
        .map_single = pci32_map_single,
        .unmap_single = NULL,
        .map_sg = pci32_dma_map_sg,
@@ -51,5 +51,10 @@ static const struct dma_mapping_ops pci32_dma_ops = {
        .mapping_error = pci32_map_error,
 };
 
-const struct dma_mapping_ops *dma_ops = &pci32_dma_ops;
-EXPORT_SYMBOL(dma_ops);
+/* this is temporary */
+int __init no_iommu_init(void)
+{
+       dma_ops = &pci32_dma_ops;
+       return 0;
+}
+fs_initcall(no_iommu_init);
index f1c24d8e79421486199cea8c54de0a92f5e1307c..1323cd80387b8951ad53fa62c657d0849b9e4120 100644 (file)
@@ -1,5 +1,8 @@
 #include <linux/dma-mapping.h>
 
+const struct dma_mapping_ops *dma_ops;
+EXPORT_SYMBOL(dma_ops);
+
 int dma_set_mask(struct device *dev, u64 mask)
 {
        if (!dev->dma_mask || !dma_supported(dev, mask))
index 1076097dcab22115f5de1e9b22afc1baf2129ab6..1ff7906a9a4dbc7afa6dfdd24f274e077cd26773 100644 (file)
@@ -47,9 +47,6 @@
 #include <asm/numa.h>
 #include <asm/cacheflush.h>
 
-const struct dma_mapping_ops *dma_ops;
-EXPORT_SYMBOL(dma_ops);
-
 static unsigned long dma_reserve __initdata;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);