* [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
@ 2022-11-03 22:21 ` Chen Lin
0 siblings, 0 replies; 4+ messages in thread
From: Chen Lin @ 2022-11-03 22:21 UTC (permalink / raw)
To: will
Cc: robin.murphy, joro, treding, linux-arm-kernel, iommu,
linux-kernel, Chen Lin
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
@ 2022-11-03 22:21 ` Chen Lin
0 siblings, 0 replies; 4+ messages in thread
From: Chen Lin @ 2022-11-03 22:21 UTC (permalink / raw)
To: will
Cc: robin.murphy, joro, treding, linux-arm-kernel, iommu,
linux-kernel, Chen Lin
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>
---
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] 4+ messages in thread
* Re: [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
2022-11-03 22:21 ` Chen Lin
@ 2022-11-15 18:32 ` Will Deacon
-1 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2022-11-15 18:32 UTC (permalink / raw)
To: Chen Lin
Cc: catalin.marinas, kernel-team, Will Deacon, robin.murphy, treding,
joro, linux-arm-kernel, iommu, linux-kernel
On Fri, 4 Nov 2022 06:21:21 +0800, Chen Lin wrote:
> 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.
>
>
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/1] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
https://git.kernel.org/will/c/f87f6e5b4539
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
@ 2022-11-15 18:32 ` Will Deacon
0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2022-11-15 18:32 UTC (permalink / raw)
To: Chen Lin
Cc: catalin.marinas, kernel-team, Will Deacon, robin.murphy, treding,
joro, linux-arm-kernel, iommu, linux-kernel
On Fri, 4 Nov 2022 06:21:21 +0800, Chen Lin wrote:
> 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.
>
>
Applied to will (for-joerg/arm-smmu/updates), thanks!
[1/1] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply
https://git.kernel.org/will/c/f87f6e5b4539
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2022-11-15 18:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 22:21 [PATCH] iommu/arm-smmu: Warn once when the perfetcher errata patch fails to apply Chen Lin
2022-11-03 22:21 ` Chen Lin
2022-11-15 18:32 ` Will Deacon
2022-11-15 18:32 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.