ia32.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 <uapi/asm/sigcontext.h>
  9. /* signal.h */
  10. struct ucontext_ia32 {
  11. unsigned int uc_flags;
  12. unsigned int uc_link;
  13. compat_stack_t uc_stack;
  14. struct sigcontext_32 uc_mcontext;
  15. compat_sigset_t uc_sigmask; /* mask last for extensibility */
  16. };
  17. /* This matches struct stat64 in glibc2.2, hence the absolutely
  18. * insane amounts of padding around dev_t's.
  19. */
  20. struct stat64 {
  21. unsigned long long st_dev;
  22. unsigned char __pad0[4];
  23. #define STAT64_HAS_BROKEN_ST_INO 1
  24. unsigned int __st_ino;
  25. unsigned int st_mode;
  26. unsigned int st_nlink;
  27. unsigned int st_uid;
  28. unsigned int st_gid;
  29. unsigned long long st_rdev;
  30. unsigned char __pad3[4];
  31. long long st_size;
  32. unsigned int st_blksize;
  33. long long st_blocks;/* Number 512-byte blocks allocated */
  34. unsigned st_atime;
  35. unsigned st_atime_nsec;
  36. unsigned st_mtime;
  37. unsigned st_mtime_nsec;
  38. unsigned st_ctime;
  39. unsigned st_ctime_nsec;
  40. unsigned long long st_ino;
  41. } __attribute__((packed));
  42. #define IA32_STACK_TOP IA32_PAGE_OFFSET
  43. #ifdef __KERNEL__
  44. struct linux_binprm;
  45. extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
  46. unsigned long stack_top, int exec_stack);
  47. struct mm_struct;
  48. extern void ia32_pick_mmap_layout(struct mm_struct *mm);
  49. #endif
  50. #endif /* !CONFIG_IA32_SUPPORT */
  51. #endif /* _ASM_X86_IA32_H */