[2.6.22 patch 4/4] x86_64: fix fake numa for machines with true srat

From: David Rientjes
Date: Mon May 07 2007 - 10:28:42 EST


Use the newly exported disable_srat() function to disable all SRAT
detected values before registering emulated node active regions or calling
setup_node_bootmem(). This ensures we are correctly srat_disabled() since
we never call acpi_scan_nodes() in the emulated case, even on true SRAT
machines.

Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
---
arch/x86_64/mm/numa.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -463,6 +463,7 @@ done:
}
}
out:
+ disable_srat();
memnode_shift = compute_hash_shift(nodes, num_nodes);
if (memnode_shift < 0) {
memnode_shift = 0;
@@ -470,12 +471,6 @@ out:
"disabled.\n");
return -1;
}
-
- /*
- * We need to vacate all active ranges that may have been registered by
- * SRAT.
- */
- remove_all_active_ranges();
for_each_node_mask(i, node_possible_map) {
e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT,
nodes[i].end >> PAGE_SHIFT);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/