Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp414455pxb; Thu, 23 Sep 2021 02:59:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4EUw7VF8Buus+9tTACBYQIEADfZ3nbsYKUiJvgBpZ1WNET9aRHbPsHnGNaG5ATNuCJwwI X-Received: by 2002:a17:906:dbc9:: with SMTP id yc9mr4036987ejb.439.1632391171637; Thu, 23 Sep 2021 02:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632391171; cv=none; d=google.com; s=arc-20160816; b=W7jo7GEZQOQQ0TMxce0wf+q9JMuTlj54K47Regn17fbizAAGvQpEW1bA4t5Hvmcam9 VC8n/IOVIfOMei4Prt4JvcBaEnd7qy1TXwQuob90hoECqd6BpRQiINppwbZsRx06Yt+q 05eRFvCIu5i+XbTc1vufVlqZu5/UAOtwEuDIHCTdCxMOvtdvcIvjFy7wfN1dsWAf5Klj +p1EACynsQpVa/kJnX8fnJ15WhPrY8+N/QKlaGgEC9f/KpdYA5NxnnRc9BuoLzbl/yl7 gwuy97kU0BuBKNogYTO6mXQJr1KCj5DyFoJFkAFZlYauwBM+N2Gp7gN0VbxDHBeYK5cU 5DQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/MJxVwGRbg1XNHDbbmS7hPzYeAHYCJbwGGA7R+iY3hA=; b=Ib5v8QAdhLpsPt99G9JnNS7Wi2MgDKPVM8UgA8kh3FWnIivI+nthRueyb2jI37iHbz pSff71e32AaUM1uHk+RNZ8rkmYs1p+YdohNpkl+KMwv8JY2dXvsWIAX2hI5z5hrRGxFJ 1hdRdpqKGl57ov04MwLa+40aA8m51uYjH//8ULy/XFLCMN/+frxjZV2K1VopjhdFjhoQ AUbuLp3DQx+MsNXgIB4kgkcGAEUel21C9L9EiGLjTkhIzUEigaYE0PGWL2EXYiE9HoTR mASTeBK9mpa0BjSXFBCptvoxqc7IftkCTbmkwYLwoqHnj8yPSwTKteB1DEMVv0f8QMTW 52Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=Rp77Ru0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 12si5516520eja.460.2021.09.23.02.59.07; Thu, 23 Sep 2021 02:59:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=Rp77Ru0n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240319AbhIWJ7V (ORCPT + 99 others); Thu, 23 Sep 2021 05:59:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240306AbhIWJ7T (ORCPT ); Thu, 23 Sep 2021 05:59:19 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92517C061574 for ; Thu, 23 Sep 2021 02:57:47 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id t8so15549605wrq.4 for ; Thu, 23 Sep 2021 02:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/MJxVwGRbg1XNHDbbmS7hPzYeAHYCJbwGGA7R+iY3hA=; b=Rp77Ru0njGFEMH0FEC1SblZEZxv6H00mID60x2gBAsJXZsrh3KOWU8rPHIOlVNxBL0 3ZRq07ZNjG7wsnyn5XX1Vj3a9vaCJUJwobD5+UlkffYsIWfnnQeMK5yxqdiqNQeRsL2O 09GrDGKL3ImHMcs9KuFU7AEzX4ooYNtIn9Z8EkjjOMTSH9PuRo6HZzpQOPDmhmJTRl8y vlaMq0VUzrNFcZaxefQrMcXHfROfCFKkds0IHSgjQ6llIwKNUUBLZ9xu9tZlevAUMcYi 03o+Rh4xWL57/dR4nVffQ6PU3YPqSRjsmyWL79WjrCkLQO1sWH4ChWmPmhmS1pdn9qcd ss4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/MJxVwGRbg1XNHDbbmS7hPzYeAHYCJbwGGA7R+iY3hA=; b=g/bqa1WEBMnMGA/jxVpsVsx9CHRtTlaDGdjlY7myk8t5qBSBCpwDceBy+1iCRDIjKW LjRPUPxY1MOfEVLxJ7Su8qfBRS7nhig/wHNGMaCKik5IOtXxfGyVW5gbXHi1zWfBIzbd ekblpxAUv6AVMHYy5jMjx5sUgcodl/b4Hf4pHglLcSNVqmomrJVRVlADjqVuFYj6BU/a p++bVENPUkDrvJkotxCh52A9iFdIOsl3TlNN9vm0KRydpJ7VouPE29VQwZ+6s3yGhLy4 zULbjtlIz7DYl80JFyOXdNgvTlzR9wBUmGQRmFbo8n4FamjOJZ/0tFOmWGQGvldACETJ a6dw== X-Gm-Message-State: AOAM533+xCq2fgvV1djYViAzPvkajRG8uOFRpVZQZhMRn6mbV2aWfJi9 SHwT0/aNbvY7vEzvTxVuno2a+XQTmiklcWYZQ2v/zQ== X-Received: by 2002:a1c:4d01:: with SMTP id o1mr3471606wmh.61.1632391066056; Thu, 23 Sep 2021 02:57:46 -0700 (PDT) MIME-Version: 1.0 References: <20210923072716.913826-1-guoren@kernel.org> <6d7b1668c1f562a5ef426bb2519f9784@mailhost.ics.forth.gr> <0861cc74d3886e685e9aa5d13ddcd781@mailhost.ics.forth.gr> <16de95480d279b086cf0c612461e4235@mailhost.ics.forth.gr> In-Reply-To: <16de95480d279b086cf0c612461e4235@mailhost.ics.forth.gr> From: Anup Patel Date: Thu, 23 Sep 2021 15:27:34 +0530 Message-ID: Subject: Re: [PATCH] riscv: Add RISC-V svpbmt extension To: Nick Kossifidis Cc: Guo Ren , Anup Patel , Atish Patra , Palmer Dabbelt , =?UTF-8?Q?Christoph_M=C3=BCllner?= , Philipp Tomsich , Christoph Hellwig , liush , wefu@redhat.com, =?UTF-8?B?V2VpIFd1ICjlkLTkvJ8p?= , Drew Fustini , linux-riscv , "linux-kernel@vger.kernel.org List" , taiten.peng@canonical.com, aniket.ponkshe@canonical.com, Heinrich Schuchardt , gordan.markus@canonical.com, Guo Ren , Arnd Bergmann , Chen-Yu Tsai , Maxime Ripard , Daniel Lustig , Greg Favor , Andrea Mondelli , Jonathan Behrens , Xinhaoqu , Bill Huffman , Allen Baum , Josh Scheid , Richard Trauben Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 3:18 PM Nick Kossifidis wrote: > > =CE=A3=CF=84=CE=B9=CF=82 2021-09-23 12:42, Nick Kossifidis =CE=AD=CE=B3= =CF=81=CE=B1=CF=88=CE=B5: > > =CE=A3=CF=84=CE=B9=CF=82 2021-09-23 12:37, Anup Patel =CE=AD=CE=B3=CF= =81=CE=B1=CF=88=CE=B5: > >> On Thu, Sep 23, 2021 at 2:55 PM Nick Kossifidis > >> wrote: > >>> > >>> Hello Guo, > >>> > >>> =CE=A3=CF=84=CE=B9=CF=82 2021-09-23 10:27, guoren@kernel.org =CE=AD= =CE=B3=CF=81=CE=B1=CF=88=CE=B5: > >>> diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml > >>> b/Documentation/devicetree/bindings/riscv/cpus.yaml > >>> index e534f6a7cfa1..1825cd8db0de 100644 > >>> --- a/Documentation/devicetree/bindings/riscv/cpus.yaml > >>> +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml > >>> @@ -56,7 +56,9 @@ properties: > >>> enum: > >>> - riscv,sv32 > >>> - riscv,sv39 > >>> + - riscv,sv39,svpbmt > >>> - riscv,sv48 > >>> + - riscv,sv48,svpbmt > >>> - riscv,none > >>> > >>> Isn't svpbmt orthogonal to the mmu type ? It's a functionality that > >>> can > >>> be present on either sv39/48/57 so why not have another "svpbmt" > >>> property directly on the cpu node ? > >> > >> Actually, "mmu-type" would be a good place because it's page based > >> memory attribute and paging can't exist without mmu translation mode. > >> > >> Also, "svpmbt" is indeed a CPU property so has to be feature > >> individual > >> CPU node. Hypothetically, a heterogeneous system is possible where > >> some CPUs have "svpmbt" and some CPUs don't have "svpmbt". For > >> example, a future FUxxx SoC might have a E-core and few S-cores > >> where S-cores have Svpmbt whereas E-core does not have Svpmbt > >> because it's an embedded core. > >> > > > > I should say cpuX node, not the root /cpu node. We can have an svpbmt > > property in the same way we have an mmu-type property. > > > > I'm also thinking of future mmu-related extensions, e.g. what about > svnapot ? Should we have mmu-type be riscv,sv39,svnapot and e.g. > riscv.sv39,svpbmt,svnapot ? It'll become messy. I agree, "mmu-type" can become longer in future but I was thinking if all MMU related features can simply be comma-separated values of one DT property. Alternately, we can have "riscv,svpmbt" bool DT property in each CPU node which will keep things simpler as compared to parsing comma-separate string in "mmu-type" DT property. Regards, Anup > > Regards, > Nick