diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2019-09-06 09:14:48 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-09-11 13:34:29 +0300 |
commit | 3fc1ca00653db6371585e3c21c4b873b2f20e60a (patch) | |
tree | 0c6b5431d51319a078b036284c81ed12b7f55b54 /include/linux/swiotlb.h | |
parent | 2c70010867f164d1b30e787e360e05d10cc40046 (diff) | |
download | linux-3fc1ca00653db6371585e3c21c4b873b2f20e60a.tar.xz |
swiotlb: Split size parameter to map/unmap APIs
This splits the size parameter to swiotlb_tbl_map_single() and
swiotlb_tbl_unmap_single() into an alloc_size and a mapping_size
parameter, where the latter one is rounded up to the iommu page
size.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/swiotlb.h')
-rw-r--r-- | include/linux/swiotlb.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 361f62bb4a8e..cde3dc18e21a 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -46,13 +46,17 @@ enum dma_sync_target { extern phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, dma_addr_t tbl_dma_addr, - phys_addr_t phys, size_t size, + phys_addr_t phys, + size_t mapping_size, + size_t alloc_size, enum dma_data_direction dir, unsigned long attrs); extern void swiotlb_tbl_unmap_single(struct device *hwdev, phys_addr_t tlb_addr, - size_t size, enum dma_data_direction dir, + size_t mapping_size, + size_t alloc_size, + enum dma_data_direction dir, unsigned long attrs); extern void swiotlb_tbl_sync_single(struct device *hwdev, |