From: Saurabh Sengar <ssengar@linux.microsoft.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
luto@kernel.org, peterz@infradead.org, mikelley@microsoft.com,
linux-kernel@vger.kernel.org
Cc: ssengar@linux.microsoft.com
Subject: [PATCH v2 2/2] x86/numa: Add Devicetree support
Date: Fri, 25 Aug 2023 00:47:37 -0700 [thread overview]
Message-ID: <1692949657-16446-2-git-send-email-ssengar@linux.microsoft.com> (raw)
In-Reply-To: <1692949657-16446-1-git-send-email-ssengar@linux.microsoft.com>
Hyper-V has usecases where it need to fetch NUMA information from
Devicetree. Currently, it is not possible to extract the NUMA information
from Devicetree for 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 <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 982b777eadc7..16ac287e9628 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 2aadb2019b4f..c79f12e449ea 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -3,6 +3,7 @@
#include <linux/acpi.h>
#include <linux/kernel.h>
#include <linux/mm.h>
+#include <linux/of.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/memblock.h>
@@ -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);
--
2.34.1
next prev parent reply other threads:[~2023-08-25 7:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 7:47 [PATCH v2 1/2] x86/of: split x86_dtb_init for early x86_flattree_get_config call Saurabh Sengar
2023-08-25 7:47 ` Saurabh Sengar [this message]
2023-10-02 19:41 ` [tip: x86/platform] x86/numa: Add Devicetree support tip-bot2 for Saurabh Sengar
2023-09-15 5:03 ` [PATCH v2 1/2] x86/of: split x86_dtb_init for early x86_flattree_get_config call Saurabh Singh Sengar
2023-10-02 19:41 ` [tip: x86/platform] x86/of: Move the x86_flattree_get_config() call out of x86_dtb_init() tip-bot2 for Saurabh Sengar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1692949657-16446-2-git-send-email-ssengar@linux.microsoft.com \
--to=ssengar@linux.microsoft.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mikelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox