Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1197312rdb; Wed, 20 Sep 2023 02:23:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwd8FRgA2SkAOZNywrzZPY0nVbgx4eagqlX/D2VLT7Stx6xHXzRftu/LTVejfIP4K19OgK X-Received: by 2002:a05:6a20:1595:b0:134:a4e2:4ac8 with SMTP id h21-20020a056a20159500b00134a4e24ac8mr2514693pzj.39.1695201817206; Wed, 20 Sep 2023 02:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695201817; cv=none; d=google.com; s=arc-20160816; b=lVwZFpIzT6Ux7/8HZxQYaONSAKxoyPiErooUxhvBq3kk+nc48cE0Ow7HuIHHroF0mg KZqMBGmyJ2sz+EiegMBSNRR0VD1L32dsBRmXnRw0PQvWAoyYi7LD5DbYH972KKaI9q9E LXoNGeeKdnVmk5Yooy/rulaIHrDKeMWHseZ8yUkNwYjtT/kwwPGrew/UDFdx5v/E2+ve 59kjJH6W9j3VsR2U3kgE/vyzOG7k/vavwhW6YrwVJ+ce2xnOb6NWMWZUlTBIkAkKMPpg ZPkCHByUCXflKMVUKiGRBqopcbRg/58AOE/ABFMmyi7WV1SCMWZkrEmZSIoR8mZSZCpi F0Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=1lQlEkt/cSd0Bes2wW40cMbMxEpioR+fvCCdKAnyQLg=; fh=WAAVzXtgRRRZzAl2Gdd8gkC2nsjWGG8lYE26uUh24qg=; b=gYTDer4axb7zI15EnQKN01QUm1mll2QyTsrPf2J6uLyj4zuq1742RCSFeRfSYGnMiz f69gOm2GatM6bqifQ9+QHY5OW+7FiV6bdXX4uIUdLP6/wIRKs5brBbL925q5C1ihhO5J 1NvvqjOxWHn6zSH7/rHvTGAj6ARLbuvMTOtD3eJyaXqojOcz1zZ/XuzWq1sSHPni/kp1 nn6RtZf/amL6lhj4jLaWVhjaTES4iFRF7cACaHq3r4Gh2E0oEruHosbrzYyxpu1wPbEM /3IRw47uU12qrEkMexMqP6CiIytp9f45UDrH2ejtTcWt5FcdkVgs/YlIdsb0ssD67DFw h/lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l9-20020a170902f68900b001bf88e777f9si12254591plg.33.2023.09.20.02.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 02:23:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B306983F029B; Wed, 20 Sep 2023 02:14:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233917AbjITJOX (ORCPT + 99 others); Wed, 20 Sep 2023 05:14:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232318AbjITJOV (ORCPT ); Wed, 20 Sep 2023 05:14:21 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B82FBD3 for ; Wed, 20 Sep 2023 02:14:15 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 61CFF2000B; Wed, 20 Sep 2023 09:14:09 +0000 (UTC) Message-ID: <876d3cd5-bb99-edd0-47c0-6dc34c8402d1@ghiti.fr> Date: Wed, 20 Sep 2023 11:14:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v3 3/3] riscv: Introduce NAPOT field to PTDUMP Content-Language: en-US To: Yu Chien Peter Lin , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, david@redhat.com, akpm@linux-foundation.org, alexghiti@rivosinc.com, bjorn@rivosinc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: conor.dooley@microchip.com References: <20230920035522.3180558-1-peterlin@andestech.com> <20230920035522.3180558-3-peterlin@andestech.com> From: Alexandre Ghiti In-Reply-To: <20230920035522.3180558-3-peterlin@andestech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: alex@ghiti.fr X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 02:14:24 -0700 (PDT) On 20/09/2023 05:55, Yu Chien Peter Lin wrote: > This patch introduces the NAPOT field to PTDUMP, allowing it > to display the letter "N" for pages that have the 63rd bit set. > > Signed-off-by: Yu Chien Peter Lin > --- > Changes v1 -> v3 > - no change > --- > arch/riscv/mm/ptdump.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/riscv/mm/ptdump.c b/arch/riscv/mm/ptdump.c > index 13997cf3fe36..b71f08b91e53 100644 > --- a/arch/riscv/mm/ptdump.c > +++ b/arch/riscv/mm/ptdump.c > @@ -136,6 +136,10 @@ struct prot_bits { > static const struct prot_bits pte_bits[] = { > { > #ifdef CONFIG_64BIT > + .mask = _PAGE_NAPOT, > + .set = "N", > + .clear = ".", > + }, { > .mask = _PAGE_MTMASK_SVPBMT, > .set = "MT(%s)", > .clear = " .. ", Nice to see that we actually transparently use napot mappings: ---[ PCI I/O start ]--- 0xffff8d7fff000000-0xffff8d7fff010000    0x0000000003000000 64K PTE N   ..     ..   D A G . . W R V You can add: Reviewed-by: Alexandre Ghiti Tested-by: Alexandre Ghiti Thanks for the series, really appreciated! Alex