]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
common: DMA-mapping: add DMA_ATTR_ALLOC_EXACT_SIZE attribute
authorVandana Salve <vsalve@nvidia.com>
Fri, 22 Nov 2013 09:26:32 +0000 (14:56 +0530)
committerKrishna Reddy <vdumpa@nvidia.com>
Tue, 26 Nov 2013 19:18:07 +0000 (11:18 -0800)
Add DMA_ATTR_ALLOC_EXACT_SIZE attribute to DMA-mapping subsystem

By default dma_alloc/free_coherent allocates/release memory
in order of 2^pages. By specifying this attribute, allocation/release
can be done for exact size of memory thereby reducing internal memory
fragmentation

bug 1380639

Change-Id: I49eb6a0caeb85aa84ff75fab6a4cf3c6a6d96abb
Signed-off-by: Vandana Salve <vsalve@nvidia.com>
Reviewed-on: http://git-master/r/334416
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
include/linux/dma-attrs.h

index 75a6c18480b47b7230b10c7384beceea636b8303..81fb999bdfadd4e01922833a4726fe3f4d4c33f1 100644 (file)
@@ -22,6 +22,7 @@ enum dma_attr {
        DMA_ATTR_READ_ONLY,
        DMA_ATTR_WRITE_ONLY,
        DMA_ATTR_SKIP_IOVA_GAP,
+       DMA_ATTR_ALLOC_EXACT_SIZE,
        DMA_ATTR_MAX,
 };