blob: 6ed21f44d3084cc2ee2516b9f2b582ae9b543a5a [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>
Andi Kleenc818a182006-01-11 22:45:24 +010012#include <asm/system.h>
13#include <asm/processor.h>
Ingo Molnar95492e42007-02-16 01:27:34 -080014#include <asm/tsc.h>
Andi Kleenc818a182006-01-11 22:45:24 +010015#include <linux/compiler.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17#define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */
18
Venkatesh Pallipadi8a9e1b02005-06-23 00:08:13 -070019extern int read_current_timer(unsigned long *timer_value);
20#define ARCH_HAS_READ_CURRENT_TIMER 1
21
john stultzc37e7bb2007-02-16 01:28:19 -080022#define USEC_PER_TICK (USEC_PER_SEC / HZ)
23#define NSEC_PER_TICK (NSEC_PER_SEC / HZ)
24#define FSEC_PER_TICK (FSEC_PER_SEC / HZ)
25
26#define NS_SCALE 10 /* 2^10, carefully chosen */
27#define US_SCALE 32 /* 2^32, arbitralrily chosen */
28
john stultz5a90cf22007-05-02 19:27:08 +020029extern void mark_tsc_unstable(char *msg);
john stultzc37e7bb2007-02-16 01:28:19 -080030extern void set_cyc2ns_scale(unsigned long khz);
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#endif