From patchwork Mon Mar 25 04:11:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonsoo Kim X-Patchwork-Id: 2328861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id DDB96DF24C for ; Mon, 25 Mar 2013 04:14:38 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UJylI-0005wP-RH; Mon, 25 Mar 2013 04:11:58 +0000 Received: from lgemrelse7q.lge.com ([156.147.1.151]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UJyk7-0005hP-B3 for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2013 04:10:45 +0000 X-AuditID: 9c930197-b7c9dae000006959-72-514fce3a7f68 Received: from js1304-P5Q-DELUXE.LGE.NET ( [10.177.220.249]) by LGEMRELSE7Q.lge.com (Symantec Brightmail Gateway) with SMTP id 85.9C.26969.A3ECF415; Mon, 25 Mar 2013 13:10:34 +0900 (KST) From: Joonsoo Kim To: Russell King Subject: [RFC PATCH 4/6] ARM, mm: don't do arm_bootmem_init() if CONFIG_NO_BOOTMEM Date: Mon, 25 Mar 2013 13:11:12 +0900 Message-Id: <1364184674-13798-5-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364184674-13798-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1364184674-13798-1-git-send-email-iamjoonsoo.kim@lge.com> X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130325_001043_715461_DE138632 X-CRM114-Status: UNSURE ( 6.63 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.5 (-----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-5.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [156.147.1.151 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.3 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Joonsoo Kim , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Pitre X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org arm_bootmem_init() initialize a bitmap for bootmem and it is not needed for CONFIG_NO_BOOTMEM. So skip it when CONFIG_NO_BOOTMEM. Signed-off-by: Joonsoo Kim diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index ad722f1..049414a 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -149,6 +149,12 @@ static void __init find_limits(unsigned long *min, unsigned long *max_low, *max_high = bank_pfn_end(&mi->bank[mi->nr_banks - 1]); } +#ifdef CONFIG_NO_BOOTMEM +static inline void __init arm_bootmem_init(unsigned long start_pfn, + unsigned long end_pfn) +{ +} +#else static void __init arm_bootmem_init(unsigned long start_pfn, unsigned long end_pfn) { @@ -169,7 +175,6 @@ static void __init arm_bootmem_init(unsigned long start_pfn, * Initialise the bootmem allocator, handing the * memory banks over to bootmem. */ - node_set_online(0); pgdat = NODE_DATA(0); init_bootmem_node(pgdat, __phys_to_pfn(bitmap), start_pfn, end_pfn); @@ -200,6 +205,7 @@ static void __init arm_bootmem_init(unsigned long start_pfn, (end - start) << PAGE_SHIFT, BOOTMEM_DEFAULT); } } +#endif #ifdef CONFIG_ZONE_DMA @@ -392,6 +398,7 @@ void __init bootmem_init(void) find_limits(&min, &max_low, &max_high); + node_set_online(0); arm_bootmem_init(min, max_low); /*