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/include | |
parent | 47740eb887796608fb4c629aa6b8507a2fb6c0eb (diff) | |
download | linux-4f29c057aa81c5440f06b716f768ba9f8a041fe9.tar.bz2 |
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/include')
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index c64afb40cd06..d16afddb09a9 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -24,8 +24,13 @@ extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction); extern dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction direction); -extern void dma_unmap_page(struct device *dev, dma_addr_t dma_address, - size_t size, enum dma_data_direction direction); + +static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, + size_t size, enum dma_data_direction direction) +{ + dma_unmap_single(dev, dma_address, size, direction); +} + extern void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, enum dma_data_direction direction); extern void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, |