[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1551011649-30103-4-git-send-email-kernelfans@gmail.com>
Date: Sun, 24 Feb 2019 20:34:06 +0800
From: Pingfan Liu <kernelfans@...il.com>
To: x86@...nel.org, linux-mm@...ck.org
Cc: Pingfan Liu <kernelfans@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andy Lutomirski <luto@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
Petr Tesarik <ptesarik@...e.cz>,
Michal Hocko <mhocko@...e.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Jonathan Corbet <corbet@....net>,
Nicholas Piggin <npiggin@...il.com>,
Daniel Vacek <neelx@...hat.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 3/6] x86/numa: define numa_init_array() conditional on CONFIG_NUMA
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@...il.com>
CC: Thomas Gleixner <tglx@...utronix.de>
CC: Ingo Molnar <mingo@...hat.com>
CC: Borislav Petkov <bp@...en8.de>
CC: "H. Peter Anvin" <hpa@...or.com>
CC: Dave Hansen <dave.hansen@...ux.intel.com>
CC: Vlastimil Babka <vbabka@...e.cz>
CC: Mike Rapoport <rppt@...ux.vnet.ibm.com>
CC: Andrew Morton <akpm@...ux-foundation.org>
CC: Mel Gorman <mgorman@...e.de>
CC: Joonsoo Kim <iamjoonsoo.kim@....com>
CC: Andy Lutomirski <luto@...nel.org>
CC: Andi Kleen <ak@...ux.intel.com>
CC: Petr Tesarik <ptesarik@...e.cz>
CC: Michal Hocko <mhocko@...e.com>
CC: Stephen Rothwell <sfr@...b.auug.org.au>
CC: Jonathan Corbet <corbet@....net>
CC: Nicholas Piggin <npiggin@...il.com>
CC: Daniel Vacek <neelx@...hat.com>
CC: linux-kernel@...r.kernel.org
---
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
Powered by blists - more mailing lists