Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3035119ybe; Sun, 8 Sep 2019 05:53:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiG/qw3KrptvyCOP3KGsLF6gt6+5LYiWnhdE3IVbgR2uocNw48H0eSs13n55So1u6TkimV X-Received: by 2002:a17:906:f189:: with SMTP id gs9mr15746995ejb.274.1567947237831; Sun, 08 Sep 2019 05:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947237; cv=none; d=google.com; s=arc-20160816; b=e/SDzrrjGvZjErOkyhe1/R5woF06JkCnU7bhDQO3NkTNVTHiX2MF0/RcA8xNBeMfW3 MV0ECtr205o+h0jkRA8X4bLMEc0q4H62sYuywK82f1KzdW2LbPJldcejMSr3o5xHia8L DowHry3EX3bFGbaU5dF1ZX/FUADfbUpuhekaYUAjUmCbdxg+UGmMp6aAMUaNr3Ywkz1a gcDI2OcLhHkoE8RAS66F7XrquXhQg5f7rhQVds3OSWQNzUDVQ0oc2duOlEXaAPSw0EDZ Oos2mIlNfd4/tOe6dXJHMHtCkKtvNkJpeDWuTwOcF4WJbzIiLQAzppfifgVFnrW86k1M rEfA== 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:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=kSopJtjN0Bct/j9/oVkg8pXbs8bfoPtfq3tp15cWbFA=; b=ESHcWdtyOTI9FVSkmtc8dqiMhRL4VP5t2U2bbf/WU6+46OR9EGInvWKjK71gJM5tHd L+PQWAqJowLXc1Btw3LbFjg0TRAGdJ3n2a7jM+uOQwNg9LYo3QgV6egKzxvYNcW12NHC mOLHkA0qY/t8FA3poEz+Z1xpJHgZ2nV9eYYqFgUYSgpUZaQHurFcTYNNvxUnQYURUC41 BUQcCVA5pT6iQ5N5W1DF26VqcFxLi/nFe0Z7exW9AY4azwj/2fxwx80HY2roIZtOWllI ZC+9T5YKXVxTfl/ro0mIcCxC3BN7uvNkPyH+tRJDQde4NVuv68Ay5NGCKhDOyKm9pG09 lDQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GP196Uxh; 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 q14si6653076edr.3.2019.09.08.05.53.34; Sun, 08 Sep 2019 05:53:57 -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=GP196Uxh; 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 S2404437AbfIGRZt (ORCPT + 99 others); Sat, 7 Sep 2019 13:25:49 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:34089 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395132AbfIGRZt (ORCPT ); Sat, 7 Sep 2019 13:25:49 -0400 Received: by mail-oi1-f194.google.com with SMTP id g128so7595751oib.1; Sat, 07 Sep 2019 10:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=kSopJtjN0Bct/j9/oVkg8pXbs8bfoPtfq3tp15cWbFA=; b=GP196UxhtesI4DpzLroLGitq6AT3yCg6JIv7eHeX5bE512Bt2rY5UX8Owl6UWaLuqS KBU4alhzy/RjfOR2TD2kzxNOol1Dd7elx6QeLBSjvXAWYZ6J72Ui7zxbgwBqcpRN3GUw HM+GqbVngxARkCzWLz6bcneox7MpCZMhaZa7BbElkS22E1/H9BVwFHjSHB7D8HdTnNB8 s9D7U+SPL6HVQH4GdqLxg+X1sIFEo1PwYNdUecPhL42WU/f2CPZGoIfUWj2ABQ0FomHv p1CyrMS2490/kosLr9EtAAYUk6zgj+NGlrqlwd2lM4GhpruzQf8L1+BRJ/tGzqsdCmoi ndmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=kSopJtjN0Bct/j9/oVkg8pXbs8bfoPtfq3tp15cWbFA=; b=Nl27ysNru90fZ2hpaMtHlbX0S0pT6Iqa8OOzxZ3BMMxhQ+8NJu0HwEvAxxQmQaT7tL EFxOnvC7AAD5lw1RiXpPOCXs4HPsSVt08gab9hStD3aFr3b+e3QvDKTnv7kHlPSZulm+ MbNcsOcafDx9vZylUZIHfcAJfc0g6oK2skISF53zBoXUEr/FrXTy/77SUVfNy0xEKUfL s2gj1eJBPqqF9G0meo2Xdxr/fiasKfAUJ5HlHn6AGUVrbB18kD38QqZNdpvg/9RBxvxf bVVInHZkGwaORXu3xkZj8u+EPydfhEE5oJInZyE8n5OjiBSXRbOdxksp/B62CV8wXYpf tZsw== X-Gm-Message-State: APjAAAWekbYXtPRGL6Nz+Llc3nKWPxMQPau+WGTETVZA/KvLl1rLjEsQ 1APuWpchm7wNUT5ECTekxUU= X-Received: by 2002:aca:2105:: with SMTP id 5mr9598351oiz.84.1567877148171; Sat, 07 Sep 2019 10:25:48 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id x6sm4135651ote.69.2019.09.07.10.25.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Sep 2019 10:25:47 -0700 (PDT) Subject: [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h From: Alexander Duyck To: 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, will@kernel.org, linux-arm-kernel@lists.infradead.org, osalvador@suse.de Cc: 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 Date: Sat, 07 Sep 2019 10:25:45 -0700 Message-ID: <20190907172545.10910.88045.stgit@localhost.localdomain> In-Reply-To: <20190907172225.10910.34302.stgit@localhost.localdomain> References: <20190907172225.10910.34302.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 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 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) - static inline pte_t pgd_pte(pgd_t pgd) { return __pte(pgd_val(pgd));