From patchwork Mon Oct 2 19:41:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 147519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1719415vqb; Mon, 2 Oct 2023 15:11:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIQyD1qGcRAmyvL2dvkUhsmrgTunaPEWoMJmVKgObMqWSsGQA/CPiU/i2XcbQAR+4Usi7t X-Received: by 2002:a17:90a:8b8d:b0:274:96a:5007 with SMTP id z13-20020a17090a8b8d00b00274096a5007mr10608713pjn.1.1696284688490; Mon, 02 Oct 2023 15:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696284688; cv=none; d=google.com; s=arc-20160816; b=u8gD5PVCQCUm4AjfgUhNSaiiSxvZRX8Db0HbA5j6rKSIt7vJwzdznGEXhRfqlRHgxb ZX78/50k+o+hIbC0RqdoYTcoIudwhfj0Tw7HrxDK694ZlhvVdvq0nTmEakrxPTntjW4o g9Sm+CB+hyXJvialPF8rR37hIjMc1FW0mqMUdEarCiPcnUeRIA5jq8XVRhD63XNwdYDD dqFXlnVuSd1Ud7RxDDtdUmMJnKQl+Yworep44vewY8TSrq1BuksDuX2MPpmZMwACG/ZB W/FlAm0CNGX/2uOdmSlEpmGKVK+916L7dzWmp60Cmr+m5nkBJz9BYczw0OzRVf9qDOjF bffw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=TA8px2Gs5zicIf3ntSyEajmuGJx7VXeR5XlyhlMdO4o=; fh=1t4//4iF2C0eQ2DCwqxljKxGShVNc5p/tg52zFdCVTg=; b=VL71EAWDHpFx0/voVieu6P+qhF1D4pF0D14qq7SVVyLc3l5HVN42ukjZDi+SsV3oXk RkJ1101G9nGr+SLYkDOq8B70eeDQTkhcnwGmoRrV7CJGrGB7Wgfd8aUS19fsjg+wjBFK opWRYWtURbvW0Gq/2rVf3eBRDUqc8oYugeunl4r3PDizSAgkXy6Fbi88aQeAx3zeUbi6 KPsXYkyKGtOr9+nOGkMSvrLlr3zfu+NVW13hIkmdE0PQkZ7jKmukG2ISITZCiMiVqBvl n8lNhM9dP/BETeetjEZMjcTg96vNAnTcqsr2pDDK4/z2wBJDwU1va9lAr4lgxCTnQ6g0 RSuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v6zqlENE; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ne12-20020a17090b374c00b00276c28cdd4fsi8290250pjb.31.2023.10.02.15.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v6zqlENE; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DA8D680AEB24; Mon, 2 Oct 2023 12:41:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238935AbjJBTlN (ORCPT + 18 others); Mon, 2 Oct 2023 15:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjJBTlK (ORCPT ); Mon, 2 Oct 2023 15:41:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76A63A9; Mon, 2 Oct 2023 12:41:05 -0700 (PDT) Date: Mon, 02 Oct 2023 19:41:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696275664; 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=TA8px2Gs5zicIf3ntSyEajmuGJx7VXeR5XlyhlMdO4o=; b=v6zqlENEQnGO4kWR/9Nx7ejWOe62pY6AYBvpPLgKiY1qucegi+0N2uZF+Is82M49QFzE91 rJeAYp7L5yMD1akzeocaobLysn+sBNZMYA1mhXNjAFy9p4e0lu1sm+GZit7Pr6PnBSCddM Cf6eqrImQXmMwAHZrqFCGh43+QPd2gYjnpO3NXIDB1UfFawDYkVRRI9pXVbGkOJviIhPZZ ei9DNuRaw3YtATxMmcmKFmOxI6aNqr1AOMarEs+ZYUm+xrC0AUJ31bXiAuI/mjQjGSH+n0 O3mflOHRq2zomivmyJPzcrMj2hmFSaG1miW28mkEGuLTjzCK5OYZO0j7Yg535A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696275664; 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=TA8px2Gs5zicIf3ntSyEajmuGJx7VXeR5XlyhlMdO4o=; b=DnHtqKhIrFeqqu+r+mohesOs43Edd0brDinvYpKAwy12DQD+D3Wxvk3wkJ8rKVvgd7NMwl j9Jyy8mH9Su5onDw== 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/numa: Add Devicetree support Cc: Saurabh Sengar , Ingo Molnar , Sebastian Andrzej Siewior , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1692949657-16446-2-git-send-email-ssengar@linux.microsoft.com> References: <1692949657-16446-2-git-send-email-ssengar@linux.microsoft.com> MIME-Version: 1.0 Message-ID: <169627566214.3135.17645034772157973524.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 12:41:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778683413859733461 X-GMAIL-MSGID: 1778683413859733461 The following commit has been merged into the x86/platform branch of tip: Commit-ID: 0c436a58292d0ca1af213ede75b2508995c8af0b Gitweb: https://git.kernel.org/tip/0c436a58292d0ca1af213ede75b2508995c8af0b Author: Saurabh Sengar AuthorDate: Fri, 25 Aug 2023 00:47:37 -07:00 Committer: Ingo Molnar CommitterDate: Mon, 02 Oct 2023 21:30:20 +02:00 x86/numa: Add Devicetree support Hyper-V has usecases where it needs to fetch NUMA information from Devicetree. Currently, it is not possible to extract the NUMA information from Devicetree for the x86 arch. Add support for Devicetree in the x86_numa_init() function, allowing the retrieval of NUMA node information from the Devicetree. Signed-off-by: Saurabh Sengar Signed-off-by: Ingo Molnar Cc: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/1692949657-16446-2-git-send-email-ssengar@linux.microsoft.com --- arch/x86/Kconfig | 1 + arch/x86/mm/numa.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 66bfaba..aab5e32 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1534,6 +1534,7 @@ config NUMA depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP) default y if X86_BIGSMP select USE_PERCPU_NUMA_NODE_ID + select OF_NUMA if OF help Enable NUMA (Non-Uniform Memory Access) support. diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 2aadb20..c79f12e 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -733,6 +734,8 @@ void __init x86_numa_init(void) if (!numa_init(amd_numa_init)) return; #endif + if (acpi_disabled && !numa_init(of_numa_init)) + return; } numa_init(dummy_numa_init);