From: Conor Dooley <conor@kernel.org>
To: "Clément Léger" <cleger@rivosinc.com>
Cc: Andrew Jones <ajones@ventanamicro.com>,
Samuel Holland <samuel.holland@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
linux-riscv@lists.infradead.org,
Albert Ou <aou@eecs.berkeley.edu>,
Andy Chiu <andy.chiu@sifive.com>,
Charlie Jenkins <charlie@rivosinc.com>,
Evan Green <evan@rivosinc.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -fixes] riscv: cpufeature: Do not drop Linux-internal extensions
Date: Fri, 19 Jul 2024 09:25:04 +0100 [thread overview]
Message-ID: <20240719-deity-squander-e17b4dfed649@spud> (raw)
In-Reply-To: <a36e07a1-f4da-4d6f-9e68-929b77b70836@rivosinc.com>
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
On Fri, Jul 19, 2024 at 09:11:20AM +0200, Clément Léger wrote:
>
>
> On 18/07/2024 23:57, Andrew Jones wrote:
> > On Thu, Jul 18, 2024 at 02:29:59PM GMT, Samuel Holland wrote:
> >> The Linux-internal Xlinuxenvcfg ISA extension is omitted from the
> >> riscv_isa_ext array because it has no DT binding and should not appear
> >> in /proc/cpuinfo. The logic added in commit 625034abd52a ("riscv: add
> >> ISA extensions validation callback") assumes all extensions are included
> >> in riscv_isa_ext, and so riscv_resolve_isa() wrongly drops Xlinuxenvcfg
> >> from the final ISA string. Instead, accept such Linux-internal ISA
> >> extensions as if they have no validation callback.
> >
> > This assumes we'll never need a validation callback for a Linux-internal
> > ISA extension. We can make that assumption now and change our mind
> > later, but we could also add Xlinuxenvcfg to riscv_isa_ext now and
> > modify the places where it matters (just print_isa?). If we add
> > Xlinuxenvcfg to the array with a NULL name then we could do something
> > like
> >
> > print_isa()
> > {
> > for (...) {
> > ...
> > if (!riscv_isa_ext[i].name)
> > continue;
> > }
> > }
>
> I would rather add it to the riscv_isa_ext[] array and avoid handling it
> differently. There is already the xandespmu extension in this array so
> xlinuxenvcfg can be added as well.
xandespmu and xlinuxenvcfg are fundamentally different, the former is
parsed from devicetree and is a real extension. xlinuxengcfg is an
internal flag. I don't think we should be printing it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-07-19 8:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 21:29 [PATCH -fixes] riscv: cpufeature: Do not drop Linux-internal extensions Samuel Holland
2024-07-18 21:34 ` Samuel Holland
2024-07-18 21:57 ` Andrew Jones
2024-07-19 7:11 ` Clément Léger
2024-07-19 8:25 ` Conor Dooley [this message]
2024-07-19 8:34 ` Clément Léger
2024-07-29 22:25 ` Samuel Holland
2024-07-31 18:00 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240719-deity-squander-e17b4dfed649@spud \
--to=conor@kernel.org \
--cc=ajones@ventanamicro.com \
--cc=andy.chiu@sifive.com \
--cc=aou@eecs.berkeley.edu \
--cc=charlie@rivosinc.com \
--cc=cleger@rivosinc.com \
--cc=evan@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=samuel.holland@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox