All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm
@ 2022-01-25 15:40 James Morse
  2022-01-25 15:40 ` [PATCH 1/2] arm64: Add Cortex-A510 CPU part definition James Morse
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: James Morse @ 2022-01-25 15:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marc Zyngier, Catalin Marinas, Will Deacon, Anshuman Khandual

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(+)

-- 
2.30.2


_______________________________________________
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

* [PATCH 1/2] arm64: Add Cortex-A510 CPU part definition
  2022-01-25 15:40 [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
@ 2022-01-25 15:40 ` James Morse
  2022-01-25 15:40 ` [PATCH 2/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
  2022-01-28 16:37 ` (subset) [PATCH 0/2] " Catalin Marinas
  2 siblings, 0 replies; 4+ messages in thread
From: James Morse @ 2022-01-25 15:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marc Zyngier, Catalin Marinas, Will Deacon, Anshuman Khandual

From: Anshuman Khandual <anshuman.khandual@arm.com>

Add the CPU Partnumbers for the new Arm designs.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
---
 arch/arm64/include/asm/cputype.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
index 19b8441aa8f2..e8fdc10395b6 100644
--- a/arch/arm64/include/asm/cputype.h
+++ b/arch/arm64/include/asm/cputype.h
@@ -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)
-- 
2.30.2


_______________________________________________
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

* [PATCH 2/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm
  2022-01-25 15:40 [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
  2022-01-25 15:40 ` [PATCH 1/2] arm64: Add Cortex-A510 CPU part definition James Morse
@ 2022-01-25 15:40 ` James Morse
  2022-01-28 16:37 ` (subset) [PATCH 0/2] " Catalin Marinas
  2 siblings, 0 replies; 4+ messages in thread
From: James Morse @ 2022-01-25 15:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marc Zyngier, Catalin Marinas, Will Deacon, Anshuman Khandual

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: stable@vger.kernel.org # ${GITHASHHERE}: arm64: Add Cortex-A510 CPU part definition
Cc: stable@vger.kernel.org
Signed-off-by: James Morse <james.morse@arm.com>
---
 Documentation/arm64/silicon-errata.rst |  2 ++
 arch/arm64/Kconfig                     | 11 +++++++++++
 arch/arm64/kernel/cpufeature.c         |  3 +++
 3 files changed, 16 insertions(+)

diff --git a/Documentation/arm64/silicon-errata.rst b/Documentation/arm64/silicon-errata.rst
index 5342e895fb60..dcd346d209b5 100644
--- a/Documentation/arm64/silicon-errata.rst
+++ b/Documentation/arm64/silicon-errata.rst
@@ -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       |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 6978140edfa4..a8aca96918b2 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -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
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index a46ab3b1c4d5..e5f23dab1c8d 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -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
 		{},
 	};
-- 
2.30.2


_______________________________________________
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: (subset) [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm
  2022-01-25 15:40 [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
  2022-01-25 15:40 ` [PATCH 1/2] arm64: Add Cortex-A510 CPU part definition James Morse
  2022-01-25 15:40 ` [PATCH 2/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
@ 2022-01-28 16:37 ` Catalin Marinas
  2 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2022-01-28 16:37 UTC (permalink / raw)
  To: linux-arm-kernel, James Morse
  Cc: Will Deacon, Marc Zyngier, Anshuman Khandual

On Tue, 25 Jan 2022 15:40:38 +0000, James Morse wrote:
> 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.

-- 
Catalin


_______________________________________________
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-01-28 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 15:40 [PATCH 0/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
2022-01-25 15:40 ` [PATCH 1/2] arm64: Add Cortex-A510 CPU part definition James Morse
2022-01-25 15:40 ` [PATCH 2/2] arm64: cpufeature: List early Cortex-A510 parts as having broken dbm James Morse
2022-01-28 16:37 ` (subset) [PATCH 0/2] " Catalin Marinas

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.