On Fri, 10 Jun 2011 14:52:17 +0200, Alan Cox alan@lxorguk.ukuu.org.uk wrote:
I plan to replace it with lib/bitmap.c bitmap_* based allocator (similar like it it is used by dma_declare_coherent_memory() and friends in drivers/base/dma-coherent.c). We need something really simple for CMA area management.
IMHO allocate_resource and friends a bit too heavy here, but good to know that such allocator also exists.
Not sure I'd class allocate_resource as heavyweight but providing it's using something that already exists rather than inventing yet another allocator.
genalloc is already in the kernel and is used in a few places, so we either let everyone use it as they see fit or we deprecate the library. If we don't deprecate it I see no reason why CMA should not use it.