blob: d0e8e0141041e95a127c3d1dbe188f6d040a5897 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_IA32_H
2#define _ASM_X86_IA32_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
5#ifdef CONFIG_IA32_EMULATION
6
7#include <linux/compat.h>
8
9/*
10 * 32 bit structures for IA32 support.
11 */
12
13#include <asm/sigcontext32.h>
14
15/* signal.h */
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Linus Torvalds1da177e2005-04-16 15:20:36 -070017struct ucontext_ia32 {
18 unsigned int uc_flags;
19 unsigned int uc_link;
Al Viro90268432012-12-14 14:47:53 -050020 compat_stack_t uc_stack;
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 struct sigcontext_ia32 uc_mcontext;
22 compat_sigset_t uc_sigmask; /* mask last for extensibility */
23};
24
H. J. Lu4048e2a2012-02-19 07:46:08 -080025struct ucontext_x32 {
26 unsigned int uc_flags;
27 unsigned int uc_link;
Al Viro90268432012-12-14 14:47:53 -050028 compat_stack_t uc_stack;
H. J. Lu4048e2a2012-02-19 07:46:08 -080029 unsigned int uc__pad0; /* needed for alignment */
30 struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
31 compat_sigset_t uc_sigmask; /* mask last for extensibility */
32};
33
Linus Torvalds1da177e2005-04-16 15:20:36 -070034/* This matches struct stat64 in glibc2.2, hence the absolutely
35 * insane amounts of padding around dev_t's.
36 */
37struct stat64 {
38 unsigned long long st_dev;
39 unsigned char __pad0[4];
40
41#define STAT64_HAS_BROKEN_ST_INO 1
42 unsigned int __st_ino;
43
44 unsigned int st_mode;
45 unsigned int st_nlink;
46
47 unsigned int st_uid;
48 unsigned int st_gid;
49
50 unsigned long long st_rdev;
51 unsigned char __pad3[4];
52
53 long long st_size;
54 unsigned int st_blksize;
55
Joe Perches9bd73422008-03-23 01:02:20 -070056 long long st_blocks;/* Number 512-byte blocks allocated */
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
58 unsigned st_atime;
59 unsigned st_atime_nsec;
60 unsigned st_mtime;
61 unsigned st_mtime_nsec;
62 unsigned st_ctime;
63 unsigned st_ctime_nsec;
64
65 unsigned long long st_ino;
66} __attribute__((packed));
67
Linus Torvalds1da177e2005-04-16 15:20:36 -070068#define IA32_STACK_TOP IA32_PAGE_OFFSET
69
70#ifdef __KERNEL__
Andi Kleenea0be472005-11-05 17:25:54 +010071struct linux_binprm;
72extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
73 unsigned long stack_top, int exec_stack);
Andi Kleen88172102006-01-17 07:03:38 +010074struct mm_struct;
75extern void ia32_pick_mmap_layout(struct mm_struct *mm);
Andi Kleenea0be472005-11-05 17:25:54 +010076
Linus Torvalds1da177e2005-04-16 15:20:36 -070077#endif
78
79#endif /* !CONFIG_IA32_SUPPORT */
Joe Perches9bd73422008-03-23 01:02:20 -070080
H. Peter Anvin1965aae2008-10-22 22:26:29 -070081#endif /* _ASM_X86_IA32_H */