]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 13 Apr 2018 14:00:13 +0000 (16:00 +0200)
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>
[ luis: adjuste context after commit a9a62c938441 ("dma-mapping: introduce
  the DMA_ATTR_NO_WARN attribute") has been applied to master ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Documentation/DMA-attributes.txt
include/linux/dma-attrs.h

index 7cfc2dcf5b4b973ae9d35d67734b5b7be9f34022..d3e6fa0a710d15f7d4c901f9c7040e3456cfa94b 100644 (file)
@@ -117,3 +117,12 @@ So, this provides a way for drivers to avoid those error messages on calls
 where allocation failures are not a problem, and shouldn't bother the logs.
 
 NOTE: At the moment DMA_ATTR_NO_WARN is only implemented on PowerPC.
+
+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 6ed6570961a01f4f5b86dcf27f5276a0f3f80d37..23fde576d2f8702912a101b7593c4b11d61226d8 100644 (file)
@@ -19,6 +19,7 @@ enum dma_attr {
        DMA_ATTR_SKIP_CPU_SYNC,
        DMA_ATTR_FORCE_CONTIGUOUS,
        DMA_ATTR_NO_WARN,
+       DMA_ATTR_STRONGLY_ORDERED,
        DMA_ATTR_MAX,
 };