Skip to content

RISC-V: Export Zba, Zbb to usermode via hwprobe

Evan Green linux-doc linux-riscv lkml 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 8 repliesApplied 3/3
  2. v13 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Add Zbs as well
- Add blank line before if in riscv_fill_hwcap() (Conor)
- Fixed typo s/supporte/supported/ (Conor)
- Fixed copypasta s/IMA_ZBB/EXT_ZBB/ (Conor)
- Added Zbs

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3RISC-V: Add Zba, Zbs extension probingarch/riscv/include/asm/hwcap.h arch/riscv/kernel/cpu.c arch/riscv/kernel/cpufeature.c+6 -04 repliesApplied
2/3RISC-V: Track ISA extensions per hartarch/riscv/include/asm/cpufeature.h arch/riscv/kernel/cpufeature.c+22 -60 repliesApplied
3/3RISC-V: hwprobe: Expose Zba, Zbb, and ZbsDocumentation/riscv/hwprobe.rst arch/riscv/include/uapi/asm/hwprobe.h arch/riscv/kernel/sys_riscv.c+54 -73 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndrew JonesPalmer DabbeltConor DooleyHeiko Stuebner
1/3R-b R-b R-b R-b
2/3R-b R-b R-b
3/3R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] RISC-V: Export Zba, Zbb to usermode via hwprobe

This change detects the presence of Zba, Zbb, and Zbs extensions and exports them per-hart to userspace via the hwprobe mechanism. Glibc can then use these in setting up hwcaps-based library search paths.

There's a little bit of extra housekeeping here: the first change adds Zba and Zbs to the set of extensions the kernel recognizes, and the second change starts tracking ISA features per-hart (in addition to the ANDed mask of features across all harts which the kernel uses to make decisions). Now that we track the ISA information per-hart, we could even fix up /proc/cpuinfo to accurately report extension per-hart, though I've left that out of this series for now.

Changes in v2:
- Add Zbs as well
- Add blank line before if in riscv_fill_hwcap() (Conor)
- Fixed typo s/supporte/supported/ (Conor)
- Fixed copypasta s/IMA_ZBB/EXT_ZBB/ (Conor)
- Added Zbs

Evan Green (3):
RISC-V: Add Zba, Zbs extension probing
RISC-V: Track ISA extensions per hart
RISC-V: hwprobe: Expose Zba, Zbb, and Zbs

 Documentation/riscv/hwprobe.rst       | 10 ++++++
 arch/riscv/include/asm/cpufeature.h   | 10 ++++++
 arch/riscv/include/asm/hwcap.h        |  2 ++
 arch/riscv/include/uapi/asm/hwprobe.h |  3 ++
 arch/riscv/kernel/cpu.c               |  2 ++
 arch/riscv/kernel/cpufeature.c        | 20 +++++++----
 arch/riscv/kernel/sys_riscv.c         | 48 +++++++++++++++++++++++----
 7 files changed, 82 insertions(+), 13 deletions(-)
Signature · 1 line
2.25.1