|
@@ -415,9 +415,6 @@ static int __initdata srat_num_cpus; /* number of cpus */
|
|
static u32 __devinitdata pxm_flag[PXM_FLAG_LEN];
|
|
static u32 __devinitdata pxm_flag[PXM_FLAG_LEN];
|
|
#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag))
|
|
#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag))
|
|
#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag))
|
|
#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag))
|
|
-/* maps to convert between proximity domain and logical node ID */
|
|
|
|
-int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
|
|
|
|
-int __initdata nid_to_pxm_map[MAX_NUMNODES];
|
|
|
|
static struct acpi_table_slit __initdata *slit_table;
|
|
static struct acpi_table_slit __initdata *slit_table;
|
|
|
|
|
|
static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa)
|
|
static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa)
|
|
@@ -533,22 +530,17 @@ void __init acpi_numa_arch_fixup(void)
|
|
* MCD - This can probably be dropped now. No need for pxm ID to node ID
|
|
* MCD - This can probably be dropped now. No need for pxm ID to node ID
|
|
* mapping with sparse node numbering iff MAX_PXM_DOMAINS <= MAX_NUMNODES.
|
|
* mapping with sparse node numbering iff MAX_PXM_DOMAINS <= MAX_NUMNODES.
|
|
*/
|
|
*/
|
|
- /* calculate total number of nodes in system from PXM bitmap */
|
|
|
|
- memset(pxm_to_nid_map, -1, sizeof(pxm_to_nid_map));
|
|
|
|
- memset(nid_to_pxm_map, -1, sizeof(nid_to_pxm_map));
|
|
|
|
nodes_clear(node_online_map);
|
|
nodes_clear(node_online_map);
|
|
for (i = 0; i < MAX_PXM_DOMAINS; i++) {
|
|
for (i = 0; i < MAX_PXM_DOMAINS; i++) {
|
|
if (pxm_bit_test(i)) {
|
|
if (pxm_bit_test(i)) {
|
|
- int nid = num_online_nodes();
|
|
|
|
- pxm_to_nid_map[i] = nid;
|
|
|
|
- nid_to_pxm_map[nid] = i;
|
|
|
|
|
|
+ int nid = acpi_map_pxm_to_node(i);
|
|
node_set_online(nid);
|
|
node_set_online(nid);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/* set logical node id in memory chunk structure */
|
|
/* set logical node id in memory chunk structure */
|
|
for (i = 0; i < num_node_memblks; i++)
|
|
for (i = 0; i < num_node_memblks; i++)
|
|
- node_memblk[i].nid = pxm_to_nid_map[node_memblk[i].nid];
|
|
|
|
|
|
+ node_memblk[i].nid = pxm_to_node(node_memblk[i].nid);
|
|
|
|
|
|
/* assign memory bank numbers for each chunk on each node */
|
|
/* assign memory bank numbers for each chunk on each node */
|
|
for_each_online_node(i) {
|
|
for_each_online_node(i) {
|
|
@@ -562,7 +554,7 @@ void __init acpi_numa_arch_fixup(void)
|
|
|
|
|
|
/* set logical node id in cpu structure */
|
|
/* set logical node id in cpu structure */
|
|
for (i = 0; i < srat_num_cpus; i++)
|
|
for (i = 0; i < srat_num_cpus; i++)
|
|
- node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid];
|
|
|
|
|
|
+ node_cpuid[i].nid = pxm_to_node(node_cpuid[i].nid);
|
|
|
|
|
|
printk(KERN_INFO "Number of logical nodes in system = %d\n",
|
|
printk(KERN_INFO "Number of logical nodes in system = %d\n",
|
|
num_online_nodes());
|
|
num_online_nodes());
|
|
@@ -575,11 +567,11 @@ void __init acpi_numa_arch_fixup(void)
|
|
for (i = 0; i < slit_table->localities; i++) {
|
|
for (i = 0; i < slit_table->localities; i++) {
|
|
if (!pxm_bit_test(i))
|
|
if (!pxm_bit_test(i))
|
|
continue;
|
|
continue;
|
|
- node_from = pxm_to_nid_map[i];
|
|
|
|
|
|
+ node_from = pxm_to_node(i);
|
|
for (j = 0; j < slit_table->localities; j++) {
|
|
for (j = 0; j < slit_table->localities; j++) {
|
|
if (!pxm_bit_test(j))
|
|
if (!pxm_bit_test(j))
|
|
continue;
|
|
continue;
|
|
- node_to = pxm_to_nid_map[j];
|
|
|
|
|
|
+ node_to = pxm_to_node(j);
|
|
node_distance(node_from, node_to) =
|
|
node_distance(node_from, node_to) =
|
|
slit_table->entry[i * slit_table->localities + j];
|
|
slit_table->entry[i * slit_table->localities + j];
|
|
}
|
|
}
|
|
@@ -785,9 +777,9 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid)
|
|
|
|
|
|
/*
|
|
/*
|
|
* Assuming that the container driver would have set the proximity
|
|
* Assuming that the container driver would have set the proximity
|
|
- * domain and would have initialized pxm_to_nid_map[pxm_id] && pxm_flag
|
|
|
|
|
|
+ * domain and would have initialized pxm_to_node(pxm_id) && pxm_flag
|
|
*/
|
|
*/
|
|
- node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_nid_map[pxm_id];
|
|
|
|
|
|
+ node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_node(pxm_id);
|
|
|
|
|
|
node_cpuid[cpu].phys_id = physid;
|
|
node_cpuid[cpu].phys_id = physid;
|
|
#endif
|
|
#endif
|
|
@@ -966,7 +958,7 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
|
|
if (pxm < 0)
|
|
if (pxm < 0)
|
|
return AE_OK;
|
|
return AE_OK;
|
|
|
|
|
|
- node = pxm_to_nid_map[pxm];
|
|
|
|
|
|
+ node = pxm_to_node(pxm);
|
|
|
|
|
|
if (node >= MAX_NUMNODES || !node_online(node) ||
|
|
if (node >= MAX_NUMNODES || !node_online(node) ||
|
|
cpus_empty(node_to_cpumask(node)))
|
|
cpus_empty(node_to_cpumask(node)))
|