riscv: hwprobe: export missing Zbc ISA extension
authorClément Léger <cleger@rivosinc.com>
Tue, 14 Nov 2023 14:12:38 +0000 (09:12 -0500)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 12 Dec 2023 23:44:59 +0000 (15:44 -0800)
While Zba and Zbb were exported through hwprobe, Zbc was not. Export it.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20231114141256.126749-3-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Documentation/arch/riscv/hwprobe.rst
arch/riscv/include/uapi/asm/hwprobe.h
arch/riscv/kernel/sys_riscv.c

index 7b2384de471f8fa5813271a010f8f5f011e7d8c3..3f71da935a6570fbc64336724822c24d6238e649 100644 (file)
@@ -80,6 +80,9 @@ The following keys are defined:
   * :c:macro:`RISCV_HWPROBE_EXT_ZICBOZ`: The Zicboz extension is supported, as
        ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
 
+  * :c:macro:`RISCV_HWPROBE_EXT_ZBC` The Zbc extension is supported, as defined
+       in version 1.0 of the Bit-Manipulation ISA extensions.
+
 * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
   information about the selected set of processors.
 
index b659ffcfcdb454cf4d12cd513bfcb23cf32b11c5..aca5abc7ebee5b97738f585d83f10f854555a917 100644 (file)
@@ -30,6 +30,7 @@ struct riscv_hwprobe {
 #define                RISCV_HWPROBE_EXT_ZBB           (1 << 4)
 #define                RISCV_HWPROBE_EXT_ZBS           (1 << 5)
 #define                RISCV_HWPROBE_EXT_ZICBOZ        (1 << 6)
+#define                RISCV_HWPROBE_EXT_ZBC           (1 << 7)
 #define RISCV_HWPROBE_KEY_CPUPERF_0    5
 #define                RISCV_HWPROBE_MISALIGNED_UNKNOWN        (0 << 0)
 #define                RISCV_HWPROBE_MISALIGNED_EMULATED       (1 << 0)
index c712037dbe10ec88b9ee8f5d8559f9b73c6608fa..7a40145e96285dd4a5af77a4b23bec8dc1dd1a0c 100644 (file)
@@ -162,6 +162,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
                EXT_KEY(ZBB);
                EXT_KEY(ZBS);
                EXT_KEY(ZICBOZ);
+               EXT_KEY(ZBC);
 #undef EXT_KEY
        }