Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ASM_VDSO_VSYSCALL_H
0003 #define __ASM_VDSO_VSYSCALL_H
0004 
0005 #ifndef __ASSEMBLY__
0006 
0007 #include <linux/timekeeper_internal.h>
0008 #include <vdso/datapage.h>
0009 
0010 #define VDSO_PRECISION_MASK ~(0xFF00ULL<<48)
0011 
0012 extern struct vdso_data *vdso_data;
0013 
0014 /*
0015  * Update the vDSO data page to keep in sync with kernel timekeeping.
0016  */
0017 static __always_inline
0018 struct vdso_data *__arm64_get_k_vdso_data(void)
0019 {
0020     return vdso_data;
0021 }
0022 #define __arch_get_k_vdso_data __arm64_get_k_vdso_data
0023 
0024 static __always_inline
0025 void __arm64_update_vsyscall(struct vdso_data *vdata, struct timekeeper *tk)
0026 {
0027     vdata[CS_HRES_COARSE].mask  = VDSO_PRECISION_MASK;
0028     vdata[CS_RAW].mask      = VDSO_PRECISION_MASK;
0029 }
0030 #define __arch_update_vsyscall __arm64_update_vsyscall
0031 
0032 /* The asm-generic header needs to be included after the definitions above */
0033 #include <asm-generic/vdso/vsyscall.h>
0034 
0035 #endif /* !__ASSEMBLY__ */
0036 
0037 #endif /* __ASM_VDSO_VSYSCALL_H */