]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm: Add option to skip buffer zeroing
authorLaura Abbott <lauraa@codeaurora.org>
Wed, 6 Aug 2014 02:39:38 +0000 (19:39 -0700)
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 11 Jan 2016 09:54:39 +0000 (09:54 +0000)
The DMA framework currently zeros all buffers because it (righfully so)
assumes that drivers will soon need to pass the memory to a device.
Some devices/use case may not require zeroed memory and there can
be an increase in performance if we skip the zeroing. Add a DMA_ATTR
to allow skipping of DMA zeroing.

Note: only the header file was modified to add the enum to allow the code to
compile, however the arm32 implementation was not pulled, and the arm64
implementation is missing as well

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
include/linux/dma-attrs.h

index 29bd0a909bc895820b8d5223e1d05f1f9600056f..eb1b9d727f3984bf5356fa26be5995ad4f86e760 100644 (file)
@@ -19,6 +19,7 @@ enum dma_attr {
        DMA_ATTR_SKIP_CPU_SYNC,
        DMA_ATTR_FORCE_CONTIGUOUS,
        DMA_ATTR_STRONGLY_ORDERED,
+       DMA_ATTR_SKIP_ZEROING,
        DMA_ATTR_MAX,
 };