aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-06-17 19:28:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:58 -0400
commit9916219579d078c80377dd3988c2cc213536d868 (patch)
treef92bf45865ffc734d97c9f5ec1b4b3af2206bf37 /arch/ia64
parentd6d0a6aee252f004b06f27f74e401198f9c9ffb8 (diff)
dma-mapping: ia64: add CONFIG_DMA_API_DEBUG support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Joerg Roedel <joerg.roedel@amd.com> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: "Luck, Tony" <tony.luck@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc; "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/ia64/include/asm/dma-mapping.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 294a3b13ecac..170042b420d4 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -28,6 +28,7 @@ config IA64
28 select HAVE_DMA_ATTRS 28 select HAVE_DMA_ATTRS
29 select HAVE_KVM 29 select HAVE_KVM
30 select HAVE_ARCH_TRACEHOOK 30 select HAVE_ARCH_TRACEHOOK
31 select HAVE_DMA_API_DEBUG
31 default y 32 default y
32 help 33 help
33 The Itanium Processor Family is Intel's 64-bit successor to 34 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 2475c91adc98..5a61b5c2e18f 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -8,6 +8,7 @@
8#include <asm/machvec.h> 8#include <asm/machvec.h>
9#include <linux/scatterlist.h> 9#include <linux/scatterlist.h>
10#include <asm/swiotlb.h> 10#include <asm/swiotlb.h>
11#include <linux/dma-debug.h>
11 12
12#define ARCH_HAS_DMA_GET_REQUIRED_MASK 13#define ARCH_HAS_DMA_GET_REQUIRED_MASK
13 14
@@ -24,13 +25,18 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
24 dma_addr_t *daddr, gfp_t gfp) 25 dma_addr_t *daddr, gfp_t gfp)
25{ 26{
26 struct dma_map_ops *ops = platform_dma_get_ops(dev); 27 struct dma_map_ops *ops = platform_dma_get_ops(dev);
27 return ops->alloc_coherent(dev, size, daddr, gfp); 28 void *caddr;
29
30 caddr = ops->alloc_coherent(dev, size, daddr, gfp);
31 debug_dma_alloc_coherent(dev, size, *daddr, caddr);
32 return caddr;
28} 33}
29 34
30static inline void dma_free_coherent(struct device *dev, size_t size, 35static inline void dma_free_coherent(struct device *dev, size_t size,
31 void *caddr, dma_addr_t daddr) 36 void *caddr, dma_addr_t daddr)
32{ 37{
33 struct dma_map_ops *ops = platform_dma_get_ops(dev); 38 struct dma_map_ops *ops = platform_dma_get_ops(dev);
39 debug_dma_free_coherent(dev, size, caddr, daddr);
34 ops->free_coherent(dev, size, caddr, daddr); 40 ops->free_coherent(dev, size, caddr, daddr);
35} 41}
36 42