Loading arch/arm64/mm/dma-mapping.c +7 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include <linux/iommu.h> #include <linux/vmalloc.h> #include <linux/swiotlb.h> #include <linux/dma-removed.h> #include <linux/pci.h> #include <linux/io.h> Loading Loading @@ -986,8 +987,12 @@ static void arm_iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size); void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu, bool coherent) { if (!dev->dma_ops) if (!dev->dma_ops) { if (dev->removed_mem) set_dma_ops(dev, &removed_dma_ops); else dev->dma_ops = &arm64_swiotlb_dma_ops; } dev->archdata.dma_coherent = coherent; arm_iommu_setup_dma_ops(dev, dma_base, size); Loading include/linux/dma-removed.h 0 → 100644 +8 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LINUX_DMA_REMOVED_H #define __LINUX_DMA_REMOVED_H extern const struct dma_map_ops removed_dma_ops; #endif /* __LINUX_DMA_REMOVED_H */ Loading
arch/arm64/mm/dma-mapping.c +7 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include <linux/iommu.h> #include <linux/vmalloc.h> #include <linux/swiotlb.h> #include <linux/dma-removed.h> #include <linux/pci.h> #include <linux/io.h> Loading Loading @@ -986,8 +987,12 @@ static void arm_iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size); void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu, bool coherent) { if (!dev->dma_ops) if (!dev->dma_ops) { if (dev->removed_mem) set_dma_ops(dev, &removed_dma_ops); else dev->dma_ops = &arm64_swiotlb_dma_ops; } dev->archdata.dma_coherent = coherent; arm_iommu_setup_dma_ops(dev, dma_base, size); Loading
include/linux/dma-removed.h 0 → 100644 +8 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LINUX_DMA_REMOVED_H #define __LINUX_DMA_REMOVED_H extern const struct dma_map_ops removed_dma_ops; #endif /* __LINUX_DMA_REMOVED_H */