From: Conor Dooley <conor.dooley@microchip.com>
To: Samuel Ortiz <sameo@rivosinc.com>
Cc: "Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org,
"Hongren (Zenithal) Zheng" <i@zenithal.me>,
linux@rivosinc.com, "Andrew Jones" <ajones@ventanamicro.com>,
"Heiko Stuebner" <heiko.stuebner@vrull.eu>,
"Anup Patel" <apatel@ventanamicro.com>,
linux-kernel@vger.kernel.org, "Guo Ren" <guoren@kernel.org>,
"Atish Patra" <atishp@rivosinc.com>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Evan Green" <evan@rivosinc.com>,
"Jiatai He" <jiatai2021@iscas.ac.cn>
Subject: Re: [PATCH v2 1/3] RISC-V: add Bitmanip/Scalar Crypto parsing from DT
Date: Thu, 6 Jul 2023 14:40:19 +0100 [thread overview]
Message-ID: <20230706-amused-entrench-3ce9cb6769ef@wendy> (raw)
In-Reply-To: <20230628131442.3022772-2-sameo@rivosinc.com>
[-- Attachment #1: Type: text/plain, Size: 2703 bytes --]
Hey,
On Wed, Jun 28, 2023 at 03:14:33PM +0200, Samuel Ortiz wrote:
> From: "Hongren (Zenithal) Zheng" <i@zenithal.me>
>
> Parse Zb/Zk related string from DT and output them to cpuinfo.
>
> It is worth noting that the Scalar Crypto extension defines "zk" as a
> shorthand for the Zkn, Zkr and Zkt extensions. Since the Zkn one also
> implies the Zbkb, Zbkc and Zbkx extensions, simply passing the valid
> "zk" extension name through a DT will enable all of the Zbkb, Zbkc,
> Zbkx, Zkn, Zkr and Zkt extensions.
>
> Also, since there currently is no mechanism to merge all enabled
> extensions, the generated cpuinfo output could be relatively large.
> For example, setting the "riscv,isa" DT property to "rv64imafdc_zk_zks"
> will generate the following cpuinfo output:
> "rv64imafdc_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zksed_zksh_zkt".
>
> Tested-by: Jiatai He <jiatai2021@iscas.ac.cn>
> Signed-off-by: Samuel Ortiz <sameo@rivosinc.com>
> Signed-off-by: Hongren (Zenithal) Zheng <i@zenithal.me>
> ---
> arch/riscv/include/asm/hwcap.h | 11 +++++++++++
> arch/riscv/kernel/cpu.c | 11 +++++++++++
> arch/riscv/kernel/cpufeature.c | 30 ++++++++++++++++++++++++++++++
> 3 files changed, 52 insertions(+)
>
> diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
> index f041bfa7f6a0..b80ca6e77088 100644
> --- a/arch/riscv/include/asm/hwcap.h
> +++ b/arch/riscv/include/asm/hwcap.h
> @@ -53,6 +53,17 @@
> #define RISCV_ISA_EXT_ZICSR 40
> #define RISCV_ISA_EXT_ZIFENCEI 41
> #define RISCV_ISA_EXT_ZIHPM 42
> +#define RISCV_ISA_EXT_ZBC 43
> +#define RISCV_ISA_EXT_ZBKB 44
> +#define RISCV_ISA_EXT_ZBKC 45
> +#define RISCV_ISA_EXT_ZBKX 46
> +#define RISCV_ISA_EXT_ZKND 47
> +#define RISCV_ISA_EXT_ZKNE 48
> +#define RISCV_ISA_EXT_ZKNH 49
> +#define RISCV_ISA_EXT_ZKR 50
> +#define RISCV_ISA_EXT_ZKSED 51
> +#define RISCV_ISA_EXT_ZKSH 52
> +#define RISCV_ISA_EXT_ZKT 53
Getting mighty close to running out of space in a u64 :)
I'd personally rather get my changes to this extensions stuff merged
before adding more extensions, but I am clearly biased in terms of
saving my own work there, and it'd not really be "fair" to hold it up
on that basis alone.
However, since Palmer has now merged the "riscv,isa" deprecation [1],
adding parsing of new ISA extensions, now requires documenting them in
the extensions dt-binding. Can you please do that in v3?
Otherwise, this looks good to me:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
1 - https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?h=for-next&id=aeb71e42caae2031ec849a858080d81462cacca9
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-07-06 13:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 13:14 [PATCH v2 0/3] RISC-V: archrandom support Samuel Ortiz
2023-06-28 13:14 ` [PATCH v2 1/3] RISC-V: add Bitmanip/Scalar Crypto parsing from DT Samuel Ortiz
2023-06-28 17:22 ` Evan Green
2023-07-06 13:40 ` Conor Dooley [this message]
2023-07-09 11:30 ` Heiko Stuebner
2023-06-28 13:14 ` [PATCH v2 2/3] RISC-V: hwprobe: Expose Zbc and the scalar crypto extensions Samuel Ortiz
2023-07-06 13:32 ` Conor Dooley
2023-07-09 11:31 ` Heiko Stuebner
2023-06-28 13:14 ` [PATCH v2 3/3] RISC-V: Implement archrandom when Zkr is available Samuel Ortiz
2023-07-06 13:33 ` Conor Dooley
2023-07-13 0:21 ` Guo Ren
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=20230706-amused-entrench-3ce9cb6769ef@wendy \
--to=conor.dooley@microchip.com \
--cc=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=atishp@rivosinc.com \
--cc=bjorn@rivosinc.com \
--cc=evan@rivosinc.com \
--cc=guoren@kernel.org \
--cc=heiko.stuebner@vrull.eu \
--cc=i@zenithal.me \
--cc=jiatai2021@iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rivosinc.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=sameo@rivosinc.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
all inboxes | Powered by JetHome®