1 #ifndef _ASM_X86_64_IA32_H
2 #define _ASM_X86_64_IA32_H
4 #include <linux/config.h>
6 #ifdef CONFIG_IA32_EMULATION
8 #include <linux/compat.h>
11 * 32 bit structures for IA32 support.
14 #include <asm/sigcontext32.h>
18 unsigned int sa_handler; /* Really a pointer, but need to deal
20 unsigned int sa_flags;
21 unsigned int sa_restorer; /* Another 32 bit pointer */
22 compat_sigset_t sa_mask; /* A 32 bit mask */
25 struct old_sigaction32 {
26 unsigned int sa_handler; /* Really a pointer, but need to deal
28 compat_old_sigset_t sa_mask; /* A 32 bit mask */
29 unsigned int sa_flags;
30 unsigned int sa_restorer; /* Another 32 bit pointer */
33 typedef struct sigaltstack_ia32 {
39 struct ucontext_ia32 {
40 unsigned int uc_flags;
42 stack_ia32_t uc_stack;
43 struct sigcontext_ia32 uc_mcontext;
44 compat_sigset_t uc_sigmask; /* mask last for extensibility */
47 /* This matches struct stat64 in glibc2.2, hence the absolutely
48 * insane amounts of padding around dev_t's.
51 unsigned long long st_dev;
52 unsigned char __pad0[4];
54 #define STAT64_HAS_BROKEN_ST_INO 1
55 unsigned int __st_ino;
58 unsigned int st_nlink;
63 unsigned long long st_rdev;
64 unsigned char __pad3[4];
67 unsigned int st_blksize;
69 long long st_blocks;/* Number 512-byte blocks allocated. */
72 unsigned st_atime_nsec;
74 unsigned st_mtime_nsec;
76 unsigned st_ctime_nsec;
78 unsigned long long st_ino;
79 } __attribute__((packed));
81 typedef struct compat_siginfo{
87 int _pad[((128/sizeof(int)) - 3)];
91 unsigned int _pid; /* sender's pid */
92 unsigned int _uid; /* sender's uid */
97 compat_timer_t _tid; /* timer id */
98 int _overrun; /* overrun count */
99 compat_sigval_t _sigval; /* same as below */
100 int _sys_private; /* not to be passed to user */
101 int _overrun_incr; /* amount to add to overrun */
104 /* POSIX.1b signals */
106 unsigned int _pid; /* sender's pid */
107 unsigned int _uid; /* sender's uid */
108 compat_sigval_t _sigval;
113 unsigned int _pid; /* which child */
114 unsigned int _uid; /* sender's uid */
115 int _status; /* exit code */
116 compat_clock_t _utime;
117 compat_clock_t _stime;
120 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
122 unsigned int _addr; /* faulting insn/memory ref. */
127 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
137 struct sigcontext_ia32 sc;
138 struct _fpstate_ia32 fpstate;
139 unsigned int extramask[_COMPAT_NSIG_WORDS-1];
148 compat_siginfo_t info;
149 struct ucontext_ia32 uc;
150 struct _fpstate_ia32 fpstate;
155 compat_ino_t f_tinode;
160 #define IA32_STACK_TOP IA32_PAGE_OFFSET
165 int do_get_thread_area(struct thread_struct *t, struct user_desc __user *info);
166 int do_set_thread_area(struct thread_struct *t, struct user_desc __user *info);
167 int ia32_child_tls(struct task_struct *p, struct pt_regs *childregs);
170 extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
171 unsigned long stack_top, int exec_stack);
175 #endif /* !CONFIG_IA32_SUPPORT */