Skip to content

Commit

Permalink
x86_64: disable srat when numa emulation succeeds
Browse files Browse the repository at this point in the history
When NUMA emulation succeeds, acpi_numa needs to be set to -1 so that
srat_disabled() will always return true.  We won't be calling
acpi_scan_nodes() or registering the true nodes we've found.

[hugh@veritas.com: Fix x86_64 CONFIG_NUMA_EMU build: acpi_numa needs CONFIG_ACPI_NUMA]
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Jul 22, 2007
1 parent a7e9662 commit 1c05f09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/x86_64/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,13 @@ static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn)

/*
* We need to vacate all active ranges that may have been registered by
* SRAT.
* SRAT and set acpi_numa to -1 so that srat_disabled() always returns
* true. NUMA emulation has succeeded so we will not scan ACPI nodes.
*/
remove_all_active_ranges();
#ifdef CONFIG_ACPI_NUMA
acpi_numa = -1;
#endif
for_each_node_mask(i, node_possible_map) {
e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT,
nodes[i].end >> PAGE_SHIFT);
Expand Down

0 comments on commit 1c05f09

Please sign in to comment.