dma-debug: don't enforce dma mapping check on noncoherent allocations
authorBaochen Qiang <baochen.qiang@oss.qualcomm.com>
Thu, 28 Aug 2025 08:17:33 +0000 (16:17 +0800)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 2 Sep 2025 08:18:16 +0000 (10:18 +0200)
commit7e2368a21741e2db542330b32aa6fdd8908e7cff
treecbeb24cf811b58cd19cdb37fc8129433c28f7deb
parent89a2d212bdb4bc29bed8e7077abe054b801137ea
dma-debug: don't enforce dma mapping check on noncoherent allocations

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: efa70f2fdc84 ("dma-mapping: add a new dma_alloc_pages API")
Link: https://lore.kernel.org/all/ff6c1fe6-820f-4e58-8395-df06aa91706c@oss.qualcomm.com
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
kernel/dma/debug.c
kernel/dma/debug.h
kernel/dma/mapping.c