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

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


hi all:
in __dma_alloc of arch/arm/mm/dma-mapping.c, if the size of allocation
is PAGE_SIZE, we will use __alloc_remap_buffer instead of
__alloc_from_contiguous like below excerpted from __dma_alloc.

Is any special reason for PAGE_SIZE allocation NOT getting from continuous pool?
Appreciate your kind help in advance,

         ..............
         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