[PATCH 2/8] riscv: hwprobe: Add support for probing B

Andrew Jones andrew.jones at oss.qualcomm.com
Sun Feb 8 08:47:33 PST 2026


On Sat, Feb 07, 2026 at 06:27:56PM +0800, Guodong Xu wrote:
> The B extension is a shorthand for the Zba, Zbb, and Zbs extensions
> combined, as defined by version 20240411 of the RISC-V Instruction Set
> Manual Volume I Unprivileged Architecture.
> 
> The B bit is added as a system-wide check in RISCV_HWPROBE_KEY_IMA_EXT_1
> using the global ISA bitmap.
> 
> It should be noted that the kernel already exports Zba, Zbb, and Zbs
> individually in RISCV_HWPROBE_KEY_IMA_EXT_0 with per-CPU granularity.

For the rva23u64 base behavior rfc I opted to not add a B hwprobe
extension bit because Zba, Zbb, and Zbs were already in hwprobe and
because I added B to hwcap. I realize we have 'FD', C, and V in hwprobe as
well as the 'IMA' base, so I'm open to adding 'B' as well if that's what
users expect, I'm just not sure if we need it, especially with adding the
rva23u64 base as a quick way to determine B is present along with all
other rva23 extensions.

Thanks,
drew



More information about the linux-riscv mailing list