]> err.no Git - linux-2.6/blobdiff - arch/x86/mm/numa_64.c
Merge branch 'smsc47b397-new-id' into release
[linux-2.6] / arch / x86 / mm / numa_64.c
index 59898fb0a4aa1edc115858e10de10fc9004c820e..16b82ad34b961ba08fab68c21076f98e79e89c88 100644 (file)
@@ -221,8 +221,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
                                 bootmap_pages<<PAGE_SHIFT, PAGE_SIZE);
        if (bootmap == NULL)  {
                if (nodedata_phys < start || nodedata_phys >= end)
-                       free_bootmem((unsigned long)node_data[nodeid],
-                                    pgdat_size);
+                       free_bootmem(nodedata_phys, pgdat_size);
                node_data[nodeid] = NULL;
                return;
        }
@@ -622,13 +621,17 @@ void __init init_cpu_to_node(void)
        int i;
 
        for (i = 0; i < NR_CPUS; i++) {
+               int node;
                u16 apicid = x86_cpu_to_apicid_init[i];
 
                if (apicid == BAD_APICID)
                        continue;
-               if (apicid_to_node[apicid] == NUMA_NO_NODE)
+               node = apicid_to_node[apicid];
+               if (node == NUMA_NO_NODE)
                        continue;
-               numa_set_node(i, apicid_to_node[apicid]);
+               if (!node_online(node))
+                       continue;
+               numa_set_node(i, node);
        }
 }