summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/kernel/perf_event.c')
-rw-r--r--arch/riscv/kernel/perf_event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/kernel/perf_event.c b/arch/riscv/kernel/perf_event.c
index 667ee70defea..91626d9ae5f2 100644
--- a/arch/riscv/kernel/perf_event.c
+++ b/arch/riscv/kernel/perf_event.c
@@ -185,10 +185,10 @@ static inline u64 read_counter(int idx)
switch (idx) {
case RISCV_PMU_CYCLE:
- val = csr_read(cycle);
+ val = csr_read(CSR_CYCLE);
break;
case RISCV_PMU_INSTRET:
- val = csr_read(instret);
+ val = csr_read(CSR_INSTRET);
break;
default:
WARN_ON_ONCE(idx < 0 || idx > RISCV_MAX_COUNTERS);