From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Conor Dooley <Conor.Dooley@microchip.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
buildroot@buildroot.org,
Valentina Fernandez Alanis
<Valentina.FernandezAlanis@microchip.com>,
Jamie Gibbons <jamie.gibbons@microchip.com>
Subject: Re: [Buildroot] [PATCH v2 1/3] arch/Config.in.riscv: update instruction set ext
Date: Thu, 17 Aug 2023 09:40:15 +0200 [thread overview]
Message-ID: <20230817094015.5324e023@windsurf> (raw)
In-Reply-To: <20230816150442.GB1340200@scaer>
On Wed, 16 Aug 2023 17:04:42 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Basically, I think what Thomas expects is something like:
>
> diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv
> index 3dfbb4165f..997f7a631d 100644
> --- a/arch/Config.in.riscv
> +++ b/arch/Config.in.riscv
> @@ -1,26 +1,5 @@
> # RISC-V CPU ISA extensions.
>
> -config BR2_RISCV_ISA_RVI
> - bool
> -
> -config BR2_RISCV_ISA_RVM
> - bool
> -
> -config BR2_RISCV_ISA_RVA
> - bool
> -
> -config BR2_RISCV_ISA_RVF
> - bool
> -
> -config BR2_RISCV_ISA_RVD
> - bool
> -
> -config BR2_RISCV_ISA_RVC
> - bool
> -
> -config BR2_RISCV_ISA_RVV
> - bool
> -
> choice
> prompt "Target Architecture Variant"
> default BR2_riscv_g
> @@ -41,38 +20,28 @@ config BR2_riscv_custom
>
> endchoice
>
> -if BR2_riscv_custom
> -
> comment "Instruction Set Extensions"
>
> -config BR2_RISCV_ISA_CUSTOM_RVM
> +config BR2_RISCV_ISA_RVM
> bool "Integer Multiplication and Division (M)"
> - select BR2_RISCV_ISA_RVM
>
> -config BR2_RISCV_ISA_CUSTOM_RVA
> +config BR2_RISCV_ISA_RVA
> bool "Atomic Instructions (A)"
> - select BR2_RISCV_ISA_RVA
>
> -config BR2_RISCV_ISA_CUSTOM_RVF
> +config BR2_RISCV_ISA_RVF
> bool "Single-precision Floating-point (F)"
> - select BR2_RISCV_ISA_RVF
>
> -config BR2_RISCV_ISA_CUSTOM_RVD
> +config BR2_RISCV_ISA_RVD
> bool "Double-precision Floating-point (D)"
> depends on BR2_RISCV_ISA_RVF
> - select BR2_RISCV_ISA_RVD
>
> -config BR2_RISCV_ISA_CUSTOM_RVC
> +config BR2_RISCV_ISA_RVC
> bool "Compressed Instructions (C)"
> - select BR2_RISCV_ISA_RVC
>
> -config BR2_RISCV_ISA_CUSTOM_RVV
> +config BR2_RISCV_ISA_RVV
> bool "Vector Instructions (V)"
> - select BR2_RISCV_ISA_RVV
> select BR2_ARCH_NEEDS_GCC_AT_LEAST_12
>
> -endif
> -
> choice
> prompt "Target Architecture Size"
> default BR2_RISCV_64
>
> Thomas?
Not quite, because we want the IMAFD options to remain under the
"custom" option.
Essentially what happens today is:
- RISC-V G implies IMAFD, but there is no way to say I have G + C + V
- RISC-V custom allows any combination of IMAFDCV
What we want is:
- RISC-V G implies IMAFD, but also allows to select C and V
- RISC-V custom allows any combination of IMAFDCV
So something like this:
diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv
index 3dfbb4165f..df8499c7a0 100644
--- a/arch/Config.in.riscv
+++ b/arch/Config.in.riscv
@@ -41,10 +41,10 @@ config BR2_riscv_custom
endchoice
-if BR2_riscv_custom
-
comment "Instruction Set Extensions"
+if BR2_riscv_custom
+
config BR2_RISCV_ISA_CUSTOM_RVM
bool "Integer Multiplication and Division (M)"
select BR2_RISCV_ISA_RVM
@@ -62,6 +62,8 @@ config BR2_RISCV_ISA_CUSTOM_RVD
depends on BR2_RISCV_ISA_RVF
select BR2_RISCV_ISA_RVD
+endif
+
config BR2_RISCV_ISA_CUSTOM_RVC
bool "Compressed Instructions (C)"
select BR2_RISCV_ISA_RVC
@@ -71,8 +73,6 @@ config BR2_RISCV_ISA_CUSTOM_RVV
select BR2_RISCV_ISA_RVV
select BR2_ARCH_NEEDS_GCC_AT_LEAST_12
-endif
-
choice
prompt "Target Architecture Size"
default BR2_RISCV_64
Note that indeed the blind options BR2_RISCV_ISA_RVC and
BR2_RISCV_ISA_RVV are no longer very useful, but I guess I would keep
them anyway to keep the symmetry with BR2_RISCV_ISA_RV{I,M,A,F,D} blind
options.
Thoughts?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-17 7:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 9:24 [Buildroot] [PATCH v2 0/3] Update RISC-V Instruction Sets Jamie Gibbons via buildroot
2023-08-16 9:24 ` [Buildroot] [PATCH v2 1/3] arch/Config.in.riscv: update instruction set ext Jamie Gibbons via buildroot
2023-08-16 12:23 ` Thomas Petazzoni via buildroot
2023-08-16 15:04 ` Yann E. MORIN
2023-08-17 7:40 ` Thomas Petazzoni via buildroot [this message]
2023-08-17 8:27 ` yann.morin
2023-08-17 9:45 ` Thomas Petazzoni via buildroot
2023-08-16 9:24 ` [Buildroot] [PATCH v2 2/3] configs/microchip_mpfs_icicle_defconfig: update instruction sets Jamie Gibbons via buildroot
2023-08-16 9:24 ` [Buildroot] [PATCH v2 3/3] board/microchip/mpfs_icicle: update post-image script Jamie Gibbons via buildroot
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=20230817094015.5324e023@windsurf \
--to=buildroot@buildroot.org \
--cc=Conor.Dooley@microchip.com \
--cc=Valentina.FernandezAlanis@microchip.com \
--cc=jamie.gibbons@microchip.com \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.