aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/numa.c
diff options
context:
space:
mode:
authorNathan Lynch <nathanl@austin.ibm.com>2006-03-20 18:36:15 -0600
committerPaul Mackerras <paulus@samba.org>2006-03-22 15:03:57 +1100
commitbc16a75926941094db6b42d76014abb5e8d3a910 (patch)
treeb6eced8416d521711a80f23e79cc58d7dc361cb4 /arch/powerpc/mm/numa.c
parentcf950b7af0e51935e559c54262214423e2b6c88a (diff)
[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: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/numa.c')
-rw-r--r--arch/powerpc/mm/numa.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index a5286a68760..dd611ef8df7 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -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,14 +302,9 @@ 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);
+ printk(KERN_ERR "WARNING: cpu %ld "
+ "maps to invalid NUMA node %d\n",
+ lcpu, nid);
nid = 0;
}
out:
@@ -442,10 +442,9 @@ new_range:
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);
+ printk(KERN_ERR "WARNING: memory at %lx maps "
+ "to invalid NUMA node %d\n", start,
+ nid);
nid = 0;
}