提交 ca26fded 编写于 作者: M Marc Zyngier 提交者: Caspar Zhang

arm64: Handle erratum 1418040 as a superset of erratum 1188873

task #28924046

[ Upstream commit a5325089bd05 ]

We already mitigate erratum 1188873 affecting Cortex-A76 and
Neoverse-N1 r0p0 to r2p0. It turns out that revisions r0p0 to
r3p1 of the same cores are affected by erratum 1418040, which
has the same workaround as 1188873.

Let's expand the range of affected revisions to match 1418040,
and repaint all occurences of 1188873 to 1418040. Whilst we're
there, do a bit of reformating in silicon-errata.txt and drop
a now unnecessary dependency on ARM_ARCH_TIMER_OOL_WORKAROUND.
Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
Signed-off-by: NBin Yu <jkchen@linux.alibaba.com>
Reviewed-by: NBaolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Nzou cao <zoucao@linux.alibaba.com>
上级 6ea79e78
...@@ -59,10 +59,11 @@ stable kernels. ...@@ -59,10 +59,11 @@ stable kernels.
| ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 | | ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 |
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 | | ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
| ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 | | ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 |
| ARM | Neoverse-N1 | #1188873 | ARM64_ERRATUM_1188873 | | ARM | Cortex-A76 | #1188873,1418040| ARM64_ERRATUM_1418040 |
| ARM | MMU-500 | #841119,#826419 | N/A | | ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 |
| ARM | MMU-500 | #841119, 826419 | N/A |
| | | | | | | | | |
| Cavium | ThunderX ITS | #22375, #24313 | CAVIUM_ERRATUM_22375 | | Cavium | ThunderX ITS | #22375, 24313 | CAVIUM_ERRATUM_22375 |
| Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 | | Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 |
| Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 | | Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 |
| Cavium | ThunderX Core | #27456 | CAVIUM_ERRATUM_27456 | | Cavium | ThunderX Core | #27456 | CAVIUM_ERRATUM_27456 |
......
...@@ -505,16 +505,16 @@ config ARM64_ERRATUM_1463225 ...@@ -505,16 +505,16 @@ config ARM64_ERRATUM_1463225
If unsure, say Y. If unsure, say Y.
config ARM64_ERRATUM_1188873 config ARM64_ERRATUM_1418040
bool "Cortex-A76/Neoverse-N1: MRC read following MRRC read of specific Generic Timer in AArch32 might give incorrect result" bool "Cortex-A76/Neoverse-N1: MRC read following MRRC read of specific Generic Timer in AArch32 might give incorrect result"
default y default y
depends on COMPAT depends on COMPAT
select ARM_ARCH_TIMER_OOL_WORKAROUND select ARM_ARCH_TIMER_OOL_WORKAROUND
help help
This option adds work arounds for ARM Cortex-A76/Neoverse-N1 This option adds work arounds for ARM Cortex-A76/Neoverse-N1
erratum 1188873 errata 1188873 and 1418040
Affected Cortex-A76/Neoverse-N1 cores (r0p0, r1p0, r2p0) could Affected Cortex-A76/Neoverse-N1 cores (r0p0 to r2p0) could
cause register corruption when accessing the timer registers cause register corruption when accessing the timer registers
from AArch32 userspace. from AArch32 userspace.
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#define ARM64_WORKAROUND_1463225 33 #define ARM64_WORKAROUND_1463225 33
#define ARM64_SSBS 34 #define ARM64_SSBS 34
#define ARM64_HAS_CRC32 35 #define ARM64_HAS_CRC32 35
#define ARM64_WORKAROUND_1188873 36 #define ARM64_WORKAROUND_1418040 36
#define ARM64_NCAPS 37 #define ARM64_NCAPS 37
......
...@@ -653,12 +653,16 @@ static const struct midr_range arm64_harden_el2_vectors[] = { ...@@ -653,12 +653,16 @@ static const struct midr_range arm64_harden_el2_vectors[] = {
#endif #endif
#ifdef CONFIG_ARM64_ERRATUM_1188873 #ifdef CONFIG_ARM64_ERRATUM_1418040
static const struct midr_range erratum_1188873_list[] = { /*
/* Cortex-A76 r0p0 to r2p0 */ * - 1188873 affects r0p0 to r2p0
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 2, 0), * - 1418040 affects r0p0 to r3p1
/* Neoverse-N1 r0p0 to r2p0 */ */
MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 0, 2, 0), static const struct midr_range erratum_1418040_list[] = {
/* Cortex-A76 r0p0 to r3p1 */
MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 1),
/* Neoverse-N1 r0p0 to r3p1 */
MIDR_RANGE(MIDR_NEOVERSE_N1, 0, 0, 3, 1),
{}, {},
}; };
#endif #endif
...@@ -845,11 +849,11 @@ const struct arm64_cpu_capabilities arm64_errata[] = { ...@@ -845,11 +849,11 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
.matches = needs_tx2_tvm_workaround, .matches = needs_tx2_tvm_workaround,
}, },
#endif #endif
#ifdef CONFIG_ARM64_ERRATUM_1188873 #ifdef CONFIG_ARM64_ERRATUM_1418040
{ {
.desc = "ARM erratum 1188873", .desc = "ARM erratum 1418040",
.capability = ARM64_WORKAROUND_1188873, .capability = ARM64_WORKAROUND_1418040,
ERRATA_MIDR_RANGE_LIST(erratum_1188873_list), ERRATA_MIDR_RANGE_LIST(erratum_1418040_list),
}, },
#endif #endif
{ {
......
...@@ -322,8 +322,8 @@ alternative_if ARM64_WORKAROUND_845719 ...@@ -322,8 +322,8 @@ alternative_if ARM64_WORKAROUND_845719
alternative_else_nop_endif alternative_else_nop_endif
#endif #endif
3: 3:
#ifdef CONFIG_ARM64_ERRATUM_1188873 #ifdef CONFIG_ARM64_ERRATUM_1418040
alternative_if_not ARM64_WORKAROUND_1188873 alternative_if_not ARM64_WORKAROUND_1418040
b 4f b 4f
alternative_else_nop_endif alternative_else_nop_endif
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册