diff options
-rw-r--r-- | arch/arm64/kernel/cpu_errata.c | 6 | ||||
-rw-r--r-- | arch/arm64/kernel/cpufeature.c | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index 6de823a1be10..4613e4d75c73 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -285,8 +285,8 @@ qcom_enable_link_stack_sanitization(const struct arm64_cpu_capabilities *entry) * of call backs, sharing the same capability bit. * Iterate over each entry to see if at least one matches. */ -static bool multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry, - int scope) +static bool __maybe_unused +multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry, int scope) { const struct arm64_cpu_capabilities *caps; @@ -301,7 +301,7 @@ static bool multi_entry_cap_matches(const struct arm64_cpu_capabilities *entry, * Take appropriate action for all matching entries in the shared capability * entry. */ -static void +static void __maybe_unused multi_entry_cap_cpu_enable(const struct arm64_cpu_capabilities *entry) { const struct arm64_cpu_capabilities *caps; diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 381bb4077563..071a4548a231 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -838,11 +838,6 @@ static bool has_no_hw_prefetch(const struct arm64_cpu_capabilities *entry, int _ MIDR_CPU_VAR_REV(1, MIDR_REVISION_MASK)); } -static bool runs_at_el2(const struct arm64_cpu_capabilities *entry, int __unused) -{ - return is_kernel_in_hyp_mode(); -} - static bool hyp_offset_low(const struct arm64_cpu_capabilities *entry, int __unused) { @@ -1022,6 +1017,12 @@ static bool has_hw_dbm(const struct arm64_cpu_capabilities *cap, #endif +#ifdef CONFIG_ARM64_VHE +static bool runs_at_el2(const struct arm64_cpu_capabilities *entry, int __unused) +{ + return is_kernel_in_hyp_mode(); +} + static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) { /* @@ -1035,6 +1036,7 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) if (!alternatives_applied) write_sysreg(read_sysreg(tpidr_el1), tpidr_el2); } +#endif static const struct arm64_cpu_capabilities arm64_features[] = { { |