Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5730056ybe; Tue, 17 Sep 2019 12:31:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqysHKtMi5I696XjxF+UVr7N4NTs5eHJgLETkBNN8RU5Zfhkr60o9c1oWckQNFKxyY4h+qYq X-Received: by 2002:a50:fa99:: with SMTP id w25mr6435730edr.259.1568748689167; Tue, 17 Sep 2019 12:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568748689; cv=none; d=google.com; s=arc-20160816; b=TwZPq1c68Lfx+hpwqnFJV18bafsR6NjKcz/aSSpqZROiytV4sgLFNVJBPV3KxOEowL 13ELkEzkSkRAUak1cErRxX8IK81yBMCRrpxEwqY+Akiq4f/eHbtoigfWgV1MpVAYB6Wp nMsi8ABAdE+cMvtJQXbvmaMY8k/Dl9ozTfFPiFGx2Ik2qdQ62Soc5pQK0a1WXg/hU0ft uf4fWok942b3Z3cuSh6/MKfO/2UpJZj9q3zIJUzLtdJy6EiyxDhViwTRd1x191HaTvq+ S0AA1OFYUNQZcGNG3mXw13yri340n+W0mtM5hPzKL/6zocZt1szt/B4WhuBGMtLQBni1 BQ7g== 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:dkim-signature; bh=FGFe5HjPF0otjozG1dBDdzXpJIan9qMbAZajM/ZnDvo=; b=QiwQlCtkd7UUqWDN0oKCJ/PMPiH28/Ka5KiW0Cn4LFe2/LcBf2qHshTLOw+UuqiHT4 8KpAdKdZ8xUjiaI1GgkhNZBz7OGLH1pdYDa4avt79688I09yDeCgLQhXAqK1xQfV8eB3 v4xkHqHBw5O//Hv+obf7v2lp3xE8voDSKmajuZj81Vj5Yl2K08JPg/Yzlbi/WEowfju8 j4vRzCuREUs49GHOxEYit1KWH/TWmcqZpcV2+rKYSB8LqcaiyZf0Bqm9Fr/r3vAJza6l WxJvjDswS3q/S0kx0JePig+bACwcn8XauTsKrPntWCXwp7h/QSRGjfXe36Sa3Lv/2JJA q5/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qVC1Yn8W; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si1926678edb.159.2019.09.17.12.31.06; Tue, 17 Sep 2019 12:31:29 -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=@kernel.org header.s=default header.b=qVC1Yn8W; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727232AbfIQRtD (ORCPT + 99 others); Tue, 17 Sep 2019 13:49:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:58666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfIQRtC (ORCPT ); Tue, 17 Sep 2019 13:49:02 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C097E2067B; Tue, 17 Sep 2019 17:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568742541; bh=FSMaJ2t0Ern/akbZqXA6ZM9C06TUV99X2yV0MmFQdIY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qVC1Yn8WLaMgltxhSWwtZ1BYX0hq/DSbyp0YXdeNlM05RTalJwaz1IdVR1mxCzoJH 2jmDhZkbbGMRBlKa6G2ByAcodEBcn7IHRlMrnZPWSTSdXe0iGFIIYax0IibhrMPMWE OIHBacY3JQfNPSG4m91Q8dCXzhQH97JIW/fn0LMc= Date: Tue, 17 Sep 2019 18:48:53 +0100 From: Will Deacon To: Alexander Duyck Cc: virtio-dev@lists.oasis-open.org, kvm@vger.kernel.org, mst@redhat.com, catalin.marinas@arm.com, david@redhat.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, willy@infradead.org, mhocko@kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, osalvador@suse.de, yang.zhang.wz@gmail.com, pagupta@redhat.com, konrad.wilk@oracle.com, nitesh@redhat.com, riel@surriel.com, lcapitulino@redhat.com, wei.w.wang@intel.com, aarcange@redhat.com, ying.huang@intel.com, pbonzini@redhat.com, dan.j.williams@intel.com, fengguang.wu@intel.com, alexander.h.duyck@linux.intel.com, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h Message-ID: <20190917174853.5csycb5pb5zalsxd@willie-the-truck> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172545.10910.88045.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190907172545.10910.88045.stgit@localhost.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 07, 2019 at 10:25:45AM -0700, Alexander Duyck wrote: > From: Alexander Duyck > > Move the static definition for things such as HUGETLB_PAGE_ORDER out of > asm/pgtable.h and place it in page-defs.h. By doing this the includes > become much easier to deal with as currently arm64 is the only architecture > that didn't include this definition in the asm/page.h file or a file > included by it. > > It also makes logical sense as PAGE_SHIFT was already defined in > page-defs.h so now we also have HPAGE_SHIFT defined there as well. > > Signed-off-by: Alexander Duyck > --- > arch/arm64/include/asm/page-def.h | 9 +++++++++ > arch/arm64/include/asm/pgtable.h | 9 --------- > 2 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/arm64/include/asm/page-def.h b/arch/arm64/include/asm/page-def.h > index f99d48ecbeef..1c5b079e2482 100644 > --- a/arch/arm64/include/asm/page-def.h > +++ b/arch/arm64/include/asm/page-def.h > @@ -20,4 +20,13 @@ > #define CONT_SIZE (_AC(1, UL) << (CONT_SHIFT + PAGE_SHIFT)) > #define CONT_MASK (~(CONT_SIZE-1)) > > +/* > + * Hugetlb definitions. > + */ > +#define HUGE_MAX_HSTATE 4 > +#define HPAGE_SHIFT PMD_SHIFT > +#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT) > +#define HPAGE_MASK (~(HPAGE_SIZE - 1)) > +#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) > + > #endif /* __ASM_PAGE_DEF_H */ > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index 7576df00eb50..06a376de9bd6 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -305,15 +305,6 @@ static inline int pte_same(pte_t pte_a, pte_t pte_b) > */ > #define pte_mkhuge(pte) (__pte(pte_val(pte) & ~PTE_TABLE_BIT)) > > -/* > - * Hugetlb definitions. > - */ > -#define HUGE_MAX_HSTATE 4 > -#define HPAGE_SHIFT PMD_SHIFT > -#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT) > -#define HPAGE_MASK (~(HPAGE_SIZE - 1)) > -#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) > - Acked-by: Will Deacon I'm assuming you're taking this along with the other patches, but please shout if you'd rather it went via the arm64 tree. Will