diff options
Diffstat (limited to 'arch/sparc/include/asm/timex_64.h')
-rw-r--r-- | arch/sparc/include/asm/timex_64.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/timex_64.h b/arch/sparc/include/asm/timex_64.h index 18b30bc9823..905443a8889 100644 --- a/arch/sparc/include/asm/timex_64.h +++ b/arch/sparc/include/asm/timex_64.h @@ -12,7 +12,24 @@ /* Getting on the cycle counter on sparc64. */ typedef unsigned long cycles_t; -#define get_cycles() tick_ops->get_tick() + +static inline cycles_t get_cycles(void) +{ + return tick_ops->get_tick(); +} + +/* get_cycles instruction is synchronized on sparc64 */ +static inline void get_cycles_barrier(void) +{ + return; +} + +extern unsigned long tb_ticks_per_usec; + +static inline cycles_t get_cycles_rate(void) +{ + return (cycles_t)tb_ticks_per_usec * 1000000UL; +} #define ARCH_HAS_READ_CURRENT_TIMER |