1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __ASM_GENERIC_VSYSCALL_H 3 #define __ASM_GENERIC_VSYSCALL_H 4 5 #ifndef __ASSEMBLY__ 6 7 #ifdef CONFIG_GENERIC_VDSO_DATA_STORE 8 9 #ifndef __arch_get_vdso_u_time_data 10 static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void) 11 { 12 return vdso_u_time_data; 13 } 14 #endif 15 16 #ifndef __arch_get_vdso_u_rng_data 17 static __always_inline const struct vdso_rng_data *__arch_get_vdso_u_rng_data(void) 18 { 19 return &vdso_u_rng_data; 20 } 21 #endif 22 23 #else /* !CONFIG_GENERIC_VDSO_DATA_STORE */ 24 25 #ifndef __arch_get_k_vdso_data 26 static __always_inline struct vdso_data *__arch_get_k_vdso_data(void) 27 { 28 return NULL; 29 } 30 #endif /* __arch_get_k_vdso_data */ 31 #define vdso_k_time_data __arch_get_k_vdso_data() 32 33 #define __arch_get_vdso_u_time_data __arch_get_vdso_data 34 35 #ifndef __arch_get_vdso_u_rng_data 36 #define __arch_get_vdso_u_rng_data() __arch_get_vdso_rng_data() 37 #endif 38 #define vdso_k_rng_data __arch_get_k_vdso_rng_data() 39 40 #endif /* CONFIG_GENERIC_VDSO_DATA_STORE */ 41 42 #ifndef __arch_update_vsyscall 43 static __always_inline void __arch_update_vsyscall(struct vdso_data *vdata) 44 { 45 } 46 #endif /* __arch_update_vsyscall */ 47 48 #ifndef __arch_sync_vdso_data 49 static __always_inline void __arch_sync_vdso_data(struct vdso_data *vdata) 50 { 51 } 52 #endif /* __arch_sync_vdso_data */ 53 54 #endif /* !__ASSEMBLY__ */ 55 56 #endif /* __ASM_GENERIC_VSYSCALL_H */ 57