xref: /linux/arch/arm/include/asm/vdso/vsyscall.h (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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 <vdso/datapage.h>
8 #include <asm/cacheflush.h>
9 
10 extern struct vdso_data *vdso_data;
11 extern bool cntvct_ok;
12 
13 static __always_inline
14 struct vdso_data *__arm_get_k_vdso_data(void)
15 {
16 	return vdso_data;
17 }
18 #define __arch_get_k_vdso_data __arm_get_k_vdso_data
19 
20 static __always_inline
21 void __arm_sync_vdso_data(struct vdso_data *vdata)
22 {
23 	flush_dcache_page(virt_to_page(vdata));
24 }
25 #define __arch_sync_vdso_data __arm_sync_vdso_data
26 
27 /* The asm-generic header needs to be included after the definitions above */
28 #include <asm-generic/vdso/vsyscall.h>
29 
30 #endif /* !__ASSEMBLY__ */
31 
32 #endif /* __ASM_VDSO_VSYSCALL_H */
33