Skip to content

Commit cdfb984

Browse files
jgunthorpewilldeacon
authored andcommitted
iommu/arm-smmu-v3: Remove domain_alloc_paging()
arm_smmu_domain_alloc_paging_flags() with a flags = 0 now does the same thing as arm_smmu_domain_alloc_paging(), remove arm_smmu_domain_alloc_paging(). Signed-off-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent bb857c5 commit cdfb984

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ static const char * const event_class_str[] = {
105105
[3] = "Reserved",
106106
};
107107

108-
static int arm_smmu_domain_finalise(struct arm_smmu_domain *smmu_domain,
109-
struct arm_smmu_device *smmu, u32 flags);
110108
static int arm_smmu_alloc_cd_tables(struct arm_smmu_master *master);
111109

112110
static void parse_driver_options(struct arm_smmu_device *smmu)
@@ -2466,34 +2464,6 @@ struct arm_smmu_domain *arm_smmu_domain_alloc(void)
24662464
return smmu_domain;
24672465
}
24682466

2469-
static struct iommu_domain *arm_smmu_domain_alloc_paging(struct device *dev)
2470-
{
2471-
struct arm_smmu_master *master = dev_iommu_priv_get(dev);
2472-
struct arm_smmu_domain *smmu_domain;
2473-
int ret;
2474-
2475-
/*
2476-
* Allocate the domain and initialise some of its data structures.
2477-
* We can't really do anything meaningful until we've added a
2478-
* master.
2479-
*/
2480-
smmu_domain = arm_smmu_domain_alloc();
2481-
if (IS_ERR(smmu_domain))
2482-
return ERR_CAST(smmu_domain);
2483-
2484-
if (master->smmu->features & ARM_SMMU_FEAT_TRANS_S1)
2485-
smmu_domain->stage = ARM_SMMU_DOMAIN_S1;
2486-
else
2487-
smmu_domain->stage = ARM_SMMU_DOMAIN_S2;
2488-
2489-
ret = arm_smmu_domain_finalise(smmu_domain, master->smmu, 0);
2490-
if (ret) {
2491-
kfree(smmu_domain);
2492-
return ERR_PTR(ret);
2493-
}
2494-
return &smmu_domain->domain;
2495-
}
2496-
24972467
static void arm_smmu_domain_free_paging(struct iommu_domain *domain)
24982468
{
24992469
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
@@ -3656,7 +3626,6 @@ static struct iommu_ops arm_smmu_ops = {
36563626
.blocked_domain = &arm_smmu_blocked_domain,
36573627
.capable = arm_smmu_capable,
36583628
.hw_info = arm_smmu_hw_info,
3659-
.domain_alloc_paging = arm_smmu_domain_alloc_paging,
36603629
.domain_alloc_sva = arm_smmu_sva_domain_alloc,
36613630
.domain_alloc_paging_flags = arm_smmu_domain_alloc_paging_flags,
36623631
.probe_device = arm_smmu_probe_device,

0 commit comments

Comments
 (0)