diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-08-09 22:53:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-10 03:35:00 -0400 |
commit | 451d7400a34cb679369e337d67f0238ed410f484 (patch) | |
tree | 75dc26e88fa60609503ccb6426b3cdbd441615d5 /arch/sparc/include | |
parent | ee664a9252d24ef10317d1bba8fc8f4c6495b36c (diff) |
sparc: Add CONFIG_DMA_API_DEBUG support
All we need to do for CONFIG_DMA_API_DEBUG support is call
dma_debug_init() in DMA code common for SPARC32 and SPARC64.
Now SPARC32 uses two dma_map_ops structures for pci and sbus so
there is not much dma stuff for SPARC32 in kernel/dma.c.
kernel/ioport.c also includes dma stuff for SPARC32. So let's
put all the dma stuff for SPARC32 in kernel/ioport.c and make
kernel/dma.c common for SPARC32 and SPARC64.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Robert Reif <reif@earthlink.net>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
LKML-Reference: <1249872797-1314-9-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/dma-mapping.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 2677818dc781..5a8c308e2b5c 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h | |||
@@ -32,8 +32,11 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size, | |||
32 | dma_addr_t *dma_handle, gfp_t flag) | 32 | dma_addr_t *dma_handle, gfp_t flag) |
33 | { | 33 | { |
34 | struct dma_map_ops *ops = get_dma_ops(dev); | 34 | struct dma_map_ops *ops = get_dma_ops(dev); |
35 | void *cpu_addr; | ||
35 | 36 | ||
36 | return ops->alloc_coherent(dev, size, dma_handle, flag); | 37 | cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag); |
38 | debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); | ||
39 | return cpu_addr; | ||
37 | } | 40 | } |
38 | 41 | ||
39 | static inline void dma_free_coherent(struct device *dev, size_t size, | 42 | static inline void dma_free_coherent(struct device *dev, size_t size, |
@@ -41,6 +44,7 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
41 | { | 44 | { |
42 | struct dma_map_ops *ops = get_dma_ops(dev); | 45 | struct dma_map_ops *ops = get_dma_ops(dev); |
43 | 46 | ||
47 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); | ||
44 | ops->free_coherent(dev, size, cpu_addr, dma_handle); | 48 | ops->free_coherent(dev, size, cpu_addr, dma_handle); |
45 | } | 49 | } |
46 | 50 | ||