Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1174460rdb; Fri, 16 Feb 2024 07:29:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVkzYTOfw6D4Wl0uHWRQEopUsgJFF4fIHmbvLaLD6S/VtI2o9CKhrAhIk4MMszNCVmr4gJS45u79+X7X2cKQeBsGlrAsRp5wTnz4RStvg== X-Google-Smtp-Source: AGHT+IFCpuROH6a9g4o/+Zg1sdmJ5kegEIkn1g4tbwWXWSQj2QxpCRvCp/Y6T+aHsGhaY/b8wOYT X-Received: by 2002:a05:6a20:9f8f:b0:19c:93c2:7ef3 with SMTP id mm15-20020a056a209f8f00b0019c93c27ef3mr6462632pzb.46.1708097344181; Fri, 16 Feb 2024 07:29:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097344; cv=pass; d=google.com; s=arc-20160816; b=FyjwJ0Wr6carN/oHDl+/zljjW9seNDVJWWjc/z+vKFm6xi6IwQM7Dqs6//LbCtU/ad /QZvsP5EAfFYy/e7cKm5shCnmEwJgV1DblW65xLejgQx6Bpep7K3zrPjRjcci5djuOkH gn9s7kBxcUt63Gc/B+p6B/0Hu36sYfIIIV7Bwt/7dTW6st5Vn8axq6/N8dnVh2xgRGhw 40bKUXEsquItCKCvFdue0ODAQgtgDaR3gXSR83lmDGOkZjKI9q49AK9LWvbqS624NGLm SphEsH+iW1jbo0ZIF+hu/gomwcxaUOvmcHmsKTPROY8XjHcVCVtW1t3p9sBfNXTHE8RU KIPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=bPloKj88mdSMdmwarhAFJJc0zHrtpcybvLHh+9Lbx40=; fh=bKFZC7eFAaoHEVJ40HlAwnrPNXnqvg4zDQ5eWTP23JU=; b=Kx+koMp77QkAN6pcRgNuYaPFStxYXoQFQYdhG4ETr3SCXV1u852yIoKegTEU4QwKDt loSXklIv6xjiIxXgdheH3g3hkDwLC8V27SXGIq9nSj4RIwLWYhFnNI0vPRhWgmpl13S5 VuZYjGoFlBe8izjtNzNiVhFR3whVzE9IBrxDoKXrIEVdfQvY+SD3kENE/sHU3wAzTB6v W9DYK0D/W7xTuknAxonyycIdFVbbxrzYE5BEExe9ujghTaZhB9vS4ybrqvjQcI0DJ4lA kCEIh78yAZSkUyb+xY0Mty59nIaREEbxqARqHo9VRJVZvHxUmcJsTgK3job0vyLbnEUN Hvsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LNjYsPNO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jc17-20020a056a006c9100b006e14613024bsi69065pfb.146.2024.02.16.07.29.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:29:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LNjYsPNO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 10B64283D28 for ; Fri, 16 Feb 2024 15:28:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54157152DF0; Fri, 16 Feb 2024 15:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LNjYsPNO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="i/QfOHdY" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A72B9150986; Fri, 16 Feb 2024 15:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096654; cv=none; b=XIDB06nnRvZcYABbuyHlq8wlgzJs1d+fA23IXU/O9PUXV4XQxjxt8l1gXI/Sg7pIbOr+Oa/Pklg/6x4AEYC9J7aNPzu0/FynYFoer8dkEveSO/Ek99qLnFDXrB5EvmYwrHFeAuC7upl/JK28GVmvNYJ6H2Y++IIlw/Zk1cHgsTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096654; c=relaxed/simple; bh=LZiiAH1sOHfRn8ApaM2IgEBYL/70zAFPV/Y4PhwryRA=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=fJoX4l3wFyVihkpyiKohxyfGposbPaUnQhW2s8gJsKLZqKbstytxwa3hXsIoKuesQEuU1/WIjo3kECUbPaRTMeWDv0D7Hp08KpVprS6GQzSeTtJHjvtlohZSoH/S2vuAFsB8QeGJnhOKD111MEFrgJAtSF1g9woxAqtSeNERcW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LNjYsPNO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=i/QfOHdY; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 16 Feb 2024 15:17:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096651; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bPloKj88mdSMdmwarhAFJJc0zHrtpcybvLHh+9Lbx40=; b=LNjYsPNOeOg2QQF/HeV7UuGUo/8Xr36CZytuL6BWN0ZAWFyEHPij+fVJHBFK/NlTcVzlYg whggWDOLMMFMSMv7og09p2L8YXTKDl2PJ33lvWI+WRFMxG4kiIHBs6C9464C4ie+m15K56 r3XrH/FxQZ1K+LMe/PCm2CMn9mxFNEKivEWWpkV5gNX/O45FsTHl+HnQSFilj9svCc70pV juRCWINRHMWfIxUI8UrUsKt4SlS/W3eW2zP44DSWuX9Llruef63MUBwtr+ITVSyXPaREPU Dsfa4bQInQ0OA+i2T9aqvR7QfudG0P4rRML0i6pT5gglgtUXFTc2yoQUTWQMMw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096651; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bPloKj88mdSMdmwarhAFJJc0zHrtpcybvLHh+9Lbx40=; b=i/QfOHdYsGvFvI2KQISxTe5rx2uPKyeQjD1wqWw4AYKCm+qDF87sJlogitVxb3DI5ZRXez Fkhi+xxHH32ZvvCQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/smpboot: Teach it about topo.amd_node_id Cc: Thomas Gleixner , Juergen Gross , Sohil Mehta , Michael Kelley , Zhang Rui , Wang Wendy , K Prateek Nayak , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240212153625.082979150@linutronix.de> References: <20240212153625.082979150@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809665048.398.10738577765951683896.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/apic branch of tip: Commit-ID: ace278e7eca6be5d36eb6f1efb660c13b66c4d64 Gitweb: https://git.kernel.org/tip/ace278e7eca6be5d36eb6f1efb660c13b66c4d64 Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:04:13 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:37 +01:00 x86/smpboot: Teach it about topo.amd_node_id When switching AMD over to the new topology parser then the match functions need to look for AMD systems with the extended topology feature at the new topo.amd_node_id member which is then holding the node id information. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Sohil Mehta Tested-by: Michael Kelley Tested-by: Zhang Rui Tested-by: Wang Wendy Tested-by: K Prateek Nayak Link: https://lore.kernel.org/r/20240212153625.082979150@linutronix.de --- arch/x86/kernel/smpboot.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 3f57ce6..9cdb056 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -488,6 +488,7 @@ static bool match_smt(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) if (c->topo.pkg_id == o->topo.pkg_id && c->topo.die_id == o->topo.die_id && + c->topo.amd_node_id == o->topo.amd_node_id && per_cpu_llc_id(cpu1) == per_cpu_llc_id(cpu2)) { if (c->topo.core_id == o->topo.core_id) return topology_sane(c, o, "smt"); @@ -509,10 +510,13 @@ static bool match_smt(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) static bool match_die(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) { - if (c->topo.pkg_id == o->topo.pkg_id && - c->topo.die_id == o->topo.die_id) - return true; - return false; + if (c->topo.pkg_id != o->topo.pkg_id || c->topo.die_id != o->topo.die_id) + return false; + + if (cpu_feature_enabled(X86_FEATURE_TOPOEXT) && topology_amd_nodes_per_pkg() > 1) + return c->topo.amd_node_id == o->topo.amd_node_id; + + return true; } static bool match_l2c(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)