summaryrefslogtreecommitdiff
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-08-30 09:51:01 +0300
committerChristoph Hellwig <hch@lst.de>2019-09-04 12:13:20 +0300
commit512317401f6a337e617ec284d20dec5fa3a951ec (patch)
treea835b3bccfb35b7c6498d7cede836bebb05b14af /arch/arm/mm
parentfe9041c245196c6c61091ccc2c74b73ab9a5fc50 (diff)
downloadlinux-512317401f6a337e617ec284d20dec5fa3a951ec.tar.xz
dma-mapping: always use VM_DMA_COHERENT for generic DMA remap
Currently the generic dma remap allocator gets a vm_flags passed by the caller that is a little confusing. We just introduced a generic vmalloc-level flag to identify the dma coherent allocations, so use that everywhere and remove the now pointless argument. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/dma-mapping.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index aec31f9b918b..fd02c982e36a 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -343,13 +343,12 @@ static void *
__dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot,
const void *caller)
{
- return dma_common_contiguous_remap(page, size, VM_DMA_COHERENT,
- prot, caller);
+ return dma_common_contiguous_remap(page, size, prot, caller);
}
static void __dma_free_remap(void *cpu_addr, size_t size)
{
- dma_common_free_remap(cpu_addr, size, VM_DMA_COHERENT);
+ dma_common_free_remap(cpu_addr, size);
}
#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
@@ -1365,8 +1364,7 @@ static void *
__iommu_alloc_remap(struct page **pages, size_t size, gfp_t gfp, pgprot_t prot,
const void *caller)
{
- return dma_common_pages_remap(pages, size, VM_DMA_COHERENT, prot,
- caller);
+ return dma_common_pages_remap(pages, size, prot, caller);
}
/*
@@ -1609,7 +1607,7 @@ void __arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr,
}
if ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0)
- dma_common_free_remap(cpu_addr, size, VM_DMA_COHERENT);
+ dma_common_free_remap(cpu_addr, size);
__iommu_remove_mapping(dev, handle, size);
__iommu_free_buffer(dev, pages, size, attrs);