Skip to contentSkip to conversation

arm64: cpufeature: List early Cortex-A510 parts as having broken dbm

PATCH Applied James Morse 2 participants 4 messages Jan 25, 2022 – Jan 28, 2022

Subsystems (2)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm64: cpufeature: List early Cortex-A510 parts as having broken dbm

Hello,

Early Cortex-A510 parts have broken dbm. Add them to the list of CPUs with broken dbm.

The SDEN is available here:
https://developer.arm.com/documentation/SDEN2397239/900

There are three series that would add the Cortex-A510 part macros. I've picked Anshuman's patch that does this, on the assumption that makes Catalin's life easier. I haven't spotted that patch on the arm64/for-next/fixes branch, so I've not included the hash in the prerequisite field of the CC-stable.

That patch may need to go on a stable branch, as the the third series will likely go via the KVM tree.

Let me know if you want this reposted once that value is known.

This series is based on v5.17-rc1 and can be retrieved from:
https://git.gitlab.arm.com/linux-arm/linux-jm.git a510_errata/dbm/v1

Thanks,

James

Anshuman Khandual (1):
arm64: Add Cortex-A510 CPU part definition

James Morse (1):
arm64: cpufeature: List early Cortex-A510 parts as having broken dbm

 Documentation/arm64/silicon-errata.rst |  2 ++
 arch/arm64/Kconfig                     | 11 +++++++++++
 arch/arm64/include/asm/cputype.h       |  2 ++
 arch/arm64/kernel/cpufeature.c         |  3 +++
 4 files changed, 18 insertions(+)
Signature · 7 lines
2.30.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/2 arm64: Add Cortex-A510 CPU part definition

From: Anshuman Khandual <[email protected]>

Add the CPU Partnumbers for the new Arm designs.

---
 arch/arm64/include/asm/cputype.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/include/asm/cputype.h +2 -0
index 19b8441aa8f2..e8fdc10395b6 100644
@@ -73,6 +73,7 @@
 #define ARM_CPU_PART_CORTEX_A76		0xD0B
 #define ARM_CPU_PART_NEOVERSE_N1	0xD0C
 #define ARM_CPU_PART_CORTEX_A77		0xD0D
+#define ARM_CPU_PART_CORTEX_A510	0xD46
 #define ARM_CPU_PART_CORTEX_A710	0xD47
 #define ARM_CPU_PART_NEOVERSE_N2	0xD49
 
@@ -115,6 +116,7 @@
 #define MIDR_CORTEX_A76	MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76)
 #define MIDR_NEOVERSE_N1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N1)
 #define MIDR_CORTEX_A77	MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A77)
+#define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510)
 #define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
 #define MIDR_NEOVERSE_N2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N2)
 #define MIDR_THUNDERX	MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
Signature · 7 lines
2.30.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 2/2 arm64: cpufeature: List early Cortex-A510 parts as having broken dbm

In reply to James Morse

Versions of Cortex-A510 before r0p3 are affected by a hardware erratum where the hardware update of the dirty bit is not correctly ordered.

Add these cpus to the cpu_has_broken_dbm list.

Cc [email protected] # ${GITHASHHERE}: arm64: Add Cortex-A510 CPU part definition
---
 Documentation/arm64/silicon-errata.rst |  2 ++
 arch/arm64/Kconfig                     | 11 +++++++++++
 arch/arm64/kernel/cpufeature.c         |  3 +++
 3 files changed, 16 insertions(+)
Documentation/arm64/silicon-errata.rst +2 -0
index 5342e895fb60..dcd346d209b5 100644
@@ -92,6 +92,8 @@ stable kernels.
 +----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Cortex-A77      | #1508412        | ARM64_ERRATUM_1508412       |
 +----------------+-----------------+-----------------+-----------------------------+
+| ARM            | Cortex-A510     | #2051678        | ARM64_ERRATUM_2051678       |
++----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Cortex-A710     | #2119858        | ARM64_ERRATUM_2119858       |
 +----------------+-----------------+-----------------+-----------------------------+
 | ARM            | Cortex-A710     | #2054223        | ARM64_ERRATUM_2054223       |
arch/arm64/Kconfig +11 -0
index 6978140edfa4..a8aca96918b2 100644
@@ -670,6 +670,17 @@ config ARM64_ERRATUM_1508412
 config ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE
 	bool
 
+config ARM64_ERRATUM_2051678
+	bool "Cortex-A510: 2051678: disable Hardware Update of the page table's dirty bit"
+	help
+	  This options adds the workaround for ARM Cortex-A510 erratum ARM64_ERRATUM_2051678.
+	  Affected Coretex-A510 might not respect the ordering rules for
+	  hardware update of the page table's dirty bit. The workaround
+	  is to not enable the feature on affected CPUs.
+
+	  If unsure, say Y.
+
+
 config ARM64_ERRATUM_2119858
 	bool "Cortex-A710: 2119858: workaround TRBE overwriting trace data in FILL mode"
 	default y
arch/arm64/kernel/cpufeature.c +3 -0
index a46ab3b1c4d5..e5f23dab1c8d 100644
@@ -1645,6 +1645,9 @@ static bool cpu_has_broken_dbm(void)
 		MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
 		/* Kryo4xx Silver (rdpe => r1p0) */
 		MIDR_REV(MIDR_QCOM_KRYO_4XX_SILVER, 0xd, 0xe),
+#endif
+#ifdef CONFIG_ARM64_ERRATUM_2051678
+		MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2),
 #endif
 		{},
 	};
Signature · 7 lines
2.30.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#3 lore raw

Re: (subset) [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm

In reply to James Morse
Quoted 8 lines · James Morse

Early Cortex-A510 parts have broken dbm. Add them to the list of CPUs with broken dbm.

The SDEN is available here:
https://developer.arm.com/documentation/SDEN2397239/900

[...]

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

[2/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm

      https://git.kernel.org/arm64/c/297ae1eb23b0

Patch 1 got into for-next/fixes via Mathieu's pull request.

Signature · 7 lines
Catalin


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel