[PATCH v2 0/6] riscv: hwprobe: do not report disabled extensions

Radim Krčmář radim.krcmar at oss.qualcomm.com
Tue Nov 10 09:50:42 PST 2026


Hello,

hwprobe currently looks at the hart's ISA when it reports RISC-V
extensions, but some of these extensions might be present in hart's ISA,
yet still disabled on that hart.
This series improves the situation by only reporting extensions that the
hwprobe caller can actually use on all queried harts.

v1: https://lore.kernel.org/linux-riscv/20261006075303.205216-1-radim.krcmar@oss.qualcomm.com/
v2:
 * [4/6] Used pmlen helpers from v7.4-rc1 [Guodong]
 * (hopefully) improved commit messages
 * r-b

The series changed mainly in the commit messages.
A small semantic change in [4/6] makes us only report Supm when
userspace can choose non-zero PMLEN.

Based on v7.4-rc1 and even through there are a lot of Fixes: tags, there
isn't any rush to get this into 7.4, since the problems can only appear
in awkward/heterogenous platforms.


Radim Krčmář (6):
  riscv: hwprobe: Report FP extensions only when available
  riscv: hwprobe: Report Zicbom and Zicboz only when available
  riscv: hwprobe: Report Zicfilp and Zicfiss only when available
  riscv: hwprobe: Report Supm only when available
  riscv: hwprobe: Report XTheadVector only when available
  riscv: hwprobe: Report SiFive vector extensions only when available

 arch/riscv/include/asm/usercfi.h              |  9 ++--
 arch/riscv/kernel/sys_hwprobe.c               | 54 ++++++++++++-------
 .../kernel/vendor_extensions/sifive_hwprobe.c | 14 +++--
 .../kernel/vendor_extensions/thead_hwprobe.c  |  5 +-
 4 files changed, 54 insertions(+), 28 deletions(-)

-- 
2.55.0




More information about the linux-riscv mailing list