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 <jgg@nvidia.com> Change-Id: I7eb1698fe46941ed326f0c0a11ad28d6ecddddd8 Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Link: https://lore.kernel.org/r/e11a3c0bde172c9652c2946f12bc2ceed4c3a355.1724970714.git.nicolinc@nvidia.com Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Ashish Mhetre <amhetre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3435430 Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Ashish Mhetre
parent
d6b2a909b9
commit
af82bcacd5
@@ -2930,9 +2930,9 @@ static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int arm_smmu_cmdq_init(struct arm_smmu_device *smmu)
|
static int arm_smmu_cmdq_init(struct arm_smmu_device *smmu,
|
||||||
|
struct arm_smmu_cmdq *cmdq)
|
||||||
{
|
{
|
||||||
struct arm_smmu_cmdq *cmdq = &smmu->cmdq;
|
|
||||||
unsigned int nents = 1 << cmdq->q.llq.max_n_shift;
|
unsigned int nents = 1 << cmdq->q.llq.max_n_shift;
|
||||||
|
|
||||||
atomic_set(&cmdq->owner_prod, 0);
|
atomic_set(&cmdq->owner_prod, 0);
|
||||||
@@ -2957,7 +2957,7 @@ static int arm_smmu_init_queues(struct arm_smmu_device *smmu)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = arm_smmu_cmdq_init(smmu);
|
ret = arm_smmu_cmdq_init(smmu, &smmu->cmdq);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user