iommu/vt-d: Use ops->blocked_domain
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 27 Sep 2023 23:47:33 +0000 (20:47 -0300)
committerJoerg Roedel <jroedel@suse.de>
Thu, 26 Oct 2023 14:53:50 +0000 (16:53 +0200)
Trivially migrate to the ops->blocked_domain for the existing global
static.

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/3-v2-bff223cf6409+282-dart_paging_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c

index 6b0276b..301d42a 100644 (file)
@@ -4041,8 +4041,6 @@ static struct iommu_domain *intel_iommu_domain_alloc(unsigned type)
        struct iommu_domain *domain;
 
        switch (type) {
-       case IOMMU_DOMAIN_BLOCKED:
-               return &blocking_domain;
        case IOMMU_DOMAIN_DMA:
        case IOMMU_DOMAIN_UNMANAGED:
                dmar_domain = alloc_domain(type);
@@ -4804,6 +4802,7 @@ static void *intel_iommu_hw_info(struct device *dev, u32 *length, u32 *type)
 }
 
 const struct iommu_ops intel_iommu_ops = {
+       .blocked_domain         = &blocking_domain,
        .capable                = intel_iommu_capable,
        .hw_info                = intel_iommu_hw_info,
        .domain_alloc           = intel_iommu_domain_alloc,