diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2019-07-15 11:15:02 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 11:15:02 -0300 |
commit | 6b774eec1f9d3064e9b33634dfa99d5666d0a73a (patch) | |
tree | 64fa879c312d6a52f90e6dbf3f7be2d66de3ddd4 /kernel/cpu.c | |
parent | 774f42075a4800fe4106dffca804e3207bc3c2e7 (diff) | |
parent | 286d8c46ed06d5fc1b8c212356a11a19b2c94bc4 (diff) |
Merge pull request #50 from MaxKrummenacher/4.14-2.0.x-imx
4.14 2.0.x imx
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 8c350dd81581..127a69b8b192 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2054,7 +2054,7 @@ static void cpuhp_online_cpu_device(unsigned int cpu) kobject_uevent(&dev->kobj, KOBJ_ONLINE); } -static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) +int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { int cpu, ret = 0; @@ -2088,7 +2088,7 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) return ret; } -static int cpuhp_smt_enable(void) +int cpuhp_smt_enable(void) { int cpu, ret = 0; @@ -2297,3 +2297,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); |