From abaa6f77feb882f53a132f9c931db56c8d2f7b05 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 7 Jun 2026 14:39:39 +0300 Subject: [PATCH] RISC-V: rdtime is part of the Zicntr extension --- kernel/cycle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cycle.h b/kernel/cycle.h index 089bdafe..c205cdbd 100644 --- a/kernel/cycle.h +++ b/kernel/cycle.h @@ -486,7 +486,7 @@ INLINE_ELAPSED(inline) #define HAVE_TICK_COUNTER #endif -#if defined(__riscv_xlen) && !defined(HAVE_TICK_COUNTER) +#if defined(__riscv_xlen) && defined(__riscv_zicntr) && !defined(HAVE_TICK_COUNTER) typedef uint64_t ticks; static inline ticks getticks(void) {