Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp212308imm; Tue, 24 Jul 2018 17:27:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsPUdQLflM2BRASlaBX6BmK8547bLZhsJrEuYkyjU2KLBCjahU/I9HsIoPaKEylZTtFJQj X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr19544681pfi.58.1532478448813; Tue, 24 Jul 2018 17:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532478448; cv=none; d=google.com; s=arc-20160816; b=kLRKAbhNUQmElJvOqtoqM1t0vgQVP2AhaeankiC049TKKcEqigQk3xEFY6pobNWfWB bdbUEseG3VC9oFvdw41Wt9p8UZ+KOCbJcbLGeZEWBtWxKJigGGVs5jlglMQMf1l47rka lLL/E0XmPRrJ2sBDRtCOVtyPDd2EIS2bobn5qupesSjbpwaGyWROTjEyHMHREhEO2Jam MVd6Fkt2cURHdfodPPL2qPWp6qhRSEvE56jfyOg/+3ItJVLbu6AlGu7yMNnb5HsEt5Wp Jr+jSl9enuq4oZak5Ci05MYNB0zkGIIM9HU8u1y/CTkFCTymnl/H2iKlfiK86Fv+/DQ0 vGlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=6aWuan11IWk/DcBupTrYoAeSdfAJLrkW5ftubRZU8OU=; b=OWvF8EaJlCX1U2erT0moDujA7PUCzzk4lVWqavOvt8iwQNtxNLctFv6ZoQ+pWeh5W6 vhY4Hn8yO3J4gj/U+bZL9C48YiLpULtl0bwiLwEiD6YxPUPCD67rT19qXPm60cFovgrB P6uqNTvBV2dl9iAZNxhRZrnMPgzZwPZq7i0RXQHBkr5qXIh5LXrMe20RjiFAfbp73wka sswHAthW6hbz8O+Ju40xbe022KG0AA9IGFTLOLHfukjf5h358qfE9PEhgXdguXE/hiAq bsZVjrSEH7DCS1YJyzYjXuqM0UjxKCaVwBsb/ZzUDWJqErymIaG06WsBe1DSyZ5VNqkD 1BSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=o327C6cV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4-v6si11082325plo.208.2018.07.24.17.27.14; Tue, 24 Jul 2018 17:27:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=o327C6cV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388599AbeGYBfZ (ORCPT + 99 others); Tue, 24 Jul 2018 21:35:25 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:52276 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388495AbeGYBfY (ORCPT ); Tue, 24 Jul 2018 21:35:24 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6P0NvdY146026; Wed, 25 Jul 2018 00:25:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=6aWuan11IWk/DcBupTrYoAeSdfAJLrkW5ftubRZU8OU=; b=o327C6cVX2BuJz1UGd+tYK9O6iWH/6vEnDrETVH4HfFfevq+MGKk8mbipzGifHpTTjWf gggz+9E6jMy6pwZbn6Iwh01M48HuUqx9hdWejRj1oC8OdgVgYMNjhLht6BaE0nXvC/NI pkTF5nxLPt1WDoBFjV/OWb024N3rfYgn6/RxBer8suFaGm91U2I6SDZx4vfNFQpLXbbK GLpudTcZ03HzaJJqwkbtxux7ZqFjwDWRYnCy6TZ0igXKNSiR7lvdGxEEMuBeZ1TcfqtK u1PQvzN1kFsFEncrCX9Ab8PkmZGzu4QYoAV6EEXau1Zzr4pWekhFUVmF6mF4u/5oKru0 sw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2kbtbcue8u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jul 2018 00:25:51 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6P0PoxH004882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Jul 2018 00:25:50 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6P0Pm6p012502; Wed, 25 Jul 2018 00:25:48 GMT Received: from localhost.localdomain (/73.69.118.222) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 24 Jul 2018 16:55:27 -0700 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, linux-mm@kvack.org, dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, jrdr.linux@gmail.com, bhe@redhat.com, gregkh@linuxfoundation.org, vbabka@suse.cz, richard.weiyang@gmail.com, dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, osalvador@techadventures.net, pasha.tatashin@oracle.com, abdhalee@linux.vnet.ibm.com, mpe@ellerman.id.au Subject: [PATCH 1/3] mm: make memmap_init a proper function Date: Tue, 24 Jul 2018 19:55:18 -0400 Message-Id: <20180724235520.10200-2-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724235520.10200-1-pasha.tatashin@oracle.com> References: <20180724235520.10200-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8964 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=605 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807250002 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org memmap_init is sometimes a macro sometimes a function based on __HAVE_ARCH_MEMMAP_INIT. It is only a function on ia64. Make memmap_init a weak function instead, and let ia64 redefine it. Signed-off-by: Pavel Tatashin --- arch/ia64/include/asm/pgtable.h | 1 - mm/page_alloc.c | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h index 165827774bea..b1e7468eb65a 100644 --- a/arch/ia64/include/asm/pgtable.h +++ b/arch/ia64/include/asm/pgtable.h @@ -544,7 +544,6 @@ extern struct page *zero_page_memmap_ptr; # ifdef CONFIG_VIRTUAL_MEM_MAP /* arch mem_map init routine is needed due to holes in a virtual mem_map */ -# define __HAVE_ARCH_MEMMAP_INIT extern void memmap_init (unsigned long size, int nid, unsigned long zone, unsigned long start_pfn); # endif /* CONFIG_VIRTUAL_MEM_MAP */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a790ef4be74e..cea749b26394 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5554,10 +5554,11 @@ static void __meminit zone_init_free_lists(struct zone *zone) } } -#ifndef __HAVE_ARCH_MEMMAP_INIT -#define memmap_init(size, nid, zone, start_pfn) \ - memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY, NULL) -#endif +void __meminit __weak memmap_init(unsigned long size, int nid, + unsigned long zone, unsigned long start_pfn) +{ + memmap_init_zone(size, nid, zone, start_pfn, MEMMAP_EARLY, NULL); +} static int zone_batchsize(struct zone *zone) { -- 2.18.0