]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: dma-api: document DMA_ATTR_CPU_CACHE_CLEAN
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Dec 2025 13:11:41 +0000 (08:11 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 1 Jan 2026 00:30:17 +0000 (19:30 -0500)
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>
Documentation/core-api/dma-attributes.rst

index 0bdc2be65e57574de8b7606b1406a2793479e781..1d7bfad73b1c7a85d9b17e3c31ceb5ef6a4e8bbd 100644 (file)
@@ -148,3 +148,12 @@ DMA_ATTR_MMIO is appropriate.
 For architectures that require cache flushing for DMA coherence
 DMA_ATTR_MMIO will not perform any cache flushing. The address
 provided must never be mapped cacheable into the CPU.
+
+DMA_ATTR_CPU_CACHE_CLEAN
+------------------------
+
+This attribute indicates the CPU will not dirty any cacheline overlapping this
+DMA_FROM_DEVICE/DMA_BIDIRECTIONAL buffer while it is mapped. This allows
+multiple small buffers to safely share a cacheline without risk of data
+corruption, suppressing DMA debug warnings about overlapping mappings.
+All mappings sharing a cacheline should have this attribute.