Skip to content

Commit 464b018

Browse files
atishp04palmer-dabbelt
authored andcommitted
RISC-V: Enable sstc extension parsing from DT
The ISA extension framework now allows parsing any multi-letter ISA extension. Enable that for sstc extension. Reviewed-by: Anup Patel <[email protected]> Signed-off-by: Atish Patra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent bf952a2 commit 464b018

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

arch/riscv/include/asm/hwcap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ extern unsigned long elf_hwcap;
5353
enum riscv_isa_ext_id {
5454
RISCV_ISA_EXT_SSCOFPMF = RISCV_ISA_EXT_BASE,
5555
RISCV_ISA_EXT_SVPBMT,
56+
RISCV_ISA_EXT_SSTC,
5657
RISCV_ISA_EXT_ID_MAX = RISCV_ISA_EXT_MAX,
5758
};
5859

arch/riscv/kernel/cpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ int riscv_of_parent_hartid(struct device_node *node)
8989
static struct riscv_isa_ext_data isa_ext_arr[] = {
9090
__RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF),
9191
__RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT),
92+
__RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC),
9293
__RISCV_ISA_EXT_DATA("", RISCV_ISA_EXT_MAX),
9394
};
9495

arch/riscv/kernel/cpufeature.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ void __init riscv_fill_hwcap(void)
199199
} else {
200200
SET_ISA_EXT_MAP("sscofpmf", RISCV_ISA_EXT_SSCOFPMF);
201201
SET_ISA_EXT_MAP("svpbmt", RISCV_ISA_EXT_SVPBMT);
202+
SET_ISA_EXT_MAP("sstc", RISCV_ISA_EXT_SSTC);
202203
}
203204
#undef SET_ISA_EXT_MAP
204205
}

0 commit comments

Comments
 (0)