From: Saurabh Sengar Date: Fri, 25 Aug 2023 07:47:37 +0000 (-0700) Subject: x86/numa: Add Devicetree support X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0c436a58292d0ca1af213ede75b2508995c8af0b;p=linux.git 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 --- diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 66bfabae88149..aab5e3205602f 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 2aadb2019b4f2..c79f12e449eac 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);