ARM64: dma_debug: add debug_dma_mapping_error support
authorShuah Khan <shuah.khan@hp.com>
Fri, 23 Nov 2012 21:31:09 +0000 (14:31 -0700)
committerJoerg Roedel <joro@8bytes.org>
Wed, 28 Nov 2012 14:28:57 +0000 (15:28 +0100)
Add dma-debug interface debug_dma_mapping_error() to debug drivers that fail
to check dma mapping errors on addresses returned by dma_map_single() and
dma_map_page() interfaces.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
arch/arm64/include/asm/dma-mapping.h

index 538f4b44db5d40b14b00e8b5384b189c313da0dd..99477689419849822602f0b152650d88dd18f241 100644 (file)
@@ -50,6 +50,7 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dev_addr)
 {
        struct dma_map_ops *ops = get_dma_ops(dev);
+       debug_dma_mapping_error(dev, dev_addr);
        return ops->mapping_error(dev, dev_addr);
 }