topology_num_nodes_per_package() reports values greater than one on certain AMD systems resulting in resctrl's Intel model specific SNC detection printing the confusing message: "CoD enabled system? Resctrl not supported" Add a check for Intel systems before looking at the topology. [ reinette: Add Closes tag, fix tag typos, rework changelog ]
Unified · Split
| @@ -377,7 +377,12 @@ static const struct x86_cpu_id snc_cpu_ids[] __initconst = { · 376 unmodified lines | |||
| 377 | 377 | ||
| 378 | static __init int snc_get_config(void) | 378 | static __init int snc_get_config(void) |
| 379 | { | 379 | { |
| 380 | int ret = topology_num_nodes_per_package(); | 380 | int ret; |
| 381 | |||
| 382 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) | ||
| 383 | return 1; | ||
| 384 | |||
| 385 | ret = topology_num_nodes_per_package(); | ||
| 381 | 386 | ||
| 382 | if (ret > 1 && !x86_match_cpu(snc_cpu_ids)) { | 387 | if (ret > 1 && !x86_match_cpu(snc_cpu_ids)) { |
| 383 | pr_warn("CoD enabled system? Resctrl not supported\n"); | 388 | pr_warn("CoD enabled system? Resctrl not supported\n"); |