Archive-only list for patches
 help / color / mirror / Atom feed
* [PATCH] iommu/vt-d: Remove domain_alloc_paging()
@ 2024-12-04 20:14 Jason Gunthorpe
  2024-12-06  7:24 ` Yi Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2024-12-04 20:14 UTC (permalink / raw)
  To: Lu Baolu, David Woodhouse, iommu, Joerg Roedel, Robin Murphy,
	Will Deacon
  Cc: patches

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

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
---
 drivers/iommu/intel/iommu.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 7d0acb74d5a543..88e4e867012cba 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -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
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iommu/vt-d: Remove domain_alloc_paging()
  2024-12-04 20:14 [PATCH] iommu/vt-d: Remove domain_alloc_paging() Jason Gunthorpe
@ 2024-12-06  7:24 ` Yi Liu
  2024-12-09 18:31 ` Jerry Snitselaar
  2025-01-02  3:12 ` Baolu Lu
  2 siblings, 0 replies; 4+ messages in thread
From: Yi Liu @ 2024-12-06  7:24 UTC (permalink / raw)
  To: Jason Gunthorpe, Lu Baolu, David Woodhouse, iommu, Joerg Roedel,
	Robin Murphy, Will Deacon
  Cc: patches

On 2024/12/5 04:14, Jason Gunthorpe wrote:
> This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove
> it.
> 
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>   drivers/iommu/intel/iommu.c | 16 ----------------
>   1 file changed, 16 deletions(-)

Reviewed-by: Yi Liu <yi.l.liu@intel.com>

> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 7d0acb74d5a543..88e4e867012cba 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -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

-- 
Regards,
Yi Liu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iommu/vt-d: Remove domain_alloc_paging()
  2024-12-04 20:14 [PATCH] iommu/vt-d: Remove domain_alloc_paging() Jason Gunthorpe
  2024-12-06  7:24 ` Yi Liu
@ 2024-12-09 18:31 ` Jerry Snitselaar
  2025-01-02  3:12 ` Baolu Lu
  2 siblings, 0 replies; 4+ messages in thread
From: Jerry Snitselaar @ 2024-12-09 18:31 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Lu Baolu, David Woodhouse, iommu, Joerg Roedel, Robin Murphy,
	Will Deacon, patches

On Wed, Dec 04, 2024 at 04:14:58PM -0400, Jason Gunthorpe wrote:
> This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove
> it.
> 
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>  drivers/iommu/intel/iommu.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 7d0acb74d5a543..88e4e867012cba 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -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
> -- 
> 2.43.0
> 

Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iommu/vt-d: Remove domain_alloc_paging()
  2024-12-04 20:14 [PATCH] iommu/vt-d: Remove domain_alloc_paging() Jason Gunthorpe
  2024-12-06  7:24 ` Yi Liu
  2024-12-09 18:31 ` Jerry Snitselaar
@ 2025-01-02  3:12 ` Baolu Lu
  2 siblings, 0 replies; 4+ messages in thread
From: Baolu Lu @ 2025-01-02  3:12 UTC (permalink / raw)
  To: Jason Gunthorpe, David Woodhouse, iommu, Joerg Roedel,
	Robin Murphy, Will Deacon
  Cc: patches

On 12/5/24 04:14, Jason Gunthorpe wrote:
> This is duplicated by intel_iommu_domain_alloc_paging_flags(), just remove
> it.
> 
> Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>
> ---
>   drivers/iommu/intel/iommu.c | 16 ----------------
>   1 file changed, 16 deletions(-)

Queued for v6.14. Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-02  3:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 20:14 [PATCH] iommu/vt-d: Remove domain_alloc_paging() Jason Gunthorpe
2024-12-06  7:24 ` Yi Liu
2024-12-09 18:31 ` Jerry Snitselaar
2025-01-02  3:12 ` Baolu Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox