Merge tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux/fpc-iii.git] / arch / x86 / include / asm / timer.h
blob2016962103df5be9b858a82cca1cf355219e3b33
1 #ifndef _ASM_X86_TIMER_H
2 #define _ASM_X86_TIMER_H
3 #include <linux/pm.h>
4 #include <linux/percpu.h>
5 #include <linux/interrupt.h>
6 #include <linux/math64.h>
8 #define TICK_SIZE (tick_nsec / 1000)
10 unsigned long long native_sched_clock(void);
11 extern int recalibrate_cpu_khz(void);
13 extern int no_timer_check;
15 extern bool using_native_sched_clock(void);
18 * We use the full linear equation: f(x) = a + b*x, in order to allow
19 * a continuous function in the face of dynamic freq changes.
21 * Continuity means that when our frequency changes our slope (b); we want to
22 * ensure that: f(t) == f'(t), which gives: a + b*t == a' + b'*t.
24 * Without an offset (a) the above would not be possible.
26 * See the comment near cycles_2_ns() for details on how we compute (b).
28 struct cyc2ns_data {
29 u32 cyc2ns_mul;
30 u32 cyc2ns_shift;
31 u64 cyc2ns_offset;
32 }; /* 16 bytes */
34 extern void cyc2ns_read_begin(struct cyc2ns_data *);
35 extern void cyc2ns_read_end(void);
37 #endif /* _ASM_X86_TIMER_H */