some question about __dma_alloc in arch/arm/mm/dma-mapping.c

vichy vichy.kuo at gmail.com
Sat Jul 4 08:06:17 PDT 2015


hi all:
in __dma_alloc of arch/arm/mm/dma-mapping.c, if the size of allocation
is PAGE_SIZE

if (is_coherent || nommu())
                addr = __alloc_simple_buffer(dev, size, gfp, &page);
        else if (!(gfp & __GFP_WAIT))
                addr = __alloc_from_pool(size, &page);
        else if (size == PAGE_SIZE || !CMA_DEFAULT_REGION)
                addr = __alloc_remap_buffer(dev, size, gfp, prot,
&page, caller);
        else
                addr = __alloc_from_contiguous(dev, size, prot, &page, caller);



More information about the linux-arm-kernel mailing list