File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,9 @@ The following keys are defined:
260
260
defined in the RISC-V ISA manual starting from commit 4dc23d6229de
261
261
("Added Chapter title to BF16").
262
262
263
+ * :c:macro: `RISCV_HWPROBE_EXT_ZICBOM `: The Zicbom extension is supported, as
264
+ ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
265
+
263
266
* :c:macro: `RISCV_HWPROBE_KEY_CPUPERF_0 `: Deprecated. Returns similar values to
264
267
:c:macro: `RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF `, but the key was
265
268
mistakenly classified as a bitmask rather than a value.
@@ -321,3 +324,6 @@ The following keys are defined:
321
324
* :c:macro: `RISCV_HWPROBE_VENDOR_EXT_XTHEADVECTOR `: The xtheadvector vendor
322
325
extension is supported in the T-Head ISA extensions spec starting from
323
326
commit a18c801634 ("Add T-Head VECTOR vendor extension. ").
327
+
328
+ * :c:macro: `RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE `: An unsigned int which
329
+ represents the size of the Zicbom block in bytes.
Original file line number Diff line number Diff line change 8
8
9
9
#include <uapi/asm/hwprobe.h>
10
10
11
- #define RISCV_HWPROBE_MAX_KEY 11
11
+ #define RISCV_HWPROBE_MAX_KEY 12
12
12
13
13
static inline bool riscv_hwprobe_key_is_valid (__s64 key )
14
14
{
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ struct riscv_hwprobe {
78
78
#define RISCV_HWPROBE_EXT_ZFBFMIN (1ULL << 52)
79
79
#define RISCV_HWPROBE_EXT_ZVFBFMIN (1ULL << 53)
80
80
#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54)
81
+ #define RISCV_HWPROBE_EXT_ZICBOM (1ULL << 55)
81
82
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
82
83
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
83
84
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
@@ -100,6 +101,7 @@ struct riscv_hwprobe {
100
101
#define RISCV_HWPROBE_MISALIGNED_VECTOR_FAST 3
101
102
#define RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED 4
102
103
#define RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0 11
104
+ #define RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE 12
103
105
/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
104
106
105
107
/* Flags */
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
107
107
EXT_KEY (ZCA );
108
108
EXT_KEY (ZCB );
109
109
EXT_KEY (ZCMOP );
110
+ EXT_KEY (ZICBOM );
110
111
EXT_KEY (ZICBOZ );
111
112
EXT_KEY (ZICNTR );
112
113
EXT_KEY (ZICOND );
@@ -166,7 +167,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
166
167
pair -> value &= ~missing ;
167
168
}
168
169
169
- static bool hwprobe_ext0_has (const struct cpumask * cpus , unsigned long ext )
170
+ static bool hwprobe_ext0_has (const struct cpumask * cpus , u64 ext )
170
171
{
171
172
struct riscv_hwprobe pair ;
172
173
@@ -284,6 +285,11 @@ static void hwprobe_one_pair(struct riscv_hwprobe *pair,
284
285
if (hwprobe_ext0_has (cpus , RISCV_HWPROBE_EXT_ZICBOZ ))
285
286
pair -> value = riscv_cboz_block_size ;
286
287
break ;
288
+ case RISCV_HWPROBE_KEY_ZICBOM_BLOCK_SIZE :
289
+ pair -> value = 0 ;
290
+ if (hwprobe_ext0_has (cpus , RISCV_HWPROBE_EXT_ZICBOM ))
291
+ pair -> value = riscv_cbom_block_size ;
292
+ break ;
287
293
case RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS :
288
294
pair -> value = user_max_virt_addr ();
289
295
break ;
You can’t perform that action at this time.
0 commit comments