vdso.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2015 Imagination Technologies
  4. * Author: Alex Smith <[email protected]>
  5. */
  6. #ifndef __ASM_VDSO_H
  7. #define __ASM_VDSO_H
  8. #include <linux/mm_types.h>
  9. #include <vdso/datapage.h>
  10. #include <asm/barrier.h>
  11. /**
  12. * struct mips_vdso_image - Details of a VDSO image.
  13. * @data: Pointer to VDSO image data (page-aligned).
  14. * @size: Size of the VDSO image data (page-aligned).
  15. * @off_sigreturn: Offset of the sigreturn() trampoline.
  16. * @off_rt_sigreturn: Offset of the rt_sigreturn() trampoline.
  17. * @mapping: Special mapping structure.
  18. *
  19. * This structure contains details of a VDSO image, including the image data
  20. * and offsets of certain symbols required by the kernel. It is generated as
  21. * part of the VDSO build process, aside from the mapping page array, which is
  22. * populated at runtime.
  23. */
  24. struct mips_vdso_image {
  25. void *data;
  26. unsigned long size;
  27. unsigned long off_sigreturn;
  28. unsigned long off_rt_sigreturn;
  29. struct vm_special_mapping mapping;
  30. };
  31. /*
  32. * The following structures are auto-generated as part of the build for each
  33. * ABI by genvdso, see arch/mips/vdso/Makefile.
  34. */
  35. extern struct mips_vdso_image vdso_image;
  36. #ifdef CONFIG_MIPS32_O32
  37. extern struct mips_vdso_image vdso_image_o32;
  38. #endif
  39. #ifdef CONFIG_MIPS32_N32
  40. extern struct mips_vdso_image vdso_image_n32;
  41. #endif
  42. union mips_vdso_data {
  43. struct vdso_data data[CS_BASES];
  44. u8 page[PAGE_SIZE];
  45. };
  46. #endif /* __ASM_VDSO_H */