Commit 75167957 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

[PATCH] Reintroduce NODES_SPAN_OTHER_NODES for powerpc

Reintroduce NODES_SPAN_OTHER_NODES for powerpc

Revert "[PATCH] Remove SPAN_OTHER_NODES config definition"
    This reverts commit f62859bb.
Revert "[PATCH] mm: remove arch independent NODES_SPAN_OTHER_NODES"
    This reverts commit a94b3ab7.

Also update the comments to indicate that this is still required
and where its used.
Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Kravetz <kravetz@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
Acked-by: default avatarWill Schmidt <will_schmidt@vnet.ibm.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 047a66d4
...@@ -751,6 +751,15 @@ config ARCH_MEMORY_PROBE ...@@ -751,6 +751,15 @@ config ARCH_MEMORY_PROBE
def_bool y def_bool y
depends on MEMORY_HOTPLUG depends on MEMORY_HOTPLUG
# Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and
# between a node's start and end pfns, it may not
# reside on that node. See memmap_init_zone()
# for details.
config NODES_SPAN_OTHER_NODES
def_bool y
depends on NEED_MULTIPLE_NODES
config PPC_64K_PAGES config PPC_64K_PAGES
bool "64k page size" bool "64k page size"
depends on PPC64 depends on PPC64
......
...@@ -184,6 +184,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 ...@@ -184,6 +184,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y CONFIG_MIGRATION=y
CONFIG_RESOURCES_64BIT=y CONFIG_RESOURCES_64BIT=y
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_NODES_SPAN_OTHER_NODES=y
# CONFIG_PPC_64K_PAGES is not set # CONFIG_PPC_64K_PAGES is not set
CONFIG_SCHED_SMT=y CONFIG_SCHED_SMT=y
CONFIG_PROC_DEVICETREE=y CONFIG_PROC_DEVICETREE=y
......
...@@ -674,6 +674,12 @@ void sparse_init(void); ...@@ -674,6 +674,12 @@ void sparse_init(void);
#define sparse_index_init(_sec, _nid) do {} while (0) #define sparse_index_init(_sec, _nid) do {} while (0)
#endif /* CONFIG_SPARSEMEM */ #endif /* CONFIG_SPARSEMEM */
#ifdef CONFIG_NODES_SPAN_OTHER_NODES
#define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid))
#else
#define early_pfn_in_nid(pfn, nid) (1)
#endif
#ifndef early_pfn_valid #ifndef early_pfn_valid
#define early_pfn_valid(pfn) (1) #define early_pfn_valid(pfn) (1)
#endif #endif
......
...@@ -1689,6 +1689,8 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, ...@@ -1689,6 +1689,8 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
for (pfn = start_pfn; pfn < end_pfn; pfn++) { for (pfn = start_pfn; pfn < end_pfn; pfn++) {
if (!early_pfn_valid(pfn)) if (!early_pfn_valid(pfn))
continue; continue;
if (!early_pfn_in_nid(pfn, nid))
continue;
page = pfn_to_page(pfn); page = pfn_to_page(pfn);
set_page_links(page, zone, nid, pfn); set_page_links(page, zone, nid, pfn);
init_page_count(page); init_page_count(page);
......
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