1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __ASM_VDSO_VSYSCALL_H 3 #define __ASM_VDSO_VSYSCALL_H 4 5 #define __VDSO_RND_DATA_OFFSET 640 6 #define __VVAR_PAGES 4 7 8 #define VDSO_NR_VCLOCK_PAGES 2 9 #define VDSO_PAGE_PVCLOCK_OFFSET 0 10 #define VDSO_PAGE_HVCLOCK_OFFSET 1 11 12 #ifndef __ASSEMBLY__ 13 14 #include <vdso/datapage.h> 15 #include <asm/vgtod.h> 16 17 extern struct vdso_data *vdso_data; 18 19 /* 20 * Update the vDSO data page to keep in sync with kernel timekeeping. 21 */ 22 static __always_inline 23 struct vdso_data *__x86_get_k_vdso_data(void) 24 { 25 return vdso_data; 26 } 27 #define __arch_get_k_vdso_data __x86_get_k_vdso_data 28 29 static __always_inline 30 struct vdso_rng_data *__x86_get_k_vdso_rng_data(void) 31 { 32 return (void *)vdso_data + __VDSO_RND_DATA_OFFSET; 33 } 34 #define __arch_get_k_vdso_rng_data __x86_get_k_vdso_rng_data 35 36 /* The asm-generic header needs to be included after the definitions above */ 37 #include <asm-generic/vdso/vsyscall.h> 38 39 #endif /* !__ASSEMBLY__ */ 40 41 #endif /* __ASM_VDSO_VSYSCALL_H */ 42