summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/cpu_errata.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/cpu_errata.c')
-rw-r--r--arch/arm64/kernel/cpu_errata.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 3f46b5415018..c2906c2b281d 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -306,13 +306,14 @@ ssize_t cpu_show_spectre_v2(struct device *dev,
#endif
-static void
-enable_retpoline(const struct arm64_cpu_capabilities *entry)
+static int
+enable_retpoline(void *data)
{
spectre_v2_enabled = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC :
SPECTRE_V2_RETPOLINE_MINIMAL;
printk("Enabling retpoline!\n");
+ return 0;
}
#endif
@@ -503,12 +504,9 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
#endif
#ifdef CONFIG_RETPOLINE
{
- .desc = "speculative branch prediction using retpoline",
.capability = ARM64_RETPOLINE,
- .type = ARM64_CPUCAP_BOOT_RESTRICTED_CPU_LOCAL_FEATURE,
- .cpu_enable = enable_retpoline,
- .matches = is_affected_midr_range,
- .midr_range = MIDR_RANGE(MIDR_APM_POTENZA, 0, 0, 3, 1),
+ MIDR_ALL_VERSIONS(MIDR_APM_POTENZA),
+ .enable = enable_retpoline,
},
#endif
{