Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5774128ybe; Tue, 17 Sep 2019 13:17:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqytWSZ8FWYobW9g9sB8Wzv+Ll4qZb1KnxUx+alO1nKV2GlLELER59gdftayJQiafTIFkFAI X-Received: by 2002:a50:934c:: with SMTP id n12mr6799952eda.12.1568751463016; Tue, 17 Sep 2019 13:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568751463; cv=none; d=google.com; s=arc-20160816; b=DHXW0D7URD6iJ/72HZ3wJpKj8q14BY3BINxUdpDU/B21NVquSybEGYqJMqDx6kupIC p0vXUFaoY5QuV54NxEGIoT4+cJ2b3JCAsVdWkfdtvNn45DoAodiGHAJ82fPylBXVoWY7 Eu3p96luv5IztzMSqg3zAJd/2YXR29JmKCSNWgAzVH8ZV36rD8St2MrgyQszbhb0QkDf 9K0LFGEo3/27k5h2wSVuqnIUeoJ7mWx2HeXgEK9ehj7WXNhAaD7YtcEBfkPWdwHLgXih 4UDrhgsbh32QdSS1OnjUaLeawivKC8nSbNJIeQ7HnJHs8RpzsKOxTF3/rHYa57oOAjbx JMHg== 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; bh=Ce6TIk2yBsCUQjQPMJ8ki5Nu2SBqoNexDUHdpPLZySE=; b=KccVblwq6kkEcSaixd54ggRIkD8B1GyV5uZ8DjPRoVMrVYSBjgPNFnxlxptqPwH2zq UGfI3CmqgY2Pw55ru3d+Dlfipw5Ta3s6v/+bXIRqcBuQ98n38z6pslCausLYDKf9K72K l8RllKLyYtqulmpXLEqsS/0loSpGPuwUtgOvOV5s6SKBI1ESsykIVrGNeJXUmZ2ibogJ vy73bSUpE8mOjgPOWMPRCIrumOKyhLixlle/akAvLiVrE5skFf+UQsu8THNbXeI4rkhB tcL25qbTz3qXHlS5Jq5txexkuxgRdlMWxTKUtIFxGWPbLM+Zdg+/9dKAqDbTu+8XaaSu Yo8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IXoQ3vxu; 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 ch10si1622292ejb.89.2019.09.17.13.17.19; Tue, 17 Sep 2019 13:17:42 -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=IXoQ3vxu; 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 S1728311AbfIQUHj (ORCPT + 99 others); Tue, 17 Sep 2019 16:07:39 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:34886 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbfIQUHi (ORCPT ); Tue, 17 Sep 2019 16:07:38 -0400 Received: by mail-io1-f68.google.com with SMTP id q10so10751100iop.2; Tue, 17 Sep 2019 13:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ce6TIk2yBsCUQjQPMJ8ki5Nu2SBqoNexDUHdpPLZySE=; b=IXoQ3vxuaz+/4yYyVZDcNRx1kyPbDpgLdKm9H8fFva0zYnZbhoFmyYyC8gngZ58zyF 6NxP+qTT+//nALDqAjKoS3MOCtXEssE+jNU/o5MfABd/0QfY3+RqJjY3fM9a5qI/F/4T I6epQYin6F+jNcw6aZJIhbXjbp5bKLq+/DjI7wrNkEHGGgqFaC3H0YN1XY/adk4zydhW Xf95qYQNNXA2wAxAS+n54QcFh281JuuxKEOq/L8CTTqsOx4H9/SagURbie47k2iYcAhF B0/AzQQkBqYdmNMEweXoFU7lM61o6RZS8L7cktMGGlkEuw/V+Kp2pD+o1/oJYGlsiLZg WK1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ce6TIk2yBsCUQjQPMJ8ki5Nu2SBqoNexDUHdpPLZySE=; b=O5jQ7tVXRc1wQIlHjwgfZR6m8vxkYK80IKrOocVPDDCXXFtuqoioR90u5xlatXvZS+ oLtbjIQP9WFQQG/kFXdgnTV7mldnVV6cLXudXQi0/ifrz7TRIUq3BiATXWf1me0KditC l34M2nPn9yXWiRc7HEBvjdYUTzgwCww70yyhyEXoM4jL9mOqzsNq+fqyJVdH3F9825Dp oNaQ2+k8gVeV4yH7DLP5/z6n5l6zbFmJeAWVMpBz48STd1mdO5CBhS4k/iQbI5pWp/PK cOPOZmpeeN+U7bHhQ6WgdVKqeXT8NbutyY4W1wsD1ZCLy1uD7u5rngS8Knfk0oq7ywn0 n5LQ== X-Gm-Message-State: APjAAAVg32KQxoTIt/mPqoOSXQABST/Iq0jKLoE3zwFcm8U4xMNgxHAS V23PHPtBPjY3GeQuJ2iINcT7xmoXgDzaILHSvF0= X-Received: by 2002:a5d:8b47:: with SMTP id c7mr733291iot.42.1568750857640; Tue, 17 Sep 2019 13:07:37 -0700 (PDT) MIME-Version: 1.0 References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172545.10910.88045.stgit@localhost.localdomain> <20190917174853.5csycb5pb5zalsxd@willie-the-truck> In-Reply-To: <20190917174853.5csycb5pb5zalsxd@willie-the-truck> From: Alexander Duyck Date: Tue, 17 Sep 2019 13:07:26 -0700 Message-ID: Subject: Re: [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h To: Will Deacon Cc: virtio-dev@lists.oasis-open.org, kvm list , "Michael S. Tsirkin" , Catalin Marinas , David Hildenbrand , Dave Hansen , LKML , Matthew Wilcox , Michal Hocko , linux-mm , Andrew Morton , linux-arm-kernel@lists.infradead.org, Oscar Salvador , Yang Zhang , Pankaj Gupta , Konrad Rzeszutek Wilk , Nitesh Narayan Lal , Rik van Riel , lcapitulino@redhat.com, "Wang, Wei W" , Andrea Arcangeli , ying.huang@intel.com, Paolo Bonzini , Dan Williams , Fengguang Wu , Alexander Duyck , "Kirill A. Shutemov" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 17, 2019 at 10:49 AM Will Deacon wrote: > > 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 As it turns out I am close to submitting a v10 that doesn't need this patch. I basically just needed to move the list manipulators out of mmzone.h and then moved my header file out of there so I no longer needed the code. Thanks. - Alex