Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2529024lqz; Wed, 3 Apr 2024 00:00:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmdBE2BD/VtPfX4x1dNcRYYhwtr4JVYq8+G48CMH8km8+oQLf/myjBR0s8VOeTk4oawUkiq2wV0S4LUH6ZUWW5ENYEW/xZF4w532UjyA== X-Google-Smtp-Source: AGHT+IE6zzSMU4fiu4pmGXhwyKt2wmr/zXRWMsZLCiQyBE1gdc22vA5cX5dp+xPFw+4HPsztQHLQ X-Received: by 2002:a17:906:2657:b0:a4e:95eb:34a6 with SMTP id i23-20020a170906265700b00a4e95eb34a6mr1527349ejc.49.1712127626279; Wed, 03 Apr 2024 00:00:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712127626; cv=pass; d=google.com; s=arc-20160816; b=KGvxBJLLlm/fKq6xTlnWiriqiz7+2DfT+frMvLp52zLWIEEW0TS3zMXR41hoQcsEPy ZIaM3a+dLRIG+nlQyJUd2CamYllU9QkMnIdBftRiW4ZwBmlHdgf4lF4kOTqOm4wlwdI7 auJYFR4PsWKN8rao+upN30NCmdfxUsI6gNyXoA9fFLXzjybViVnBkPbyudL4hlw/X59N ZzQb9EkBadB6S5gDj6O+qrTW5J3NKOJVoTJi5JJdZt37IL+JjmxlwLf7PR+Fq94OE3Xx 1hVoV1/Sw2ABQAPExN6MkrqSFU+CO8inJuefhCyowTO3nVjNAIpciqKcZ+HKIv6lpyTP 4RPw== 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=ON/M2PgUF5GWdoAdKTKqNpLjfTY2s81CIZQgUzkSHrA=; fh=gZJTxru7ydRpIxurx8mZg5bBk4+6w4AJppHuhPEGsLU=; b=EnPR/JgpLi43xuh7tnwitBZeiyEDcoahNXDIGwZ44+u6hfEgVrYKzXVh9NmwP3LaKU aOb6+f7cK6wiI2jF8shUiGn5CTV6+WezA15xeQJMgH5nww/f9moC/KYOj3znbfBgUxpT i9ryMKbuBiF3AYSYrCLYKjLPxclp14b/eTkNmfA6wZaTYuj747LjFWYMxVhJA0lEASJ5 iT/Ta62P2WdJN7E5QW8Kr7I9voHhMu265yMXb4vEVb2grpw21xsB8dVWnjk6kpdApl4E GTtygrxHgsPeSXi/shgqYSFO/X2KEKFujTcW78VFx/NGF23ubzBy53v7fupxp8WCSlVI jWfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PGGG7yAk; 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-129117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129117-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ku16-20020a170907789000b00a46b8c85631si6526210ejc.1014.2024.04.03.00.00.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 00:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PGGG7yAk; 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-129117-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129117-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EECE01F23DF5 for ; Wed, 3 Apr 2024 07:00:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1844B55E48; Wed, 3 Apr 2024 06:59:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PGGG7yAk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="daRPRkI4" 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 AA2864D13B; Wed, 3 Apr 2024 06:59:53 +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=1712127596; cv=none; b=pK6vZiKZbmfi/xl3m3S/LOcyI9bfQRFdVNuiaCoVdjEfZmM1uuExCdIO3rjHzeR9JD73Alagp3ihWX3PoJdt1GTGRNI++b74E/Kp+FDLFVNc24uncbGn0q8FJmOVlSpWmQJEDVg6KkjkAE0hLdNz2jtPXIrChNHiOK/JA33bppE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712127596; c=relaxed/simple; bh=OMu4Ow82kA0QbAkpQeKmd+fAJKan59UG9MCRd1Ud31Y=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=qUwIGUJ98Ct/Fbd4pXZjXtWIIKHXwHFwO0zapRRGib0cWxG2rwv3sA/juLL7275kkQB/tAlLkGo6c7thTmc3DqvbP8Z8iI/znWIRldY1p7w3jEWS7dvZWpOtWd9I9OOibbhe1r11XClMvxpJ/rbI2cpOiW5DsyV6LDVZRaUuzBk= 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=PGGG7yAk; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=daRPRkI4; 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: Wed, 03 Apr 2024 06:59:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712127592; 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=ON/M2PgUF5GWdoAdKTKqNpLjfTY2s81CIZQgUzkSHrA=; b=PGGG7yAki2aQWFbIWDRnQ39qFoiL1oKoPyJVPwwDpeMpX4+Bp51RRgO372Z+/JIpAOPuTL dX9Mp4BwtOcfb+PkQVqcRCXuz1QZUt37lVfpjaAX0rmTx83ehCDUsWgn76JwmutVfO1Krx kWTluEtSpYvsRMPJ/rbelO5ipxPpS3e9qwxkEJACHFUlq94okhziOQS72DIe1cjYZ9eJaB LeGDcGhXl7VtINP563KQCuKf6rcJsaFteIkJUSQGgu7qzFkGtjC+guj+2MiuM0F5ijQDUk R8vUMY71uDi0Wt5fji8/Rvp5pI417HhczwD6uqEz0cYtBUYlaNJ7OEj4FQSv8A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712127592; 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=ON/M2PgUF5GWdoAdKTKqNpLjfTY2s81CIZQgUzkSHrA=; b=daRPRkI4tNmCsLUq9GdxeK5gBoLQyLRe9fzAU0X0PGywqdAtvPR+nD3rhG67pVFc1etTFa RHZsJXsAjP1Z39CA== From: "tip-bot2 for Saurabh Sengar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/of: Map NUMA node to CPUs as per DeviceTree Cc: Saurabh Sengar , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1712068830-4513-4-git-send-email-ssengar@linux.microsoft.com> References: <1712068830-4513-4-git-send-email-ssengar@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171212759135.10875.13008794555300700297.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/platform branch of tip: Commit-ID: 85900d061884de85f557a06cf56ff69dfae07e26 Gitweb: https://git.kernel.org/tip/85900d061884de85f557a06cf56ff69dfae07e26 Author: Saurabh Sengar AuthorDate: Tue, 02 Apr 2024 07:40:29 -07:00 Committer: Ingo Molnar CommitterDate: Wed, 03 Apr 2024 08:49:15 +02:00 x86/of: Map NUMA node to CPUs as per DeviceTree Currently for DeviceTree bootup, x86 code does the default mapping of CPUs to NUMA, which is wrong. This can cause incorrect mapping and WARNs on SMT enabled systems: CPU #1's smt-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency. WARNING: CPU: 1 PID: 0 at topology_sane.isra.0+0x5c/0x6d match_smt+0xf6/0xfc set_cpu_sibling_map.cold+0x24f/0x512 start_secondary+0x5c/0x110 Call the set_apicid_to_node() function in dtb_cpu_setup() for setting the NUMA to CPU mapping for DeviceTree platforms. Signed-off-by: Saurabh Sengar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/1712068830-4513-4-git-send-email-ssengar@linux.microsoft.com --- arch/x86/kernel/devicetree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 0d3a50e..b93ce8a 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -24,6 +24,7 @@ #include #include #include +#include #include __initdata u64 initial_dtb; @@ -137,6 +138,7 @@ static void __init dtb_cpu_setup(void) continue; } topology_register_apic(apic_id, CPU_ACPIID_INVALID, true); + set_apicid_to_node(apic_id, of_node_to_nid(dn)); } }