Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into next
[firefly-linux-kernel-4.4.55.git] / arch / arm / mm / dma-mapping.c
index 5bef858568e61b4b95c798110b484e5e318136b1..4c88935654caf5f28d4b05d82be57234822cd41b 100644 (file)
@@ -885,7 +885,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
 static void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
        size_t size, enum dma_data_direction dir)
 {
-       unsigned long paddr;
+       phys_addr_t paddr;
 
        dma_cache_maint_page(page, off, size, dir, dmac_map_area);
 
@@ -901,14 +901,15 @@ static void __dma_page_cpu_to_dev(struct page *page, unsigned long off,
 static void __dma_page_dev_to_cpu(struct page *page, unsigned long off,
        size_t size, enum dma_data_direction dir)
 {
-       unsigned long paddr = page_to_phys(page) + off;
+       phys_addr_t paddr = page_to_phys(page) + off;
 
        /* FIXME: non-speculating: not required */
-       /* don't bother invalidating if DMA to device */
-       if (dir != DMA_TO_DEVICE)
+       /* in any case, don't bother invalidating if DMA to device */
+       if (dir != DMA_TO_DEVICE) {
                outer_inv_range(paddr, paddr + size);
 
-       dma_cache_maint_page(page, off, size, dir, dmac_unmap_area);
+               dma_cache_maint_page(page, off, size, dir, dmac_unmap_area);
+       }
 
        /*
         * Mark the D-cache clean for these pages to avoid extra flushing.