Skip to content

Commit 154a370

Browse files
clementlegerpalmer-dabbelt
authored andcommitted
riscv: hwprobe: export Zacas ISA extension
Export Zacas ISA extension through hwprobe. Signed-off-by: Clément Léger <cleger@rivosinc.com> Link: https://lore.kernel.org/r/20231220155723.684081-6-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 188a212 commit 154a370

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Documentation/arch/riscv/hwprobe.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ The following keys are defined:
165165
defined in the RISC-V ISA manual starting from commit 5618fb5a216b
166166
("Ztso is now ratified.")
167167

168+
* :c:macro:`RISCV_HWPROBE_EXT_ZACAS`: The Zacas extension is supported as
169+
defined in the Atomic Compare-and-Swap (CAS) instructions manual starting
170+
from commit 5059e0ca641c ("update to ratified").
171+
168172
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
169173
information about the selected set of processors.
170174

arch/riscv/include/uapi/asm/hwprobe.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ struct riscv_hwprobe {
5757
#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31)
5858
#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)
5959
#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)
60+
#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)
6061
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
6162
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
6263
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)

arch/riscv/kernel/sys_riscv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
175175
EXT_KEY(ZKT);
176176
EXT_KEY(ZIHINTNTL);
177177
EXT_KEY(ZTSO);
178+
EXT_KEY(ZACAS);
178179

179180
if (has_vector()) {
180181
EXT_KEY(ZVBB);

0 commit comments

Comments
 (0)