diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-07-09 21:05:01 -0400 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-07-28 01:19:20 -0400 |
commit | 8d4f5339d1ee4027c07e6b2a1cfa9dc41b0d383b (patch) | |
tree | aeb86783e2c32a77b7dfe64cd0936e704338b2da /arch/ia64/include/asm/dma-mapping.h | |
parent | 8f2502fd8157632909ff335a3c628e7caeec5e03 (diff) |
x86, IA64, powerpc: add phys_to_dma() and dma_to_phys()
This adds two functions, phys_to_dma() and dma_to_phys() to x86, IA64
and powerpc. swiotlb uses them. phys_to_dma() converts a physical
address to a dma address. dma_to_phys() does the opposite.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
Diffstat (limited to 'arch/ia64/include/asm/dma-mapping.h')
-rw-r--r-- | arch/ia64/include/asm/dma-mapping.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h index 88d0f860394d..f91829de329f 100644 --- a/arch/ia64/include/asm/dma-mapping.h +++ b/arch/ia64/include/asm/dma-mapping.h | |||
@@ -77,6 +77,16 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | |||
77 | return addr + size <= *dev->dma_mask; | 77 | return addr + size <= *dev->dma_mask; |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | ||
81 | { | ||
82 | return paddr; | ||
83 | } | ||
84 | |||
85 | static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | ||
86 | { | ||
87 | return daddr; | ||
88 | } | ||
89 | |||
80 | extern int dma_get_cache_alignment(void); | 90 | extern int dma_get_cache_alignment(void); |
81 | 91 | ||
82 | static inline void | 92 | static inline void |