From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755276Ab1BGXTo (ORCPT ); Mon, 7 Feb 2011 18:19:44 -0500 Received: from rcsinet10.oracle.com ([148.87.113.121]:57662 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755104Ab1BGXTn (ORCPT ); Mon, 7 Feb 2011 18:19:43 -0500 From: Yinghai Lu To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton Cc: David Miller , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH 10/11] mm: Move contig_page_data define to bootmem.c/nobootmem.c Date: Mon, 7 Feb 2011 15:17:11 -0800 Message-Id: <1297120632-24933-11-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1297120632-24933-1-git-send-email-yinghai@kernel.org> References: <1297120632-24933-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4D507DBA.0041,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 Signed-off-by: Yinghai Lu --- mm/bootmem.c | 7 +++++++ mm/nobootmem.c | 5 +++++ mm/page_alloc.c | 9 --------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mm/bootmem.c b/mm/bootmem.c index 4403e2f..79d9c3c 100644 --- a/mm/bootmem.c +++ b/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; diff --git a/mm/nobootmem.c b/mm/nobootmem.c index f220b8d..6a018e4 100644 --- a/mm/nobootmem.c +++ b/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; diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 887ce3b..a243a7f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4841,15 +4841,6 @@ void __init set_dma_reserve(unsigned long new_dma_reserve) 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, -- 1.7.1