diff options
author | 2019-05-01 15:34:56 +0100 | |
---|---|---|
committer | 2019-05-01 15:34:56 +0100 | |
commit | 50abbe19623e08e2aa34e0e526bd6115569f3dc3 (patch) | |
tree | ecaddb898d671847f70c40fcab5fd115dacc1a1e /kernel | |
parent | Merge branch 'for-next/futex' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into for-next/core (diff) | |
parent | Documentation: Add ARM64 to kernel-parameters.rst (diff) | |
download | wireguard-linux-50abbe19623e08e2aa34e0e526bd6115569f3dc3.tar.xz wireguard-linux-50abbe19623e08e2aa34e0e526bd6115569f3dc3.zip |
Merge branch 'for-next/mitigations' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into for-next/core
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 6754f3ecfd94..43e741e88691 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2304,3 +2304,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); |