From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932644Ab1BXHMr (ORCPT ); Thu, 24 Feb 2011 02:12:47 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]:53811 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932371Ab1BXHMo (ORCPT ); Thu, 24 Feb 2011 02:12:44 -0500 Message-ID: <4D6604C5.2080904@kernel.org> Date: Wed, 23 Feb 2011 23:12:05 -0800 From: Yinghai Lu User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: Ingo Molnar CC: Andrew Morton , Thomas Gleixner , "H. Peter Anvin" , David Miller , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] mm: Move contig_page_data define to bootmem.c/nobootmem.c References: <1297120632-24933-1-git-send-email-yinghai@kernel.org> <1297120632-24933-11-git-send-email-yinghai@kernel.org> <20110222154806.0be18267.akpm@linux-foundation.org> <4D660375.10005@kernel.org> In-Reply-To: <4D660375.10005@kernel.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4D6604D5.0078,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can remove #ifdef in mm/page_alloc.c -v2: According to Andrew, fixed the struct layout. Signed-off-by: Yinghai Lu Acked-by: Andrew Morton --- mm/bootmem.c | 7 +++++++ mm/nobootmem.c | 5 +++++ mm/page_alloc.c | 9 --------- 3 files changed, 12 insertions(+), 9 deletions(-) Index: linux-2.6/mm/bootmem.c =================================================================== --- linux-2.6.orig/mm/bootmem.c +++ linux-2.6/mm/bootmem.c @@ -23,6 +23,13 @@ #include "internal.h" +#ifndef CONFIG_NEED_MULTIPLE_NODES +struct pglist_data __refdata contig_page_data = { + .bdata = &bootmem_node_data[0] +}; +EXPORT_SYMBOL(contig_page_data); +#endif + unsigned long max_low_pfn; unsigned long min_low_pfn; unsigned long max_pfn; Index: linux-2.6/mm/nobootmem.c =================================================================== --- linux-2.6.orig/mm/nobootmem.c +++ linux-2.6/mm/nobootmem.c @@ -23,6 +23,11 @@ #include "internal.h" +#ifndef CONFIG_NEED_MULTIPLE_NODES +struct pglist_data __refdata contig_page_data; +EXPORT_SYMBOL(contig_page_data); +#endif + unsigned long max_low_pfn; unsigned long min_low_pfn; unsigned long max_pfn; Index: linux-2.6/mm/page_alloc.c =================================================================== --- linux-2.6.orig/mm/page_alloc.c +++ linux-2.6/mm/page_alloc.c @@ -4841,15 +4841,6 @@ void __init set_dma_reserve(unsigned lon dma_reserve = new_dma_reserve; } -#ifndef CONFIG_NEED_MULTIPLE_NODES -struct pglist_data __refdata contig_page_data = { -#ifndef CONFIG_NO_BOOTMEM - .bdata = &bootmem_node_data[0] -#endif - }; -EXPORT_SYMBOL(contig_page_data); -#endif - void __init free_area_init(unsigned long *zones_size) { free_area_init_node(0, zones_size,