Skip to content

Commit 0c436a5

Browse files
Saurabh SengarIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0d294c8 commit 0c436a5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,7 @@ config NUMA
15341534
depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP)
15351535
default y if X86_BIGSMP
15361536
select USE_PERCPU_NUMA_NODE_ID
1537+
select OF_NUMA if OF
15371538
help
15381539
Enable NUMA (Non-Uniform Memory Access) support.
15391540

arch/x86/mm/numa.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/acpi.h>
44
#include <linux/kernel.h>
55
#include <linux/mm.h>
6+
#include <linux/of.h>
67
#include <linux/string.h>
78
#include <linux/init.h>
89
#include <linux/memblock.h>
@@ -733,6 +734,8 @@ void __init x86_numa_init(void)
733734
if (!numa_init(amd_numa_init))
734735
return;
735736
#endif
737+
if (acpi_disabled && !numa_init(of_numa_init))
738+
return;
736739
}
737740

738741
numa_init(dummy_numa_init);

0 commit comments

Comments
 (0)