summaryrefslogtreecommitdiff
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-04-01 17:52:52 +0200
committerJoerg Roedel <jroedel@suse.de>2021-04-07 10:56:53 +0200
commit7e147547783a9035df816864b6a45ffbb254d700 (patch)
tree6fec770a6dfdbc48d415ae3f5bdfcfe313d31b34 /drivers/iommu/iommu.c
parentbc9a05eef113e75cfa792fdf24dae011bc3d5294 (diff)
downloadlwn-7e147547783a9035df816864b6a45ffbb254d700.tar.gz
lwn-7e147547783a9035df816864b6a45ffbb254d700.zip
iommu: remove DOMAIN_ATTR_NESTING
Use an explicit enable_nesting method instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Will Deacon <will@kernel.org> Acked-by: Li Yang <leoyang.li@nxp.com> Link: https://lore.kernel.org/r/20210401155256.298656-17-hch@lst.de Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r--drivers/iommu/iommu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 703e67d8cb04..4738bc024240 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -2690,6 +2690,16 @@ int iommu_domain_set_attr(struct iommu_domain *domain,
}
EXPORT_SYMBOL_GPL(iommu_domain_set_attr);
+int iommu_enable_nesting(struct iommu_domain *domain)
+{
+ if (domain->type != IOMMU_DOMAIN_UNMANAGED)
+ return -EINVAL;
+ if (!domain->ops->enable_nesting)
+ return -EINVAL;
+ return domain->ops->enable_nesting(domain);
+}
+EXPORT_SYMBOL_GPL(iommu_enable_nesting);
+
void iommu_get_resv_regions(struct device *dev, struct list_head *list)
{
const struct iommu_ops *ops = dev->bus->iommu_ops;