Files

38 lines
1.0 KiB
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2008-10-22 22:26:29 -07:00
#ifndef _ASM_X86_TIMER_H
#define _ASM_X86_TIMER_H
2005-09-03 15:57:07 -07:00
#include <linux/pm.h>
#include <linux/percpu.h>
2009-02-23 00:34:39 +01:00
#include <linux/interrupt.h>
#include <linux/math64.h>
2005-04-16 15:20:36 -07:00
2007-03-05 00:30:35 -08:00
unsigned long long native_sched_clock(void);
2017-07-14 11:34:07 +08:00
extern void recalibrate_cpu_khz(void);
extern int no_timer_check;
2005-04-16 15:20:36 -07:00
2017-03-17 12:48:18 +01:00
extern bool using_native_sched_clock(void);
void paravirt_set_sched_clock(u64 (*func)(void));
2017-03-17 12:48:18 +01:00
/*
* We use the full linear equation: f(x) = a + b*x, in order to allow
* a continuous function in the face of dynamic freq changes.
*
* Continuity means that when our frequency changes our slope (b); we want to
* ensure that: f(t) == f'(t), which gives: a + b*t == a' + b'*t.
*
* Without an offset (a) the above would not be possible.
*
* See the comment near cycles_2_ns() for details on how we compute (b).
*/
struct cyc2ns_data {
u32 cyc2ns_mul;
u32 cyc2ns_shift;
u64 cyc2ns_offset;
}; /* 16 bytes */
extern void cyc2ns_read_begin(struct cyc2ns_data *);
extern void cyc2ns_read_end(void);
2007-07-17 18:37:04 -07:00
2008-10-22 22:26:29 -07:00
#endif /* _ASM_X86_TIMER_H */