aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorNathan Lynch <nathanl@austin.ibm.com>2006-03-20 19:36:15 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-21 23:03:57 -0500
commitbc16a75926941094db6b42d76014abb5e8d3a910 (patch)
treeb6eced8416d521711a80f23e79cc58d7dc361cb4 /arch/powerpc/mm
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')
-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 a5286a68760a..dd611ef8df7a 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)
207 device->full_name); 207 device->full_name);
208 nid = 0; 208 nid = 0;
209 } 209 }
210
211 /* POWER4 LPAR uses 0xffff as invalid node */
212 if (nid == 0xffff)
213 nid = 0;
214
210 return nid; 215 return nid;
211} 216}
212 217
@@ -297,14 +302,9 @@ static int __cpuinit numa_setup_cpu(unsigned long lcpu)
297 nid = of_node_to_nid(cpu); 302 nid = of_node_to_nid(cpu);
298 303
299 if (nid >= num_online_nodes()) { 304 if (nid >= num_online_nodes()) {
300 /* 305 printk(KERN_ERR "WARNING: cpu %ld "
301 * POWER4 LPAR uses 0xffff as invalid node, 306 "maps to invalid NUMA node %d\n",
302 * dont warn in this case. 307 lcpu, nid);
303 */
304 if (nid != 0xffff)
305 printk(KERN_ERR "WARNING: cpu %ld "
306 "maps to invalid NUMA node %d\n",
307 lcpu, nid);
308 nid = 0; 308 nid = 0;
309 } 309 }
310out: 310out:
@@ -442,10 +442,9 @@ new_range:
442 nid = of_node_to_nid(memory); 442 nid = of_node_to_nid(memory);
443 443
444 if (nid >= MAX_NUMNODES) { 444 if (nid >= MAX_NUMNODES) {
445 if (nid != 0xffff) 445 printk(KERN_ERR "WARNING: memory at %lx maps "
446 printk(KERN_ERR "WARNING: memory at %lx maps " 446 "to invalid NUMA node %d\n", start,
447 "to invalid NUMA node %d\n", start, 447 nid);
448 nid);
449 nid = 0; 448 nid = 0;
450 } 449 }
451 450