Skip to content

Commit

Permalink
ARM: DMA-Mapping: print warning when atomic coherent allocation fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Szyprowski committed Aug 28, 2012
1 parent 6e5267a commit fb71285
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,10 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page)
bitmap_set(pool->bitmap, pageno, count);
ptr = pool->vaddr + PAGE_SIZE * pageno;
*ret_page = pool->page + pageno;
} else {
pr_err_once("ERROR: %u KiB atomic DMA coherent pool is too small!\n"
"Please increase it with coherent_pool= kernel parameter!\n",
(unsigned)pool->size / 1024);
}
spin_unlock_irqrestore(&pool->lock, flags);

Expand Down

0 comments on commit fb71285

Please sign in to comment.