[PATCH v5 1/6] iommu/arm-smmu-v3: Factor out a common domain alloc

Nicolin Chen nicolinc at nvidia.com
Thu Jun 6 15:12:02 PDT 2024


On Thu, Jun 06, 2024 at 02:32:57PM +0100, Shameer Kolothum wrote:
> And use that for arm_smmu_domain_alloc_paging(). This will be useful
> in a subsequent patch as well where we introduce support for
> domain_alloc_user().
> 
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>

Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>

Though it'd be probably nicer to have a line of justification
for the renaming below:

> @@ -2276,7 +2287,7 @@ static struct iommu_domain *arm_smmu_domain_alloc_paging(struct device *dev)
>         return &smmu_domain->domain;
>  }
> 
> -static void arm_smmu_domain_free(struct iommu_domain *domain)
> +static void arm_smmu_domain_free_paging(struct iommu_domain *domain)
>  {
>         struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
>         struct arm_smmu_device *smmu = smmu_domain->smmu;
> @@ -3119,7 +3130,7 @@ static struct iommu_ops arm_smmu_ops = {
>                 .iotlb_sync             = arm_smmu_iotlb_sync,
>                 .iova_to_phys           = arm_smmu_iova_to_phys,
>                 .enable_nesting         = arm_smmu_enable_nesting,
> -               .free                   = arm_smmu_domain_free,
> +               .free                   = arm_smmu_domain_free_paging,

Thanks
Nicolin



More information about the linux-arm-kernel mailing list