1 // SPDX-License-Identifier: GPL-2.0
3 #include "../perf_regs.h"
4 #include "../../../arch/riscv/include/uapi/asm/perf_regs.h"
6 const char *__perf_reg_name_riscv(int id
)
9 case PERF_REG_RISCV_PC
:
11 case PERF_REG_RISCV_RA
:
13 case PERF_REG_RISCV_SP
:
15 case PERF_REG_RISCV_GP
:
17 case PERF_REG_RISCV_TP
:
19 case PERF_REG_RISCV_T0
:
21 case PERF_REG_RISCV_T1
:
23 case PERF_REG_RISCV_T2
:
25 case PERF_REG_RISCV_S0
:
27 case PERF_REG_RISCV_S1
:
29 case PERF_REG_RISCV_A0
:
31 case PERF_REG_RISCV_A1
:
33 case PERF_REG_RISCV_A2
:
35 case PERF_REG_RISCV_A3
:
37 case PERF_REG_RISCV_A4
:
39 case PERF_REG_RISCV_A5
:
41 case PERF_REG_RISCV_A6
:
43 case PERF_REG_RISCV_A7
:
45 case PERF_REG_RISCV_S2
:
47 case PERF_REG_RISCV_S3
:
49 case PERF_REG_RISCV_S4
:
51 case PERF_REG_RISCV_S5
:
53 case PERF_REG_RISCV_S6
:
55 case PERF_REG_RISCV_S7
:
57 case PERF_REG_RISCV_S8
:
59 case PERF_REG_RISCV_S9
:
61 case PERF_REG_RISCV_S10
:
63 case PERF_REG_RISCV_S11
:
65 case PERF_REG_RISCV_T3
:
67 case PERF_REG_RISCV_T4
:
69 case PERF_REG_RISCV_T5
:
71 case PERF_REG_RISCV_T6
:
80 uint64_t __perf_reg_ip_riscv(void)
82 return PERF_REG_RISCV_PC
;
85 uint64_t __perf_reg_sp_riscv(void)
87 return PERF_REG_RISCV_SP
;