iommu/arm-smmu: Reorganize arm_smmu_domain_add_master()
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 17 Oct 2023 18:11:40 +0000 (15:11 -0300)
committerWill Deacon <will@kernel.org>
Wed, 13 Dec 2023 12:42:19 +0000 (12:42 +0000)
commitff0f802974136c7f4c576da227565dc27cc1c69d
tree212a82b2ef1e9b420166e84fbbbe97832e9927d5
parent9fde008337d3be8afa7b3b42c1787aac4b6853c9
iommu/arm-smmu: Reorganize arm_smmu_domain_add_master()

Make arm_smmu_domain_add_master() not use the smmu_domain to detect the
s2cr configuration, instead pass it in as a parameter. It always returns
zero so make it return void.

Since it no longer really does anything to do with a domain call it
arm_smmu_master_install_s2crs().

This is done to make the next two patches able to re-use this code without
forcing the creation of a struct arm_smmu_domain.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/1-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu.c