vdso.h 784 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_CSKY_VDSO_H
  3. #define __ASM_CSKY_VDSO_H
  4. #include <linux/types.h>
  5. #ifndef GENERIC_TIME_VSYSCALL
  6. struct vdso_data {
  7. };
  8. #endif
  9. /*
  10. * The VDSO symbols are mapped into Linux so we can just use regular symbol
  11. * addressing to get their offsets in userspace. The symbols are mapped at an
  12. * offset of 0, but since the linker must support setting weak undefined
  13. * symbols to the absolute address 0 it also happens to support other low
  14. * addresses even when the code model suggests those low addresses would not
  15. * otherwise be available.
  16. */
  17. #define VDSO_SYMBOL(base, name) \
  18. ({ \
  19. extern const char __vdso_##name[]; \
  20. (void __user *)((unsigned long)(base) + __vdso_##name); \
  21. })
  22. #endif /* __ASM_CSKY_VDSO_H */