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