diff options
Diffstat (limited to 'arch/powerpc/kernel/dma.c')
-rw-r--r-- | arch/powerpc/kernel/dma.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index ccf129d47d84..21b784d7e7d0 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/dma-debug.h> | ||
10 | #include <linux/lmb.h> | 11 | #include <linux/lmb.h> |
11 | #include <asm/bug.h> | 12 | #include <asm/bug.h> |
12 | #include <asm/abs_addr.h> | 13 | #include <asm/abs_addr.h> |
@@ -140,7 +141,7 @@ static inline void dma_direct_sync_single_range(struct device *dev, | |||
140 | } | 141 | } |
141 | #endif | 142 | #endif |
142 | 143 | ||
143 | struct dma_mapping_ops dma_direct_ops = { | 144 | struct dma_map_ops dma_direct_ops = { |
144 | .alloc_coherent = dma_direct_alloc_coherent, | 145 | .alloc_coherent = dma_direct_alloc_coherent, |
145 | .free_coherent = dma_direct_free_coherent, | 146 | .free_coherent = dma_direct_free_coherent, |
146 | .map_sg = dma_direct_map_sg, | 147 | .map_sg = dma_direct_map_sg, |
@@ -156,3 +157,13 @@ struct dma_mapping_ops dma_direct_ops = { | |||
156 | #endif | 157 | #endif |
157 | }; | 158 | }; |
158 | EXPORT_SYMBOL(dma_direct_ops); | 159 | EXPORT_SYMBOL(dma_direct_ops); |
160 | |||
161 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) | ||
162 | |||
163 | static int __init dma_init(void) | ||
164 | { | ||
165 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | ||
166 | |||
167 | return 0; | ||
168 | } | ||
169 | fs_initcall(dma_init); | ||