aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2012-08-22 08:50:42 -0400
committerMarek Szyprowski <m.szyprowski@samsung.com>2012-08-28 15:01:03 -0400
commitfb71285f0c1633a85544784aae7577502274b77a (patch)
treefeac1389aef43f8cd58606fd9c546cbe38443406 /arch/arm/mm
parent6e5267aa543817015edb4a65c66e15f9809f92bd (diff)
ARM: DMA-Mapping: print warning when atomic coherent allocation fails
Print a loud warning when system runs out of memory from atomic DMA coherent pool to let users notice the potential problem. Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/dma-mapping.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index d1cc9c1d3566..acced9332109 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -461,6 +461,10 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page)
461 bitmap_set(pool->bitmap, pageno, count); 461 bitmap_set(pool->bitmap, pageno, count);
462 ptr = pool->vaddr + PAGE_SIZE * pageno; 462 ptr = pool->vaddr + PAGE_SIZE * pageno;
463 *ret_page = pool->page + pageno; 463 *ret_page = pool->page + pageno;
464 } else {
465 pr_err_once("ERROR: %u KiB atomic DMA coherent pool is too small!\n"
466 "Please increase it with coherent_pool= kernel parameter!\n",
467 (unsigned)pool->size / 1024);
464 } 468 }
465 spin_unlock_irqrestore(&pool->lock, flags); 469 spin_unlock_irqrestore(&pool->lock, flags);
466 470