Commit bb10eb7b authored by Ritesh Harjani's avatar Ritesh Harjani Committed by Catalin Marinas

arm64: Change misleading function names in dma-mapping

arm64_swiotlb_alloc/free_coherent name can be misleading
somtimes with CMA support being enabled after this
patch (c2104debc235b745265b64d610237a6833fd53)

Change this name to be more generic:
__dma_alloc/free_coherent
Signed-off-by: default avatarRitesh Harjani <ritesh.harjani@gmail.com>
[catalin.marinas@arm.com: renamed arm64_swiotlb_dma_ops to coherent_swiotlb_dma_ops]
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 09024aa6
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
struct dma_map_ops *dma_ops; struct dma_map_ops *dma_ops;
EXPORT_SYMBOL(dma_ops); EXPORT_SYMBOL(dma_ops);
static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size, static void *__dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flags, dma_addr_t *dma_handle, gfp_t flags,
struct dma_attrs *attrs) struct dma_attrs *attrs)
{ {
if (dev == NULL) { if (dev == NULL) {
WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); WARN_ONCE(1, "Use an actual device structure for DMA allocation\n");
...@@ -58,9 +58,9 @@ static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size, ...@@ -58,9 +58,9 @@ static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size,
} }
} }
static void arm64_swiotlb_free_coherent(struct device *dev, size_t size, static void __dma_free_coherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t dma_handle, void *vaddr, dma_addr_t dma_handle,
struct dma_attrs *attrs) struct dma_attrs *attrs)
{ {
if (dev == NULL) { if (dev == NULL) {
WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); WARN_ONCE(1, "Use an actual device structure for DMA allocation\n");
...@@ -78,9 +78,9 @@ static void arm64_swiotlb_free_coherent(struct device *dev, size_t size, ...@@ -78,9 +78,9 @@ static void arm64_swiotlb_free_coherent(struct device *dev, size_t size,
} }
} }
static struct dma_map_ops arm64_swiotlb_dma_ops = { static struct dma_map_ops coherent_swiotlb_dma_ops = {
.alloc = arm64_swiotlb_alloc_coherent, .alloc = __dma_alloc_coherent,
.free = arm64_swiotlb_free_coherent, .free = __dma_free_coherent,
.map_page = swiotlb_map_page, .map_page = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page, .unmap_page = swiotlb_unmap_page,
.map_sg = swiotlb_map_sg_attrs, .map_sg = swiotlb_map_sg_attrs,
...@@ -95,7 +95,7 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = { ...@@ -95,7 +95,7 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = {
void __init arm64_swiotlb_init(void) void __init arm64_swiotlb_init(void)
{ {
dma_ops = &arm64_swiotlb_dma_ops; dma_ops = &coherent_swiotlb_dma_ops;
swiotlb_init(1); swiotlb_init(1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment