summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2021-11-18 13:59:46 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-11 12:11:52 +0100
commit3f21b7e355237aa2f8196ad44c2b7456a739518d (patch)
tree7e41bc3f22aa79cea0fadacfe1d473f59ecca939 /include
parent49379552969acee3237387cc258848437e127d98 (diff)
downloadlinux-stable-3f21b7e355237aa2f8196ad44c2b7456a739518d.tar.gz
linux-stable-3f21b7e355237aa2f8196ad44c2b7456a739518d.tar.bz2
linux-stable-3f21b7e355237aa2f8196ad44c2b7456a739518d.zip
arm64: entry: Add vectors that have the bhb mitigation sequences
commit ba2689234be92024e5635d30fe744f4853ad97db upstream. Some CPUs affected by Spectre-BHB need a sequence of branches, or a firmware call to be run before any indirect branch. This needs to go in the vectors. No CPU needs both. While this can be patched in, it would run on all CPUs as there is a single set of vectors. If only one part of a big/little combination is affected, the unaffected CPUs have to run the mitigation too. Create extra vectors that include the sequence. Subsequent patches will allow affected CPUs to select this set of vectors. Later patches will modify the loop count to match what the CPU requires. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/arm-smccc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index f860645f6512..ff38737475ec 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -87,6 +87,11 @@
ARM_SMCCC_SMC_32, \
0, 0x7fff)
+#define ARM_SMCCC_ARCH_WORKAROUND_3 \
+ ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
+ ARM_SMCCC_SMC_32, \
+ 0, 0x3fff)
+
#define SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED 1
/* Paravirtualised time calls (defined by ARM DEN0057A) */