Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
[pandora-kernel.git] / arch / arm / mm / dma-mapping.c
index 4bc43e5..e4dd064 100644 (file)
@@ -523,6 +523,12 @@ void ___dma_page_dev_to_cpu(struct page *page, unsigned long off,
                outer_inv_range(paddr, paddr + size);
 
        dma_cache_maint_page(page, off, size, dir, dmac_unmap_area);
+
+       /*
+        * Mark the D-cache clean for this page to avoid extra flushing.
+        */
+       if (dir != DMA_TO_DEVICE && off == 0 && size >= PAGE_SIZE)
+               set_bit(PG_dcache_clean, &page->flags);
 }
 EXPORT_SYMBOL(___dma_page_dev_to_cpu);