Skip to content

Commit

Permalink
RISC-V: Define get_cycles64() regardless of M-mode
Browse files Browse the repository at this point in the history
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 <lkp@intel.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
  • Loading branch information
Palmer Dabbelt committed Dec 11, 2020
1 parent 30aca1b commit ccbbfd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/riscv/include/asm/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ static inline u32 get_cycles_hi(void)
}
#define get_cycles_hi get_cycles_hi

#endif /* !CONFIG_RISCV_M_MODE */

#ifdef CONFIG_64BIT
static inline u64 get_cycles64(void)
{
Expand All @@ -79,8 +81,6 @@ static inline u64 get_cycles64(void)
}
#endif /* CONFIG_64BIT */

#endif /* !CONFIG_RISCV_M_MODE */

#define ARCH_HAS_READ_CURRENT_TIMER
static inline int read_current_timer(unsigned long *timer_val)
{
Expand Down

0 comments on commit ccbbfd1

Please sign in to comment.