aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc64/Kconfig12
-rw-r--r--include/linux/mmzone.h6
-rw-r--r--mm/page_alloc.c2
3 files changed, 20 insertions, 0 deletions
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
index 011b5c0bf1d0..85f8fcf44b6c 100644
--- a/arch/ppc64/Kconfig
+++ b/arch/ppc64/Kconfig
@@ -211,6 +211,18 @@ config ARCH_FLATMEM_ENABLE
211 211
212source "mm/Kconfig" 212source "mm/Kconfig"
213 213
214# Some NUMA nodes have memory ranges that span
215# other nodes. Even though a pfn is valid and
216# between a node's start and end pfns, it may not
217# reside on that node.
218#
219# This is a relatively temporary hack that should
220# be able to go away when sparsemem is fully in
221# place
222config NODES_SPAN_OTHER_NODES
223 def_bool y
224 depends on NEED_MULTIPLE_NODES
225
214config NUMA 226config NUMA
215 bool "NUMA support" 227 bool "NUMA support"
216 depends on DISCONTIGMEM 228 depends on DISCONTIGMEM
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 19860d317ec2..746b57e3d370 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -528,6 +528,12 @@ void sparse_init(void);
528#define sparse_init() do {} while (0) 528#define sparse_init() do {} while (0)
529#endif /* CONFIG_SPARSEMEM */ 529#endif /* CONFIG_SPARSEMEM */
530 530
531#ifdef CONFIG_NODES_SPAN_OTHER_NODES
532#define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid))
533#else
534#define early_pfn_in_nid(pfn, nid) (1)
535#endif
536
531#ifndef early_pfn_valid 537#ifndef early_pfn_valid
532#define early_pfn_valid(pfn) (1) 538#define early_pfn_valid(pfn) (1)
533#endif 539#endif
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5c1b8982a6da..1eb683f9b3af 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1656,6 +1656,8 @@ void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone,
1656 for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) { 1656 for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) {
1657 if (!early_pfn_valid(pfn)) 1657 if (!early_pfn_valid(pfn))
1658 continue; 1658 continue;
1659 if (!early_pfn_in_nid(pfn, nid))
1660 continue;
1659 page = pfn_to_page(pfn); 1661 page = pfn_to_page(pfn);
1660 set_page_links(page, zone, nid, pfn); 1662 set_page_links(page, zone, nid, pfn);
1661 set_page_count(page, 0); 1663 set_page_count(page, 0);