[v5,6/6] iommu/arm-smmu-v3: Cleanup arm_smmu_domain_finalise
Commit Message
Remove unused master parameter now that the CD table is allocated
elsewhere.
Signed-off-by: Michael Shavit <mshavit@google.com>
---
(no changes since v1)
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
Comments
On Thu, Aug 3, 2023 at 6:14 PM Michael Shavit <mshavit@google.com> wrote:
>
> Remove unused master parameter now that the CD table is allocated
> elsewhere.
This almost certainly belongs in the CD table patch series. I'd like
to move it there if this commit looks OK.
On Thu, Aug 03, 2023 at 06:12:26PM +0800, Michael Shavit wrote:
> Remove unused master parameter now that the CD table is allocated
> elsewhere.
>
> Signed-off-by: Michael Shavit <mshavit@google.com>
> ---
>
> (no changes since v1)
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Agree with moving the commit
Jason
@@ -2129,7 +2129,6 @@ static void arm_smmu_domain_free(struct iommu_domain *domain)
}
static int arm_smmu_domain_finalise_cd(struct arm_smmu_domain *smmu_domain,
- struct arm_smmu_master *master,
struct io_pgtable_cfg *pgtbl_cfg)
{
int ret;
@@ -2167,7 +2166,6 @@ static int arm_smmu_domain_finalise_cd(struct arm_smmu_domain *smmu_domain,
}
static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain,
- struct arm_smmu_master *master,
struct io_pgtable_cfg *pgtbl_cfg)
{
int vmid;
@@ -2192,8 +2190,7 @@ static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain,
return 0;
}
-static int arm_smmu_domain_finalise(struct iommu_domain *domain,
- struct arm_smmu_master *master)
+static int arm_smmu_domain_finalise(struct iommu_domain *domain)
{
int ret;
unsigned long ias, oas;
@@ -2201,7 +2198,6 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain,
struct io_pgtable_cfg pgtbl_cfg;
struct io_pgtable_ops *pgtbl_ops;
int (*finalise_stage_fn)(struct arm_smmu_domain *,
- struct arm_smmu_master *,
struct io_pgtable_cfg *);
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
struct arm_smmu_device *smmu = smmu_domain->smmu;
@@ -2253,7 +2249,7 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain,
domain->geometry.aperture_end = (1UL << pgtbl_cfg.ias) - 1;
domain->geometry.force_aperture = true;
- ret = finalise_stage_fn(smmu_domain, master, &pgtbl_cfg);
+ ret = finalise_stage_fn(smmu_domain, &pgtbl_cfg);
if (ret < 0) {
free_io_pgtable_ops(pgtbl_ops);
return ret;
@@ -2429,15 +2425,14 @@ static void arm_smmu_detach_dev(struct arm_smmu_master *master)
}
static int arm_smmu_prepare_domain_for_smmu(struct arm_smmu_device *smmu,
- struct arm_smmu_domain *smmu_domain,
- struct arm_smmu_master *master)
+ struct arm_smmu_domain *smmu_domain)
{
int ret = 0;
mutex_lock(&smmu_domain->init_mutex);
if (!smmu_domain->smmu) {
smmu_domain->smmu = smmu;
- ret = arm_smmu_domain_finalise(&smmu_domain->domain, master);
+ ret = arm_smmu_domain_finalise(&smmu_domain->domain);
if (ret)
smmu_domain->smmu = NULL;
} else if (smmu_domain->smmu != smmu)
@@ -2462,7 +2457,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
master = dev_iommu_priv_get(dev);
smmu = master->smmu;
- ret = arm_smmu_prepare_domain_for_smmu(smmu, smmu_domain, master);
+ ret = arm_smmu_prepare_domain_for_smmu(smmu, smmu_domain);
if (ret)
return ret;
@@ -2541,7 +2536,7 @@ static int arm_smmu_set_dev_pasid(struct iommu_domain *domain,
master = dev_iommu_priv_get(dev);
smmu = master->smmu;
- ret = arm_smmu_prepare_domain_for_smmu(smmu, smmu_domain, master);
+ ret = arm_smmu_prepare_domain_for_smmu(smmu, smmu_domain);
if (ret)
return ret;