vdso.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Author: Huacai Chen <[email protected]>
  4. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  5. */
  6. #ifndef __ASM_VDSO_H
  7. #define __ASM_VDSO_H
  8. #include <linux/mm.h>
  9. #include <linux/mm_types.h>
  10. #include <vdso/datapage.h>
  11. #include <asm/barrier.h>
  12. /*
  13. * struct loongarch_vdso_info - Details of a VDSO image.
  14. * @vdso: Pointer to VDSO image (page-aligned).
  15. * @size: Size of the VDSO image (page-aligned).
  16. * @off_rt_sigreturn: Offset of the rt_sigreturn() trampoline.
  17. * @code_mapping: Special mapping structure for vdso code.
  18. * @code_mapping: Special mapping structure for vdso data.
  19. *
  20. * This structure contains details of a VDSO image, including the image data
  21. * and offsets of certain symbols required by the kernel. It is generated as
  22. * part of the VDSO build process, aside from the mapping page array, which is
  23. * populated at runtime.
  24. */
  25. struct loongarch_vdso_info {
  26. void *vdso;
  27. unsigned long size;
  28. unsigned long offset_sigreturn;
  29. struct vm_special_mapping code_mapping;
  30. struct vm_special_mapping data_mapping;
  31. };
  32. extern struct loongarch_vdso_info vdso_info;
  33. #endif /* __ASM_VDSO_H */