From patchwork Tue Mar 26 17:46:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cody P Schafer X-Patchwork-Id: 231498 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 3E97A2C04E8 for ; Wed, 27 Mar 2013 04:49:06 +1100 (EST) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com [32.97.182.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e7.ny.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 0CBFA2C00B2 for ; Wed, 27 Mar 2013 04:46:51 +1100 (EST) Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Mar 2013 13:46:48 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 26 Mar 2013 13:46:46 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id E67BC6E804F for ; Tue, 26 Mar 2013 13:46:42 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2QHki9v21757994 for ; Tue, 26 Mar 2013 13:46:44 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2QHkfpw011802 for ; Tue, 26 Mar 2013 14:46:43 -0300 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r2QHkexB011752; Tue, 26 Mar 2013 14:46:41 -0300 Received: from localhost (sig-9-65-3-248.mts.ibm.com [9.65.3.248]) by kernel.stglabs.ibm.com (Postfix) with SMTP id CCF1D2402FE; Tue, 26 Mar 2013 10:46:38 -0700 (PDT) From: Cody P Schafer To: linux-mm@kvack.org Subject: [PATCH 1/3] page_alloc: make setup_nr_node_ids() usable for arch init code Date: Tue, 26 Mar 2013 10:46:00 -0700 Message-Id: <1364319962-30967-2-git-send-email-cody@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1364319962-30967-1-git-send-email-cody@linux.vnet.ibm.com> References: <1364319962-30967-1-git-send-email-cody@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13032617-5806-0000-0000-0000207BF8E9 Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ingo Molnar , Paul Mackerras , "H. Peter Anvin" , Andrew Morton , Cody P Schafer , Thomas Gleixner X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" powerpc and x86 were opencoding copies of setup_nr_node_ids(), which page_alloc provides but makes static. Make it avaliable to the archs in linux/mm.h. Signed-off-by: Cody P Schafer --- include/linux/mm.h | 6 ++++++ mm/page_alloc.c | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 7acc9dc..3405405 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1755,5 +1755,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; } static inline bool page_is_guard(struct page *page) { return false; } #endif /* CONFIG_DEBUG_PAGEALLOC */ +#if MAX_NUMNODES > 1 +void __init setup_nr_node_ids(void); +#else +static inline void setup_nr_node_ids(void) {} +#endif + #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8fcced7..96909bb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4710,7 +4710,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size, /* * Figure out the number of possible node ids. */ -static void __init setup_nr_node_ids(void) +void __init setup_nr_node_ids(void) { unsigned int node; unsigned int highest = 0; @@ -4719,10 +4719,6 @@ static void __init setup_nr_node_ids(void) highest = node; nr_node_ids = highest + 1; } -#else -static inline void setup_nr_node_ids(void) -{ -} #endif /**