Thread (19 messages) 19 messages, 6 authors, 2023-10-26
STALE954d LANDED: 1 (1M)
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 3/9] iommu/vt-d: Use ops->blocked_domain

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2023-09-27 23:48:37
Also in: asahi, linux-arm-kernel, linux-iommu
Subsystem: intel iommu (vt-d), iommu subsystem, the rest · Maintainers: David Woodhouse, Lu Baolu, Joerg Roedel, Will Deacon, Linus Torvalds

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>
---
 drivers/iommu/intel/iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index ba9db95d2f1c5e..71c12e15ecd7b3 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -4025,8 +4025,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);
@@ -4788,6 +4786,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,
-- 
2.42.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help