blob: 8c6808a3fba443ab74770b526997fd8a6ea0b447 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/include/asm-x86_64/timex.h
3 *
4 * x86-64 architecture timex specifications
5 */
6#ifndef _ASMx8664_TIMEX_H
7#define _ASMx8664_TIMEX_H
8
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <asm/8253pit.h>
10#include <asm/msr.h>
11#include <asm/vsyscall.h>
12#include <asm/hpet.h>
Andi Kleenc818a182006-01-11 22:45:24 +010013#include <asm/system.h>
14#include <asm/processor.h>
Ingo Molnar95492e42007-02-16 01:27:34 -080015#include <asm/tsc.h>
Andi Kleenc818a182006-01-11 22:45:24 +010016#include <linux/compiler.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18#define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */
19
Venkatesh Pallipadi8a9e1b02005-06-23 00:08:13 -070020extern int read_current_timer(unsigned long *timer_value);
21#define ARCH_HAS_READ_CURRENT_TIMER 1
22
john stultzc37e7bb2007-02-16 01:28:19 -080023#define USEC_PER_TICK (USEC_PER_SEC / HZ)
24#define NSEC_PER_TICK (NSEC_PER_SEC / HZ)
25#define FSEC_PER_TICK (FSEC_PER_SEC / HZ)
26
27#define NS_SCALE 10 /* 2^10, carefully chosen */
28#define US_SCALE 32 /* 2^32, arbitralrily chosen */
29
john stultz14899392007-02-16 01:28:20 -080030extern void mark_tsc_unstable(void);
john stultzc37e7bb2007-02-16 01:28:19 -080031extern void set_cyc2ns_scale(unsigned long khz);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#endif