]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/x86/include/asm/timer.h
Merge remote-tracking branches 'spi/topic/devprop', 'spi/topic/fsl', 'spi/topic/fsl...
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / include / asm / timer.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_TIMER_H
2#define _ASM_X86_TIMER_H
c3c433e4 3#include <linux/pm.h>
53d517cd 4#include <linux/percpu.h>
8e6dafd6 5#include <linux/interrupt.h>
5dd12c21 6#include <linux/math64.h>
1da177e4 7
1da177e4 8#define TICK_SIZE (tick_nsec / 1000)
6cb9a835 9
6cb9a835 10unsigned long long native_sched_clock(void);
64fcbac1 11extern int recalibrate_cpu_khz(void);
6cb9a835 12
cc038491 13extern int no_timer_check;
1da177e4 14
698eff63
PZ
15extern bool using_native_sched_clock(void);
16
20d1c86a
PZ
17/*
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.
20 *
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.
23 *
24 * Without an offset (a) the above would not be possible.
25 *
26 * See the comment near cycles_2_ns() for details on how we compute (b).
27 */
28struct cyc2ns_data {
29 u32 cyc2ns_mul;
30 u32 cyc2ns_shift;
31 u64 cyc2ns_offset;
32 u32 __count;
33 /* u32 hole */
34}; /* 24 bytes -- do not grow */
35
36extern struct cyc2ns_data *cyc2ns_read_begin(void);
37extern void cyc2ns_read_end(struct cyc2ns_data *);
688340ea 38
1965aae3 39#endif /* _ASM_X86_TIMER_H */