Skip to content

Commit 6a01b9f

Browse files
nicolincwilldeacon
authored andcommitted
iommu/arm-smmu-v3: Do not continue in __arm_smmu_domain_inv_range()
The loop in the __arm_smmu_domain_inv_range() is a while loop, not a for loop. So, using "continue" is wrong that would fail to move the needle. Meanwhile, though the current command is skipped, the batch still has to go through arm_smmu_invs_end_batch() to be issued accordingly. Thus, use "break" to fix the issue. Fixes: 587bb3e ("iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range()") Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 4202fdd commit 6a01b9f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,7 @@ static void __arm_smmu_domain_inv_range(struct arm_smmu_invs *invs,
26882688
case INV_TYPE_S2_VMID_S1_CLEAR:
26892689
/* CMDQ_OP_TLBI_S12_VMALL already flushed S1 entries */
26902690
if (arm_smmu_inv_size_too_big(cur->smmu, size, granule))
2691-
continue;
2691+
break;
26922692
cmd.tlbi.vmid = cur->id;
26932693
arm_smmu_cmdq_batch_add(smmu, &cmds, &cmd);
26942694
break;
@@ -2704,7 +2704,7 @@ static void __arm_smmu_domain_inv_range(struct arm_smmu_invs *invs,
27042704
break;
27052705
default:
27062706
WARN_ON_ONCE(1);
2707-
continue;
2707+
break;
27082708
}
27092709

27102710
/* Skip any trash entry in-between */

0 commit comments

Comments
 (0)