Commit 5a4ad32c authored by David S. Miller's avatar David S. Miller

[SPARC64]: Use tick_ops for get_cycles, export it.

parent 942e4c16
......@@ -380,3 +380,5 @@ EXPORT_SYMBOL(ns87303_lock);
/* for solaris compat module */
EXPORT_SYMBOL_GPL(sys_call_table);
EXPORT_SYMBOL(tick_ops);
......@@ -6,6 +6,8 @@
#ifndef _ASMsparc64_TIMEX_H
#define _ASMsparc64_TIMEX_H
#include <asm/timer.h>
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */
#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
......@@ -14,10 +16,6 @@
/* Getting on the cycle counter on sparc64. */
typedef unsigned long cycles_t;
#define get_cycles() \
({ cycles_t ret; \
__asm__ __volatile__("rd %%tick, %0" : "=r" (ret)); \
ret; \
})
#define get_cycles() tick_ops->get_tick()
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment