aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/consistent.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-14 02:22:15 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-14 02:22:15 -0400
commit7b41f5688c1e03c41c772cd1766d6d80189380dd (patch)
tree976cddb7fbfa5161f9e88bf83c34f4ac0f8ec209 /arch/sh/mm/consistent.c
parent0ee50254dfe0c96f9eef4fc9fdf47a18d6a12df3 (diff)
sh: Pre-allocate a reasonable number of DMA debug entries.
This prevents the DMA API debugging from running out of entries right away on boot. Defines 4096 entries by default, which while a bit on the heavy side, ought to leave enough breathing room for some time. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/consistent.c')
-rw-r--r--arch/sh/mm/consistent.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 8c9ee855328a..e098ec158ddb 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -10,12 +10,22 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/init.h>
13#include <linux/platform_device.h> 14#include <linux/platform_device.h>
14#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
15#include <linux/dma-debug.h> 16#include <linux/dma-debug.h>
17#include <linux/io.h>
16#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
17#include <asm/addrspace.h> 19#include <asm/addrspace.h>
18#include <asm/io.h> 20
21#define PREALLOC_DMA_DEBUG_ENTRIES 4096
22
23static int __init dma_init(void)
24{
25 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
26 return 0;
27}
28fs_initcall(dma_init);
19 29
20void *dma_alloc_coherent(struct device *dev, size_t size, 30void *dma_alloc_coherent(struct device *dev, size_t size,
21 dma_addr_t *dma_handle, gfp_t gfp) 31 dma_addr_t *dma_handle, gfp_t gfp)