|
@@ -276,22 +276,21 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void)
|
|
|
|
|
|
if (cmdline_find_option_bool(boot_command_line, "nospectre_v2"))
|
|
|
return SPECTRE_V2_CMD_NONE;
|
|
|
- else {
|
|
|
- ret = cmdline_find_option(boot_command_line, "spectre_v2", arg, sizeof(arg));
|
|
|
- if (ret < 0)
|
|
|
- return SPECTRE_V2_CMD_AUTO;
|
|
|
|
|
|
- for (i = 0; i < ARRAY_SIZE(mitigation_options); i++) {
|
|
|
- if (!match_option(arg, ret, mitigation_options[i].option))
|
|
|
- continue;
|
|
|
- cmd = mitigation_options[i].cmd;
|
|
|
- break;
|
|
|
- }
|
|
|
+ ret = cmdline_find_option(boot_command_line, "spectre_v2", arg, sizeof(arg));
|
|
|
+ if (ret < 0)
|
|
|
+ return SPECTRE_V2_CMD_AUTO;
|
|
|
|
|
|
- if (i >= ARRAY_SIZE(mitigation_options)) {
|
|
|
- pr_err("unknown option (%s). Switching to AUTO select\n", arg);
|
|
|
- return SPECTRE_V2_CMD_AUTO;
|
|
|
- }
|
|
|
+ for (i = 0; i < ARRAY_SIZE(mitigation_options); i++) {
|
|
|
+ if (!match_option(arg, ret, mitigation_options[i].option))
|
|
|
+ continue;
|
|
|
+ cmd = mitigation_options[i].cmd;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (i >= ARRAY_SIZE(mitigation_options)) {
|
|
|
+ pr_err("unknown option (%s). Switching to AUTO select\n", arg);
|
|
|
+ return SPECTRE_V2_CMD_AUTO;
|
|
|
}
|
|
|
|
|
|
if ((cmd == SPECTRE_V2_CMD_RETPOLINE ||
|