]> www.infradead.org Git - users/jedix/linux-maple.git/commit
riscv: hwprobe: Add thead vendor extension probing
authorCharlie Jenkins <charlie@rivosinc.com>
Thu, 14 Nov 2024 02:21:16 +0000 (18:21 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sat, 18 Jan 2025 20:33:35 +0000 (12:33 -0800)
commita5ea53da65c588339890c825e63c0da5baef6897
treeace6d5dc97496d022e1cbe4e3ee7b4da7d97cf36
parentd863910eabaffc68eb28aaf476dd870fc3f7197d
riscv: hwprobe: Add thead vendor extension probing

Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0" which
allows userspace to probe for the new RISCV_ISA_VENDOR_EXT_XTHEADVECTOR
vendor extension.

This new key will allow userspace code to probe for which thead vendor
extensions are supported. This API is modeled to be consistent with
RISCV_HWPROBE_KEY_IMA_EXT_0. The bitmask returned will have each bit
corresponding to a supported thead vendor extension of the cpumask set.
Just like RISCV_HWPROBE_KEY_IMA_EXT_0, this allows a userspace program
to determine all of the supported thead vendor extensions in one call.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Evan Green <evan@rivosinc.com>
Tested-by: Yangyu Chen <cyy@cyyself.name>
Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-10-236c22791ef9@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/hwprobe.h
arch/riscv/include/asm/vendor_extensions/thead_hwprobe.h [new file with mode: 0644]
arch/riscv/include/asm/vendor_extensions/vendor_hwprobe.h [new file with mode: 0644]
arch/riscv/include/uapi/asm/hwprobe.h
arch/riscv/include/uapi/asm/vendor/thead.h [new file with mode: 0644]
arch/riscv/kernel/sys_hwprobe.c
arch/riscv/kernel/vendor_extensions/Makefile
arch/riscv/kernel/vendor_extensions/thead_hwprobe.c [new file with mode: 0644]