]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dma-debug-dont-report-false-positives-with-dma_bounce_unaligned_kmalloc-v2
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 10 Oct 2025 17:30:09 +0000 (19:30 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 15 Oct 2025 04:28:06 +0000 (21:28 -0700)
replace is_swiotlb_allocated() with is_swiotlb_active(), per Catalin

Link: https://lkml.kernel.org/r/20251010173009.3916215-1-m.szyprowski@samsung.com
Fixes: 370645f41e6e ("dma-mapping: force bouncing if the kmalloc() size is not cache-line-aligned")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "Isaac J. Manjarres" <isaacmanjarres@google.com>
Cc: Robin Murohy <robin.murphy@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/dma/debug.c

index 6f05b5376119506c6ebec05e5fae290c3b1efb24..138ede653de400d90114e113bdc66fabb63ff4b0 100644 (file)
@@ -597,7 +597,7 @@ static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs)
                global_disable = true;
        } else if (rc == -EEXIST && !(attrs & DMA_ATTR_SKIP_CPU_SYNC) &&
                   !(IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) &&
-                    is_swiotlb_allocated())) {
+                    is_swiotlb_active(entry->dev))) {
                err_printk(entry->dev, entry,
                        "cacheline tracking EEXIST, overlapping mappings aren't supported\n");
        }