diff options
-rw-r--r-- | arch/powerpc/Kconfig | 9 | ||||
-rw-r--r-- | arch/powerpc/configs/pseries_defconfig | 1 | ||||
-rw-r--r-- | include/linux/mmzone.h | 6 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 |
4 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 8b6910465578..2bd9b7fb0f6c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -751,6 +751,15 @@ config ARCH_MEMORY_PROBE | |||
751 | def_bool y | 751 | def_bool y |
752 | depends on MEMORY_HOTPLUG | 752 | depends on MEMORY_HOTPLUG |
753 | 753 | ||
754 | # Some NUMA nodes have memory ranges that span | ||
755 | # other nodes. Even though a pfn is valid and | ||
756 | # between a node's start and end pfns, it may not | ||
757 | # reside on that node. See memmap_init_zone() | ||
758 | # for details. | ||
759 | config NODES_SPAN_OTHER_NODES | ||
760 | def_bool y | ||
761 | depends on NEED_MULTIPLE_NODES | ||
762 | |||
754 | config PPC_64K_PAGES | 763 | config PPC_64K_PAGES |
755 | bool "64k page size" | 764 | bool "64k page size" |
756 | depends on PPC64 | 765 | depends on PPC64 |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 9828663652e9..d2833c1a1f3d 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -184,6 +184,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
184 | CONFIG_MIGRATION=y | 184 | CONFIG_MIGRATION=y |
185 | CONFIG_RESOURCES_64BIT=y | 185 | CONFIG_RESOURCES_64BIT=y |
186 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | 186 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y |
187 | CONFIG_NODES_SPAN_OTHER_NODES=y | ||
187 | # CONFIG_PPC_64K_PAGES is not set | 188 | # CONFIG_PPC_64K_PAGES is not set |
188 | CONFIG_SCHED_SMT=y | 189 | CONFIG_SCHED_SMT=y |
189 | CONFIG_PROC_DEVICETREE=y | 190 | CONFIG_PROC_DEVICETREE=y |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 59855b8718a0..ed0762b283a9 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -674,6 +674,12 @@ void sparse_init(void); | |||
674 | #define sparse_index_init(_sec, _nid) do {} while (0) | 674 | #define sparse_index_init(_sec, _nid) do {} while (0) |
675 | #endif /* CONFIG_SPARSEMEM */ | 675 | #endif /* CONFIG_SPARSEMEM */ |
676 | 676 | ||
677 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES | ||
678 | #define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid)) | ||
679 | #else | ||
680 | #define early_pfn_in_nid(pfn, nid) (1) | ||
681 | #endif | ||
682 | |||
677 | #ifndef early_pfn_valid | 683 | #ifndef early_pfn_valid |
678 | #define early_pfn_valid(pfn) (1) | 684 | #define early_pfn_valid(pfn) (1) |
679 | #endif | 685 | #endif |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ebd425c2e2a7..f5fc45472d5c 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1689,6 +1689,8 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, | |||
1689 | for (pfn = start_pfn; pfn < end_pfn; pfn++) { | 1689 | for (pfn = start_pfn; pfn < end_pfn; pfn++) { |
1690 | if (!early_pfn_valid(pfn)) | 1690 | if (!early_pfn_valid(pfn)) |
1691 | continue; | 1691 | continue; |
1692 | if (!early_pfn_in_nid(pfn, nid)) | ||
1693 | continue; | ||
1692 | page = pfn_to_page(pfn); | 1694 | page = pfn_to_page(pfn); |
1693 | set_page_links(page, zone, nid, pfn); | 1695 | set_page_links(page, zone, nid, pfn); |
1694 | init_page_count(page); | 1696 | init_page_count(page); |