summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-08-04 23:08:27 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-28 08:24:11 +0400
commit4a9a6bfe707cfe5bcb0a20eabe240293a095cd10 (patch)
tree6a0fed231234d6b38afe7f03bf82048569da16aa /arch/powerpc/include/asm/dma-mapping.h
parent46bab4e4b45ec522ecd5fa4a0e2b4a6e6d1f153a (diff)
downloadlinux-4a9a6bfe707cfe5bcb0a20eabe240293a095cd10.tar.xz
powerpc: Handle SWIOTLB mapping error properly
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/dma-mapping.h')
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 91217e4a0bfc..4bd41b4051e3 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -143,6 +143,11 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
+ struct dma_map_ops *dma_ops = get_dma_ops(dev);
+
+ if (dma_ops->mapping_error)
+ return dma_ops->mapping_error(dev, dma_addr);
+
#ifdef CONFIG_PPC64
return (dma_addr == DMA_ERROR_CODE);
#else