Skip to contentSkip to conversation

iommu/arm-smmu: Warn once when the perfetcher errata patch fails to allpy

PATCH In review Chen Lin 2 participants 2 messages Oct 22, 2022 – Oct 23, 2022

Subsystems (2)
lore
Share & tools
lore

Chen Lin

author
#0 lore raw

PATCH 1/1 iommu/arm-smmu: Warn once when the perfetcher errata patch fails to allpy

From: Chen Lin <[email protected]>

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.

---
 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/iommu/arm/arm-smmu/arm-smmu-impl.c +3 -0
index 658f3cc83278..2d2252b3e518 100644
@@ -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 alpply prefetcher errata patch, check SMMU_sACR.cache_lock\n");
 	}
 
 	return 0;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · Chen Lin

From: Chen Lin <[email protected]>

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.

---
 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 +++
 1 file changed, 3 insertions(+)

As has been stated many times before, please fix your email systems and stop using personal accounts, if you wish for us to think that you really are developing from a zte.com.cn account.

thanks,

greg k-h