Skip to content

Commit a9e821b

Browse files
Sai Prakash Ranjanwilldeacon
authored andcommitted
arm64: Add KRYO4XX gold CPU cores to erratum list 1463225 and 1418040
KRYO4XX 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). Signed-off-by: Sai Prakash Ranjan <[email protected]> Link: https://lore.kernel.org/r/83780e80c6377c12ca51b5d53186b61241685e49.1593539394.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon <[email protected]>
1 parent dce4f28 commit a9e821b

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Documentation/arm64/silicon-errata.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ stable kernels.
147147
+----------------+-----------------+-----------------+-----------------------------+
148148
| Qualcomm Tech. | Falkor v{1,2} | E1041 | QCOM_FALKOR_ERRATUM_1041 |
149149
+----------------+-----------------+-----------------+-----------------------------+
150+
| Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1463225 |
151+
+----------------+-----------------+-----------------+-----------------------------+
152+
| Qualcomm Tech. | Kryo4xx Gold | N/A | ARM64_ERRATUM_1418040 |
153+
+----------------+-----------------+-----------------+-----------------------------+
150154
+----------------+-----------------+-----------------+-----------------------------+
151155
| Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 |
152156
+----------------+-----------------+-----------------+-----------------------------+

arch/arm64/kernel/cpu_errata.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,7 @@ static bool
472472
has_cortex_a76_erratum_1463225(const struct arm64_cpu_capabilities *entry,
473473
int scope)
474474
{
475-
u32 midr = read_cpuid_id();
476-
/* Cortex-A76 r0p0 - r3p1 */
477-
struct midr_range range = MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1);
478-
479-
WARN_ON(scope != SCOPE_LOCAL_CPU || preemptible());
480-
return is_midr_in_range(midr, &range) && is_kernel_in_hyp_mode();
475+
return is_affected_midr_range_list(entry, scope) && is_kernel_in_hyp_mode();
481476
}
482477
#endif
483478

@@ -728,6 +723,8 @@ static const struct midr_range erratum_1418040_list[] = {
728723
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1),
729724
/* Neoverse-N1 r0p0 to r3p1 */
730725
MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 0, 3, 1),
726+
/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
727+
MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xf),
731728
{},
732729
};
733730
#endif
@@ -777,6 +774,15 @@ static const struct midr_range erratum_speculative_at_list[] = {
777774
};
778775
#endif
779776

777+
#ifdef CONFIG_ARM64_ERRATUM_1463225
778+
static const struct midr_range erratum_1463225[] = {
779+
/* Cortex-A76 r0p0 - r3p1 */
780+
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1),
781+
/* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
782+
MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xf),
783+
};
784+
#endif
785+
780786
const struct arm64_cpu_capabilities arm64_errata[] = {
781787
#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE
782788
{
@@ -916,6 +922,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
916922
.capability = ARM64_WORKAROUND_1463225,
917923
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
918924
.matches = has_cortex_a76_erratum_1463225,
925+
.midr_range_list = erratum_1463225,
919926
},
920927
#endif
921928
#ifdef CONFIG_CAVIUM_TX2_ERRATUM_219

0 commit comments

Comments
 (0)