diff --git a/arch/arch-riscv64.h b/arch/arch-riscv64.h index 9b8fd001d7..8ac33fa31c 100644 --- a/arch/arch-riscv64.h +++ b/arch/arch-riscv64.h @@ -16,7 +16,7 @@ static inline unsigned long long get_cpu_clock(void) { unsigned long val; - asm volatile("rdcycle %0" : "=r"(val)); + asm volatile("rdtime %0" : "=r"(val)); return val; } #define ARCH_HAVE_CPU_CLOCK