1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Adapted from arm64 version.
4  *
5  * Copyright (C) 2012 ARM Limited
6  */
7 #ifndef __ASM_VDSO_DATAPAGE_H
8 #define __ASM_VDSO_DATAPAGE_H
9 
10 #ifdef __KERNEL__
11 
12 #ifndef __ASSEMBLY__
13 
14 #include <asm/page.h>
15 
16 /* Try to be cache-friendly on systems that don't implement the
17  * generic timer: fit the unconditionally updated fields in the first
18  * 32 bytes.
19  */
20 struct vdso_data {
21 	u32 seq_count;		/* sequence count - odd during updates */
22 	u16 tk_is_cntvct;	/* fall back to syscall if false */
23 	u16 cs_shift;		/* clocksource shift */
24 	u32 xtime_coarse_sec;	/* coarse time */
25 	u32 xtime_coarse_nsec;
26 
27 	u32 wtm_clock_sec;	/* wall to monotonic offset */
28 	u32 wtm_clock_nsec;
29 	u32 xtime_clock_sec;	/* CLOCK_REALTIME - seconds */
30 	u32 cs_mult;		/* clocksource multiplier */
31 
32 	u64 cs_cycle_last;	/* last cycle value */
33 	u64 cs_mask;		/* clocksource mask */
34 
35 	u64 xtime_clock_snsec;	/* CLOCK_REALTIME sub-ns base */
36 	u32 tz_minuteswest;	/* timezone info for gettimeofday(2) */
37 	u32 tz_dsttime;
38 };
39 
40 union vdso_data_store {
41 	struct vdso_data data;
42 	u8 page[PAGE_SIZE];
43 };
44 
45 #endif /* !__ASSEMBLY__ */
46 
47 #endif /* __KERNEL__ */
48 
49 #endif /* __ASM_VDSO_DATAPAGE_H */
50