aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/numa_32.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-05-02 08:18:53 -0400
committerTejun Heo <tj@kernel.org>2011-05-02 08:18:53 -0400
commit299a180aec6a8ee3069cf0fe90d722ac20c1f837 (patch)
tree12498f1eb2d54dd9aaaaf2842a683db84e225d4d /arch/x86/mm/numa_32.c
parent5acd91ab837c9d066af7345aea6462dc55695db7 (diff)
x86-32, NUMA: Update numaq to use new NUMA init protocol
Update numaq such that it calls numa_add_memblk() and sets numa_nodes_parsed instead of directly diddling with NUMA states. The original get_memcfg_numaq() is renamed to numaq_numa_init() and new get_memcfg_numaq() is created in numa_32.c. The shim numa_add_memblk() implementation handles node_start/end_pfn[] and node_set_online() for nodes with memory. The new get_memcfg_numaq() exactly the same with get_memcfg_from_srat() other than calling the numaq init function. Things get_memcfgs_numaq() do are not strictly necessary for numaq but added for consistency and to help unifying NUMA init handling. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm/numa_32.c')
-rw-r--r--arch/x86/mm/numa_32.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index 8641239a066..14135e52cef 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -332,6 +332,29 @@ static __init void init_alloc_remap(int nid)
332 nid, node_pa, node_pa + size, remap_va, remap_va + size); 332 nid, node_pa, node_pa + size, remap_va, remap_va + size);
333} 333}
334 334
335static int get_memcfg_numaq(void)
336{
337#ifdef CONFIG_X86_NUMAQ
338 int nid;
339
340 if (numa_off)
341 return 0;
342
343 if (numaq_numa_init() < 0) {
344 nodes_clear(numa_nodes_parsed);
345 remove_all_active_ranges();
346 return 0;
347 }
348
349 for_each_node_mask(nid, numa_nodes_parsed)
350 node_set_online(nid);
351 sort_node_map();
352 return 1;
353#else
354 return 0;
355#endif
356}
357
335static int get_memcfg_from_srat(void) 358static int get_memcfg_from_srat(void)
336{ 359{
337#ifdef CONFIG_ACPI_NUMA 360#ifdef CONFIG_ACPI_NUMA