]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Aug 2017 10:51:18 +0000 (12:51 +0200)
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 23fde576d2f8702912a101b7593c4b11d61226d8..e3ed0e146f48d3b1c8e4ce40f91c98ea7cfd2c34 100644 (file)
@@ -20,6 +20,7 @@ enum dma_attr {
        DMA_ATTR_FORCE_CONTIGUOUS,
        DMA_ATTR_NO_WARN,
        DMA_ATTR_STRONGLY_ORDERED,
+       DMA_ATTR_SKIP_ZEROING,
        DMA_ATTR_MAX,
 };