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

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240619113529.676940-4-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 fc015b452ebf6ff824d4cd20520cf927eed2f30e..2b7f1d05b2e3f3e2400067f4d016f8b25e9da59f 100644 (file)
@@ -207,6 +207,10 @@ The following keys are defined:
   * :c:macro:`RISCV_HWPROBE_EXT_ZVE64D`: The Vector sub-extension Zve64d is
     supported, as defined by version 1.0 of the RISC-V Vector extension manual.
 
+  * :c:macro:`RISCV_HWPROBE_EXT_ZIMOP`: The Zimop May-Be-Operations extension is
+       supported as defined in the RISC-V ISA manual starting from commit
+       58220614a5f ("Zimop is ratified/1.0").
+
 * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
   information about the selected set of processors.
 
index 7b95fadbea2a725d1b4f690e4862afff8c65e8ab..538c404938e60fb67cd5a9b1f6d07979ec69bb4f 100644 (file)
@@ -65,6 +65,7 @@ struct riscv_hwprobe {
 #define                RISCV_HWPROBE_EXT_ZVE64X        (1ULL << 39)
 #define                RISCV_HWPROBE_EXT_ZVE64F        (1ULL << 40)
 #define                RISCV_HWPROBE_EXT_ZVE64D        (1ULL << 41)
+#define                RISCV_HWPROBE_EXT_ZIMOP         (1ULL << 42)
 #define RISCV_HWPROBE_KEY_CPUPERF_0    5
 #define                RISCV_HWPROBE_MISALIGNED_UNKNOWN        (0 << 0)
 #define                RISCV_HWPROBE_MISALIGNED_EMULATED       (1 << 0)
index 83fcc939df670a28c4aaa6cc69fb685ef1de117d..04a2ed4ee41578d043feb2347c89ebb6cdf69ece 100644 (file)
@@ -112,6 +112,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
                EXT_KEY(ZACAS);
                EXT_KEY(ZICOND);
                EXT_KEY(ZIHINTPAUSE);
+               EXT_KEY(ZIMOP);
 
                /*
                 * All the following extensions must depend on the kernel