projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
655c447
)
iommu/arm-smmu-v3: Add a check to avoid invalid iotlb sync
author
Xiang Chen
<chenxiang66@hisilicon.com>
Tue, 30 Mar 2021 12:58:26 +0000
(20:58 +0800)
committer
Will Deacon
<will@kernel.org>
Tue, 30 Mar 2021 14:06:51 +0000
(15:06 +0100)
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
patch
|
blob
|
history
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
8594b4a
..
941ba54
100644
(file)
--- 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);