diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-24 16:44:36 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2018-08-24 16:44:36 -0400 |
commit | 8fb465b0b9f3709a77a1cdd0d32389c685fc8ec2 (patch) | |
tree | b851e91e49baf22f512be68848cde5fc57ef6f29 | |
parent | 234d9acfe2223d70a162ed6fbf728e9ff48ba578 (diff) | |
download | longterm-queue-4.12-8fb465b0b9f3709a77a1cdd0d32389c685fc8ec2.tar.gz |
arm ssb refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/arm64-Add-ssbd-command-line-option.patch | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/queue/arm64-Add-ssbd-command-line-option.patch b/queue/arm64-Add-ssbd-command-line-option.patch index 0715e83..2b94bc4 100644 --- a/queue/arm64-Add-ssbd-command-line-option.patch +++ b/queue/arm64-Add-ssbd-command-line-option.patch @@ -1,4 +1,4 @@ -From a43ae4dfe56a01f5b98ba0cb2f784b6a43bafcc6 Mon Sep 17 00:00:00 2001 +From 2c8ba2a5d7dae0beadf78b1b909c8071d5e28635 Mon Sep 17 00:00:00 2001 From: Marc Zyngier <marc.zyngier@arm.com> Date: Tue, 29 May 2018 13:11:09 +0100 Subject: [PATCH] arm64: Add 'ssbd' command-line option @@ -18,12 +18,13 @@ Reviewed-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index 11fc28ecdb6d..7db8868fabab 100644 +index edd2da9f5c6d..affa1cb9fc8c 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -4047,6 +4047,23 @@ +@@ -3903,6 +3903,23 @@ expediting. Set to zero to disable automatic expediting. @@ -48,11 +49,11 @@ index 11fc28ecdb6d..7db8868fabab 100644 override the default stack gap protection. The value is in page units and it defines how many pages prior diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h -index 09b0f2a80c8f..b50650f3e496 100644 +index 428ee1f2468c..0bd5ebfb328e 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h -@@ -537,6 +537,12 @@ static inline u64 read_zcr_features(void) - return zcr; +@@ -262,6 +262,12 @@ static inline bool system_uses_ttbr0_pan(void) + !cpus_have_const_cap(ARM64_HAS_PAN); } +#define ARM64_SSBD_UNKNOWN -1 @@ -65,10 +66,10 @@ index 09b0f2a80c8f..b50650f3e496 100644 #endif diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c -index 7e8f12d85d99..1075f90fdd8c 100644 +index 222779fce333..6b866d90c867 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c -@@ -235,6 +235,38 @@ enable_smccc_arch_workaround_1(const struct arm64_cpu_capabilities *entry) +@@ -231,6 +231,38 @@ static int qcom_enable_link_stack_sanitization(void *data) #ifdef CONFIG_ARM64_SSBD DEFINE_PER_CPU_READ_MOSTLY(u64, arm64_ssbd_callback_required); @@ -107,7 +108,7 @@ index 7e8f12d85d99..1075f90fdd8c 100644 void __init arm64_update_smccc_conduit(struct alt_instr *alt, __le32 *origptr, __le32 *updptr, int nr_inst) -@@ -278,44 +310,83 @@ static bool has_ssbd_mitigation(const struct arm64_cpu_capabilities *entry, +@@ -274,44 +306,83 @@ static bool has_ssbd_mitigation(const struct arm64_cpu_capabilities *entry, int scope) { struct arm_smccc_res res; @@ -148,10 +149,8 @@ index 7e8f12d85d99..1075f90fdd8c 100644 - supported = false; + ssbd_state = ARM64_SSBD_UNKNOWN; + return false; - } - -- if (supported) { -- __this_cpu_write(arm64_ssbd_callback_required, 1); ++ } ++ + val = (s32)res.a0; + + switch (val) { @@ -175,8 +174,10 @@ index 7e8f12d85d99..1075f90fdd8c 100644 + default: + WARN_ON(1); + return false; -+ } -+ + } + +- if (supported) { +- __this_cpu_write(arm64_ssbd_callback_required, 1); + switch (ssbd_state) { + case ARM64_SSBD_FORCE_DISABLE: + pr_info_once("%s disabled from command-line\n", entry->desc); |