Re: [PATCH v2 6/8] dma-mapping: Support batch mode for dma_direct_{map,unmap}_sg
From: Leon Romanovsky <leon@kernel.org>
Date: 2025-12-27 20:14:09
Also in:
linux-iommu, lkml, xen-devel
From: Leon Romanovsky <leon@kernel.org>
Date: 2025-12-27 20:14:09
Also in:
linux-iommu, lkml, xen-devel
On Sat, Dec 27, 2025 at 11:52:46AM +1300, Barry Song wrote:
From: Barry Song <baohua@kernel.org> Leon suggested extending a flush argument to
Let's move this sentence out of the commit message and place it in the changelog instead.
dma_direct_unmap_phys(), dma_direct_map_phys(), and
dma_direct_sync_single_for_cpu(). For single-buffer cases, this
would use flush=true, while for SG cases flush=false would be
used, followed by a single flush after all cache operations are
issued in dma_direct_{map,unmap}_sg().
This ultimately benefits dma_map_sg() and dma_unmap_sg().
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Ada Couprie Diaz <redacted>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Anshuman Khandual <redacted>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Tangquan Zheng <redacted>
Signed-off-by: Barry Song <baohua@kernel.org>
---
kernel/dma/direct.c | 17 +++++++++++++----
kernel/dma/direct.h | 16 ++++++++++------
kernel/dma/mapping.c | 6 +++---
3 files changed, 26 insertions(+), 13 deletions(-)Thanks, Reviewed-by: Leon Romanovsky <leon@kernel.org>