Skip to content

Commit 8b80549

Browse files
rmurphy-armjoergroedel
authored andcommitted
arm64: Properly clean up iommu-dma remnants
Thanks to the somewhat asymmetrical nature, while removing iommu_setup_dma_ops() from the arch_setup_dma_ops() flow, I managed to forget that arm64's teardown path was also specific to iommu-dma. Clean that up to match, otherwise probe deferral will lead to the arch code erroneously removing DMA ops set elsewhere. Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/linux-iommu/Zi_LV28TR-P-PzXi@eriador.lumag.spb.ru/ Fixes: b67483b ("iommu/dma: Centralise iommu_setup_dma_ops()") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Acked-by: Will Deacon <will@kernel.org> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Link: https://lore.kernel.org/r/d4cc20cbb0c45175e98dd76bf187e2ad6421296d.1714472573.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent f091e93 commit 8b80549

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ config ARM64
4646
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
4747
select ARCH_HAS_SYNC_DMA_FOR_CPU
4848
select ARCH_HAS_SYSCALL_WRAPPER
49-
select ARCH_HAS_TEARDOWN_DMA_OPS if IOMMU_SUPPORT
5049
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
5150
select ARCH_HAS_ZONE_DMA_SET if EXPERT
5251
select ARCH_HAVE_ELF_PROT

arch/arm64/mm/dma-mapping.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <linux/gfp.h>
88
#include <linux/cache.h>
99
#include <linux/dma-map-ops.h>
10-
#include <linux/iommu.h>
1110
#include <xen/xen.h>
1211

1312
#include <asm/cacheflush.h>
@@ -39,13 +38,6 @@ void arch_dma_prep_coherent(struct page *page, size_t size)
3938
dcache_clean_poc(start, start + size);
4039
}
4140

42-
#ifdef CONFIG_IOMMU_DMA
43-
void arch_teardown_dma_ops(struct device *dev)
44-
{
45-
dev->dma_ops = NULL;
46-
}
47-
#endif
48-
4941
void arch_setup_dma_ops(struct device *dev, bool coherent)
5042
{
5143
int cls = cache_line_size_of_cpu();

0 commit comments

Comments
 (0)