]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/mm/numa.c
Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[karo-tx-linux.git] / arch / powerpc / mm / numa.c
index bba87ca2b4d78a1a8fbedd70e6122d583d365d79..fa33c546e77869bc7596b434bdbf6dafe39a4b4a 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/pfn.h>
 #include <linux/cpuset.h>
 #include <linux/node.h>
+#include <linux/slab.h>
 #include <asm/sparsemem.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
@@ -62,14 +63,11 @@ static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS];
  */
 static void __init setup_node_to_cpumask_map(void)
 {
-       unsigned int node, num = 0;
+       unsigned int node;
 
        /* setup nr_node_ids if not done yet */
-       if (nr_node_ids == MAX_NUMNODES) {
-               for_each_node_mask(node, node_possible_map)
-                       num = node;
-               nr_node_ids = num + 1;
-       }
+       if (nr_node_ids == MAX_NUMNODES)
+               setup_nr_node_ids();
 
        /* allocate the map */
        for (node = 0; node < nr_node_ids; node++)