2 * include/asm-ppc/timex.h
4 * ppc architecture timex specifications
7 #ifndef _ASMppc_TIMEX_H
8 #define _ASMppc_TIMEX_H
10 #include <linux/config.h>
11 #include <asm/cputable.h>
13 #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
14 #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */
15 #define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \
16 (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
17 << (SHIFT_SCALE-SHIFT_HZ)) / HZ)
19 typedef unsigned long cycles_t
;
22 * For the "cycle" counter we use the timebase lower half.
23 * Currently only used on SMP.
26 extern cycles_t cacheflush_time
;
28 static inline cycles_t
get_cycles(void)
35 ".section __ftr_fixup,\"a\"\n"
41 : "=r" (ret
) : "i" (CPU_FTR_601
));
46 #endif /* __KERNEL__ */