[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1620656249-68890-15-git-send-email-john.garry@huawei.com>
Date: Mon, 10 May 2021 22:17:28 +0800
From: John Garry <john.garry@...wei.com>
To: <joro@...tes.org>, <will@...nel.org>, <robin.murphy@....com>,
<hch@....de>, <m.szyprowski@...sung.com>
CC: <iommu@...ts.linux-foundation.org>, <baolu.lu@...ux.intel.com>,
<linux-kernel@...r.kernel.org>, <linux-scsi@...r.kernel.org>,
<linuxarm@...wei.com>, <sai.praneeth.prakhya@...el.com>,
John Garry <john.garry@...wei.com>
Subject: [PATCH v2 14/15] dma-iommu: Add iommu_dma_set_opt_size()
Add iommu_dma_set_opt_size(), which is a frontend for
iommu_set_dev_dma_opt_size().
Signed-off-by: John Garry <john.garry@...wei.com>
---
drivers/iommu/dma-iommu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 1d58c7a2d85d..fd62afe7c7d0 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -490,6 +490,11 @@ static dma_addr_t iommu_dma_alloc_iova(struct iommu_domain *domain,
return (dma_addr_t)iova << shift;
}
+static int iommu_dma_set_opt_size(struct device *dev, size_t size)
+{
+ return iommu_set_dev_dma_opt_size(dev, size);
+}
+
static void iommu_dma_free_iova(struct iommu_dma_cookie *cookie,
dma_addr_t iova, size_t size, struct page *freelist)
{
@@ -1340,6 +1345,7 @@ static const struct dma_map_ops iommu_dma_ops = {
.map_resource = iommu_dma_map_resource,
.unmap_resource = iommu_dma_unmap_resource,
.get_merge_boundary = iommu_dma_get_merge_boundary,
+ .set_max_opt_size = iommu_dma_set_opt_size,
};
/*
--
2.26.2
Powered by blists - more mailing lists