Skip to content

Commit e21dd66

Browse files
committed
docs: dma-api: document DMA_ATTR_CPU_CACHE_CLEAN
Document DMA_ATTR_CPU_CACHE_CLEAN as implemented in the previous patch. Message-ID: <0720b4be31c1b7a38edca67fd0c97983d2a56936.1767601130.git.mst@redhat.com> Reviewed-by: Petr Tesarik <ptesarik@suse.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 61868dc commit e21dd66

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Documentation/core-api/dma-attributes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,12 @@ DMA_ATTR_MMIO is appropriate.
148148
For architectures that require cache flushing for DMA coherence
149149
DMA_ATTR_MMIO will not perform any cache flushing. The address
150150
provided must never be mapped cacheable into the CPU.
151+
152+
DMA_ATTR_CPU_CACHE_CLEAN
153+
------------------------
154+
155+
This attribute indicates the CPU will not dirty any cacheline overlapping this
156+
DMA_FROM_DEVICE/DMA_BIDIRECTIONAL buffer while it is mapped. This allows
157+
multiple small buffers to safely share a cacheline without risk of data
158+
corruption, suppressing DMA debug warnings about overlapping mappings.
159+
All mappings sharing a cacheline should have this attribute.

0 commit comments

Comments
 (0)