Skip to content

Commit 1cf45b8

Browse files
ffainelliwilldeacon
authored andcommitted
arm64: apply ARM64_ERRATUM_843419 workaround for Brahma-B53 core
The Broadcom Brahma-B53 core is susceptible to the issue described by ARM64_ERRATUM_843419 so this commit enables the workaround to be applied when executing on that core. Since there are now multiple entries to match, we must convert the existing ARM64_ERRATUM_843419 into an erratum list and use cpucap_multi_entry_cap_matches to match our entries. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent e059770 commit 1cf45b8

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

Documentation/arm64/silicon-errata.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ stable kernels.
9393
+----------------+-----------------+-----------------+-----------------------------+
9494
| Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_845719 |
9595
+----------------+-----------------+-----------------+-----------------------------+
96+
| Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_843419 |
97+
+----------------+-----------------+-----------------+-----------------------------+
9698
+----------------+-----------------+-----------------+-----------------------------+
9799
| Cavium | ThunderX ITS | #22375,24313 | CAVIUM_ERRATUM_22375 |
98100
+----------------+-----------------+-----------------+-----------------------------+

arch/arm64/kernel/cpu_errata.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,23 @@ static const struct midr_range erratum_845719_list[] = {
755755
};
756756
#endif
757757

758+
#ifdef CONFIG_ARM64_ERRATUM_843419
759+
static const struct arm64_cpu_capabilities erratum_843419_list[] = {
760+
{
761+
/* Cortex-A53 r0p[01234] */
762+
.matches = is_affected_midr_range,
763+
ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
764+
MIDR_FIXED(0x4, BIT(8)),
765+
},
766+
{
767+
/* Brahma-B53 r0p[0] */
768+
.matches = is_affected_midr_range,
769+
ERRATA_MIDR_REV(MIDR_BRAHMA_B53, 0, 0),
770+
},
771+
{},
772+
};
773+
#endif
774+
758775
const struct arm64_cpu_capabilities arm64_errata[] = {
759776
#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE
760777
{
@@ -786,11 +803,11 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
786803
#endif
787804
#ifdef CONFIG_ARM64_ERRATUM_843419
788805
{
789-
/* Cortex-A53 r0p[01234] */
790806
.desc = "ARM erratum 843419",
791807
.capability = ARM64_WORKAROUND_843419,
792-
ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
793-
MIDR_FIXED(0x4, BIT(8)),
808+
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
809+
.matches = cpucap_multi_entry_cap_matches,
810+
.match_list = erratum_843419_list,
794811
},
795812
#endif
796813
#ifdef CONFIG_ARM64_ERRATUM_845719

0 commit comments

Comments
 (0)