linux-yocto/kernel/dma
Baochen Qiang a60e426d22 dma-debug: don't enforce dma mapping check on noncoherent allocations
[ Upstream commit 7e2368a21741e2db542330b32aa6fdd8908e7cff ]

As discussed in [1], there is no need to enforce dma mapping check on
noncoherent allocations, a simple test on the returned CPU address is
good enough.

Add a new pair of debug helpers and use them for noncoherent alloc/free
to fix this issue.

Fixes: efa70f2fdc ("dma-mapping: add a new dma_alloc_pages API")
Link: https://lore.kernel.org/all/ff6c1fe6-820f-4e58-8395-df06aa91706c@oss.qualcomm.com # 1
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20250828-dma-debug-fix-noncoherent-dma-check-v1-1-76e9be0dd7fc@oss.qualcomm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-19 16:37:26 +02:00
..
coherent.c dma-coherent: Warn if OF reserved memory is beyond current coherent DMA mask 2025-04-22 17:44:09 +02:00
contiguous.c of: reserved_mem: Restructure call site for dma_contiguous_early_fixup() 2025-09-04 16:55:32 +02:00
debug.c dma-debug: don't enforce dma mapping check on noncoherent allocations 2025-09-19 16:37:26 +02:00
debug.h dma-debug: don't enforce dma mapping check on noncoherent allocations 2025-09-19 16:37:26 +02:00
direct.c dma-mapping: move the PCI P2PDMA mapping helpers to pci-p2pdma.h 2025-05-06 08:36:53 +02:00
direct.h swiotlb: reduce swiotlb pool lookups 2024-07-10 07:59:03 +02:00
dummy.c dma-mapping: call ->unmap_page and ->unmap_sg unconditionally 2024-08-22 06:18:11 +02:00
Kconfig dma-debug: remove DMA_API_DEBUG_SG 2024-10-29 08:53:37 +01:00
Makefile dma-mapping: clearly mark DMA ops as an architecture feature 2024-09-04 07:08:51 +03:00
map_benchmark.c dma-mapping: benchmark: Don't starve others when doing the test 2024-07-09 07:48:32 +02:00
mapping.c dma-debug: don't enforce dma mapping check on noncoherent allocations 2025-09-19 16:37:26 +02:00
ops_helpers.c dma-mapping: use IOMMU DMA calls for common alloc/free page calls 2024-09-05 14:29:42 +03:00
pool.c dma/pool: Ensure DMA_DIRECT_REMAP allocations are decrypted 2025-09-04 16:55:47 +02:00
remap.c dma-mapping: use bit masking to check VM_DMA_COHERENT 2024-08-22 06:15:35 +02:00
swiotlb.c dma-mapping: replace zone_dma_bits by zone_dma_limit 2024-08-22 06:18:00 +02:00