aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dma-attrs.h
diff options
context:
space:
mode:
authorDoug Anderson <armlinux@m.disordat.com>2016-01-29 23:07:26 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2016-02-11 15:33:38 +0000
commitdf05c6f6e0bb41380b31ef99b49796ac43a2a2df (patch)
tree4b3b9d25a9c8fa850ddc7c9fca63abf10de0dbd7 /include/linux/dma-attrs.h
parentARM: 8505/1: dma-mapping: Optimize allocation (diff)
downloadlinux-dev-df05c6f6e0bb41380b31ef99b49796ac43a2a2df.tar.xz
linux-dev-df05c6f6e0bb41380b31ef99b49796ac43a2a2df.zip
ARM: 8506/1: common: DMA-mapping: add DMA_ATTR_ALLOC_SINGLE_PAGES attribute
This patch adds the DMA_ATTR_ALLOC_SINGLE_PAGES attribute to the DMA-mapping subsystem. This attribute can be used as a hint to the DMA-mapping subsystem that it's likely not worth it to try to allocate large pages behind the scenes. Large pages are likely to make an IOMMU TLB work more efficiently but may not be worth it. See the Documentation contained in this patch for more details about this attribute and when to use it. Note that the name of the hint (DMA_ATTR_ALLOC_SINGLE_PAGES) is loosely based on the name MADV_NOHUGEPAGE. Just as there is MADV_NOHUGEPAGE vs. MADV_HUGEPAGE we could also add an "opposite" attribute to DMA_ATTR_ALLOC_SINGLE_PAGES. Without having the "opposite" attribute the lack of DMA_ATTR_ALLOC_SINGLE_PAGES means "use your best judgement about whether to use small pages or large pages". Signed-off-by: Douglas Anderson <dianders@chromium.org> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/linux/dma-attrs.h')
-rw-r--r--include/linux/dma-attrs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dma-attrs.h b/include/linux/dma-attrs.h
index 99c0be00b47c..5246239a4953 100644
--- a/include/linux/dma-attrs.h
+++ b/include/linux/dma-attrs.h
@@ -18,6 +18,7 @@ enum dma_attr {
DMA_ATTR_NO_KERNEL_MAPPING,
DMA_ATTR_SKIP_CPU_SYNC,
DMA_ATTR_FORCE_CONTIGUOUS,
+ DMA_ATTR_ALLOC_SINGLE_PAGES,
DMA_ATTR_MAX,
};