Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759113Ab0FVR3f (ORCPT ); Tue, 22 Jun 2010 13:29:35 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:33425 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758499Ab0FVR3U (ORCPT ); Tue, 22 Jun 2010 13:29:20 -0400 From: Yinghai Lu To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , David Miller , Benjamin Herrenschmidt Cc: Linus Torvalds , Johannes Weiner , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Yinghai Lu Subject: [PATCH 23/25] x86: Have nobootmem version setup_bootmem_allocator() Date: Tue, 22 Jun 2010 10:26:52 -0700 Message-Id: <1277227614-11581-24-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1277227614-11581-1-git-send-email-yinghai@kernel.org> References: <1277227614-11581-1-git-send-email-yinghai@kernel.org> X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090208.4C20F2D1.0044,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1873 Lines: 66 We can reduce #ifdef number from 3 to one in init_32.c Signed-off-by: Yinghai Lu --- arch/x86/mm/init_32.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index e3ae067..f172aa3 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -771,11 +771,9 @@ static unsigned long __init setup_node_bootmem(int nodeid, return bootmap + bootmap_size; } -#endif void __init setup_bootmem_allocator(void) { -#ifndef CONFIG_NO_BOOTMEM int nodeid; unsigned long bootmap_size, bootmap; /* @@ -787,13 +785,11 @@ void __init setup_bootmem_allocator(void) if (bootmap == (unsigned long)LMB_ERROR) panic("Cannot find bootmem map of size %ld\n", bootmap_size); lmb_reserve_range(bootmap, bootmap + bootmap_size, "BOOTMAP"); -#endif printk(KERN_INFO " mapped low ram: 0 - %08lx\n", max_pfn_mapped<