]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
common: DMA-mapping: Add strongly ordered memory attribute
authorLaura Abbott <lauraa@codeaurora.org>
Mon, 29 Oct 2012 20:08:03 +0000 (13:08 -0700)
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 11 Jan 2016 09:54:39 +0000 (09:54 +0000)
Strongly ordered memory is occasionally needed for some DMA
allocations for specialized use cases. Add the corresponding
DMA attribute.

Change-Id: Idd9e756c242ef57d6fa6700e51cc38d0863b760d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Documentation/DMA-attributes.txt
include/linux/dma-attrs.h

index 18dc52c4f2a0b13a42d9867c36c94f4774bf58e2..9ac45c33c5688e59c6ddb35def1b8cde85727f54 100644 (file)
@@ -100,3 +100,12 @@ allocated by dma_alloc_attrs() function from individual pages if it can
 be mapped as contiguous chunk into device dma address space. By
 specifying this attribute the allocated buffer is forced to be contiguous
 also in physical memory.
+
+DMA_ATTR_STRONGLY_ORDERED
+-------------------------
+
+DMA_ATTR_STRONGLY_ORDERED allocates memory with a very restrictive type
+of mapping (no unaligned accesses, no re-ordering, no write merging, no
+buffering, no pre-fetching). This has severe performance penalties and
+should not be used for general purpose DMA allocations. It should only
+be used if one of the restrictions on strongly ordered memory is required.
index c8e1831d757232c7364ebb909cb77a6442bb4a8a..29bd0a909bc895820b8d5223e1d05f1f9600056f 100644 (file)
@@ -18,6 +18,7 @@ enum dma_attr {
        DMA_ATTR_NO_KERNEL_MAPPING,
        DMA_ATTR_SKIP_CPU_SYNC,
        DMA_ATTR_FORCE_CONTIGUOUS,
+       DMA_ATTR_STRONGLY_ORDERED,
        DMA_ATTR_MAX,
 };