diff options
author | Christoph Hellwig <hch@lst.de> | 2021-04-01 17:52:55 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2021-04-07 10:56:53 +0200 |
commit | 4fc52b81e87be583efb834df5b58245cb9ddd3e7 (patch) | |
tree | 33fb4ed31dfa15d19dc22bcfaf475e2b08ed8223 /drivers/iommu/iommu.c | |
parent | iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE (diff) | |
download | linux-4fc52b81e87be583efb834df5b58245cb9ddd3e7.tar.xz linux-4fc52b81e87be583efb834df5b58245cb9ddd3e7.zip |
iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG
Use an explicit set_pgtable_quirks method instead that just passes
the actual quirk bitmask 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-20-hch@lst.de
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b09d3f07f3df..7ea5135b1431 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2701,6 +2701,17 @@ int iommu_enable_nesting(struct iommu_domain *domain) } EXPORT_SYMBOL_GPL(iommu_enable_nesting); +int iommu_set_pgtable_quirks(struct iommu_domain *domain, + unsigned long quirk) +{ + if (domain->type != IOMMU_DOMAIN_UNMANAGED) + return -EINVAL; + if (!domain->ops->set_pgtable_quirks) + return -EINVAL; + return domain->ops->set_pgtable_quirks(domain, quirk); +} +EXPORT_SYMBOL_GPL(iommu_set_pgtable_quirks); + void iommu_get_resv_regions(struct device *dev, struct list_head *list) { const struct iommu_ops *ops = dev->bus->iommu_ops; |