summaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-04-17 21:38:16 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-04-17 21:55:31 +0200
commite9fee6fe08eef51cd9a7455d18b9011f1e463f22 (patch)
tree12df824e278d3bf25644cbb1f680e69044b02d07 /kernel/cpu.c
parente2c3c94788b08891dcf3dbe608f9880523ecd71b (diff)
parent0336e04a6520bdaefdb0769d2a70084fa52e81ed (diff)
downloadlinux-e9fee6fe08eef51cd9a7455d18b9011f1e463f22.tar.bz2
Merge branch 'core/speculation' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Pull in the command line updates from the tip tree so the MDS parts can be added.
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index d1c6d152da89..e70a90634b41 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2279,3 +2279,18 @@ void __init boot_cpu_hotplug_init(void)
#endif
this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
}
+
+enum cpu_mitigations cpu_mitigations __ro_after_init = CPU_MITIGATIONS_AUTO;
+
+static int __init mitigations_parse_cmdline(char *arg)
+{
+ if (!strcmp(arg, "off"))
+ cpu_mitigations = CPU_MITIGATIONS_OFF;
+ else if (!strcmp(arg, "auto"))
+ cpu_mitigations = CPU_MITIGATIONS_AUTO;
+ else if (!strcmp(arg, "auto,nosmt"))
+ cpu_mitigations = CPU_MITIGATIONS_AUTO_NOSMT;
+
+ return 0;
+}
+early_param("mitigations", mitigations_parse_cmdline);