From 133d624b1cee16906134e92d5befb843b58bcf31 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Thu, 7 Feb 2019 12:59:15 +0100 Subject: dma: Introduce dma_max_mapping_size() The function returns the maximum size that can be mapped using DMA-API functions. The patch also adds the implementation for direct DMA and a new dma_map_ops pointer so that other implementations can expose their limit. Cc: stable@vger.kernel.org Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel Signed-off-by: Michael S. Tsirkin --- Documentation/DMA-API.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation/DMA-API.txt') diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index e133ccd60228..acfe3d0f78d1 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -195,6 +195,14 @@ Requesting the required mask does not alter the current mask. If you wish to take advantage of it, you should issue a dma_set_mask() call to set the mask to the value returned. +:: + + size_t + dma_direct_max_mapping_size(struct device *dev); + +Returns the maximum size of a mapping for the device. The size parameter +of the mapping functions like dma_map_single(), dma_map_page() and +others should not be larger than the returned value. Part Id - Streaming DMA mappings -------------------------------- -- cgit v1.2.3