Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp621156imm; Mon, 2 Jul 2018 18:56:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIF061e9P8CRITvnysN78+xiTHwW19COkionpTihOisaU0FaJDXvpXMEftJ70G63kt9ewOA X-Received: by 2002:a17:902:581:: with SMTP id f1-v6mr27890515plf.48.1530582992712; Mon, 02 Jul 2018 18:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530582992; cv=none; d=google.com; s=arc-20160816; b=qL1gUcaStdeRXgrj+9JwlIMYv4PjSn0mB68JtQVIrAd/O3oYykel8Cto2f2/v8Fxnq 4/bS7P2tCka7CJXFnGh7KZLJ5YEK3eGIB7C+9B0ATO/GR64mK4w49OLz7bTk72f/2HS6 fQXMBvDYJBHyTwiP5Ay047puHCn0U8w5Br5emBZPq8AP/ZipohI025zJOnBdIFVNjc5F 63lAvwtAVAT/JAPM9VFqyfjHRhSi5Da2FacHcPCupYCshU6OZy5Cmon7dlCSbgG6zipv hk3Qbytp2UcI6ITimOrGuurC54baxi5LoYNkDUgMurDQHPel7jJ5ZBAWLCOM4wZ1W1V/ 6AMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=UdTqGxUorRG6RjeT7eMF3thgzx/46dO66eUVOcxuF7M=; b=1Cb8TDKgK/0aEDNz7IHUFjH+glVeDY33TDRqwxXecoZgGD4thXU2d2LTDCopIAyvpH sEZTTIIXceC3QylvpWbtlU4B49RVSWSx2QEnwjJ5uZUunYsPyLPurDVS14d82JXNTyBt OWMAi0VknCiSUM2Vtp3+ANrqG6ejhCrIkYy656mnsE2n3xIjW+2DR0cqNFjspoWMIvC0 UKTeAStjyJk/Sw8Akm486S9alFqn5YwDLV+1LTNBMI90OGkQAsxwhFc79PMmNo36bS37 aPJ2A2Z41Yeqh1KV6VWxeemFSLcuBT4kK0TjgAXnBcvKF58WTHwVW5WBGQ7mYNMy37A5 4saw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WrQbiXct; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4-v6si14607120pge.173.2018.07.02.18.56.18; Mon, 02 Jul 2018 18:56:32 -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=@gmail.com header.s=20161025 header.b=WrQbiXct; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753643AbeGCBzj (ORCPT + 99 others); Mon, 2 Jul 2018 21:55:39 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41163 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771AbeGCBzi (ORCPT ); Mon, 2 Jul 2018 21:55:38 -0400 Received: by mail-pl0-f68.google.com with SMTP id w8-v6so195750ply.8 for ; Mon, 02 Jul 2018 18:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=UdTqGxUorRG6RjeT7eMF3thgzx/46dO66eUVOcxuF7M=; b=WrQbiXct5JjGiQRmaXfTMgMIcFXfdtf0oajdry8RdJXrcrZsxKzp0/WzbiSbvJui96 CjVg1+cnXNNt8ieO0mnwk68+TIzVwILFylknOYDRfu4AaWA+bgfXh2TiyqtyqM5Id7u2 V/NLIXFg1b1sb/Ocf3BXeVeuWW0JIxQQahoGGG4zAaJNZf6xgg/lPNq5behcLi6DJKjO AOpo4Ax7kQ4P+/A5iZKjuRg1tf2Kajh5jXvAEjmI893fZeCwG0/DB8ANqHKuK/FyYgyQ d35iAZbkqRiXWnBfYEwdFwTFcjHDa0SbQSrCzSlBoVdnBEG2i9Tzo48qY22Gynhc1tEx Nvpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=UdTqGxUorRG6RjeT7eMF3thgzx/46dO66eUVOcxuF7M=; b=XvVIx6uwhQRLHUExoEXIPlVe0X4OFTZ1GiPu9n6jkfAjJhoZFvh3ZonBq9qV23qP3o IJMIU+ru+krfOAI15FaOEAJdQpJ7dxfZzNAczZPZPKJbkBqsx4R/DW2hpxsDWrl7+b7n LlX5WRbe6ccAJb9W8EkZNDnn25h2jgAyHyCiQov8X6uTDJPSwzpW6BiPHere6gwM6IVb QA5kMKzYjx0+Fi5fKifdNAJhYudcpNNGbKNbKarbJVqGFGoppDjbZlz5sjVn8lIhHVhb 1XnGV7n83zPzNvR61GYqlZQraT1O84CFPK40MdlWtUc4tHXJCNMc3NTcfIrKxt2EQM3G ajvA== X-Gm-Message-State: APt69E1pgzY5TephR/fTB2cO5wCdWyuz2Dq8GDJzRP+bJjlAh7W6nQHe Wc68EUVDUvPCjBZ+qQyRWaw= X-Received: by 2002:a17:902:1e6:: with SMTP id b93-v6mr15745895plb.149.1530582938061; Mon, 02 Jul 2018 18:55:38 -0700 (PDT) Received: from [0.0.0.0] (65.49.234.56.16clouds.com. [65.49.234.56]) by smtp.gmail.com with ESMTPSA id d9-v6sm71253pge.68.2018.07.02.18.55.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jul 2018 18:55:37 -0700 (PDT) Subject: Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64 To: Pavel Tatashin Cc: linux@armlinux.org.uk, Andrew Morton , Michal Hocko , Catalin Marinas , Mel Gorman , will.deacon@arm.com, mark.rutland@arm.com, hpa@zytor.com, Daniel Jordan , AKASHI Takahiro , Gioh Kim , Steven Sistare , neelx@redhat.com, erosca@de.adit-jv.com, Vlastimil Babka , LKML , Linux Memory Management List , james.morse@arm.com, ard.biesheuvel@linaro.org, steve.capper@arm.com, tglx@linutronix.de, mingo@redhat.com, gregkh@linuxfoundation.org, kstewart@linuxfoundation.org, pombredanne@nexb.com, Johannes Weiner , kemi.wang@intel.com, ptesarik@suse.com, yasu.isimatu@gmail.com, aryabinin@virtuozzo.com, nborisov@suse.com, Wei Yang , jia.he@hxt-semitech.com References: <1530239363-2356-1-git-send-email-hejianet@gmail.com> <1530239363-2356-3-git-send-email-hejianet@gmail.com> From: Jia He Message-ID: Date: Tue, 3 Jul 2018 09:55:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Pavel Thanks for the comments. On 6/30/2018 2:13 AM, Pavel Tatashin Wrote: >> +++ b/include/linux/early_pfn.h >> @@ -0,0 +1,34 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +/* Copyright (C) 2018 HXT-semitech Corp. */ >> +#ifndef __EARLY_PFN_H >> +#define __EARLY_PFN_H >> +#ifdef CONFIG_HAVE_MEMBLOCK_PFN_VALID >> +ulong __init_memblock memblock_next_valid_pfn(ulong pfn) >> +{ >> + struct memblock_type *type = &memblock.memory; > > Why put it in a header file and not in some C file? In my opinion it > is confusing to have non-line functions in header files. Basically, > you can include this header file in exactly one C file without > breaking compilation. > My original intent is to make this helper memblock_next_valid_pfn a common api between arm64 and arm arches since both arches will use enable CONFIG_HAVE_MEMBLOCK_PFN_VALID by default. Do you think it looks ok if I add the inline prefix? -- Cheers, Jia