OSDN Git Service

arm: Skip DMA zeroing completely only if specified
authorTaniya Das <tdas@codeaurora.org>
Thu, 12 Jun 2014 14:12:06 +0000 (19:42 +0530)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:14:09 +0000 (11:14 -0700)
commitb0dc751515fcc7b9267b7e688a2d931f37923609
treea6b2612fe98fb2c2550d22d0b6373d6ed225e21f
parent0bf6f5ab1502115fcc3353ad1892c1c0cf148dd9
arm: Skip DMA zeroing completely only if specified

With the dma attribute 'SKIP_ZEROING', dma allocation skips memset and
also cache flush operations. This leaves dirty lines in the caches which
when evicted later would cause issue to the allocated buffer. For some
clients this may be okay but other clients need to do the actual sync.
Switch the code to only skip __dma_clear_buffer if both
DMA_ATTR_SKIP_ZEROING and DMA_ATTR_SKIP_CPU_SYNC are specified. If only
DMA_ATTR_SKIP_ZEROING is specified, just skip the zeroing but still do the
cache operations.

Change-Id: I81dd6bbeed7ec7f1dce28cd8d0aba7c8900ec550
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
arch/arm/mm/dma-mapping.c