summaryrefslogtreecommitdiff
path: root/drivers/iommu/arm/arm-smmu
diff options
context:
space:
mode:
authorChen Lin <chen45464546@163.com>2022-11-04 01:21:21 +0300
committerWill Deacon <will@kernel.org>2022-11-15 14:47:28 +0300
commitf87f6e5b4539639460ab105e597e5190c9b2500f (patch)
tree0a124ad2b8d1c112899d569c259bb4e11d92e148 /drivers/iommu/arm/arm-smmu
parent9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff)
downloadlinux-f87f6e5b4539639460ab105e597e5190c9b2500f.tar.xz
iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
Default reset value of secure banked register SMMU_sACR.cache_lock is 1. If it is not been set to 0 by secure software(eg: atf), the non-secure linux cannot clear ARM_MMU500_ACTLR_CPRE bit. In this situation, the prefetcher errata is not applied successfully, warn once. Signed-off-by: Chen Lin <chen45464546@163.com> Link: https://lore.kernel.org/r/20221103222121.3051-1-chen45464546@163.com [will: Tweaked wording of diagnostic] Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/iommu/arm/arm-smmu')
-rw-r--r--drivers/iommu/arm/arm-smmu/arm-smmu-impl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
index 658f3cc83278..9dc772f2cbb2 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
@@ -136,6 +136,9 @@ int arm_mmu500_reset(struct arm_smmu_device *smmu)
reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
reg &= ~ARM_MMU500_ACTLR_CPRE;
arm_smmu_cb_write(smmu, i, ARM_SMMU_CB_ACTLR, reg);
+ reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
+ if (reg & ARM_MMU500_ACTLR_CPRE)
+ dev_warn_once(smmu->dev, "Failed to disable prefetcher [errata #841119 and #826419], check ACR.CACHE_LOCK\n");
}
return 0;