Re: [PATCH v6 1/6] iommu/arm-smmu-v3: Pass in cmdq pointer to arm_smmu_cmdq_issue_cmdlist()

From: Jason Gunthorpe
Date: Tue Apr 30 2024 - 09:55:28 EST


On Mon, Apr 29, 2024 at 09:43:44PM -0700, Nicolin Chen wrote:
> The driver currently calls arm_smmu_get_cmdq() helper in different places,
> although they are all called from the arm_smmu_cmdq_issue_cmdlist().
>
> Allow to pass in the cmdq pointer, instead of calling arm_smmu_get_cmdq()
> every time.
>
> This will also help CMDQV extension in NVIDIA Tegra241 SoC, as its driver
> will maintain its own cmdq pointers, then need to redirect arm_smmu->cmdq
> to one of its vcmdqs upon seeing a supported command.
>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason