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