iommu/arm-smmu-v3: Build the whole STE in arm_smmu_make_s2_domain_ste()
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 26 Feb 2024 17:07:15 +0000 (13:07 -0400)
committerWill Deacon <will@kernel.org>
Thu, 29 Feb 2024 15:12:21 +0000 (15:12 +0000)
commit71b0aa10b18dd589a899449457e5ab7c1da00d01
tree655bf23f94cb6d4cbe756020cef5d490a1aab927
parentefe15df08727d483bd247ff905a828f0de955de6
iommu/arm-smmu-v3: Build the whole STE in arm_smmu_make_s2_domain_ste()

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

Reviewed-by: Michael Shavit <mshavit@google.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Moritz Fischer <moritzf@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/4-v6-96275f25c39d+2d4-smmuv3_newapi_p1_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