linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to allpy
@ 2022-10-22  2:45 Chen Lin
  2022-10-23 14:36 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Lin @ 2022-10-22  2:45 UTC (permalink / raw)
  To: will
  Cc: robin.murphy, joro, treding, linux-arm-kernel, iommu,
	linux-kernel, Chen Lin

From: Chen Lin <chen.lin5@zte.com.cn>

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 <chen.lin5@zte.com.cn>
---
 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
index 658f3cc83278..2d2252b3e518 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 alpply prefetcher errata patch, check SMMU_sACR.cache_lock\n");
 	}
 
 	return 0;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to allpy
  2022-10-22  2:45 [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to allpy Chen Lin
@ 2022-10-23 14:36 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-10-23 14:36 UTC (permalink / raw)
  To: Chen Lin
  Cc: will, robin.murphy, joro, treding, linux-arm-kernel, iommu,
	linux-kernel, Chen Lin

On Sat, Oct 22, 2022 at 10:45:59AM +0800, Chen Lin wrote:
> From: Chen Lin <chen.lin5@zte.com.cn>
> 
> 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 <chen.lin5@zte.com.cn>
> ---
>  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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-23 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-22  2:45 [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to allpy Chen Lin
2022-10-23 14:36 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).