arm64: Add ARM64_WORKAROUND_1319367 for all A57 and A72 versions
Rework the EL2 vector hardening that is only selected for A57 and A72 so that the table can also be used for ARM64_WORKAROUND_1319367. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
parent
4f5cafb5cb
commit
f75e2294a4
|
@ -52,7 +52,8 @@
|
||||||
#define ARM64_HAS_IRQ_PRIO_MASKING 42
|
#define ARM64_HAS_IRQ_PRIO_MASKING 42
|
||||||
#define ARM64_HAS_DCPODP 43
|
#define ARM64_HAS_DCPODP 43
|
||||||
#define ARM64_WORKAROUND_1463225 44
|
#define ARM64_WORKAROUND_1463225 44
|
||||||
|
#define ARM64_WORKAROUND_1319367 45
|
||||||
|
|
||||||
#define ARM64_NCAPS 45
|
#define ARM64_NCAPS 46
|
||||||
|
|
||||||
#endif /* __ASM_CPUCAPS_H */
|
#endif /* __ASM_CPUCAPS_H */
|
||||||
|
|
|
@ -623,9 +623,9 @@ check_branch_predictor(const struct arm64_cpu_capabilities *entry, int scope)
|
||||||
return (need_wa > 0);
|
return (need_wa > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HARDEN_EL2_VECTORS
|
#if defined(CONFIG_HARDEN_EL2_VECTORS) || defined(CONFIG_ARM64_ERRATUM_1319367)
|
||||||
|
|
||||||
static const struct midr_range arm64_harden_el2_vectors[] = {
|
static const struct midr_range ca57_a72[] = {
|
||||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A57),
|
||||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
|
MIDR_ALL_VERSIONS(MIDR_CORTEX_A72),
|
||||||
{},
|
{},
|
||||||
|
@ -819,7 +819,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||||
{
|
{
|
||||||
.desc = "EL2 vector hardening",
|
.desc = "EL2 vector hardening",
|
||||||
.capability = ARM64_HARDEN_EL2_VECTORS,
|
.capability = ARM64_HARDEN_EL2_VECTORS,
|
||||||
ERRATA_MIDR_RANGE_LIST(arm64_harden_el2_vectors),
|
ERRATA_MIDR_RANGE_LIST(ca57_a72),
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -851,6 +851,13 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||||
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
|
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
|
||||||
.matches = has_cortex_a76_erratum_1463225,
|
.matches = has_cortex_a76_erratum_1463225,
|
||||||
},
|
},
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_ARM64_ERRATUM_1319367
|
||||||
|
{
|
||||||
|
.desc = "ARM erratum 1319367",
|
||||||
|
.capability = ARM64_WORKAROUND_1319367,
|
||||||
|
ERRATA_MIDR_RANGE_LIST(ca57_a72),
|
||||||
|
},
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue