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: 12144879 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.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,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 A5ADCC433E0 for ; Wed, 17 Mar 2021 06:24:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 253D364F96 for ; Wed, 17 Mar 2021 06:24:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 253D364F96 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AB5756B0073; Wed, 17 Mar 2021 02:24:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A64F06B0074; Wed, 17 Mar 2021 02:24:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 906D26B0075; Wed, 17 Mar 2021 02:24:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 766546B0073 for ; Wed, 17 Mar 2021 02:24:30 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2FE24181AF5F7 for ; Wed, 17 Mar 2021 06:24:30 +0000 (UTC) X-FDA: 77928377100.17.796E318 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by imf07.hostedemail.com (Postfix) with ESMTP id BAD20A0000FC for ; Wed, 17 Mar 2021 06:24:29 +0000 (UTC) Received: by mail-pl1-f177.google.com with SMTP id e2so268691pld.9 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=m5/g4hKsoMRdtTUXa4Fd1ECkRnJ2fEWRtOq8d5GxT7uIB9zgQXIznx9n1QEHlZliIJ coQsc5v2HJI7P9b6jBvCS+i3pDcxBxcPkvKrk8huVLP8Atu9+kBYydVCHf3AaLf7UhW/ RXyvIZduFbjzwJUChxMDzyXPDPwMMShHq7hISDpZi3k75FN68o3fcbdOJXp6C7uewSm9 RoODctE1Sf5Q09q7QnK5NeVMMgCkX68WQ8/NMlsxSjMiQYvH4RT0+GYVTNpAKWmQ2F03 Up1nsQtEKVhlg37MjcuBLMFtEgr1JFlL+xLZOwWf8CSEWoyjA52dc87DIoazr1d4ruHb PbOQ== X-Gm-Message-State: AOAM532mn6zCOfMQAOaRoSjDyW2GHfp+e/vviY9oDnePjA7F2eNkUV4n 4TQZ9n9IM5zHsqTPIMvURtu6Jgnmyns= 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-Stat-Signature: gtmu6kppftgd46skg4pi4j4hx6sr9khg X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BAD20A0000FC Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf07; identity=mailfrom; envelope-from=""; helo=mail-pl1-f177.google.com; client-ip=209.85.214.177 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615962269-466889 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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)