]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86_64/mm/srat.c
x86_64: Use LOCAL_DISTANCE and REMOTE_DISTANCE in x86_64 ACPI code
[linux-2.6-omap-h63xx.git] / arch / x86_64 / mm / srat.c
index 2efe215fc76a1db4353edbe231bc12070954af6c..a126cb73928b45217ef9b6997701371b56079f18 100644 (file)
@@ -106,9 +106,9 @@ static __init int slit_valid(struct acpi_table_slit *slit)
                for (j = 0; j < d; j++)  {
                        u8 val = slit->entry[d*i + j];
                        if (i == j) {
-                               if (val != 10)
+                               if (val != LOCAL_DISTANCE)
                                        return 0;
-                       } else if (val <= 10)
+                       } else if (val <= LOCAL_DISTANCE)
                                return 0;
                }
        }
@@ -419,19 +419,21 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
                return -1;
        }
 
+       node_possible_map = nodes_parsed;
+
        /* Finally register nodes */
-       for_each_node_mask(i, nodes_parsed)
+       for_each_node_mask(i, node_possible_map)
                setup_node_bootmem(i, nodes[i].start, nodes[i].end);
        /* Try again in case setup_node_bootmem missed one due
           to missing bootmem */
-       for_each_node_mask(i, nodes_parsed)
+       for_each_node_mask(i, node_possible_map)
                if (!node_online(i))
                        setup_node_bootmem(i, nodes[i].start, nodes[i].end);
 
        for (i = 0; i < NR_CPUS; i++) {
                if (cpu_to_node[i] == NUMA_NO_NODE)
                        continue;
-               if (!node_isset(cpu_to_node[i], nodes_parsed))
+               if (!node_isset(cpu_to_node[i], node_possible_map))
                        numa_set_node(i, NUMA_NO_NODE);
        }
        numa_init_array();
@@ -462,7 +464,7 @@ int __node_distance(int a, int b)
        int index;
 
        if (!acpi_slit)
-               return a == b ? 10 : 20;
+               return a == b ? LOCAL_DISTANCE : REMOTE_DISTANCE;
        index = acpi_slit->locality_count * node_to_pxm(a);
        return acpi_slit->entry[index + node_to_pxm(b)];
 }