blob: f6527e1b6c1c68eff886a54bc9ff860b48e85b7e [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 stultz5a90cf22007-05-02 19:27:08 +020030extern void mark_tsc_unstable(char *msg);
john stultzc37e7bb2007-02-16 01:28:19 -080031extern void set_cyc2ns_scale(unsigned long khz);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#endif