Commit 6a01b9f0 authored by Nicolin Chen's avatar Nicolin Chen Committed by Will Deacon
Browse files

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: 587bb3e5 ("iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range()")
Signed-off-by: default avatarNicolin Chen <nicolinc@nvidia.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 4202fddd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2688,7 +2688,7 @@ static void __arm_smmu_domain_inv_range(struct arm_smmu_invs *invs,
		case INV_TYPE_S2_VMID_S1_CLEAR:
			/* CMDQ_OP_TLBI_S12_VMALL already flushed S1 entries */
			if (arm_smmu_inv_size_too_big(cur->smmu, size, granule))
				continue;
				break;
			cmd.tlbi.vmid = cur->id;
			arm_smmu_cmdq_batch_add(smmu, &cmds, &cmd);
			break;
@@ -2704,7 +2704,7 @@ static void __arm_smmu_domain_inv_range(struct arm_smmu_invs *invs,
			break;
		default:
			WARN_ON_ONCE(1);
			continue;
			break;
		}

		/* Skip any trash entry in-between */