Skip to contentSkip to conversation

arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76

PATCH Applied Zenghui Yu 3 participants 4 messages Aug 9, 2022 – Aug 17, 2022 arm64

lore
Share & tools
lore

Zenghui Yu

author
#0 lore raw

PATCH 1/1 arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76

Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.

Fix this issue by creating a separate entry for Kryo4xx Gold.

Fixes 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs")
Cc Shreyas K K <[email protected]>
---
 arch/arm64/kernel/cpu_errata.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/kernel/cpu_errata.c +2 -0
index 7e6289e709fc..0f7e9087d900 100644
@@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities arm64_repeat_tlbi_list[] = {
 #ifdef CONFIG_ARM64_ERRATUM_1286807
 	{
 		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
+	},
+	{
 		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
 		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
 	},
Signature · 1 line
2.33.0
Acked-by on v1 1/1
#1 lore raw
Quoted 27 lines · Zenghui Yu

Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.

Fix this issue by creating a separate entry for Kryo4xx Gold.

Fixes 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX

gold CPUs")

---
 arch/arm64/kernel/cpu_errata.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/kernel/cpu_errata.c +2 -0
index 7e6289e709fc..0f7e9087d900 100644
@@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities
 arm64_repeat_tlbi_list[] = {
 #ifdef CONFIG_ARM64_ERRATUM_1286807
 	{
 		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
+	},
+	{
 		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
 		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),
Quoted 1 line

},

Ouch. It isn't the first time we end-up with this sort of thing, and I wonder whether we should restructure the ERRATA_MIDR_* macros to prevent this sort of accidental override...

Anyway, thanks for spotting it!

        M.
Signature · 1 line
Jazz is not dead. It just smells funny...
maintainer
#2 lore raw
Quoted 30 lines · Marc Zyngier
Quoted 29 lines · Zenghui Yu

Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX
gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its
entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.

Fix this issue by creating a separate entry for Kryo4xx Gold.

Fixes 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX

gold CPUs")

---
 arch/arm64/kernel/cpu_errata.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/kernel/cpu_errata.c +2 -0
index 7e6289e709fc..0f7e9087d900 100644
@@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities
 arm64_repeat_tlbi_list[] = {
 #ifdef CONFIG_ARM64_ERRATUM_1286807
 	{
 		ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0),
+	},
+	{
Quoted 8 lines
Quoted 3 lines
arch/arm64/kernel/cpu_errata.c +0 -0
 		/* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */
 		ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe),

},

Ouch. It isn't the first time we end-up with this sort of thing, and I wonder whether we should restructure the ERRATA_MIDR_* macros to prevent this sort of accidental override...

Agreed. I think we may have gone a bit too far with the macros in cpu_errata.c and cpufeature.c. Although the files would be larger, I think it would be clearer if we removed some of the abstractions and forced this stuff to be spelled out each time.

Quoted 4 lines

Anyway, thanks for spotting it!

I'll queue this as a fix at -rc1 along with any other fixes which come in.

Will

maintainer Applied
#3 lore raw
In reply to Zenghui Yu
Quoted 8 lines · Zenghui Yu

Since commit 51f559d66527 ("arm64: Enable repeat tlbi workaround on KRYO4XX gold CPUs"), we failed to detect erratum 1286807 on Cortex-A76 because its entry in arm64_repeat_tlbi_list[] was accidently corrupted by this commit.

Fix this issue by creating a separate entry for Kryo4xx Gold.

[...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76

      https://git.kernel.org/arm64/c/5e1e087457c9

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev