aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/timex_64.h
blob: 905443a888946d31e7bbec5a5806ff8e430ab600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * linux/include/asm/timex.h
 *
 * sparc64 architecture timex specifications
 */
#ifndef _ASMsparc64_TIMEX_H
#define _ASMsparc64_TIMEX_H

#include <asm/timer.h>

#define CLOCK_TICK_RATE	1193180 /* Underlying HZ */

/* Getting on the cycle counter on sparc64. */
typedef unsigned long cycles_t;

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

#endif