Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1218114imm; Fri, 29 Jun 2018 13:40:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKB4Uo5QzbLC//VDbpDYRZv8DB7vbg8Cu+NVmaacxTd+PQOaliI4/hKYPqKaZ0zApefL+NX X-Received: by 2002:a65:47cc:: with SMTP id f12-v6mr13857231pgs.173.1530304853407; Fri, 29 Jun 2018 13:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530304853; cv=none; d=google.com; s=arc-20160816; b=ys+YYmHuClwGXm87nPtF7KqPAPB1WXcZbQ0BmHQ0dAyaAC4DFfMlZT9lkl31mBC5oC 0iZWK2nZHIBlo0bwcLYgD0IGXpV7eIaQ1T5f/RXQj9VpUL7af4ig+vii58BxrAIWFGAF kZHAvRjpiTDesarRYMYdtTRPQZrTw5Rf7V/+KorZyuwxz4VfSuNejt3IrxUBoFH5facB je7334z0Njg/uDVFsgBmKWeMCW1DKHM7P20+valmL99WZrF9KjykyaOZUuYLQxP9lBW4 9LO9lYYiQSp29JIbS4cWw/wlLSyqrT5fgSPMntBOYYxIcDZF2UyLyyVXkoRj9A+hv7D+ 6B+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=4XXgRCRrgzdcKmkaYb1mGuJl2YegIbEI5i/G1KFvf94=; b=ws3whT2VMvKNpwyZgMLon3ubrt2KNjwOi93UFSZw8dcThI8T3eW/VNabRaK+HamnDp uE6/eWKgTtrlQjaC0UoZeI2V9/BpwbEJDtz2fvo4/Tv3pkeu+5j+RfscmD2sT/6RY0WS eb6ocSCnHY6WoHNImylPKWXPc4IytLfOWaxuR+lARUVF8Vt0h45qcgvy0JhUBbNYnx4X KfxQXltE9lBYwgBEPiYfrDGaX7+mTWY4qo0O2smGfMLnx4P7aK4svar1QMxSi4DW44xl HCFRiqrCjDMm+KzBcSBP63tfhbhJjOk9ll0glu9rNggbPmc/PZy6WBEFLVT1FIkp20a6 f/qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=b2WtA+n9; 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 o12-v6si9841802plg.154.2018.06.29.13.40.39; Fri, 29 Jun 2018 13:40:53 -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-2017-10-26 header.b=b2WtA+n9; 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 S965609AbeF2SNu (ORCPT + 99 others); Fri, 29 Jun 2018 14:13:50 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:57750 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753527AbeF2SNr (ORCPT ); Fri, 29 Jun 2018 14:13:47 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5TIDk1g122325 for ; Fri, 29 Jun 2018 18:13:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2017-10-26; bh=4XXgRCRrgzdcKmkaYb1mGuJl2YegIbEI5i/G1KFvf94=; b=b2WtA+n9n/uXSNtKUyGJMy6MfKB8JUCXT9nyKJuMW2aGKWSlrESBiOf4lR/p00l3r0K6 3MXumNJX/IHtkjCCYRSMxN5reP3UY4imJZfFTwAC1HaFD0OrHzAEKFyvKcFEL7Q7xkgM R4QevChbK2M1MmQ6Inyp48YH5ipRPWDrj00Fh1GRXG2yqFjcu2I6iq1Tb4w2Y+KRlEh0 Q3u7HnPc14ZAZFNCoLSou3eiyMAsX61zCstgvatVgONbBIy0HsNshkaGLd3frI6JUOi/ VcvYb6IvEx7WFv7cJsaejk8S55odKfUODzcp0n/dTrQs5ML+SEYprgjOtpXn7o1/c1+r wA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2jukhsqmw3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 29 Jun 2018 18:13:46 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5TIDjVw009238 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 29 Jun 2018 18:13:45 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5TIDjwQ012526 for ; Fri, 29 Jun 2018 18:13:45 GMT Received: from mail-ot0-f172.google.com (/74.125.82.172) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 29 Jun 2018 11:13:45 -0700 Received: by mail-ot0-f172.google.com with SMTP id c15-v6so10865673otl.3 for ; Fri, 29 Jun 2018 11:13:44 -0700 (PDT) X-Gm-Message-State: APt69E1wtLPsweS8Ig4Bor25WVc9Wcm0ohAYy0mFgQeJOisgQwB7Tj3p FpY6mcwMY223Lv64A2UjF2ksMJMkKtlOI9yac1g= X-Received: by 2002:a9d:72c6:: with SMTP id d6-v6mr8613278otk.345.1530296024516; Fri, 29 Jun 2018 11:13:44 -0700 (PDT) MIME-Version: 1.0 References: <1530239363-2356-1-git-send-email-hejianet@gmail.com> <1530239363-2356-3-git-send-email-hejianet@gmail.com> In-Reply-To: <1530239363-2356-3-git-send-email-hejianet@gmail.com> From: Pavel Tatashin Date: Fri, 29 Jun 2018 14:13:08 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64 To: hejianet@gmail.com 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 Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8939 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=480 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290194 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +++ 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.