summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKarl Mehltretter <kmehltretter@gmail.com>2026-10-05 08:41:31 +0200
committerChristian König <christian.koenig@amd.com>2026-10-28 14:58:14 +0100
commite87fd0513792a5cf90f502399faa9e19439747e6 (patch)
treea64bbd5e647e3f3891d182ca142fcba42f12287d /include/linux
parent052947a3b5e7402eaad53379dfec2ecab27a2d80 (diff)
dma-buf: keep the DMA flags in the DMABUF_DEBUG copy
With DMABUF_DEBUG, dma_buf_map_attachment() hands the importer a copy of the sg_table that keeps only sg_dma_address() and sg_dma_len(). The dma_flags (SG_DMA_BUS_ADDRESS, SG_DMA_SWIOTLB) are dropped. The flags describe the DMA side of an entry, which is the side importers may use. Copy them as well. This is not a bug fix. No importer reads the flags today. Their only readers are dma-iommu, dma-direct and iommu_map_sg(), which are not supposed to see an importer's copy at all. The warn mode added in the next patch keeps its marker in dma_flags and lets importers that do get there continue. They should then see the same flags as without DMABUF_DEBUG. Assisted-by: LLM Fixes: 51db5336e16d ("dma-buf: improve sg_table debugging hack v4") Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://lore.kernel.org/r/20261005064133.7305-2-kmehltretter@gmail.com
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions