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));
82 typedef union sigval32 {
84 unsigned int sival_ptr;
87 typedef struct siginfo32 {
93 int _pad[((128/sizeof(int)) - 3)];
97 unsigned int _pid; /* sender's pid */
98 unsigned int _uid; /* sender's uid */
101 /* POSIX.1b timers */
103 int _tid; /* timer id */
104 int _overrun; /* overrun count */
105 sigval_t32 _sigval; /* same as below */
106 int _sys_private; /* not to be passed to user */
107 int _overrun_incr; /* amount to add to overrun */
110 /* POSIX.1b signals */
112 unsigned int _pid; /* sender's pid */
113 unsigned int _uid; /* sender's uid */
119 unsigned int _pid; /* which child */
120 unsigned int _uid; /* sender's uid */
121 int _status; /* exit code */
122 compat_clock_t _utime;
123 compat_clock_t _stime;
126 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
128 unsigned int _addr; /* faulting insn/memory ref. */
133 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
143 struct sigcontext_ia32 sc;
144 struct _fpstate_ia32 fpstate;
145 unsigned int extramask[_COMPAT_NSIG_WORDS-1];
154 struct siginfo32 info;
155 struct ucontext_ia32 uc;
156 struct _fpstate_ia32 fpstate;
161 compat_ino_t f_tinode;
166 #define IA32_STACK_TOP IA32_PAGE_OFFSET
171 int do_get_thread_area(struct thread_struct *t, struct user_desc *u_info);
172 int do_set_thread_area(struct thread_struct *t, struct user_desc *u_info);
173 int ia32_child_tls(struct task_struct *p, struct pt_regs *childregs);
174 int ia32_copy_siginfo_from_user(siginfo_t *to, siginfo_t32 __user *from);
175 int ia32_copy_siginfo_to_user(siginfo_t32 __user *to, siginfo_t *from);
178 #endif /* !CONFIG_IA32_SUPPORT */