Skip to contentSkip to conversation

iommu/vt-d: Remove domain_alloc_paging()

PATCH Applied Jason Gunthorpe 4 participants 4 messages Dec 4, 2024 – Jan 2, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: Remove domain_alloc_paging()

This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove it.

---
 drivers/iommu/intel/iommu.c | 16 ----------------
 1 file changed, 16 deletions(-)
drivers/iommu/intel/iommu.c +0 -16
index 7d0acb74d5a543..88e4e867012cba 100644
@@ -4443,21 +4443,6 @@ static struct iommu_domain identity_domain = {
 	},
 };
 
-static struct iommu_domain *intel_iommu_domain_alloc_paging(struct device *dev)
-{
-	struct device_domain_info *info = dev_iommu_priv_get(dev);
-	struct intel_iommu *iommu = info->iommu;
-	struct dmar_domain *dmar_domain;
-	bool first_stage;
-
-	first_stage = first_level_by_default(iommu);
-	dmar_domain = paging_domain_alloc(dev, first_stage);
-	if (IS_ERR(dmar_domain))
-		return ERR_CAST(dmar_domain);
-
-	return &dmar_domain->domain;
-}
-
 const struct iommu_ops intel_iommu_ops = {
 	.blocked_domain		= &blocking_domain,
 	.release_domain		= &blocking_domain,
@@ -4466,7 +4451,6 @@ const struct iommu_ops intel_iommu_ops = {
 	.hw_info		= intel_iommu_hw_info,
 	.domain_alloc_paging_flags = intel_iommu_domain_alloc_paging_flags,
 	.domain_alloc_sva	= intel_svm_domain_alloc,
-	.domain_alloc_paging	= intel_iommu_domain_alloc_paging,
 	.domain_alloc_nested	= intel_iommu_domain_alloc_nested,
 	.probe_device		= intel_iommu_probe_device,
 	.release_device		= intel_iommu_release_device,

base-commit: f6ba64bc6669cb5152a31a474734308dcccb3ed8

Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jason Gunthorpe

This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove it.

---
  drivers/iommu/intel/iommu.c | 16 ----------------
  1 file changed, 16 deletions(-)
Quoted 36 lines
drivers/iommu/intel/iommu.c +0 -16
index 7d0acb74d5a543..88e4e867012cba 100644
@@ -4443,21 +4443,6 @@ static struct iommu_domain identity_domain = {
  	},
  };
 
-static struct iommu_domain *intel_iommu_domain_alloc_paging(struct device *dev)
-{
-	struct device_domain_info *info = dev_iommu_priv_get(dev);
-	struct intel_iommu *iommu = info->iommu;
-	struct dmar_domain *dmar_domain;
-	bool first_stage;
-
-	first_stage = first_level_by_default(iommu);
-	dmar_domain = paging_domain_alloc(dev, first_stage);
-	if (IS_ERR(dmar_domain))
-		return ERR_CAST(dmar_domain);
-
-	return &dmar_domain->domain;
-}
-
  const struct iommu_ops intel_iommu_ops = {
  	.blocked_domain		= &blocking_domain,
  	.release_domain		= &blocking_domain,
@@ -4466,7 +4451,6 @@ const struct iommu_ops intel_iommu_ops = {
  	.hw_info		= intel_iommu_hw_info,
  	.domain_alloc_paging_flags = intel_iommu_domain_alloc_paging_flags,
  	.domain_alloc_sva	= intel_svm_domain_alloc,
-	.domain_alloc_paging	= intel_iommu_domain_alloc_paging,
  	.domain_alloc_nested	= intel_iommu_domain_alloc_nested,
  	.probe_device		= intel_iommu_probe_device,
  	.release_device		= intel_iommu_release_device,

base-commit: f6ba64bc6669cb5152a31a474734308dcccb3ed8

Signature · 2 lines
Regards,
Yi Liu
Reviewed-by on v1 1/1
#2 lore raw
In reply to Jason Gunthorpe
Quoted 43 lines · Jason Gunthorpe

This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove it.

---
 drivers/iommu/intel/iommu.c | 16 ----------------
 1 file changed, 16 deletions(-)
drivers/iommu/intel/iommu.c +0 -16
index 7d0acb74d5a543..88e4e867012cba 100644
@@ -4443,21 +4443,6 @@ static struct iommu_domain identity_domain = {
 	},
 };
 
-static struct iommu_domain *intel_iommu_domain_alloc_paging(struct device *dev)
-{
-	struct device_domain_info *info = dev_iommu_priv_get(dev);
-	struct intel_iommu *iommu = info->iommu;
-	struct dmar_domain *dmar_domain;
-	bool first_stage;
-
-	first_stage = first_level_by_default(iommu);
-	dmar_domain = paging_domain_alloc(dev, first_stage);
-	if (IS_ERR(dmar_domain))
-		return ERR_CAST(dmar_domain);
-
-	return &dmar_domain->domain;
-}
-
 const struct iommu_ops intel_iommu_ops = {
 	.blocked_domain		= &blocking_domain,
 	.release_domain		= &blocking_domain,
@@ -4466,7 +4451,6 @@ const struct iommu_ops intel_iommu_ops = {
 	.hw_info		= intel_iommu_hw_info,
 	.domain_alloc_paging_flags = intel_iommu_domain_alloc_paging_flags,
 	.domain_alloc_sva	= intel_svm_domain_alloc,
-	.domain_alloc_paging	= intel_iommu_domain_alloc_paging,
 	.domain_alloc_nested	= intel_iommu_domain_alloc_nested,
 	.probe_device		= intel_iommu_probe_device,
 	.release_device		= intel_iommu_release_device,
Quoted 4 lines

base-commit: f6ba64bc6669cb5152a31a474734308dcccb3ed8

Signature · 1 line
2.43.0