|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 03/21] xen/arm: Introduce CONFIG_DEVICE_TREE_NUMA config option
Introduce the CONFIG_DEVICE_TREE_NUMA configuration option for
Device Tree-based NUMA support. Selecting CONFIG_DEVICE_TREE_NUMA
automatically selects CONFIG_NUMA. While this option is currently
restricted to the ARM architecture, it is designed to be selectable
for RISC-V and PPC in the future. This patch also includes the
necessary compilation fixes required when building with CONFIG_NUMA,
and creates a single fake NUMA node to ensure Xen can boot
successfully at this stage.
---
xen/arch/arm/setup.c | 4 ++++
xen/arch/arm/smpboot.c | 2 ++
xen/common/Kconfig | 9 +++++++++
3 files changed, 15 insertions(+)
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 6310a47d68..c0202d9ff6 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -351,6 +351,10 @@ void asmlinkage __init noreturn start_xen(unsigned long
fdt_paddr)
/* Parse the ACPI tables for possible boot-time configuration */
acpi_boot_table_init();
+#ifdef CONFIG_NUMA
+ numa_initmem_init(0x0UL, 0x1UL << (PADDR_BITS - 12));
+#endif /* CONFIG_NUMA */
+
end_boot_allocator();
/*
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 7f3cfa812e..d1651fe7dd 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -47,8 +47,10 @@ integer_param("maxcpus", max_cpus);
/* CPU logical map: map xen cpuid to an MPIDR */
register_t __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID };
+#ifndef CONFIG_NUMA
/* Fake one node for now. See also xen/numa.h */
nodemask_t __read_mostly node_online_map = { { [0] = 1UL } };
+#endif /* CONFIG_NUMA */
/* Xen stack for bringing up the first CPU. */
static unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 5ff71480ee..2365b421bf 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -188,6 +188,15 @@ config VM_EVENT
config NEEDS_LIBELF
bool
+config DEVICE_TREE_NUMA
+ bool "Device tree based NUMA support (UNSUPPORTED)" if UNSUPPORTED &&
ARM
+ depends on HAS_DEVICE_TREE_DISCOVERY
+ select NUMA
+ help
+ Device tree based NUMA support. The "numa-node-id" property in
+ the CPU and memory nodes of a Device Tree defines the NUMA node
+ to which they belong.
+
config NUMA
bool
--
2.43.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |