]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu-v3: Issue a batch of commands to the same cmdq
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 29 Aug 2024 22:34:30 +0000 (15:34 -0700)
committerWill Deacon <will@kernel.org>
Fri, 30 Aug 2024 14:18:41 +0000 (15:18 +0100)
commit56ae8866f3b408836c5f6cafbe6102f6e97911ba
tree6c6983d6e62a2d00d52b273414dadd8013b3535b
parent2d42d3ba443706c9164fa0bef4e5fd1c36bc1bd9
iommu/arm-smmu-v3: Issue a batch of commands to the same cmdq

The driver calls in different places the arm_smmu_get_cmdq() helper, and
it's fine to do so since the helper always returns the single SMMU CMDQ.
However, with NVIDIA CMDQV extension or SMMU ECMDQ, there can be multiple
cmdqs in the system to select one from. And either case requires a batch
of commands to be issued to the same cmdq. Thus, a cmdq has to be decided
in the higher-level callers.

Add a cmdq pointer in arm_smmu_cmdq_batch structure, and decide the cmdq
when initializing the batch. Pass its pointer down to the bottom function.
Update __arm_smmu_cmdq_issue_cmd() accordingly for single command issuers.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Link: https://lore.kernel.org/r/2cbf5ddefb6ea611e48d67c642271bd24421eb21.1724970714.git.nicolinc@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h