vsyscall.h 852 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_VDSO_VSYSCALL_H
  3. #define __ASM_VDSO_VSYSCALL_H
  4. #ifndef __ASSEMBLY__
  5. #include <linux/timekeeper_internal.h>
  6. #include <vdso/datapage.h>
  7. #include <asm/cacheflush.h>
  8. extern struct vdso_data *vdso_data;
  9. extern bool cntvct_ok;
  10. /*
  11. * Update the vDSO data page to keep in sync with kernel timekeeping.
  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. static __always_inline
  20. void __arm_sync_vdso_data(struct vdso_data *vdata)
  21. {
  22. flush_dcache_page(virt_to_page(vdata));
  23. }
  24. #define __arch_sync_vdso_data __arm_sync_vdso_data
  25. /* The asm-generic header needs to be included after the definitions above */
  26. #include <asm-generic/vdso/vsyscall.h>
  27. #endif /* !__ASSEMBLY__ */
  28. #endif /* __ASM_VDSO_VSYSCALL_H */