Re: [PATCH 3/3] RISC-V: hwprobe: Expose Zba and Zbb

From: Evan Green
Date: Mon May 01 2023 - 11:34:12 EST


On Sat, Apr 29, 2023 at 1:07 PM Palmer Dabbelt <palmer@xxxxxxxxxxx> wrote:
>
> On Sat, 29 Apr 2023 06:40:51 PDT (-0700), Conor Dooley wrote:
> > On Fri, Apr 28, 2023 at 12:06:08PM -0700, Evan Green wrote:
> >> Add two new bits to the IMA_EXT_0 key for ZBA and ZBB extensions. These
> >> are accurately reported per CPU.
> >>
> >> Signed-off-by: Evan Green <evan@xxxxxxxxxxxx>
> >>
> >> ---
> >>
> >> Documentation/riscv/hwprobe.rst | 7 +++++
> >> arch/riscv/include/uapi/asm/hwprobe.h | 2 ++
> >> arch/riscv/kernel/sys_riscv.c | 43 ++++++++++++++++++++++-----
> >> 3 files changed, 45 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/Documentation/riscv/hwprobe.rst b/Documentation/riscv/hwprobe.rst
> >> index 9f0dd62dcb5d..21f444a38359 100644
> >> --- a/Documentation/riscv/hwprobe.rst
> >> +++ b/Documentation/riscv/hwprobe.rst
> >> @@ -64,6 +64,13 @@ The following keys are defined:
> >> * :c:macro:`RISCV_HWPROBE_IMA_C`: The C extension is supported, as defined
> >> by version 2.2 of the RISC-V ISA manual.
> >>
> >> + * :c:macro:`RISCV_HWPROBE_EXT_ZBA`: The Zba address generation extension is
> >> + supported, as defined in version 1.0 of the Bit-Manipulation ISA
> >> + extensions.
> >> +
> >> + * :c:macro:`RISCV_HWPROBE_IMA_ZBB`: The Zbb extension is supporte, as defined
> >
> > Why is one EXT_ZBA and the other is IMA_ZBB? You do not use IMA below,
> > so I assume this is a copy-paste mistake.
>
> Looks like it. Either way this was too late for the current merge
> window, so no big deal.

Copypasta! I'll fix it.
-Evan