As a memory range described in device tree cannot be split across multiple nodes. So we define NR_NODE_MEMBLKS as NR_MEM_BANKS in arch header. And keep default NR_NODE_MEMBLKS in common header for those architectures NUMA is disabled.
Signed-off-by: Wei Chen <[email protected]> --- xen/include/asm-arm/numa.h | 8 +++++++- xen/include/xen/numa.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-arm/numa.h b/xen/include/asm-arm/numa.h index 8f1c67e3eb..21569e634b 100644 --- a/xen/include/asm-arm/numa.h +++ b/xen/include/asm-arm/numa.h @@ -3,9 +3,15 @@ #include <xen/mm.h> +#include <asm/setup.h> + typedef u8 nodeid_t; -#ifndef CONFIG_NUMA +#ifdef CONFIG_NUMA + +#define NR_NODE_MEMBLKS NR_MEM_BANKS + +#else /* Fake one node for now. See also node_online_map. */ #define cpu_to_node(cpu) 0 diff --git a/xen/include/xen/numa.h b/xen/include/xen/numa.h index 1978e2be1b..1731e1cc6b 100644 --- a/xen/include/xen/numa.h +++ b/xen/include/xen/numa.h @@ -12,7 +12,9 @@ #define MAX_NUMNODES 1 #endif +#ifndef NR_NODE_MEMBLKS #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) +#endif #define vcpu_to_node(v) (cpu_to_node((v)->processor)) -- 2.25.1
