iommu/arm-smmu-v3: Add a check to avoid invalid iotlb sync
authorXiang Chen <chenxiang66@hisilicon.com>
Tue, 30 Mar 2021 12:58:26 +0000 (20:58 +0800)
committerWill Deacon <will@kernel.org>
Tue, 30 Mar 2021 14:06:51 +0000 (15:06 +0100)
commit6cc7e5a9c6b02507b9be5a99b51e970afa91c85f
treedf3fdd541e924b9d3e9780450db6f67e800e2d24
parent655c447c97d7fe462e6cd9e15809037be028bc70
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 <chenxiang66@hisilicon.com>
Link: https://lore.kernel.org/r/1617109106-121844-1-git-send-email-chenxiang66@hisilicon.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c