Re: [PATCH v5 1/6] iommu/arm-smmu-v3: Add CS_NONE quirk

From: Nicolin Chen
Date: Fri Apr 19 2024 - 13:13:24 EST


On Fri, Apr 12, 2024 at 08:43:49PM -0700, Nicolin Chen wrote:
> The CMDQV extension in NVIDIA Tegra241 SoC only supports CS_NONE in the
> CS field of CMD_SYNC. Add a quirk flag to accommodate that.
>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 10 ++++++++--
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 4 ++++
> 2 files changed, 12 insertions(+), 2 deletions(-)

> @@ -707,7 +712,8 @@ static int __arm_smmu_cmdq_poll_until_consumed(struct arm_smmu_device *smmu,
> static int arm_smmu_cmdq_poll_until_sync(struct arm_smmu_device *smmu,
> struct arm_smmu_ll_queue *llq)
> {
> - if (smmu->options & ARM_SMMU_OPT_MSIPOLL)
> + if (smmu->options & ARM_SMMU_OPT_MSIPOLL &&
> + !(cmdq->q.quirks & CMDQ_QUIRK_SYNC_CS_NONE_ONLY))
> return __arm_smmu_cmdq_poll_until_msi(smmu, llq);

Realized that I should have moved the PATCH-4 to the top for the
cmdq pointer here. Otherwise it breaks git-bisect... Will fix in
the next version.

Nicolin