Commit 74b30be2 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

[PATCH] ppc64: add memory present

Provide hooks for PPC64 to allow memory models to be informed of installed
memory areas.  This allows SPARSEMEM to instantiate mem_map for the populated
areas.
Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarMartin Bligh <mbligh@aracnet.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 510f8fa7
...@@ -212,8 +212,8 @@ config ARCH_FLATMEM_ENABLE ...@@ -212,8 +212,8 @@ config ARCH_FLATMEM_ENABLE
source "mm/Kconfig" source "mm/Kconfig"
config HAVE_ARCH_EARLY_PFN_TO_NID config HAVE_ARCH_EARLY_PFN_TO_NID
bool def_bool y
default y depends on NEED_MULTIPLE_NODES
# Some NUMA nodes have memory ranges that span # Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and # other nodes. Even though a pfn is valid and
......
...@@ -440,6 +440,8 @@ new_range: ...@@ -440,6 +440,8 @@ new_range:
for (i = start ; i < (start+size); i += MEMORY_INCREMENT) for (i = start ; i < (start+size); i += MEMORY_INCREMENT)
numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] =
numa_domain; numa_domain;
memory_present(numa_domain, start >> PAGE_SHIFT,
(start + size) >> PAGE_SHIFT);
if (--ranges) if (--ranges)
goto new_range; goto new_range;
...@@ -481,6 +483,7 @@ static void __init setup_nonnuma(void) ...@@ -481,6 +483,7 @@ static void __init setup_nonnuma(void)
for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT) for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT)
numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0; numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0;
memory_present(0, 0, init_node_data[0].node_end_pfn);
} }
static void __init dump_numa_topology(void) static void __init dump_numa_topology(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment