diff options
author | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-05-18 11:32:18 +0200 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-05-23 13:01:09 +0200 |
commit | 1d9cae444833be8f1193278961ce8520b549a7e8 (patch) | |
tree | 998bb4848d949530733cd38cb234eab226d8775e | |
parent | 12f147b2c3f736d51316faad6a4a739ffa77cb90 (diff) |
[noupstream] Fixups for v4.16.9.linux-4.16.9-retpoline
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r-- | arch/arm64/kernel/cpu_errata.c | 12 |
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 { |