Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946560AbWKAFr4 (ORCPT ); Wed, 1 Nov 2006 00:47:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946553AbWKAFrj (ORCPT ); Wed, 1 Nov 2006 00:47:39 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:27817 "EHLO sous-sol.org") by vger.kernel.org with ESMTP id S1946560AbWKAFrW (ORCPT ); Wed, 1 Nov 2006 00:47:22 -0500 Message-Id: <20061101054454.696256000@sous-sol.org> References: <20061101053340.305569000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Tue, 31 Oct 2006 21:34:32 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, Andy Whitcroft , Paul Mackerras , Mike Kravetz , Benjamin Herrenschmidt , Mel Gorman , Will Schmidt , Christoph Lameter Subject: [PATCH 52/61] Reintroduce NODES_SPAN_OTHER_NODES for powerpc Content-Disposition: inline; filename=reintroduce-nodes_span_other_nodes-for-powerpc.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3177 Lines: 92 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Andy Whitcroft Revert "[PATCH] Remove SPAN_OTHER_NODES config definition" This reverts commit f62859bb6871c5e4a8e591c60befc8caaf54db8c. Revert "[PATCH] mm: remove arch independent NODES_SPAN_OTHER_NODES" This reverts commit a94b3ab7eab4edcc9b2cb474b188f774c331adf7. Also update the comments to indicate that this is still required and where its used. Signed-off-by: Andy Whitcroft Cc: Paul Mackerras Cc: Mike Kravetz Cc: Benjamin Herrenschmidt Acked-by: Mel Gorman Acked-by: Will Schmidt Cc: Christoph Lameter Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright --- arch/powerpc/Kconfig | 9 +++++++++ arch/powerpc/configs/pseries_defconfig | 1 + include/linux/mmzone.h | 6 ++++++ mm/page_alloc.c | 2 ++ 4 files changed, 18 insertions(+) --- linux-2.6.18.1.orig/arch/powerpc/Kconfig +++ linux-2.6.18.1/arch/powerpc/Kconfig @@ -729,6 +729,15 @@ config ARCH_MEMORY_PROBE def_bool y 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 bool "64k page size" depends on PPC64 --- linux-2.6.18.1.orig/arch/powerpc/configs/pseries_defconfig +++ linux-2.6.18.1/arch/powerpc/configs/pseries_defconfig @@ -184,6 +184,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y CONFIG_RESOURCES_64BIT=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y +CONFIG_NODES_SPAN_OTHER_NODES=y # CONFIG_PPC_64K_PAGES is not set CONFIG_SCHED_SMT=y CONFIG_PROC_DEVICETREE=y --- linux-2.6.18.1.orig/include/linux/mmzone.h +++ linux-2.6.18.1/include/linux/mmzone.h @@ -632,6 +632,12 @@ void sparse_init(void); #define sparse_index_init(_sec, _nid) do {} while (0) #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 #define early_pfn_valid(pfn) (1) #endif --- linux-2.6.18.1.orig/mm/page_alloc.c +++ linux-2.6.18.1/mm/page_alloc.c @@ -1673,6 +1673,8 @@ void __meminit memmap_init_zone(unsigned for (pfn = start_pfn; pfn < end_pfn; pfn++) { if (!early_pfn_valid(pfn)) continue; + if (!early_pfn_in_nid(pfn, nid)) + continue; page = pfn_to_page(pfn); set_page_links(page, zone, nid, pfn); init_page_count(page); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/