]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
common: DMA-mapping: add DMA_ATTR_FORCE_CONTIGUOUS attribute
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Oct 2012 14:03:51 +0000 (16:03 +0200)
committerInki Dae <daeinki@gmail.com>
Thu, 29 Nov 2012 11:30:34 +0000 (03:30 -0800)
This patch adds DMA_ATTR_FORCE_CONTIGUOUS attribute to the DMA-mapping
subsystem.

By default DMA-mapping subsystem is allowed to assemble the buffer
allocated by dma_alloc_attrs() function from individual pages if it can
be mapped as contiguous chunk into device dma address space. By
specifing this attribute the allocated buffer is forced to be contiguous
also in physical memory.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Documentation/DMA-attributes.txt
include/linux/dma-attrs.h

index f50309081ac78e0900c3ef5e5646abf998079657..e59480db9ee0acb6be2793a9e48ea4e55d1bf5e3 100644 (file)
@@ -91,3 +91,12 @@ transferred to 'device' domain. This attribute can be also used for
 dma_unmap_{single,page,sg} functions family to force buffer to stay in
 device domain after releasing a mapping for it. Use this attribute with
 care!
+
+DMA_ATTR_FORCE_CONTIGUOUS
+-------------------------
+
+By default DMA-mapping subsystem is allowed to assemble the buffer
+allocated by dma_alloc_attrs() function from individual pages if it can
+be mapped as contiguous chunk into device dma address space. By
+specifing this attribute the allocated buffer is forced to be contiguous
+also in physical memory.
index f83f793223ff7491f59c44b3c3bd6d7440b51084..c8e1831d757232c7364ebb909cb77a6442bb4a8a 100644 (file)
@@ -17,6 +17,7 @@ enum dma_attr {
        DMA_ATTR_NON_CONSISTENT,
        DMA_ATTR_NO_KERNEL_MAPPING,
        DMA_ATTR_SKIP_CPU_SYNC,
+       DMA_ATTR_FORCE_CONTIGUOUS,
        DMA_ATTR_MAX,
 };