1 #ifndef _ASM_X86_IA32_H
2 #define _ASM_X86_IA32_H
5 #ifdef CONFIG_IA32_EMULATION
7 #include <linux/compat.h>
10 * 32 bit structures for IA32 support.
13 #include <asm/sigcontext32.h>
17 unsigned int sa_handler; /* Really a pointer, but need to deal
19 unsigned int sa_flags;
20 unsigned int sa_restorer; /* Another 32 bit pointer */
21 compat_sigset_t sa_mask; /* A 32 bit mask */
24 struct old_sigaction32 {
25 unsigned int sa_handler; /* Really a pointer, but need to deal
27 compat_old_sigset_t sa_mask; /* A 32 bit mask */
28 unsigned int sa_flags;
29 unsigned int sa_restorer; /* Another 32 bit pointer */
32 typedef struct sigaltstack_ia32 {
38 struct ucontext_ia32 {
39 unsigned int uc_flags;
41 stack_ia32_t uc_stack;
42 struct sigcontext_ia32 uc_mcontext;
43 compat_sigset_t uc_sigmask; /* mask last for extensibility */
47 unsigned int uc_flags;
49 stack_ia32_t uc_stack;
50 unsigned int uc__pad0; /* needed for alignment */
51 struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
52 compat_sigset_t uc_sigmask; /* mask last for extensibility */
55 /* This matches struct stat64 in glibc2.2, hence the absolutely
56 * insane amounts of padding around dev_t's.
59 unsigned long long st_dev;
60 unsigned char __pad0[4];
62 #define STAT64_HAS_BROKEN_ST_INO 1
63 unsigned int __st_ino;
66 unsigned int st_nlink;
71 unsigned long long st_rdev;
72 unsigned char __pad3[4];
75 unsigned int st_blksize;
77 long long st_blocks;/* Number 512-byte blocks allocated */
80 unsigned st_atime_nsec;
82 unsigned st_mtime_nsec;
84 unsigned st_ctime_nsec;
86 unsigned long long st_ino;
87 } __attribute__((packed));
89 typedef struct compat_siginfo {
95 int _pad[((128 / sizeof(int)) - 3)];
99 unsigned int _pid; /* sender's pid */
100 unsigned int _uid; /* sender's uid */
103 /* POSIX.1b timers */
105 compat_timer_t _tid; /* timer id */
106 int _overrun; /* overrun count */
107 compat_sigval_t _sigval; /* same as below */
108 int _sys_private; /* not to be passed to user */
109 int _overrun_incr; /* amount to add to overrun */
112 /* POSIX.1b signals */
114 unsigned int _pid; /* sender's pid */
115 unsigned int _uid; /* sender's uid */
116 compat_sigval_t _sigval;
121 unsigned int _pid; /* which child */
122 unsigned int _uid; /* sender's uid */
123 int _status; /* exit code */
124 compat_clock_t _utime;
125 compat_clock_t _stime;
128 /* SIGCHLD (x32 version) */
130 unsigned int _pid; /* which child */
131 unsigned int _uid; /* sender's uid */
132 int _status; /* exit code */
137 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
139 unsigned int _addr; /* faulting insn/memory ref. */
144 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
150 #define IA32_STACK_TOP IA32_PAGE_OFFSET
154 extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
155 unsigned long stack_top, int exec_stack);
157 extern void ia32_pick_mmap_layout(struct mm_struct *mm);
161 #endif /* !CONFIG_IA32_SUPPORT */
163 #endif /* _ASM_X86_IA32_H */