]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
riscv: hwprobe: export Zcmop ISA extension
authorClément Léger <cleger@rivosinc.com>
Wed, 19 Jun 2024 11:35:24 +0000 (13:35 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 26 Jun 2024 14:54:58 +0000 (07:54 -0700)
Export Zcmop ISA extension through hwprobe.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Evan Green <evan@rivosinc.com>
Link: https://lore.kernel.org/r/20240619113529.676940-15-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_hwprobe.c

index 4d9b4ed34c96507f6365fcb0ef73d13a6c159f7f..25d783be2878776a6d3969ffc637bc8d0f45bd9d 100644 (file)
@@ -231,6 +231,10 @@ The following keys are defined:
        ("Zcf doesn't exist on RV64 as it contains no instructions") of
        riscv-code-size-reduction.
 
+  * :c:macro:`RISCV_HWPROBE_EXT_ZCMOP`: The Zcmop May-Be-Operations extension is
+       supported as defined in the RISC-V ISA manual starting from commit
+       c732a4f39a4 ("Zcmop is ratified/1.0").
+
 * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
   information about the selected set of processors.
 
index c38f3f2b8382fbc3f564cf9c9c2a04c60be3535a..920fc6a586c9e994505badeae8ffe5e022024e7d 100644 (file)
@@ -70,6 +70,7 @@ struct riscv_hwprobe {
 #define                RISCV_HWPROBE_EXT_ZCB           (1ULL << 44)
 #define                RISCV_HWPROBE_EXT_ZCD           (1ULL << 45)
 #define                RISCV_HWPROBE_EXT_ZCF           (1ULL << 46)
+#define                RISCV_HWPROBE_EXT_ZCMOP         (1ULL << 47)
 #define RISCV_HWPROBE_KEY_CPUPERF_0    5
 #define                RISCV_HWPROBE_MISALIGNED_UNKNOWN        (0 << 0)
 #define                RISCV_HWPROBE_MISALIGNED_EMULATED       (1 << 0)
index 89e03cdf38b73f5ef310fc7a0b6309d5e8ca41d9..3d1aa13a0bb2fe29a6ea42859e3642002d8a13c6 100644 (file)
@@ -115,6 +115,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
                EXT_KEY(ZIMOP);
                EXT_KEY(ZCA);
                EXT_KEY(ZCB);
+               EXT_KEY(ZCMOP);
 
                /*
                 * All the following extensions must depend on the kernel