Merge tag 'dma-mapping-5.3' of git://git.infradead.org/users/hch/dma-mapping
[linux-2.6-block.git] / arch / arm / mm / dma-mapping-nommu.c
index 1aea01ba12628463a0942a26d9cc740d9f0db081..52b82559d99b3d608b4347a4060b7e686311d72a 100644 (file)
@@ -35,18 +35,7 @@ static void *arm_nommu_dma_alloc(struct device *dev, size_t size,
                                 unsigned long attrs)
 
 {
-       void *ret;
-
-       /*
-        * Try generic allocator first if we are advertised that
-        * consistency is not required.
-        */
-
-       if (attrs & DMA_ATTR_NON_CONSISTENT)
-               return dma_direct_alloc_pages(dev, size, dma_handle, gfp,
-                               attrs);
-
-       ret = dma_alloc_from_global_coherent(size, dma_handle);
+       void *ret = dma_alloc_from_global_coherent(size, dma_handle);
 
        /*
         * dma_alloc_from_global_coherent() may fail because:
@@ -66,16 +55,9 @@ static void arm_nommu_dma_free(struct device *dev, size_t size,
                               void *cpu_addr, dma_addr_t dma_addr,
                               unsigned long attrs)
 {
-       if (attrs & DMA_ATTR_NON_CONSISTENT) {
-               dma_direct_free_pages(dev, size, cpu_addr, dma_addr, attrs);
-       } else {
-               int ret = dma_release_from_global_coherent(get_order(size),
-                                                          cpu_addr);
-
-               WARN_ON_ONCE(ret == 0);
-       }
+       int ret = dma_release_from_global_coherent(get_order(size), cpu_addr);
 
-       return;
+       WARN_ON_ONCE(ret == 0);
 }
 
 static int arm_nommu_dma_mmap(struct device *dev, struct vm_area_struct *vma,