1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_TIMER_H
3 #define _ASM_X86_TIMER_H
5 #include <linux/percpu.h>
6 #include <linux/interrupt.h>
7 #include <linux/math64.h>
9 unsigned long long native_sched_clock(void);
10 extern void recalibrate_cpu_khz(void);
12 extern int no_timer_check;
14 extern bool using_native_sched_clock(void);
17 * We use the full linear equation: f(x) = a + b*x, in order to allow
18 * a continuous function in the face of dynamic freq changes.
20 * Continuity means that when our frequency changes our slope (b); we want to
21 * ensure that: f(t) == f'(t), which gives: a + b*t == a' + b'*t.
23 * Without an offset (a) the above would not be possible.
25 * See the comment near cycles_2_ns() for details on how we compute (b).
33 extern void cyc2ns_read_begin(struct cyc2ns_data *);
34 extern void cyc2ns_read_end(void);
36 #endif /* _ASM_X86_TIMER_H */