summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/nospec-branch.c
diff options
context:
space:
mode:
authorLinus Torvalds2019-05-06 22:01:16 +0200
committerLinus Torvalds2019-05-06 22:01:16 +0200
commit0a499fc5c37e6db096969a83534fd98a2bf2b36c (patch)
tree682875f57706b1e28bfe579372a465bd778ce3dc /arch/s390/kernel/nospec-branch.c
parentMerge branch 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff)
parents390/speculation: Support 'mitigations=' cmdline option (diff)
downloadkernel-qcow2-linux-0a499fc5c37e6db096969a83534fd98a2bf2b36c.tar.gz
kernel-qcow2-linux-0a499fc5c37e6db096969a83534fd98a2bf2b36c.tar.xz
kernel-qcow2-linux-0a499fc5c37e6db096969a83534fd98a2bf2b36c.zip
Merge branch 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull speculation mitigation update from Ingo Molnar: "This adds the "mitigations=" bootline option, which offers a cross-arch set of options that will work on x86, PowerPC and s390 that will map to the arch specific option internally" * 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: s390/speculation: Support 'mitigations=' cmdline option powerpc/speculation: Support 'mitigations=' cmdline option x86/speculation: Support 'mitigations=' cmdline option cpu/speculation: Add 'mitigations=' cmdline option
Diffstat (limited to 'arch/s390/kernel/nospec-branch.c')
-rw-r--r--arch/s390/kernel/nospec-branch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/nospec-branch.c b/arch/s390/kernel/nospec-branch.c
index bdddaae96559..649135cbedd5 100644
--- a/arch/s390/kernel/nospec-branch.c
+++ b/arch/s390/kernel/nospec-branch.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/module.h>
#include <linux/device.h>
+#include <linux/cpu.h>
#include <asm/nospec-branch.h>
static int __init nobp_setup_early(char *str)
@@ -58,7 +59,7 @@ early_param("nospectre_v2", nospectre_v2_setup_early);
void __init nospec_auto_detect(void)
{
- if (test_facility(156)) {
+ if (test_facility(156) || cpu_mitigations_off()) {
/*
* The machine supports etokens.
* Disable expolines and disable nobp.