ia32.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #ifndef _ASM_X86_IA32_H
  2. #define _ASM_X86_IA32_H
  3. #ifdef CONFIG_IA32_EMULATION
  4. #include <linux/compat.h>
  5. /*
  6. * 32 bit structures for IA32 support.
  7. */
  8. #include <asm/sigcontext32.h>
  9. /* signal.h */
  10. struct sigaction32 {
  11. unsigned int sa_handler; /* Really a pointer, but need to deal
  12. with 32 bits */
  13. unsigned int sa_flags;
  14. unsigned int sa_restorer; /* Another 32 bit pointer */
  15. compat_sigset_t sa_mask; /* A 32 bit mask */
  16. };
  17. struct old_sigaction32 {
  18. unsigned int sa_handler; /* Really a pointer, but need to deal
  19. with 32 bits */
  20. compat_old_sigset_t sa_mask; /* A 32 bit mask */
  21. unsigned int sa_flags;
  22. unsigned int sa_restorer; /* Another 32 bit pointer */
  23. };
  24. struct ucontext_ia32 {
  25. unsigned int uc_flags;
  26. unsigned int uc_link;
  27. compat_stack_t uc_stack;
  28. struct sigcontext_ia32 uc_mcontext;
  29. compat_sigset_t uc_sigmask; /* mask last for extensibility */
  30. };
  31. struct ucontext_x32 {
  32. unsigned int uc_flags;
  33. unsigned int uc_link;
  34. compat_stack_t uc_stack;
  35. unsigned int uc__pad0; /* needed for alignment */
  36. struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
  37. compat_sigset_t uc_sigmask; /* mask last for extensibility */
  38. };
  39. /* This matches struct stat64 in glibc2.2, hence the absolutely
  40. * insane amounts of padding around dev_t's.
  41. */
  42. struct stat64 {
  43. unsigned long long st_dev;
  44. unsigned char __pad0[4];
  45. #define STAT64_HAS_BROKEN_ST_INO 1
  46. unsigned int __st_ino;
  47. unsigned int st_mode;
  48. unsigned int st_nlink;
  49. unsigned int st_uid;
  50. unsigned int st_gid;
  51. unsigned long long st_rdev;
  52. unsigned char __pad3[4];
  53. long long st_size;
  54. unsigned int st_blksize;
  55. long long st_blocks;/* Number 512-byte blocks allocated */
  56. unsigned st_atime;
  57. unsigned st_atime_nsec;
  58. unsigned st_mtime;
  59. unsigned st_mtime_nsec;
  60. unsigned st_ctime;
  61. unsigned st_ctime_nsec;
  62. unsigned long long st_ino;
  63. } __attribute__((packed));
  64. #define IA32_STACK_TOP IA32_PAGE_OFFSET
  65. #ifdef __KERNEL__
  66. struct linux_binprm;
  67. extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
  68. unsigned long stack_top, int exec_stack);
  69. struct mm_struct;
  70. extern void ia32_pick_mmap_layout(struct mm_struct *mm);
  71. #endif
  72. #endif /* !CONFIG_IA32_SUPPORT */
  73. #endif /* _ASM_X86_IA32_H */