Skip to content

Commit ccbbfd1

Browse files
RISC-V: Define get_cycles64() regardless of M-mode
The timer driver uses get_cycles64() unconditionally to obtain the current time. A recent refactoring lost the common definition for some configs, which is now the only one we need. Fixes: d5be89a ("RISC-V: Resurrect the MMIO timer implementation for M-mode systems") Reported-by: kernel test robot <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 30aca1b commit ccbbfd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/include/asm/timex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ static inline u32 get_cycles_hi(void)
6060
}
6161
#define get_cycles_hi get_cycles_hi
6262

63+
#endif /* !CONFIG_RISCV_M_MODE */
64+
6365
#ifdef CONFIG_64BIT
6466
static inline u64 get_cycles64(void)
6567
{
@@ -79,8 +81,6 @@ static inline u64 get_cycles64(void)
7981
}
8082
#endif /* CONFIG_64BIT */
8183

82-
#endif /* !CONFIG_RISCV_M_MODE */
83-
8484
#define ARCH_HAS_READ_CURRENT_TIMER
8585
static inline int read_current_timer(unsigned long *timer_val)
8686
{

0 commit comments

Comments
 (0)