summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-07-10 10:05:01 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-07-28 14:19:20 +0900
commit8d4f5339d1ee4027c07e6b2a1cfa9dc41b0d383b (patch)
treeaeb86783e2c32a77b7dfe64cd0936e704338b2da /arch/x86/include/asm/dma-mapping.h
parent8f2502fd8157632909ff335a3c628e7caeec5e03 (diff)
downloadblackbird-obmc-linux-8d4f5339d1ee4027c07e6b2a1cfa9dc41b0d383b.tar.gz
blackbird-obmc-linux-8d4f5339d1ee4027c07e6b2a1cfa9dc41b0d383b.zip
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/x86/include/asm/dma-mapping.h')
-rw-r--r--arch/x86/include/asm/dma-mapping.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index adac59c8f69b..0ee770d23d0e 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -63,6 +63,16 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
return addr + size <= *dev->dma_mask;
}
+static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
+{
+ return paddr;
+}
+
+static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
+{
+ return daddr;
+}
+
static inline void
dma_cache_sync(struct device *dev, void *vaddr, size_t size,
enum dma_data_direction dir)
OpenPOWER on IntegriCloud