ia32.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. typedef struct sigaltstack_ia32 {
  25. unsigned int ss_sp;
  26. int ss_flags;
  27. unsigned int ss_size;
  28. } stack_ia32_t;
  29. struct ucontext_ia32 {
  30. unsigned int uc_flags;
  31. unsigned int uc_link;
  32. stack_ia32_t uc_stack;
  33. struct sigcontext_ia32 uc_mcontext;
  34. compat_sigset_t uc_sigmask; /* mask last for extensibility */
  35. };
  36. struct ucontext_x32 {
  37. unsigned int uc_flags;
  38. unsigned int uc_link;
  39. stack_ia32_t uc_stack;
  40. unsigned int uc__pad0; /* needed for alignment */
  41. struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
  42. compat_sigset_t uc_sigmask; /* mask last for extensibility */
  43. };
  44. /* This matches struct stat64 in glibc2.2, hence the absolutely
  45. * insane amounts of padding around dev_t's.
  46. */
  47. struct stat64 {
  48. unsigned long long st_dev;
  49. unsigned char __pad0[4];
  50. #define STAT64_HAS_BROKEN_ST_INO 1
  51. unsigned int __st_ino;
  52. unsigned int st_mode;
  53. unsigned int st_nlink;
  54. unsigned int st_uid;
  55. unsigned int st_gid;
  56. unsigned long long st_rdev;
  57. unsigned char __pad3[4];
  58. long long st_size;
  59. unsigned int st_blksize;
  60. long long st_blocks;/* Number 512-byte blocks allocated */
  61. unsigned st_atime;
  62. unsigned st_atime_nsec;
  63. unsigned st_mtime;
  64. unsigned st_mtime_nsec;
  65. unsigned st_ctime;
  66. unsigned st_ctime_nsec;
  67. unsigned long long st_ino;
  68. } __attribute__((packed));
  69. #define IA32_STACK_TOP IA32_PAGE_OFFSET
  70. #ifdef __KERNEL__
  71. struct linux_binprm;
  72. extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
  73. unsigned long stack_top, int exec_stack);
  74. struct mm_struct;
  75. extern void ia32_pick_mmap_layout(struct mm_struct *mm);
  76. #endif
  77. #endif /* !CONFIG_IA32_SUPPORT */
  78. #endif /* _ASM_X86_IA32_H */