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 <[email protected]>
CC: Thomas Gleixner <[email protected]>
CC: Ingo Molnar <[email protected]>
CC: Borislav Petkov <[email protected]>
CC: "H. Peter Anvin" <[email protected]>
CC: Dave Hansen <[email protected]>
CC: Vlastimil Babka <[email protected]>
CC: Mike Rapoport <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Mel Gorman <[email protected]>
CC: Joonsoo Kim <[email protected]>
CC: Andy Lutomirski <[email protected]>
CC: Andi Kleen <[email protected]>
CC: Petr Tesarik <[email protected]>
CC: Michal Hocko <[email protected]>
CC: Stephen Rothwell <[email protected]>
CC: Jonathan Corbet <[email protected]>
CC: Nicholas Piggin <[email protected]>
CC: Daniel Vacek <[email protected]>
CC: [email protected]
---
 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

Reply via email to