提交 bc16a759 编写于 作者: N Nathan Lynch 提交者: Paul Mackerras

[PATCH] powerpc numa: Consolidate handling of Power4 special case

Code to handle Power4's invalid node id (0xffff) is duplicated for cpu
and memory.  Better to handle this case in one place --
of_node_to_nid.  Overall behavior should be unchanged.
Signed-off-by: NNathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 cf950b7a
......@@ -207,6 +207,11 @@ static int of_node_to_nid(struct device_node *device)
device->full_name);
nid = 0;
}
/* POWER4 LPAR uses 0xffff as invalid node */
if (nid == 0xffff)
nid = 0;
return nid;
}
......@@ -297,11 +302,6 @@ static int __cpuinit numa_setup_cpu(unsigned long lcpu)
nid = of_node_to_nid(cpu);
if (nid >= num_online_nodes()) {
/*
* POWER4 LPAR uses 0xffff as invalid node,
* dont warn in this case.
*/
if (nid != 0xffff)
printk(KERN_ERR "WARNING: cpu %ld "
"maps to invalid NUMA node %d\n",
lcpu, nid);
......@@ -442,7 +442,6 @@ static int __init parse_numa_properties(void)
nid = of_node_to_nid(memory);
if (nid >= MAX_NUMNODES) {
if (nid != 0xffff)
printk(KERN_ERR "WARNING: memory at %lx maps "
"to invalid NUMA node %d\n", start,
nid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册