X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fasm-x86_64%2Ftimex.h;h=f6527e1b6c1c68eff886a54bc9ff860b48e85b7e;hb=5a90cf205c922707ffed2d8f87cefd942e96b0ba;hp=f971f45d6d78b63479fa7cf48e9fb4b9efd11833;hpb=165aeb82848c81ee1774f8defc74df4341e9184b;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h index f971f45..f6527e1 100644 --- a/include/asm-x86_64/timex.h +++ b/include/asm-x86_64/timex.h @@ -10,24 +10,23 @@ #include #include #include +#include +#include +#include +#include #define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */ -typedef unsigned long long cycles_t; - -static inline cycles_t get_cycles (void) -{ - unsigned long long ret; - - rdtscll(ret); - return ret; -} - -extern unsigned int cpu_khz; - extern int read_current_timer(unsigned long *timer_value); #define ARCH_HAS_READ_CURRENT_TIMER 1 -extern struct vxtime_data vxtime; +#define USEC_PER_TICK (USEC_PER_SEC / HZ) +#define NSEC_PER_TICK (NSEC_PER_SEC / HZ) +#define FSEC_PER_TICK (FSEC_PER_SEC / HZ) + +#define NS_SCALE 10 /* 2^10, carefully chosen */ +#define US_SCALE 32 /* 2^32, arbitralrily chosen */ +extern void mark_tsc_unstable(char *msg); +extern void set_cyc2ns_scale(unsigned long khz); #endif