xref: /OK3568_Linux_fs/kernel/arch/riscv/include/asm/vdso/vsyscall.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef __ASM_VDSO_VSYSCALL_H
3*4882a593Smuzhiyun #define __ASM_VDSO_VSYSCALL_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #ifndef __ASSEMBLY__
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #include <linux/timekeeper_internal.h>
8*4882a593Smuzhiyun #include <vdso/datapage.h>
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun extern struct vdso_data *vdso_data;
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun /*
13*4882a593Smuzhiyun  * Update the vDSO data page to keep in sync with kernel timekeeping.
14*4882a593Smuzhiyun  */
__riscv_get_k_vdso_data(void)15*4882a593Smuzhiyun static __always_inline struct vdso_data *__riscv_get_k_vdso_data(void)
16*4882a593Smuzhiyun {
17*4882a593Smuzhiyun 	return vdso_data;
18*4882a593Smuzhiyun }
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #define __arch_get_k_vdso_data __riscv_get_k_vdso_data
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun /* The asm-generic header needs to be included after the definitions above */
23*4882a593Smuzhiyun #include <asm-generic/vdso/vsyscall.h>
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #endif /* !__ASSEMBLY__ */
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun #endif /* __ASM_VDSO_VSYSCALL_H */
28