From patchwork Tue May 18 09:24:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miles Chen X-Patchwork-Id: 12264371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CD34C433B4 for ; Tue, 18 May 2021 09:43:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4F2A61184 for ; Tue, 18 May 2021 09:43:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4F2A61184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kzIw81usUjTsr6GTZSKTXSHob+PG0InI7KQ0Np8tM6c=; b=nPYdU5QkygrDmaHIP3+rjc8V0 JH+SewnjvYIRbS7pydHmkKzWqTrYOv0kuvfA3bfYEFXVRz2EkLKz2EYQpxTyFuNQUcvWEcP+lPGjV iIxkbWyFdauUuqZ4q34GMAtae8+dG2iBqGG6KIw2LC3QamdF7TRa3NQuAjvFrs5wBrRNm1uMWu91E A6PITKm2mMzmnl3hCx9pBfSa1Kro71OttHoSUKfJlG+SOeckmXeUkC7vTk493bK5WYxin1QDqo7kf fJ1UJPA27Sh4qDMsWj9jFCEiQFfo1UldULPF7UekDGbenzU/Wn+3dPGBwiJWcSGtZapVmS26OCvU5 aXC7mu8+g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liwEN-000Bzb-7B; Tue, 18 May 2021 09:41:41 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwDS-000BhR-DD; Tue, 18 May 2021 09:40:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=DMmlq0cFGW4t6gxeOtRUbUHz7I5Ct5uA+QmbIPr7f+k=; b=BfuAjv1sVSILd9312JinkSTMgk dw1+9sK7HRDloBJd8OAtTafrQEkNTyVpMtriMCLOvYh+96Y/tJ51uNGgFOFPHWLGfHgx0jMH6dgBP BezOzCm7nhZvxo6SQD2iaqX0dMeCdo6GWuUEJVW4LHJDhfcdBMLfB1T6EYPC3+T3UWzIm7de60MdY eYCnVRXWVU8wCRsiSsMTMffI91MTKx1NfBTdm8RI8Ndxs/uKOa4JnUpSRyOLSrz8bUi6onigGy/Od NotbtQ/iG8fLeil7pCz4WWxeCcI3dkqUMytI2iKg+3Foq6ONxYRv7N8VgRzGvuSsHzP/7TZvA2gYI YUtbFtOg==; Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwDP-00EWE8-MC; Tue, 18 May 2021 09:40:41 +0000 X-UUID: fa0ce63d087f4b8b94998923ff173cf2-20210518 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=DMmlq0cFGW4t6gxeOtRUbUHz7I5Ct5uA+QmbIPr7f+k=; b=DR8Y0ZOi0WRBAH9Cv0idEjpA/m8ZwqJXwS+ck7zhOtxx2ok0tg7Nv8GOZnmujReeDWkKJAhwPTJD/qBsv2ZCnczn2gVrYPWm/pVaVNPLSsezuLVrkQWhg7dpgOzRldWF3EnYgfu8VbPUfydfFut/prqmHQ1g0J35oZRXGXn5QF0=; X-UUID: fa0ce63d087f4b8b94998923ff173cf2-20210518 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 73119581; Tue, 18 May 2021 02:40:36 -0700 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 May 2021 02:40:28 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 May 2021 17:40:08 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 18 May 2021 17:40:09 +0800 From: Miles Chen To: Dave Young , Baoquan He , Vivek Goyal , Jonathan Corbet , Michael Ellerman , Benjamin Herrenschmidt , "Paul Mackerras" , Andrew Morton , "Mike Rapoport" CC: , , , , , , Miles Chen , Kazu Subject: [PATCH v2 1/2] mm: introduce prepare_node_data Date: Tue, 18 May 2021 17:24:45 +0800 Message-ID: <20210518092446.16382-2-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210518092446.16382-1-miles.chen@mediatek.com> References: <20210518092446.16382-1-miles.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_024039_752514_9AE38AD8 X-CRM114-Status: GOOD ( 15.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When CONFIG_NEED_MULTIPLE_NODES=y (CONFIG_NUMA=y), the pglist_data is allocated by a memblock API and stored in an array named node_data[]. When CONFIG_NEED_MULTIPLE_NODES=n (CONFIG_NUMA=n), the pglist_data is defined as global variable contig_page_data. The difference causes problems when we enable CONFIG_DEBUG_VIRTUAL and use __pa() to get the physical address of NODE_DATA. To solve the issue, introduce prepare_node_data() to allocate pglist_data when CONFIG_NUMA=n and stored it to node_data. i.e., Use the same way to allocate node_data[] when CONFIG_NUMA=y or CONFIG_NUMA=n. prepare_node_data() is called in sparer_init() and free_area_init(). This is the first step to replace contig_page_data with allocated pglist_data. Cc: Mike Rapoport Cc: Baoquan He Cc: Kazu Signed-off-by: Miles Chen --- include/linux/mm.h | 2 ++ include/linux/mmzone.h | 1 + mm/memblock.c | 1 + mm/page_alloc.c | 16 ++++++++++++++++ mm/sparse.c | 2 ++ 5 files changed, 22 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index c274f75efcf9..3052eeb87455 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2462,9 +2462,11 @@ static inline int early_pfn_to_nid(unsigned long pfn) { return 0; } +extern void prepare_node_data(void); #else /* please see mm/page_alloc.c */ extern int __meminit early_pfn_to_nid(unsigned long pfn); +static inline void prepare_node_data(void) {}; #endif extern void set_dma_reserve(unsigned long new_dma_reserve); diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 0d53eba1c383..557918dcc755 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1045,6 +1045,7 @@ extern char numa_zonelist_order[]; extern struct pglist_data contig_page_data; #define NODE_DATA(nid) (&contig_page_data) +extern struct pglist_data *node_data[]; #define NODE_MEM_MAP(nid) mem_map #else /* CONFIG_NEED_MULTIPLE_NODES */ diff --git a/mm/memblock.c b/mm/memblock.c index afaefa8fc6ab..ebddb57ea62d 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -95,6 +95,7 @@ #ifndef CONFIG_NEED_MULTIPLE_NODES struct pglist_data __refdata contig_page_data; EXPORT_SYMBOL(contig_page_data); +struct pglist_data *node_data[MAX_NUMNODES]; #endif unsigned long max_low_pfn; diff --git a/mm/page_alloc.c b/mm/page_alloc.c index aaa1655cf682..0c6d421f4cfb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1659,6 +1659,20 @@ int __meminit early_pfn_to_nid(unsigned long pfn) return nid; } +#else +void __init prepare_node_data(void) +{ + if (node_data[0]) + return; + + node_data[0] = memblock_alloc(sizeof(struct pglist_data), + SMP_CACHE_BYTES); + + if (!node_data[0]) + panic("Cannot allocate node_data\n"); + + memset(node_data[0], 0, sizeof(struct pglist_data)); +} #endif /* CONFIG_NEED_MULTIPLE_NODES */ void __init memblock_free_pages(struct page *page, unsigned long pfn, @@ -7697,6 +7711,8 @@ void __init free_area_init(unsigned long *max_zone_pfn) int i, nid, zone; bool descending; + prepare_node_data(); + /* Record where the zone boundaries are */ memset(arch_zone_lowest_possible_pfn, 0, sizeof(arch_zone_lowest_possible_pfn)); diff --git a/mm/sparse.c b/mm/sparse.c index b2ada9dc00cb..afcfe7463b4a 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -580,6 +580,8 @@ void __init sparse_init(void) memblocks_present(); + prepare_node_data(); + pnum_begin = first_present_section_nr(); nid_begin = sparse_early_nid(__nr_to_section(pnum_begin)); From patchwork Tue May 18 09:24:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miles Chen X-Patchwork-Id: 12264367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16A5EC433ED for ; Tue, 18 May 2021 09:42:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A087B61184 for ; Tue, 18 May 2021 09:42:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A087B61184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+hJYQJALeUjTX1JxfOdp40OxJQsmeaSn36oePvSUeN8=; b=ebzBpsrecsGNyEPGHp1cmaEFi umP7B4sEL6Xh6rU0j80uJYFk4PxvamVEYYa35FzRNk7Hi+KvnFHHNg3VFD1qDV6B8/YaN+O53fbBq iG/CmZYD6pl44oLcFAt2HWvHjXPJeQvBUTLFGXJSHGJyVe1yNP+3mvL4d2hcS8ieqwSU4M5ZwYATZ 8jxpTn0XhjcspzYroZshq+oIMPeVs4gxh70xRM8ropUpoE2NPaGih/YTtFuzLD6CvTfch2Un94dbt qO3+INW5G/2xCnjDLUhurEBsBwUo6VTnqfFb0FB/QEwXl4nll9v9EHbdnBZoK0kkRxeq5kLpvOIMe kAujoQVkw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liwDQ-000Bg8-8p; Tue, 18 May 2021 09:40:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwD7-000BbE-Ty; Tue, 18 May 2021 09:40:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=RlXBu9WGDcuUMnuchsjRfVTAyAWHFfW/wxkPyQQf21Y=; b=A7fBcudzQcY9PocoilGGvNEjyI MJXmySWGbMdL87dTBatHHSqILf+IxCcz3o4PO6sC0muDp3CXnsFcUvtk0aHjWSB/bkXoaBKQHRYqO AivJIE4K390n6lnt/G362NOgdtsNZ0g3B+akDBevIAIhLOOucVpmC3KU+4hSGT3A8Z8pj+y7Ih68N s+rlggNqFOqAu61hQSGFw9wQ5KG+QMYdtMtlClekkAKXzMTpgoqavS96lR2y9LNzkDQsA4HoAPG9n i9mePSYpz+9G8XaZR60zm00NNMTCoaNDwHzxC6zj4ZyQl+QjHbCuK4yQmpqZ1bt3zHM2imsy+ktXh 3xvcVoLA==; Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwD4-00EWBE-On; Tue, 18 May 2021 09:40:20 +0000 X-UUID: 765181ab518c4fea8661bf0f52f8dae7-20210518 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=RlXBu9WGDcuUMnuchsjRfVTAyAWHFfW/wxkPyQQf21Y=; b=PdcLmyPbo80q2ftDuKo8qdElV2vyhWyqITUE2xD30uQYWvT6fRdAlVt1YMiSx4U2PaeKOkPs9MnruUqS2nWUCjVdTujkHQ/VuaC7+kSTP6c+uN4UhQtPyaI5mDgjnTqNBGjFB9EkhAsja4YPx/J5gHy/pn1gCDWX8X99yhv5kFo=; X-UUID: 765181ab518c4fea8661bf0f52f8dae7-20210518 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 150858819; Tue, 18 May 2021 02:40:11 -0700 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 May 2021 02:40:10 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 May 2021 17:40:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 18 May 2021 17:40:09 +0800 From: Miles Chen To: Dave Young , Baoquan He , Vivek Goyal , Jonathan Corbet , Michael Ellerman , Benjamin Herrenschmidt , "Paul Mackerras" , Andrew Morton , "Mike Rapoport" CC: , , , , , , Miles Chen , Kazu Subject: [PATCH v2 2/2] mm: replace contig_page_data with node_data Date: Tue, 18 May 2021 17:24:46 +0800 Message-ID: <20210518092446.16382-3-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210518092446.16382-1-miles.chen@mediatek.com> References: <20210518092446.16382-1-miles.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_024018_859479_E7E58E2F X-CRM114-Status: GOOD ( 16.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace contig_page_data with node_data. Change the definition of NODE_DATA(nid) from (&contig_page_data) to (node_data[0]). Remove contig_page_data from the tree. Cc: Mike Rapoport Cc: Baoquan He Cc: Kazu Signed-off-by: Miles Chen --- Documentation/admin-guide/kdump/vmcoreinfo.rst | 13 ------------- arch/powerpc/kexec/core.c | 5 ----- include/linux/gfp.h | 3 --- include/linux/mmzone.h | 3 +-- kernel/crash_core.c | 1 - mm/memblock.c | 2 -- 6 files changed, 1 insertion(+), 26 deletions(-) diff --git a/Documentation/admin-guide/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst index 3861a25faae1..74185245c580 100644 --- a/Documentation/admin-guide/kdump/vmcoreinfo.rst +++ b/Documentation/admin-guide/kdump/vmcoreinfo.rst @@ -81,14 +81,6 @@ into that mem_map array. Used to map an address to the corresponding struct page. -contig_page_data ----------------- - -Makedumpfile gets the pglist_data structure from this symbol, which is -used to describe the memory layout. - -User-space tools use this to exclude free pages when dumping memory. - mem_section|(mem_section, NR_SECTION_ROOTS)|(mem_section, section_mem_map) -------------------------------------------------------------------------- @@ -531,11 +523,6 @@ node_data|(node_data, MAX_NUMNODES) See above. -contig_page_data ----------------- - -See above. - vmemmap_list ------------ diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c index 56da5eb2b923..41f31dfb540c 100644 --- a/arch/powerpc/kexec/core.c +++ b/arch/powerpc/kexec/core.c @@ -68,13 +68,8 @@ void machine_kexec_cleanup(struct kimage *image) void arch_crash_save_vmcoreinfo(void) { -#ifdef CONFIG_NEED_MULTIPLE_NODES VMCOREINFO_SYMBOL(node_data); VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); -#endif -#ifndef CONFIG_NEED_MULTIPLE_NODES - VMCOREINFO_SYMBOL(contig_page_data); -#endif #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) VMCOREINFO_SYMBOL(vmemmap_list); VMCOREINFO_SYMBOL(mmu_vmemmap_psize); diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 11da8af06704..ba8c511c402f 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -493,9 +493,6 @@ static inline int gfp_zonelist(gfp_t flags) * This zone list contains a maximum of MAX_NUMNODES*MAX_NR_ZONES zones. * There are two zonelists per node, one for all zones with memory and * one containing just zones from the node the zonelist belongs to. - * - * For the normal case of non-DISCONTIGMEM systems the NODE_DATA() gets - * optimized to &contig_page_data at compile-time. */ static inline struct zonelist *node_zonelist(int nid, gfp_t flags) { diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 557918dcc755..c0769292187c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1043,9 +1043,8 @@ extern char numa_zonelist_order[]; #ifndef CONFIG_NEED_MULTIPLE_NODES -extern struct pglist_data contig_page_data; -#define NODE_DATA(nid) (&contig_page_data) extern struct pglist_data *node_data[]; +#define NODE_DATA(nid) (node_data[0]) #define NODE_MEM_MAP(nid) mem_map #else /* CONFIG_NEED_MULTIPLE_NODES */ diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 825284baaf46..d1e324be67f9 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -457,7 +457,6 @@ static int __init crash_save_vmcoreinfo_init(void) #ifndef CONFIG_NEED_MULTIPLE_NODES VMCOREINFO_SYMBOL(mem_map); - VMCOREINFO_SYMBOL(contig_page_data); #endif #ifdef CONFIG_SPARSEMEM VMCOREINFO_SYMBOL_ARRAY(mem_section); diff --git a/mm/memblock.c b/mm/memblock.c index ebddb57ea62d..7cfc9a9d6243 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -93,8 +93,6 @@ */ #ifndef CONFIG_NEED_MULTIPLE_NODES -struct pglist_data __refdata contig_page_data; -EXPORT_SYMBOL(contig_page_data); struct pglist_data *node_data[MAX_NUMNODES]; #endif