[tip: x86/urgent] x86/resctrl: Only check Intel systems for SNC

tip-bot2 for Tony Luck posted 1 patch 2 days, 20 hours ago
arch/x86/kernel/cpu/resctrl/monitor.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
[tip: x86/urgent] x86/resctrl: Only check Intel systems for SNC
Posted by tip-bot2 for Tony Luck 2 days, 20 hours ago
The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     6f6947b2387e94e405f80d472f8a189bfbf2bd6c
Gitweb:        https://git.kernel.org/tip/6f6947b2387e94e405f80d472f8a189bfbf2bd6c
Author:        Tony Luck <tony.luck@intel.com>
AuthorDate:    Thu, 04 Jun 2026 21:46:49 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 05 Jun 2026 11:09:34 +02:00

x86/resctrl: Only check Intel systems for SNC

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 ]

Fixes: 59674fc9d0bf ("x86/resctrl: Fix SNC detection")
Reported-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://patch.msgid.link/9849330f45ac86344cc5ac54df2d313906d70bc4.1780634584.git.reinette.chatre@intel.com
Closes: https://lore.kernel.org/lkml/37ac0376-43a3-4283-a3d5-4d57b3bec578@amd.com/
---
 arch/x86/kernel/cpu/resctrl/monitor.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
index 9bd87ba..59215fe 100644
--- a/arch/x86/kernel/cpu/resctrl/monitor.c
+++ b/arch/x86/kernel/cpu/resctrl/monitor.c
@@ -377,7 +377,12 @@ static const struct x86_cpu_id snc_cpu_ids[] __initconst = {
 
 static __init int snc_get_config(void)
 {
-	int ret = topology_num_nodes_per_package();
+	int ret;
+
+	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
+		return 1;
+
+	ret = topology_num_nodes_per_package();
 
 	if (ret > 1 && !x86_match_cpu(snc_cpu_ids)) {
 		pr_warn("CoD enabled system? Resctrl not supported\n");