[PATCH 3/6] x86/numa: define numa_init_array() conditional on CONFIG_NUMA
From: Pingfan Liu
Date: Sun Feb 24 2019 - 07:34:55 EST
For non-NUMA, it turns out that numa_init_array() has no operations. Make
separated definition for non-NUMA and NUMA, so later they can be combined
into their counterpart init_cpu_to_node().
Signed-off-by: Pingfan Liu <kernelfans@xxxxxxxxx>
CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxxxxx>
CC: Borislav Petkov <bp@xxxxxxxxx>
CC: "H. Peter Anvin" <hpa@xxxxxxxxx>
CC: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
CC: Vlastimil Babka <vbabka@xxxxxxx>
CC: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
CC: Mel Gorman <mgorman@xxxxxxx>
CC: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
CC: Andy Lutomirski <luto@xxxxxxxxxx>
CC: Andi Kleen <ak@xxxxxxxxxxxxxxx>
CC: Petr Tesarik <ptesarik@xxxxxxx>
CC: Michal Hocko <mhocko@xxxxxxxx>
CC: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
CC: Jonathan Corbet <corbet@xxxxxxx>
CC: Nicholas Piggin <npiggin@xxxxxxxxx>
CC: Daniel Vacek <neelx@xxxxxxxxxx>
CC: linux-kernel@xxxxxxxxxxxxxxx
---
arch/x86/mm/numa.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 1308f54..bfe6732 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -599,6 +599,7 @@ static int __init numa_register_memblks(struct numa_meminfo *mi)
return 0;
}
+#ifdef CONFIG_NUMA
/*
* There are unfortunately some poorly designed mainboards around that
* only connect memory to a single CPU. This breaks the 1:1 cpu->node
@@ -618,6 +619,9 @@ static void __init numa_init_array(void)
rr = next_node_in(rr, node_online_map);
}
}
+#else
+static void __init numa_init_array(void) {}
+#endif
static int __init numa_init(int (*init_func)(void))
{
--
2.7.4