]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu-v3: Start a new batch if new command is not supported
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 29 Aug 2024 22:34:38 +0000 (15:34 -0700)
committerWill Deacon <will@kernel.org>
Fri, 30 Aug 2024 14:28:25 +0000 (15:28 +0100)
commitf59e854907128ec3d4a82b7fc4efe9be8da2e78e
tree671d61f5140c7e66032d3afb2be093cde70ca8e8
parent918eb5c856f6ce4cf93b4b38e4b5e156905c5943
iommu/arm-smmu-v3: Start a new batch if new command is not supported

The VCMDQ in the tegra241-cmdqv driver has a guest mode that supports only
a few invalidation commands. A batch is initialized with a cmdq, so it has
to confirm whether a new command is supported or not.

Add a supports_cmd function pointer to the cmdq structure, where the vcmdq
driver should hook a command scan function. Add an inline helper too so it
can be used by both sides.

If a new command is not supported, simply issue the existing batch and re-
init it as a new batch.

Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Link: https://lore.kernel.org/r/aafb24b881504f18c5d0c7c15f2134e40ad2c486.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