From patchwork Tue Mar 26 17:46:02 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: 231499 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 EEB8C2C019A for ; Wed, 27 Mar 2013 04:50:20 +1100 (EST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e32.co.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 8E8762C016F for ; Wed, 27 Mar 2013 04:49:18 +1100 (EST) Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Mar 2013 11:49:13 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 26 Mar 2013 11:46:57 -0600 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id D772019D8051 for ; Tue, 26 Mar 2013 11:46:48 -0600 (MDT) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2QHkpQW109926 for ; Tue, 26 Mar 2013 11:46:51 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2QHknGC019843 for ; Tue, 26 Mar 2013 11:46:51 -0600 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r2QHkmUA019618; Tue, 26 Mar 2013 11:46:48 -0600 Received: from localhost (sig-9-65-3-248.mts.ibm.com [9.65.3.248]) by kernel.stglabs.ibm.com (Postfix) with SMTP id 7743D2402FE; Tue, 26 Mar 2013 10:46:46 -0700 (PDT) From: Cody P Schafer To: linux-mm@kvack.org Subject: [PATCH 3/3] powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding. Date: Tue, 26 Mar 2013 10:46:02 -0700 Message-Id: <1364319962-30967-4-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-5406-0000-0000-000006C7394C 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" Signed-off-by: Cody P Schafer --- arch/powerpc/mm/numa.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bba87ca..7574ae3 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -62,14 +62,11 @@ static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS]; */ static void __init setup_node_to_cpumask_map(void) { - unsigned int node, num = 0; + unsigned int node; /* setup nr_node_ids if not done yet */ - if (nr_node_ids == MAX_NUMNODES) { - for_each_node_mask(node, node_possible_map) - num = node; - nr_node_ids = num + 1; - } + if (nr_node_ids == MAX_NUMNODES) + setup_nr_node_ids() /* allocate the map */ for (node = 0; node < nr_node_ids; node++)