xref: /openbmc/linux/arch/x86/include/asm/vgtod.h (revision 1965aae3)
11965aae3SH. Peter Anvin #ifndef _ASM_X86_VGTOD_H
21965aae3SH. Peter Anvin #define _ASM_X86_VGTOD_H
3bb898558SAl Viro 
4bb898558SAl Viro #include <asm/vsyscall.h>
5bb898558SAl Viro #include <linux/clocksource.h>
6bb898558SAl Viro 
7bb898558SAl Viro struct vsyscall_gtod_data {
8bb898558SAl Viro 	seqlock_t	lock;
9bb898558SAl Viro 
10bb898558SAl Viro 	/* open coded 'struct timespec' */
11bb898558SAl Viro 	time_t		wall_time_sec;
12bb898558SAl Viro 	u32		wall_time_nsec;
13bb898558SAl Viro 
14bb898558SAl Viro 	int		sysctl_enabled;
15bb898558SAl Viro 	struct timezone sys_tz;
16bb898558SAl Viro 	struct { /* extract of a clocksource struct */
17bb898558SAl Viro 		cycle_t (*vread)(void);
18bb898558SAl Viro 		cycle_t	cycle_last;
19bb898558SAl Viro 		cycle_t	mask;
20bb898558SAl Viro 		u32	mult;
21bb898558SAl Viro 		u32	shift;
22bb898558SAl Viro 	} clock;
23bb898558SAl Viro 	struct timespec wall_to_monotonic;
24bb898558SAl Viro };
25bb898558SAl Viro extern struct vsyscall_gtod_data __vsyscall_gtod_data
26bb898558SAl Viro __section_vsyscall_gtod_data;
27bb898558SAl Viro extern struct vsyscall_gtod_data vsyscall_gtod_data;
28bb898558SAl Viro 
291965aae3SH. Peter Anvin #endif /* _ASM_X86_VGTOD_H */
30