diff options
author | Robin Murphy <robin.murphy@arm.com> | 2021-09-13 15:40:06 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2021-09-28 12:20:41 +0300 |
commit | 3d31d4e7a3ef6e5951d185cb5924b53cf9cbd0e1 (patch) | |
tree | c6f68dbba4d871bd11af9b075bcca4d2849ad2ed /drivers/iommu/iommu.c | |
parent | b2b2781a9755bf18987647bb8cdf6a7d5b5d34c2 (diff) | |
download | linux-3d31d4e7a3ef6e5951d185cb5924b53cf9cbd0e1.tar.xz |
iommu/dma: Unexport IOVA cookie management
IOVA cookies are now got and put by core code, so we no longer need to
export these to modular drivers. The export for getting MSI cookies
stays, since VFIO can still be a module, but it was already relying on
someone else putting them, so that aspect is unaffected.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/ef89db54a27df7d8bc0af094c7d7b204fd61774c.1631531973.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 3303d707bab4..a80f13867bed 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -1953,8 +1953,7 @@ static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus, /* Assume all sizes by default; the driver may override this later */ domain->pgsize_bitmap = bus->iommu_ops->pgsize_bitmap; - /* Temporarily avoid -EEXIST while drivers still get their own cookies */ - if (iommu_is_dma_domain(domain) && !domain->iova_cookie && iommu_get_dma_cookie(domain)) { + if (iommu_is_dma_domain(domain) && iommu_get_dma_cookie(domain)) { iommu_domain_free(domain); domain = NULL; } |