diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-01-23 00:42:11 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-05-14 13:50:26 +0100 |
commit | 4f29c057aa81c5440f06b716f768ba9f8a041fe9 (patch) | |
tree | 152ebccf4c65945e0c28bb391e5dcbfc69b1863b /arch/mips/mm/dma-default.c | |
parent | 47740eb887796608fb4c629aa6b8507a2fb6c0eb (diff) | |
download | blackbird-obmc-linux-4f29c057aa81c5440f06b716f768ba9f8a041fe9.tar.gz blackbird-obmc-linux-4f29c057aa81c5440f06b716f768ba9f8a041fe9.zip |
MIPS: Synchronize dma_map_page and dma_map_single
Synchronize dma_map_page/dma_unmap_page and dma_map_single/dma_unmap_single.
This will reduce unnecessary writebacks and invalidates.
[Ralf: make dma_unmap_page an inline function.]
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/dma-default.c')
-rw-r--r-- | arch/mips/mm/dma-default.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index bed56f1ac837..4fdb7f5216b9 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c @@ -209,7 +209,7 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long addr; addr = (unsigned long) page_address(page) + offset; - dma_cache_wback_inv(addr, size); + __dma_sync(addr, size, direction); } return plat_map_dma_mem_page(dev, page) + offset; @@ -217,23 +217,6 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page, EXPORT_SYMBOL(dma_map_page); -void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, - enum dma_data_direction direction) -{ - BUG_ON(direction == DMA_NONE); - - if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) { - unsigned long addr; - - addr = dma_addr_to_virt(dma_address); - dma_cache_wback_inv(addr, size); - } - - plat_unmap_dma_mem(dev, dma_address); -} - -EXPORT_SYMBOL(dma_unmap_page); - void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, enum dma_data_direction direction) { |