[MIPS] Add topology_init.
[linux-2.6/kmemtrace.git] / include / asm-x86_64 / ia32.h
blobe6b7f2234e439ccdac3400be1e49d2cd624f1d61
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>
16 /* signal.h */
17 struct sigaction32 {
18 unsigned int sa_handler; /* Really a pointer, but need to deal
19 with 32 bits */
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
27 with 32 bits */
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 {
34 unsigned int ss_sp;
35 int ss_flags;
36 unsigned int ss_size;
37 } stack_ia32_t;
39 struct ucontext_ia32 {
40 unsigned int uc_flags;
41 unsigned int uc_link;
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.
50 struct stat64 {
51 unsigned long long st_dev;
52 unsigned char __pad0[4];
54 #define STAT64_HAS_BROKEN_ST_INO 1
55 unsigned int __st_ino;
57 unsigned int st_mode;
58 unsigned int st_nlink;
60 unsigned int st_uid;
61 unsigned int st_gid;
63 unsigned long long st_rdev;
64 unsigned char __pad3[4];
66 long long st_size;
67 unsigned int st_blksize;
69 long long st_blocks;/* Number 512-byte blocks allocated. */
71 unsigned st_atime;
72 unsigned st_atime_nsec;
73 unsigned st_mtime;
74 unsigned st_mtime_nsec;
75 unsigned st_ctime;
76 unsigned st_ctime_nsec;
78 unsigned long long st_ino;
79 } __attribute__((packed));
81 typedef struct compat_siginfo{
82 int si_signo;
83 int si_errno;
84 int si_code;
86 union {
87 int _pad[((128/sizeof(int)) - 3)];
89 /* kill() */
90 struct {
91 unsigned int _pid; /* sender's pid */
92 unsigned int _uid; /* sender's uid */
93 } _kill;
95 /* POSIX.1b timers */
96 struct {
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 */
102 } _timer;
104 /* POSIX.1b signals */
105 struct {
106 unsigned int _pid; /* sender's pid */
107 unsigned int _uid; /* sender's uid */
108 compat_sigval_t _sigval;
109 } _rt;
111 /* SIGCHLD */
112 struct {
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;
118 } _sigchld;
120 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
121 struct {
122 unsigned int _addr; /* faulting insn/memory ref. */
123 } _sigfault;
125 /* SIGPOLL */
126 struct {
127 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
128 int _fd;
129 } _sigpoll;
130 } _sifields;
131 } compat_siginfo_t;
133 struct sigframe32
135 u32 pretcode;
136 int sig;
137 struct sigcontext_ia32 sc;
138 struct _fpstate_ia32 fpstate;
139 unsigned int extramask[_COMPAT_NSIG_WORDS-1];
142 struct rt_sigframe32
144 u32 pretcode;
145 int sig;
146 u32 pinfo;
147 u32 puc;
148 compat_siginfo_t info;
149 struct ucontext_ia32 uc;
150 struct _fpstate_ia32 fpstate;
153 struct ustat32 {
154 __u32 f_tfree;
155 compat_ino_t f_tinode;
156 char f_fname[6];
157 char f_fpack[6];
160 #define IA32_STACK_TOP IA32_PAGE_OFFSET
162 #ifdef __KERNEL__
163 struct user_desc;
164 struct siginfo_t;
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);
169 struct linux_binprm;
170 extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
171 unsigned long stack_top, int exec_stack);
172 struct mm_struct;
173 extern void ia32_pick_mmap_layout(struct mm_struct *mm);
175 #endif
177 #endif /* !CONFIG_IA32_SUPPORT */
179 #endif