cell: fix spu/nid placement in 2.6.16 SDK kernel The of_node_to_nid() function originally depended on of_node_numa_domain to return -1 if no nid was found for a node - this wasn't the case in 2.6.16, where there's no distinction between "no nid" and nid 0 Change of_node_to_nid() to check for the ibm,associativity property itself. Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann Index: linus-2.6/arch/powerpc/mm/numa.c =================================================================== --- linus-2.6.orig/arch/powerpc/mm/numa.c +++ linus-2.6/arch/powerpc/mm/numa.c @@ -216,9 +216,11 @@ int of_node_to_nid(struct device_node *d of_node_get(device); while (device) { - nid = of_node_numa_domain(device); - if (nid != -1) + unsigned int *assoc = of_get_associativity(device); + if (assoc && *assoc >= min_common_depth) { + nid = assoc[min_common_depth]; break; + } tmp = device; device = of_get_parent(tmp);