summaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-14 10:22:15 +0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-14 10:22:15 +0400
commit7b41f5688c1e03c41c772cd1766d6d80189380dd (patch)
tree976cddb7fbfa5161f9e88bf83c34f4ac0f8ec209 /arch/sh
parent0ee50254dfe0c96f9eef4fc9fdf47a18d6a12df3 (diff)
downloadlinux-7b41f5688c1e03c41c772cd1766d6d80189380dd.tar.xz
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')
-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 @@
* for more details.
*/
#include <linux/mm.h>
+#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/dma-debug.h>
+#include <linux/io.h>
#include <asm/cacheflush.h>
#include <asm/addrspace.h>
-#include <asm/io.h>
+
+#define PREALLOC_DMA_DEBUG_ENTRIES 4096
+
+static int __init dma_init(void)
+{
+ dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
+ return 0;
+}
+fs_initcall(dma_init);
void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp)