When a memlayout is tracked (ie: CONFIG_DYNAMIC_NUMA is enabled), rather than iterate over numa_meminfo, a lookup can be done using memlayout. Signed-off-by: Cody P Schafer <cody@xxxxxxxxxxxxxxxxxx> --- arch/x86/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index a2a8dd5..1ed76d5 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -28,7 +28,7 @@ struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; EXPORT_SYMBOL(node_data); static struct numa_meminfo numa_meminfo -#ifndef CONFIG_MEMORY_HOTPLUG +#if !defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_DYNAMIC_NUMA) __initdata #endif ; @@ -832,7 +832,7 @@ EXPORT_SYMBOL(cpumask_of_node); #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */ -#ifdef CONFIG_MEMORY_HOTPLUG +#if defined(CONFIG_MEMORY_HOTPLUG) && !defined(CONFIG_DYNAMIC_NUMA) int memory_add_physaddr_to_nid(u64 start) { struct numa_meminfo *mi = &numa_meminfo; -- 1.8.1.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>