]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
x86: Set dma_ops to nommu_dma_ops by default
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Sat, 14 Nov 2009 11:46:36 +0000 (20:46 +0900)
committerIngo Molnar <mingo@elte.hu>
Sun, 15 Nov 2009 08:03:09 +0000 (09:03 +0100)
We set dma_ops to nommu_dma_ops at two different places for
x86_32 and x86_64. This unifies them by setting dma_ops to
nommu_dma_ops by default.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
LKML-Reference: <1258199198-16657-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-swiotlb.c

index 0b11bf18f540bf1970cbd43031da3229e7228c6b..f170b5364b41257250ec4801212a26f06a374d52 100644 (file)
@@ -15,7 +15,7 @@
 
 static int forbid_dac __read_mostly;
 
-struct dma_map_ops *dma_ops;
+struct dma_map_ops *dma_ops = &nommu_dma_ops;
 EXPORT_SYMBOL(dma_ops);
 
 static int iommu_sac_force __read_mostly;
@@ -128,8 +128,6 @@ void __init pci_iommu_alloc(void)
 #ifdef CONFIG_X86_64
        /* free the range so iommu could get some range less than 4G */
        dma32_free_bootmem();
-#else
-       dma_ops = &nommu_dma_ops;
 #endif
        if (pci_swiotlb_init())
                return;
index a6e5d0ffa3a7638c5b5187446d1e15e544c870c1..e36e71daa44c644abbc29f69aa1b2c02dda13a66 100644 (file)
@@ -61,8 +61,7 @@ int __init pci_swiotlb_init(void)
        if (swiotlb) {
                swiotlb_init(0);
                dma_ops = &swiotlb_dma_ops;
-       } else
-               dma_ops = &nommu_dma_ops;
+       }
 
        return swiotlb_force;
 }