Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3741067imm; Mon, 2 Jul 2018 04:54:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKqQP5kdGcTHsrbOLozRQwOc4ldbCsjBFwmTcdmKjBuzgIR9Zw95cBhwDunGcnb76XjE4gz X-Received: by 2002:a17:902:3343:: with SMTP id a61-v6mr25195155plc.241.1530532479238; Mon, 02 Jul 2018 04:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530532479; cv=none; d=google.com; s=arc-20160816; b=MCFhsjRL0g1GuSm5TnGS4ZKYCxYlDuf3qDlJYN0LOgIT5fvApg6I5mQCsZSXGxPt+H st/shBFG0EUKAqYvxGskkS7KzqaEPuHkgyaX8sSn8VATdoQakIlFgh5BAXacSezH0DtK j5mPgTWZrAdKd5c/ctX6TxZpjAbAPvJHTHt8WVjzqsezc81BwskvIIOjjtCV64hyZs8N NLIVBab14rCDvaR6ldX8PPLiM1X8ltBRRoWaRB6vbJkgkUArCjzavAO0iyJR/tM/MO3/ Y96iDsUtWloTIvOxschivBGXLGXTKu7I4GHLz1gu6E3kPkMnzxq31P4x6PSxz7/Sg+EV ZjyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=M7w1on+nJfq8N4atK2kctJyPp4WHyJUYmI/alzRkm80=; b=QkjHiU8MwIe05kAzk9docrhAXcxQJohKmaa1P6jiqrOAM2bCY8/Dn35NzXhET1BUkO B2BELTzW+FQPjUpQvB3NdX95C3ETzw4pDa+BIN2lwBZD9Q8GXn5FKTD4tAdIlG3gbtsa mokCRENWP+iGQCiNtB/olVNCp0UBgD3jMNFT1wkGkgAOllbM+HQxD7uJFib1ZKGC5DCF Yjl0HXG6aH4MoIxO36sPzZE5pHZCSvpKF+3mmCA9eefRCo+8aXJyYRgZxvmL5Jaffewh T+QsKmv+182OWChZLK1eEVQboPjI/qw1Dum2srqi37A8xl2k5gqcxE9Rl1TqnkeKNiPp bcHQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9-v6si5728398pfe.11.2018.07.02.04.53.57; Mon, 02 Jul 2018 04:54:39 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030578AbeGBLi6 (ORCPT + 99 others); Mon, 2 Jul 2018 07:38:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:50718 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030567AbeGBLiz (ORCPT ); Mon, 2 Jul 2018 07:38:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A9DADAF3D; Mon, 2 Jul 2018 11:38:53 +0000 (UTC) Date: Mon, 2 Jul 2018 13:38:51 +0200 From: Michal Hocko To: Pavel Tatashin Cc: hejianet@gmail.com, linux@armlinux.org.uk, Andrew Morton , 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 Subject: Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64 Message-ID: <20180702113851.GI19043@dhcp22.suse.cz> References: <1530239363-2356-1-git-send-email-hejianet@gmail.com> <1530239363-2356-3-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 29-06-18 14:13:08, 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. It is not confusing. It is outright broken. -- Michal Hocko SUSE Labs