iommu/arm-smmu-v3: Build the whole CD in arm_smmu_make_s1_cd()
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 30 Apr 2024 17:21:40 +0000 (14:21 -0300)
committerWill Deacon <will@kernel.org>
Wed, 1 May 2024 14:33:53 +0000 (15:33 +0100)
commit04905c17f64890311e6b5a5065d8c220602712e5
tree250801c59ff34e81b0dfcfeac96b23c1873b1186
parent7b87c93c8b86d9d9b9567d83f0ca3d3046fdfc5a
iommu/arm-smmu-v3: Build the whole CD in arm_smmu_make_s1_cd()

Half the code was living in arm_smmu_domain_finalise_s1(), just move it
here and take the values directly from the pgtbl_ops instead of storing
copies.

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Michael Shavit <mshavit@google.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/8-v9-5040dc602008+177d7-smmuv3_newapi_p2_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h