summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohn Garry <john.garry@linux.dev>2026-08-31 09:36:20 +0000
committerMarek Szyprowski <m.szyprowski@samsung.com>2026-09-07 18:55:12 +0200
commit95d2fec40c483d8a63e5ffa0fa88faeb2e0ed462 (patch)
tree8ea38cbf8f312c7a003e08dd88c304574fd9577f /include/linux
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
downloadlinux-next-95d2fec40c483d8a63e5ffa0fa88faeb2e0ed462.tar.gz
linux-next-95d2fec40c483d8a63e5ffa0fa88faeb2e0ed462.zip
dma-mapping: rename dma_opt_mapping_size()
Function dma_opt_mapping_size() implies from its name that it returns a target or sweet spot DMA mapping size. However, it is just an upper limit optimal DMA mapping size. Above this size, DMA mapping performance may significantly degrade. Rename to dma_max_opt_mapping_size() to reflect the real behaviour. Also rename the internal DMA mapping symbols to align with this. The DMA API documentation already described this behaviour properly (so there is nothing to update). Signed-off-by: John Garry <john.garry@linux.dev> Link: https://lore.kernel.org/r/20260831093620.3481337-1-john.g.garry@oracle.com Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma-map-ops.h2
-rw-r--r--include/linux/dma-mapping.h4
-rw-r--r--include/linux/iommu-dma.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h
index 8fae2b7deb20..eee6de5188c7 100644
--- a/include/linux/dma-map-ops.h
+++ b/include/linux/dma-map-ops.h
@@ -60,7 +60,7 @@ struct dma_map_ops {
int (*dma_supported)(struct device *dev, u64 mask);
u64 (*get_required_mask)(struct device *dev);
size_t (*max_mapping_size)(struct device *dev);
- size_t (*opt_mapping_size)(void);
+ size_t (*max_opt_mapping_size)(void);
unsigned long (*get_merge_boundary)(struct device *dev);
};
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index a3e880649fa4..efde0e5a58dc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -207,7 +207,7 @@ int dma_set_coherent_mask(struct device *dev, u64 mask);
u64 dma_get_required_mask(struct device *dev);
bool dma_addressing_limited(struct device *dev);
size_t dma_max_mapping_size(struct device *dev);
-size_t dma_opt_mapping_size(struct device *dev);
+size_t dma_max_opt_mapping_size(struct device *dev);
unsigned long dma_get_merge_boundary(struct device *dev);
struct sg_table *dma_alloc_noncontiguous(struct device *dev, size_t size,
enum dma_data_direction dir, gfp_t gfp, unsigned long attrs);
@@ -326,7 +326,7 @@ static inline size_t dma_max_mapping_size(struct device *dev)
{
return 0;
}
-static inline size_t dma_opt_mapping_size(struct device *dev)
+static inline size_t dma_max_opt_mapping_size(struct device *dev)
{
return 0;
}
diff --git a/include/linux/iommu-dma.h b/include/linux/iommu-dma.h
index 060f6e23ab3c..fae5d50e4f27 100644
--- a/include/linux/iommu-dma.h
+++ b/include/linux/iommu-dma.h
@@ -39,7 +39,7 @@ int iommu_dma_get_sgtable(struct device *dev, struct sg_table *sgt,
void *cpu_addr, dma_addr_t dma_addr, size_t size,
unsigned long attrs);
unsigned long iommu_dma_get_merge_boundary(struct device *dev);
-size_t iommu_dma_opt_mapping_size(void);
+size_t iommu_dma_max_opt_mapping_size(void);
size_t iommu_dma_max_mapping_size(struct device *dev);
void iommu_dma_free(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t handle, unsigned long attrs);