Commit 2a08b83
x86/bugs: Use the cpu_smt_possible() helper instead of open-coded code
There is a helper function to check if SMT is available. Use this helper
instead of performing the check manually.
The helper function cpu_smt_possible() does exactly the same thing as
was being done manually inside spectre_v2_user_select_mitigation().
Specifically, it returns false if CONFIG_SMP is disabled, otherwise
it checks the cpu_smt_control global variable.
This change improves code consistency and reduces duplication.
No change in functionality intended.
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: David Kaplan <David.Kaplan@amd.com>
Link: https://lore.kernel.org/r/20241031-x86_bugs_last_v2-v2-1-b7ff1dab840e@debian.org1 parent b8ce25d commit 2a08b83
1 file changed
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1346 | 1346 | | |
1347 | 1347 | | |
1348 | 1348 | | |
1349 | | - | |
1350 | 1349 | | |
1351 | 1350 | | |
1352 | 1351 | | |
1353 | 1352 | | |
1354 | 1353 | | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | 1354 | | |
1360 | 1355 | | |
1361 | 1356 | | |
| |||
1416 | 1411 | | |
1417 | 1412 | | |
1418 | 1413 | | |
1419 | | - | |
| 1414 | + | |
1420 | 1415 | | |
1421 | 1416 | | |
1422 | 1417 | | |
| |||
0 commit comments