Skip to content

Commit e736c89

Browse files
nicolincwilldeacon
authored andcommitted
iommu/arm-smmu-v3: Pass in cmdq pointer to arm_smmu_cmdq_init
So that this function can be used by other cmdqs than &smmu->cmdq only. Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Nicolin Chen <[email protected]> Link: https://lore.kernel.org/r/e11a3c0bde172c9652c2946f12bc2ceed4c3a355.1724970714.git.nicolinc@nvidia.com Signed-off-by: Will Deacon <[email protected]>
1 parent 2ea1f01 commit e736c89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,9 +3564,9 @@ static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
35643564
return 0;
35653565
}
35663566

3567-
static int arm_smmu_cmdq_init(struct arm_smmu_device *smmu)
3567+
static int arm_smmu_cmdq_init(struct arm_smmu_device *smmu,
3568+
struct arm_smmu_cmdq *cmdq)
35683569
{
3569-
struct arm_smmu_cmdq *cmdq = &smmu->cmdq;
35703570
unsigned int nents = 1 << cmdq->q.llq.max_n_shift;
35713571

35723572
atomic_set(&cmdq->owner_prod, 0);
@@ -3591,7 +3591,7 @@ static int arm_smmu_init_queues(struct arm_smmu_device *smmu)
35913591
if (ret)
35923592
return ret;
35933593

3594-
ret = arm_smmu_cmdq_init(smmu);
3594+
ret = arm_smmu_cmdq_init(smmu, &smmu->cmdq);
35953595
if (ret)
35963596
return ret;
35973597

0 commit comments

Comments
 (0)