]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/x86/include/asm/timer.h
KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit KVM
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / include / asm / timer.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1965aae3
PA
2#ifndef _ASM_X86_TIMER_H
3#define _ASM_X86_TIMER_H
c3c433e4 4#include <linux/pm.h>
53d517cd 5#include <linux/percpu.h>
8e6dafd6 6#include <linux/interrupt.h>
5dd12c21 7#include <linux/math64.h>
1da177e4 8
1da177e4 9#define TICK_SIZE (tick_nsec / 1000)
6cb9a835 10
6cb9a835 11unsigned long long native_sched_clock(void);
af576850 12extern void recalibrate_cpu_khz(void);
6cb9a835 13
cc038491 14extern int no_timer_check;
1da177e4 15
698eff63
PZ
16extern bool using_native_sched_clock(void);
17
20d1c86a
PZ
18/*
19 * We use the full linear equation: f(x) = a + b*x, in order to allow
20 * a continuous function in the face of dynamic freq changes.
21 *
22 * Continuity means that when our frequency changes our slope (b); we want to
23 * ensure that: f(t) == f'(t), which gives: a + b*t == a' + b'*t.
24 *
25 * Without an offset (a) the above would not be possible.
26 *
27 * See the comment near cycles_2_ns() for details on how we compute (b).
28 */
29struct cyc2ns_data {
30 u32 cyc2ns_mul;
31 u32 cyc2ns_shift;
32 u64 cyc2ns_offset;
59eaef78 33}; /* 16 bytes */
20d1c86a 34
59eaef78
PZ
35extern void cyc2ns_read_begin(struct cyc2ns_data *);
36extern void cyc2ns_read_end(void);
688340ea 37
1965aae3 38#endif /* _ASM_X86_TIMER_H */