diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2023-09-28 01:47:31 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-10-26 16:53:49 +0200 |
commit | e5d8be7406ca7b6b251c09b786f08176337c0999 (patch) | |
tree | 73acab72252b870486421294d2d8f00e5ca4be96 /include | |
parent | iommu: change iommu_map_sgtable to return signed values (diff) | |
download | linux-e5d8be7406ca7b6b251c09b786f08176337c0999.tar.xz linux-e5d8be7406ca7b6b251c09b786f08176337c0999.zip |
iommu: Move IOMMU_DOMAIN_BLOCKED global statics to ops->blocked_domain
Following the pattern of identity domains, just assign the BLOCKED domain
global statics to a value in ops. Update the core code to use the global
static directly.
Update powerpc to use the new scheme and remove its empty domain_alloc
callback.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/1-v2-bff223cf6409+282-dart_paging_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/iommu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index c28178f3690a..73daa4fb168b 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -265,6 +265,8 @@ struct iommu_iotlb_gather { * @owner: Driver module providing these ops * @identity_domain: An always available, always attachable identity * translation. + * @blocked_domain: An always available, always attachable blocking + * translation. * @default_domain: If not NULL this will always be set as the default domain. * This should be an IDENTITY/BLOCKED/PLATFORM domain. * Do not use in new drivers. @@ -303,6 +305,7 @@ struct iommu_ops { unsigned long pgsize_bitmap; struct module *owner; struct iommu_domain *identity_domain; + struct iommu_domain *blocked_domain; struct iommu_domain *default_domain; }; |