cma: Remove potential deadlock situation
authorLaura Abbott <lauraa@codeaurora.org>
Tue, 25 Feb 2014 19:01:19 +0000 (11:01 -0800)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 10:14:21 +0000 (12:14 +0200)
CMA locking is currently very coarse. The cma_mutex protects both
the bitmap and avoids concurrency with alloc_contig_range. There
are several situations which may result in a deadlock on the CMA
mutex currently, mostly involving AB/BA situations with alloc and
free. Fix this issue by protecting the bitmap with a mutex per CMA
region and use the existing mutex for protecting against concurrency
with alloc_contig_range.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/base/dma-contiguous.c

Simple merge