Add Kryo4xx gold and silver cores to applicable errata list
Subsystems (3)
cover Add Kryo4xx gold and silver cores to applicable errata list
This series adds the Kryo4xx gold/big and silver/LITTLE CPU cores to the errata list which are applicable to them based on the revisions of the Cortex CPU cores on which they are based on.
Patch 1 adds the MIDR value for Kryo4xx gold CPU cores.
Patch 2 adds Kryo4xx gold CPU cores to erratum list 1463225 and 1418040. Patch 3 adds Kryo4xx silver CPU cores to erratum list 1530923 and 1024718.
Sai Prakash Ranjan (3):
arm64: Add MIDR value for KRYO4XX gold CPU cores
arm64: Add KRYO4XX gold CPU cores to erratum list 1463225 and 1418040
arm64: Add KRYO4XX silver CPU cores to erratum list 1530923 and
1024718
Documentation/arm64/silicon-errata.rst | 8 ++++++++ arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/cpu_errata.c | 21 +++++++++++++++------ arch/arm64/kernel/cpufeature.c | 2 ++ 4 files changed, 27 insertions(+), 6 deletions(-)
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH 1/3 arm64: Add MIDR value for KRYO4XX gold CPU cores
Add MIDR value for KRYO4XX gold/big CPU cores which are used in Qualcomm Technologies, Inc. SoCs. This will be used to identify and apply erratum which are applicable for these CPU cores.
--- arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/include/asm/cputype.h +2 -0
@@ -86,6 +86,7 @@#define QCOM_CPU_PART_FALKOR 0xC00#define QCOM_CPU_PART_KRYO 0x200#define QCOM_CPU_PART_KRYO_3XX_SILVER 0x803 +#define QCOM_CPU_PART_KRYO_4XX_GOLD 0x804#define QCOM_CPU_PART_KRYO_4XX_SILVER 0x805#define NVIDIA_CPU_PART_DENVER 0x003
@@ -114,6 +115,7 @@#define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR)#define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO)#define MIDR_QCOM_KRYO_3XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_3XX_SILVER) +#define MIDR_QCOM_KRYO_4XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_GOLD)#define MIDR_QCOM_KRYO_4XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_SILVER)#define MIDR_NVIDIA_DENVER MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_DENVER)#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH 3/3 arm64: Add KRYO4XX silver CPU cores to erratum list 1530923 and 1024718
In reply to Sai Prakash RanjanKRYO4XX silver/LITTLE CPU cores with revision r1p0 are affected by erratum 1530923 and 1024718, so add them to the respective list. The variant and revision bits are implementation defined and are different from the their Cortex CPU counterparts on which they are based on, i.e., r1p0 is equivalent to rdpe.
--- Documentation/arm64/silicon-errata.rst | 4 ++++ arch/arm64/kernel/cpu_errata.c | 2 ++ arch/arm64/kernel/cpufeature.c | 2 ++ 3 files changed, 8 insertions(+)
Documentation/arm64/silicon-errata.rst +4 -0
@@ -151,6 +151,10 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1418040 | +----------------+-----------------+-----------------+-----------------------------+ +| Qualcomm Tech. | Kryo4xx Silver | N/A | ARM64_ERRATUM_1530923 | ++----------------+-----------------+-----------------+-----------------------------+ +| Qualcomm Tech. | Kryo4xx Silver | N/A | ARM64_ERRATUM_1024718 | ++----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 | +----------------+-----------------+-----------------+-----------------------------+
arch/arm64/kernel/cpu_errata.c +2 -0
@@ -769,6 +769,8 @@ static const struct midr_range erratum_speculative_at_list[] = {#ifdef CONFIG_ARM64_ERRATUM_1530923 /* Cortex A55 r0p0 to r2p0 */ MIDR_RANGE (MIDR_CORTEX_A55 ,0 ,0 ,2 ,0 ), +/* Kryo4xx Silver (rdpe => r1p0) */ + MIDR_REV(MIDR_QCOM_KRYO_4XX_SILVER, 0xd, 0xe), #endif {}, };
arch/arm64/kernel/cpufeature.c +2 -0
@@ -1408,6 +1408,8 @@ static bool cpu_has_broken_dbm(void)static const struct midr_range cpus[] = { #ifdef CONFIG_ARM64_ERRATUM_1024718MIDR_RANGE (MIDR_CORTEX_A55 ,0 ,0 ,1 ,0 ),// A55 r0p0 -r1p0 +/* Kryo4xx Silver (rdpe => r1p0) */ +MIDR_REV (MIDR_QCOM_KRYO_4XX_SILVER ,0xd ,0xe ), #endif {}, };
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH 2/3 arm64: Add KRYO4XX gold CPU cores to erratum list 1463225 and 1418040
In reply to Sai Prakash RanjanKRYO4XX gold/big CPU core revisions r0p0 to r3p1 are affected by erratum 1463225 and 1418040, so add them to the respective list. The variant and revision bits are implementation defined and are different from the their Cortex CPU counterparts on which they are based on, i.e., (r0p0 to r3p1) is equivalent to (rcpe to rfpf).
--- Documentation/arm64/silicon-errata.rst | 4 ++++ arch/arm64/kernel/cpu_errata.c | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-)
Documentation/arm64/silicon-errata.rst +4 -0
@@ -147,6 +147,10 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | Qualcomm Tech. | Falkor v{1,2} | E1041 | QCOM_FALKOR_ERRATUM_1041 | +----------------+-----------------+-----------------+-----------------------------+ +| Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1463225 | ++----------------+-----------------+-----------------+-----------------------------+ +| Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1418040 | ++----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 | +----------------+-----------------+-----------------+-----------------------------+
arch/arm64/kernel/cpu_errata.c +13 -6
@@ -472,12 +472,7 @@ static bool has_cortex_a76_erratum_1463225(const struct arm64_cpu_capabilities *entry, int scope) { -u32 midr =read_cpuid_id (); -/* Cortex-A76 r0p0 - r3p1 */ -struct midr_range range =MIDR_RANGE (MIDR_CORTEX_A76 ,0 ,0 ,3 ,1 ); - -WARN_ON (scope !=SCOPE_LOCAL_CPU ||preemptible ()); -return is_midr_in_range (midr, &range) &&is_kernel_in_hyp_mode (); + return is_affected_midr_range_list(entry, scope) && is_kernel_in_hyp_mode(); }#endif
@@ -728,6 +723,8 @@ static const struct midr_range erratum_1418040_list[] = {MIDR_RANGE (MIDR_CORTEX_A76 ,0 ,0 ,3 ,1 ),/* Neoverse-N1 r0p0 to r3p1 */ MIDR_RANGE (MIDR_NEOVERSE_N1 ,0 ,0 ,3 ,1 ), +/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */ + MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xf), {}, };#endif
@@ -777,6 +774,15 @@ static const struct midr_range erratum_speculative_at_list[] = { };#endif +#ifdef CONFIG_ARM64_ERRATUM_1463225 +static const struct midr_range erratum_1463225[] = { +/* Cortex-A76 r0p0 - r3p1 */ +MIDR_RANGE (MIDR_CORTEX_A76 ,0 ,0 ,3 ,1 ), +/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */ +MIDR_RANGE (MIDR_QCOM_KRYO_4XX_GOLD ,0xc ,0xe ,0xf ,0xf ), +}; +#endif + const struct arm64_cpu_capabilities arm64_errata[] = {#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE {
@@ -916,6 +922,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .capability = ARM64_WORKAROUND_1463225, .type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM, .matches = has_cortex_a76_erratum_1463225, + .midr_range_list = erratum_1463225, },#endif #ifdef CONFIG_CAVIUM_TX2_ERRATUM_219
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Will Deacon
maintainerRe: [PATCH 3/3] arm64: Add KRYO4XX silver CPU cores to erratum list 1530923 and 1024718
In reply to Sai Prakash RanjanQuoted 5 lines · Sai Prakash Ranjan
KRYO4XX silver/LITTLE CPU cores with revision r1p0 are affected by erratum 1530923 and 1024718, so add them to the respective list. The variant and revision bits are implementation defined and are different from the their Cortex CPU counterparts on which they are based on, i.e., r1p0 is equivalent to rdpe.
So just to confirm, revisions prior to rdpe are unaffected, or do those parts simply not exist?
Cheers,
Will
Quoted 9 lines · Sai Prakash Ranjan
This series adds the Kryo4xx gold/big and silver/LITTLE CPU cores to the errata list which are applicable to them based on the revisions of the Cortex CPU cores on which they are based on.
Patch 1 adds the MIDR value for Kryo4xx gold CPU cores.
Patch 2 adds Kryo4xx gold CPU cores to erratum list 1463225 and 1418040. Patch 3 adds Kryo4xx silver CPU cores to erratum list 1530923 and 1024718.[...]
Applied to arm64 (for-next/fixes), thanks!
[1/3] arm64: Add MIDR value for KRYO4XX gold CPU cores
https://git.kernel.org/arm64/c/dce4f2807f69 [2/3] arm64: Add KRYO4XX gold CPU cores to erratum list 1463225 and 1418040 https://git.kernel.org/arm64/c/a9e821b89daa [3/3] arm64: Add KRYO4XX silver CPU cores to erratum list 1530923 and 1024718 https://git.kernel.org/arm64/c/9b23d95c539e
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev