Skip to content

Commit 415a8c8

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: hwprobe: export Zabha extension
Export Zabha through the hwprobe syscall. Reviewed-by: Clément Léger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Ghiti <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent d7e0cce commit 415a8c8

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
@@ -271,6 +271,10 @@ The following keys are defined:
271271
* :c:macro:`RISCV_HWPROBE_EXT_ZICBOM`: The Zicbom extension is supported, as
272272
ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
273273

274+
* :c:macro:`RISCV_HWPROBE_EXT_ZABHA`: The Zabha extension is supported as
275+
ratified in commit 49f49c842ff9 ("Update to Rafified state") of
276+
riscv-zabha.
277+
274278
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: Deprecated. Returns similar values to
275279
:c:macro:`RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF`, but the key was
276280
mistakenly classified as a bitmask rather than a value.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ struct riscv_hwprobe {
8181
#define RISCV_HWPROBE_EXT_ZICBOM (1ULL << 55)
8282
#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)
8383
#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)
84+
#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)
8485
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
8586
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
8687
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)

arch/riscv/kernel/sys_hwprobe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
9696
* presence in the hart_isa bitmap, are made.
9797
*/
9898
EXT_KEY(ZAAMO);
99+
EXT_KEY(ZABHA);
99100
EXT_KEY(ZACAS);
100101
EXT_KEY(ZALRSC);
101102
EXT_KEY(ZAWRS);

0 commit comments

Comments
 (0)