diff options
| author | Xiang Chen <[email protected]> | 2021-03-30 12:58:26 +0000 |
|---|---|---|
| committer | Will Deacon <[email protected]> | 2021-03-30 14:06:51 +0000 |
| commit | 6cc7e5a9c6b02507b9be5a99b51e970afa91c85f (patch) | |
| tree | df3fdd541e924b9d3e9780450db6f67e800e2d24 | |
| parent | iommu/arm-smmu-v3: add bit field SFM into GERROR_ERR_MASK (diff) | |
| download | kernel-6cc7e5a9c6b02507b9be5a99b51e970afa91c85f.tar.gz kernel-6cc7e5a9c6b02507b9be5a99b51e970afa91c85f.zip | |
iommu/arm-smmu-v3: Add a check to avoid invalid iotlb sync
It may send a invalid tlb sync for smmuv3 if iotlb_gather is not valid
(iotlb_gather->pgsize = 0). So add a check to avoid invalid iotlb sync
for it.
Signed-off-by: Xiang Chen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
| -rw-r--r-- | drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 8594b4a83043..941ba5484731 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2305,6 +2305,9 @@ static void arm_smmu_iotlb_sync(struct iommu_domain *domain, { struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); + if (!gather->pgsize) + return; + arm_smmu_tlb_inv_range_domain(gather->start, gather->end - gather->start + 1, gather->pgsize, true, smmu_domain); |
