From patchwork Wed Mar 17 06:23:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 12144869 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F4D4C433DB for ; Wed, 17 Mar 2021 06:26:19 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF00A64F6B for ; Wed, 17 Mar 2021 06:26:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF00A64F6B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qeVOq6dupxNixthv3LgslfXmy9DwiLGS+g+2STYbwb4=; b=rOzDO3+1EQ4bKrVRiVVGlU1eX 14hpcUYD69Au37Ju1o+QEvOTBx5O0s88gxE0OaL12OCUuvTg2iWvygvGyjDc63lAdP7TrjQClKUli R0+3cSCvhMcp/gncP2HXttdt73Pi/hcI4T8f/NsUoukai1vVQ1OIv1D//0QIbSXIsg/ChhYUfrinr r+aaufu6gpwYAmJMfgdQaojR5Sb87mZ34/xpStuP651+l7Lhrj8k9hJ3UB7JHSNdcMp7qfzlhyX/z PEk1+kz9rCoO53bKeTP5tCpbUFEoX2K+PVcePoF61LuBeQS1GFMf67NSSMxT85+2/NOvd33iqQMMV rfDaEjCFQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMPbi-002YKO-4y; Wed, 17 Mar 2021 06:24:38 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMPba-002YJb-Ey for linux-arm-kernel@lists.infradead.org; Wed, 17 Mar 2021 06:24:32 +0000 Received: by mail-pj1-x1035.google.com with SMTP id s21so542310pjq.1 for ; Tue, 16 Mar 2021 23:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vAbu4uylyD/1yZsJCHQjYIcITelz2x29iNZ/QiXVtA4=; b=sXb2QLLIzWJSM+Zi+acrl+MEb1zX47TUFWvEPje56QooIkKUgZXMeMimDdGJUXgX9J 1WvPANwCYbJxwUTnOOm5W8F/OLX2VpjutsPFQg4uOs2mvGm8doD5GsJJ13j54ULp1C1P jh1im1vMwuhKWECyIqpMLcJr78DwSrzAYvzNcphn11O7eWgNETP1pyQWqOy/+s0bhR4m 2kEEAUNYMIrnYwc7qMhpZQnc8QyPT1k9gcefN4vnGFpxLM0SLUG3foeuVY1lqxMUz7y3 2PcMEPrmyVJAHyQwrHt5vdJB3xO8ebkFhXJ14d0rNpOs7F9G7ulHI5o+BKXIQLDVmLvh 4uhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vAbu4uylyD/1yZsJCHQjYIcITelz2x29iNZ/QiXVtA4=; b=QBN4FJNDZOdzfk+PYD0vIJtcsCJ5Y+l1PGbWZyyIvAKEwl92IVbhTwNmH7ZU0uHZFI x4UWDFEcLn05aGI+dnuykn8KQoL79JdOlcQWhqVRQrl/qJCHbcVUg4HnFLGYTceIlVAx W2dTvgjd4iD5qn6X5AO8qCPFTdccevFUj2n/7AXIqR1i4FFjKz5SIzN3GopwHzzQPDRG L96fzluucIg9tJEoZ8GVLlQUX8oq5zRFuM7OxVAPslDppUOM8ypBb2DYXYJjqI8Iuw+t uM28yE9lri18QvQvRsWYGLcIUhMCNWWQmO146FL57v2/KBmuU1PAMTPGSOcbSh6/0uuu Twtw== X-Gm-Message-State: AOAM531xPKQ5Ddneprp5fUq/creBoRzQTf0bPHl1zuz39IlmpIqd0Spc xjmxXPQz735jKaL/7GSlfn9KMG4SLPQ= X-Google-Smtp-Source: ABdhPJz1uqgDCGDQAR9TanybbKMGcsepIcdLLEpecSZtq52NFToIck/CqpiGOQ15vW6GJFJxlSh+vQ== X-Received: by 2002:a17:902:ead5:b029:e5:bd04:bf48 with SMTP id p21-20020a170902ead5b02900e5bd04bf48mr3083048pld.38.1615962268349; Tue, 16 Mar 2021 23:24:28 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (58-6-239-121.tpgi.com.au. [58.6.239.121]) by smtp.gmail.com with ESMTPSA id s19sm17959620pfh.168.2021.03.16.23.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 23:24:27 -0700 (PDT) From: Nicholas Piggin To: linux-mm@kvack.org, Andrew Morton Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Jonathan Cameron , Christoph Hellwig , Christophe Leroy , Rick Edgecombe , Ding Tianhong , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH v13 01/14] ARM: mm: add missing pud_page define to 2-level page tables Date: Wed, 17 Mar 2021 16:23:49 +1000 Message-Id: <20210317062402.533919-2-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210317062402.533919-1-npiggin@gmail.com> References: <20210317062402.533919-1-npiggin@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210317_062430_688686_6E4429BD X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ARM uses its own PMD folding scheme which is missing pud_page which should just pass through to pmd_page. Move this from the 3-level page table to common header. Cc: Russell King Cc: Ding Tianhong Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/arm/include/asm/pgtable-3level.h | 2 -- arch/arm/include/asm/pgtable.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 2b85d175e999..d4edab51a77c 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h @@ -186,8 +186,6 @@ static inline pte_t pte_mkspecial(pte_t pte) #define pmd_write(pmd) (pmd_isclear((pmd), L_PMD_SECT_RDONLY)) #define pmd_dirty(pmd) (pmd_isset((pmd), L_PMD_SECT_DIRTY)) -#define pud_page(pud) pmd_page(__pmd(pud_val(pud))) -#define pud_write(pud) pmd_write(__pmd(pud_val(pud))) #define pmd_hugewillfault(pmd) (!pmd_young(pmd) || !pmd_write(pmd)) #define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index c02f24400369..d63a5bb6bd0c 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -166,6 +166,9 @@ extern struct page *empty_zero_page; extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; +#define pud_page(pud) pmd_page(__pmd(pud_val(pud))) +#define pud_write(pud) pmd_write(__pmd(pud_val(pud))) + #define pmd_none(pmd) (!pmd_val(pmd)) static inline pte_t *pmd_page_vaddr(pmd_t pmd)