From: Jianqun Xu Date: Wed, 28 Dec 2016 00:32:18 +0000 (+0800) Subject: Revert "arm64/dma-mapping: __generic_dma_ops always call swiotlb_dma_ops" X-Git-Tag: firefly_0821_release~375 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f2c399320e41af7c11cbc338de582a8fe40ec04e;p=firefly-linux-kernel-4.4.55.git Revert "arm64/dma-mapping: __generic_dma_ops always call swiotlb_dma_ops" This reverts commit 3e89f7de9a3abe9cff127e161d4e11699554cb76. Change-Id: I4cf45807f91ab3021b6593f171c1f2573e1ea7f2 Signed-off-by: Jianqun Xu --- diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index 6cf04c73e983..e8d209e352ce 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h @@ -27,19 +27,12 @@ #define DMA_ERROR_CODE (~(dma_addr_t)0) extern struct dma_map_ops dummy_dma_ops; -extern struct dma_map_ops swiotlb_dma_ops; static inline struct dma_map_ops *__generic_dma_ops(struct device *dev) { if (dev && dev->archdata.dma_ops) return dev->archdata.dma_ops; - /* - * For ion APIs, they have no devices, we force it to call swiotlb_dma_ops - * to sync device. - * Revert me if ion has fixed this issue. - */ - return &swiotlb_dma_ops; /* * We expect no ISA devices, and all other DMA masters are expected to * have someone call arch_setup_dma_ops at device creation time. diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 93a82b0a01b7..2b05653e8156 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -334,7 +334,7 @@ static int __swiotlb_get_sgtable(struct device *dev, struct sg_table *sgt, return ret; } -struct dma_map_ops swiotlb_dma_ops = { +static struct dma_map_ops swiotlb_dma_ops = { .alloc = __dma_alloc, .free = __dma_free, .mmap = __swiotlb_mmap, @@ -350,7 +350,6 @@ struct dma_map_ops swiotlb_dma_ops = { .dma_supported = swiotlb_dma_supported, .mapping_error = swiotlb_dma_mapping_error, }; -EXPORT_SYMBOL(swiotlb_dma_ops); static int __init atomic_pool_init(void) {