H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_IA32_H |
| 2 | #define _ASM_X86_IA32_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
| 5 | #ifdef CONFIG_IA32_EMULATION |
| 6 | |
| 7 | #include <linux/compat.h> |
| 8 | |
| 9 | /* |
| 10 | * 32 bit structures for IA32 support. |
| 11 | */ |
| 12 | |
Ingo Molnar | decb4c4 | 2015-09-05 09:32:43 +0200 | [diff] [blame] | 13 | #include <uapi/asm/sigcontext.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
| 15 | /* signal.h */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | struct ucontext_ia32 { |
| 18 | unsigned int uc_flags; |
| 19 | unsigned int uc_link; |
Al Viro | 9026843 | 2012-12-14 14:47:53 -0500 | [diff] [blame] | 20 | compat_stack_t uc_stack; |
Ingo Molnar | 8fcb346 | 2015-09-05 09:32:41 +0200 | [diff] [blame] | 21 | struct sigcontext_32 uc_mcontext; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
| 23 | }; |
| 24 | |
| 25 | /* This matches struct stat64 in glibc2.2, hence the absolutely |
| 26 | * insane amounts of padding around dev_t's. |
| 27 | */ |
| 28 | struct stat64 { |
| 29 | unsigned long long st_dev; |
| 30 | unsigned char __pad0[4]; |
| 31 | |
| 32 | #define STAT64_HAS_BROKEN_ST_INO 1 |
| 33 | unsigned int __st_ino; |
| 34 | |
| 35 | unsigned int st_mode; |
| 36 | unsigned int st_nlink; |
| 37 | |
| 38 | unsigned int st_uid; |
| 39 | unsigned int st_gid; |
| 40 | |
| 41 | unsigned long long st_rdev; |
| 42 | unsigned char __pad3[4]; |
| 43 | |
| 44 | long long st_size; |
| 45 | unsigned int st_blksize; |
| 46 | |
Joe Perches | 9bd7342 | 2008-03-23 01:02:20 -0700 | [diff] [blame] | 47 | long long st_blocks;/* Number 512-byte blocks allocated */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | |
| 49 | unsigned st_atime; |
| 50 | unsigned st_atime_nsec; |
| 51 | unsigned st_mtime; |
| 52 | unsigned st_mtime_nsec; |
| 53 | unsigned st_ctime; |
| 54 | unsigned st_ctime_nsec; |
| 55 | |
| 56 | unsigned long long st_ino; |
| 57 | } __attribute__((packed)); |
| 58 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | #define IA32_STACK_TOP IA32_PAGE_OFFSET |
| 60 | |
| 61 | #ifdef __KERNEL__ |
Andi Kleen | ea0be47 | 2005-11-05 17:25:54 +0100 | [diff] [blame] | 62 | struct linux_binprm; |
| 63 | extern int ia32_setup_arg_pages(struct linux_binprm *bprm, |
| 64 | unsigned long stack_top, int exec_stack); |
Andi Kleen | 8817210 | 2006-01-17 07:03:38 +0100 | [diff] [blame] | 65 | struct mm_struct; |
| 66 | extern void ia32_pick_mmap_layout(struct mm_struct *mm); |
Andi Kleen | ea0be47 | 2005-11-05 17:25:54 +0100 | [diff] [blame] | 67 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | #endif |
| 69 | |
| 70 | #endif /* !CONFIG_IA32_SUPPORT */ |
Joe Perches | 9bd7342 | 2008-03-23 01:02:20 -0700 | [diff] [blame] | 71 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 72 | #endif /* _ASM_X86_IA32_H */ |