From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 BA5F6C433E6 for ; Tue, 2 Feb 2021 11:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8212264EAC for ; Tue, 2 Feb 2021 11:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbhBBLtJ (ORCPT ); Tue, 2 Feb 2021 06:49:09 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:11673 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbhBBLtH (ORCPT ); Tue, 2 Feb 2021 06:49:07 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DVNM92BMkzlDlp; Tue, 2 Feb 2021 19:46:45 +0800 (CST) Received: from [10.174.177.80] (10.174.177.80) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Tue, 2 Feb 2021 19:48:14 +0800 Subject: Re: [PATCH v12 01/14] ARM: mm: add missing pud_page define to 2-level page tables From: Ding Tianhong To: Russell King - ARM Linux admin , Nicholas Piggin CC: , Andrew Morton , , , , Jonathan Cameron , Christoph Hellwig , Christophe Leroy , Rick Edgecombe , References: <20210202110515.3575274-1-npiggin@gmail.com> <20210202110515.3575274-2-npiggin@gmail.com> <20210202111319.GL1463@shell.armlinux.org.uk> Message-ID: Date: Tue, 2 Feb 2021 19:48:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.80] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On 2021/2/2 19:47, Ding Tianhong wrote: > On 2021/2/2 19:13, Russell King - ARM Linux admin wrote: >> On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote: >>> 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))) >> >> As there is no PUD, does it really make sense to return a valid >> struct page (which will be the PTE page) for pud_page(), which is >> several tables above? >> > --- a/arch/arm/include/asm/pgtable-2level.h > +++ b/arch/arm/include/asm/pgtable-2level.h > > +static inline int pud_none(pud_t pud) > +{ > + return 0; > +} > --- a/arch/arm/include/asm/pgtable-2level.h +++ b/arch/arm/include/asm/pgtable-2level.h> +static inline int pud_page(pud_t pud) +{ + return 0; +} > I think it could be fix like this. > > Ding >