Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dma-mapping: remove <asm/dma-contiguous.h>

Just provide a weak default definition of dma_contiguous_early_fixup and
let arm override it.

Signed-off-by: Christoph Hellwig <hch@lst.de>

+7 -28
-15
arch/arm/include/asm/dma-contiguous.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef ASMARM_DMA_CONTIGUOUS_H 3 - #define ASMARM_DMA_CONTIGUOUS_H 4 - 5 - #ifdef __KERNEL__ 6 - #ifdef CONFIG_DMA_CMA 7 - 8 - #include <linux/types.h> 9 - 10 - void dma_contiguous_early_fixup(phys_addr_t base, unsigned long size); 11 - 12 - #endif 13 - #endif 14 - 15 - #endif
-1
arch/arm/mm/dma-mapping.c
··· 34 34 #include <asm/dma-iommu.h> 35 35 #include <asm/mach/map.h> 36 36 #include <asm/system_info.h> 37 - #include <asm/dma-contiguous.h> 38 37 #include <xen/swiotlb-xen.h> 39 38 40 39 #include "dma.h"
-1
include/asm-generic/Kbuild
··· 16 16 mandatory-y += delay.h 17 17 mandatory-y += device.h 18 18 mandatory-y += div64.h 19 - mandatory-y += dma-contiguous.h 20 19 mandatory-y += dma-mapping.h 21 20 mandatory-y += dma.h 22 21 mandatory-y += emergency-restart.h
-10
include/asm-generic/dma-contiguous.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_GENERIC_DMA_CONTIGUOUS_H 3 - #define _ASM_GENERIC_DMA_CONTIGUOUS_H 4 - 5 - #include <linux/types.h> 6 - 7 - static inline void 8 - dma_contiguous_early_fixup(phys_addr_t base, unsigned long size) { } 9 - 10 - #endif
+2
include/linux/dma-map-ops.h
··· 116 116 int count); 117 117 struct page *dma_alloc_contiguous(struct device *dev, size_t size, gfp_t gfp); 118 118 void dma_free_contiguous(struct device *dev, struct page *page, size_t size); 119 + 120 + void dma_contiguous_early_fixup(phys_addr_t base, unsigned long size); 119 121 #else /* CONFIG_DMA_CMA */ 120 122 static inline struct cma *dev_get_cma_area(struct device *dev) 121 123 {
+5 -1
kernel/dma/contiguous.c
··· 44 44 #endif 45 45 46 46 #include <asm/page.h> 47 - #include <asm/dma-contiguous.h> 48 47 49 48 #include <linux/memblock.h> 50 49 #include <linux/err.h> ··· 209 210 &dma_contiguous_default_area, 210 211 fixed); 211 212 } 213 + } 214 + 215 + void __weak 216 + dma_contiguous_early_fixup(phys_addr_t base, unsigned long size) 217 + { 212 218 } 213 219 214 220 /**