From: Paul Mundt Date: Tue, 14 Apr 2009 06:22:15 +0000 (+0900) Subject: sh: Pre-allocate a reasonable number of DMA debug entries. X-Git-Tag: v2.6.30-rc2~7^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7b41f5688c1e03c41c772cd1766d6d80189380dd;p=~shefty%2Frdma-dev.git 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 --- diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 8c9ee855328..e098ec158dd 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c @@ -10,12 +10,22 @@ * for more details. */ #include +#include #include #include #include +#include #include #include -#include + +#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)