riscv: hwprobe: Document SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions
authorCyan Yang <cyan.yang@sifive.com>
Fri, 18 Apr 2025 05:32:30 +0000 (13:32 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 8 May 2025 18:01:43 +0000 (11:01 -0700)
Document the support for sifive vendor extensions using the key
RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0 and two vendor extensions for SiFive
Int8 Matrix Multiplication Instructions using
RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCDOD and
RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCQOQ.

Signed-off-by: Cyan Yang <cyan.yang@sifive.com>
Link: https://lore.kernel.org/r/20250418053239.4351-4-cyan.yang@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Documentation/arch/riscv/hwprobe.rst
arch/riscv/include/asm/hwprobe.h
arch/riscv/include/uapi/asm/hwprobe.h

index 53607d962653b6606ed896ff82316495eeaf0c7d..16085b2ee64e71b60ee8294a8cead27f8c40ea4c 100644 (file)
@@ -335,3 +335,17 @@ The following keys are defined:
 
 * :c:macro:`RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE`: An unsigned int which
   represents the size of the Zicbom block in bytes.
+
+* :c:macro:`RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0`: A bitmask containing the
+  sifive vendor extensions that are compatible with the
+  :c:macro:`RISCV_HWPROBE_BASE_BEHAVIOR_IMA`: base system behavior.
+
+  * SIFIVE
+
+    * :c:macro:`RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCDOD`: The Xsfqmaccdod vendor
+        extension is supported in version 1.1 of SiFive Int8 Matrix Multiplication
+       Extensions Specification.
+
+    * :c:macro:`RISCV_HWPROBE_VENDOR_EXT_XSFVQMACCQOQ`: The Xsfqmaccqoq vendor
+        extension is supported in version 1.1 of SiFive Int8 Matrix Multiplication
+       Instruction Extensions Specification.
index 1f690fea0e03de6a6f7a59f9b6495df3675efdfc..1c69773057765b42b8b41d2e8cb0fef1312d480f 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <uapi/asm/hwprobe.h>
 
-#define RISCV_HWPROBE_MAX_KEY 12
+#define RISCV_HWPROBE_MAX_KEY 13
 
 static inline bool riscv_hwprobe_key_is_valid(__s64 key)
 {
index 3c2fce939673b9e7cf05a20793e6dae79edf73f0..9c70101f021b3cfca6fcde01d816b25ed2d75d60 100644 (file)
@@ -104,6 +104,7 @@ struct riscv_hwprobe {
 #define                RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED     4
 #define RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0   11
 #define RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE    12
+#define RISCV_HWPROBE_KEY_VENDOR_EXT_SIFIVE_0  13
 /* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
 
 /* Flags */