]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ppc64: add memory present
authorAndy Whitcroft <apw@shadowen.org>
Thu, 23 Jun 2005 07:08:02 +0000 (00:08 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:05 +0000 (09:45 -0700)
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: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Martin Bligh <mbligh@aracnet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/Kconfig
arch/ppc64/mm/numa.c

index 3c8bfd0345cc0d962e1ecd3663496123df588a32..c92d48fe06e5b526dc97a62c0f93ff2884fbf459 100644 (file)
@@ -212,8 +212,8 @@ config ARCH_FLATMEM_ENABLE
 source "mm/Kconfig"
 
 config HAVE_ARCH_EARLY_PFN_TO_NID
-       bool
-       default y
+       def_bool y
+       depends on NEED_MULTIPLE_NODES
 
 # Some NUMA nodes have memory ranges that span
 # other nodes.  Even though a pfn is valid and
index ea862ec643d3a9df7f6f2f5287c1c81402f1f321..cafd91aef289ecc4354f6252be37ee5f36006f98 100644 (file)
@@ -440,6 +440,8 @@ new_range:
                for (i = start ; i < (start+size); i += MEMORY_INCREMENT)
                        numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] =
                                numa_domain;
+               memory_present(numa_domain, start >> PAGE_SHIFT,
+                                               (start + size) >> PAGE_SHIFT);
 
                if (--ranges)
                        goto new_range;
@@ -481,6 +483,7 @@ static void __init setup_nonnuma(void)
 
        for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT)
                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)