From patchwork Tue Jul 24 23:55:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Tatashin X-Patchwork-Id: 10543347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1A2E17FD for ; Wed, 25 Jul 2018 00:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91CA829634 for ; Wed, 25 Jul 2018 00:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84F4829686; Wed, 25 Jul 2018 00:26:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21B5929634 for ; Wed, 25 Jul 2018 00:26:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2A1F6B0266; Tue, 24 Jul 2018 20:26:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CAB9B6B0269; Tue, 24 Jul 2018 20:26:02 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2DD26B026B; Tue, 24 Jul 2018 20:26:02 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id 7817F6B0266 for ; Tue, 24 Jul 2018 20:26:02 -0400 (EDT) Received: by mail-qk0-f199.google.com with SMTP id o18-v6so5100024qko.21 for ; Tue, 24 Jul 2018 17:26:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:subject:date:message-id :in-reply-to:references; bh=6aWuan11IWk/DcBupTrYoAeSdfAJLrkW5ftubRZU8OU=; b=IyJyyoi+W32XhxFJipuHcTHsaGPE5D3M4OGxKm5usvEW3acNquxQs3+FhOuakxeExN dG61Ek+6CiKjB0oalYamFPMbLPEAkL64vzcu+o9LmJDdxAmtc59YEPi5Dg1OuKRu/XmC xLMERfjA3ngZLcfLPRaUzoJOJMFXOOcCdFBvvuv2KPlT2EIdI/bm63pwAjaR6C0Jf8o7 yM7hEzf1VrVIe4JZsLPhfyEdZXLQcvmpdb9gbCd4T2t3eqFYuQBoqr+U6I617QIvndmv wJJWDG46IO8xvKFD2V9WfI02nOdtw6VEWMv4tYTAiuEVjAMzXRRheh8j4KpZTyZbOiOt 23Zg== X-Gm-Message-State: AOUpUlF2ghSwk8Blboq/sPFQddwiNO74kegc9/+J6lwsZLvQEAbNYYwN vawxg4jpQtME9w6F6apBFjZqmcnsC5r8tgPkD2cqr3u+EFuN4S8F7rh42X8LaKmoPm2PTgssqwi M18F4WXaS0aXL6yIVVnaY8YGmpk09uAvOPl4HoOXuYL1Xul5vek3xCUUbRa3rjGx/oQ== X-Received: by 2002:a0c:ab11:: with SMTP id h17-v6mr16627333qvb.114.1532478362290; Tue, 24 Jul 2018 17:26:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe7gMXWtYEGMBnvg1WiQkWkM7809ZuBf6BylLQ4jc9zHLOfck5RYe24oa3Ot7OiNrJB3fAK X-Received: by 2002:a0c:ab11:: with SMTP id h17-v6mr16627317qvb.114.1532478361764; Tue, 24 Jul 2018 17:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532478361; cv=none; d=google.com; s=arc-20160816; b=ULGNftwcK535ppPJWRYsPmpkeXRo4MkXSjs1kvVsIzxdLbFoCYNcZmXJUtaroBAX/s gquOm5nkaSyLf3ai79Jihjw9CTWQqpLrR1FjvO3J6jHa7qwjIdCDU7OOi+q5Sz6Z/fS9 SqH6BMBHVjGq7jq2Ds7HXhP+7ejiuM+zuj1DDcgmh40EeCU/RtyV0+dJIsndM7TzEcF3 tGOuVfdln6+/fsPgUP0LRb/l1B/oWQM+nXssGHWYS9fue6EyrdnbMRFl9Kwcwq6hPHsX y5R2mdNKvMi1m6H0I1EgIwjpYWIU0ZVDUx+SxKFZpZvwTuN+Of+r933GzwOKtvJ/Cr3+ ZRHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=6aWuan11IWk/DcBupTrYoAeSdfAJLrkW5ftubRZU8OU=; b=0mlltboQ/ngNAR2DALfRe3yO2GY/zPlMxrcY2u/lGaaKVQtn9NMC76sjwIbV+XRpk3 Jeo88twCJFoUIcsUhd9kTu2sRVH3XKI3E+5BcHybJEEBdCp49ZYLBwaSVMWhNNE4b36l fSvtjeNUMOJwZ2rGqkXHKZ8dU0DoDnNVAqL1TpJj8kltaZKWbNrHDn3aLYeiyGE96ih1 OoSssjqqDTq9T/oqnX0qEiICuPxDtGYxDBKBS8zvlfAnvIBKWbK2EH6LWXZ1CW4YpjsQ 4eUqANNeyNHpLSjsxQSIX405X8iuCr3n4cOb5EJbueTO4c0AC/LIOhzpSUnl9VuPCcLp LZCw== 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: domain of pasha.tatashin@oracle.com designates 141.146.126.79 as permitted sender) smtp.mailfrom=pasha.tatashin@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from aserp2130.oracle.com (aserp2130.oracle.com. [141.146.126.79]) by mx.google.com with ESMTPS id e65-v6si75773qkd.158.2018.07.24.17.26.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 17:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of pasha.tatashin@oracle.com designates 141.146.126.79 as permitted sender) client-ip=141.146.126.79; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=o327C6cV; spf=pass (google.com: domain of pasha.tatashin@oracle.com designates 141.146.126.79 as permitted sender) smtp.mailfrom=pasha.tatashin@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Oscar Salvador --- 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) {