Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | #include <asm/8253pit.h> |
| 10 | #include <asm/msr.h> |
| 11 | #include <asm/vsyscall.h> |
Andi Kleen | c818a18 | 2006-01-11 22:45:24 +0100 | [diff] [blame] | 12 | #include <asm/system.h> |
| 13 | #include <asm/processor.h> |
Ingo Molnar | 95492e4 | 2007-02-16 01:27:34 -0800 | [diff] [blame] | 14 | #include <asm/tsc.h> |
Andi Kleen | c818a18 | 2006-01-11 22:45:24 +0100 | [diff] [blame] | 15 | #include <linux/compiler.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
| 17 | #define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */ |
| 18 | |
Venkatesh Pallipadi | 8a9e1b0 | 2005-06-23 00:08:13 -0700 | [diff] [blame] | 19 | extern int read_current_timer(unsigned long *timer_value); |
| 20 | #define ARCH_HAS_READ_CURRENT_TIMER 1 |
| 21 | |
john stultz | c37e7bb | 2007-02-16 01:28:19 -0800 | [diff] [blame] | 22 | #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 stultz | 5a90cf2 | 2007-05-02 19:27:08 +0200 | [diff] [blame] | 29 | extern void mark_tsc_unstable(char *msg); |
john stultz | c37e7bb | 2007-02-16 01:28:19 -0800 | [diff] [blame] | 30 | extern void set_cyc2ns_scale(unsigned long khz); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #endif |