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>
这个提交包含在:
Tejun Heo
2011-05-02 14:18:53 +02:00
父节点 5acd91ab83
当前提交 299a180aec
修改 3 个文件,包含 34 行新增24 行删除

查看文件

@@ -332,6 +332,29 @@ static __init void init_alloc_remap(int nid)
nid, node_pa, node_pa + size, remap_va, remap_va + size);
}
static int get_memcfg_numaq(void)
{
#ifdef CONFIG_X86_NUMAQ
int nid;
if (numa_off)
return 0;
if (numaq_numa_init() < 0) {
nodes_clear(numa_nodes_parsed);
remove_all_active_ranges();
return 0;
}
for_each_node_mask(nid, numa_nodes_parsed)
node_set_online(nid);
sort_node_map();
return 1;
#else
return 0;
#endif
}
static int get_memcfg_from_srat(void)
{
#ifdef CONFIG_ACPI_NUMA