Harvey Harrison | 123a634 | 2008-02-08 12:10:00 -0800 | [diff] [blame] | 1 | #ifdef CONFIG_X86_32 |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 2 | #define sigframe_ia32 sigframe |
| 3 | #define rt_sigframe_ia32 rt_sigframe |
| 4 | #define sigcontext_ia32 sigcontext |
| 5 | #define _fpstate_ia32 _fpstate |
| 6 | #define ucontext_ia32 ucontext |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 7 | #else /* !CONFIG_X86_32 */ |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 8 | |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 9 | #ifdef CONFIG_IA32_EMULATION |
| 10 | #include <asm/ia32.h> |
| 11 | #endif /* CONFIG_IA32_EMULATION */ |
| 12 | |
| 13 | #endif /* CONFIG_X86_32 */ |
| 14 | |
| 15 | #if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 16 | struct sigframe_ia32 { |
| 17 | u32 pretcode; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | int sig; |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 19 | struct sigcontext_ia32 sc; |
Suresh Siddha | 3c1c7f1 | 2008-07-29 10:29:21 -0700 | [diff] [blame] | 20 | /* |
| 21 | * fpstate is unused. fpstate is moved/allocated after |
| 22 | * retcode[] below. This movement allows to have the FP state and the |
| 23 | * future state extensions (xsave) stay together. |
| 24 | * And at the same time retaining the unused fpstate, prevents changing |
| 25 | * the offset of extramask[] in the sigframe and thus prevent any |
| 26 | * legacy application accessing/modifying it. |
| 27 | */ |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 28 | struct _fpstate_ia32 fpstate_unused; |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 29 | #ifdef CONFIG_IA32_EMULATION |
| 30 | unsigned int extramask[_COMPAT_NSIG_WORDS-1]; |
| 31 | #else /* !CONFIG_IA32_EMULATION */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | unsigned long extramask[_NSIG_WORDS-1]; |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 33 | #endif /* CONFIG_IA32_EMULATION */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | char retcode[8]; |
Suresh Siddha | 3c1c7f1 | 2008-07-29 10:29:21 -0700 | [diff] [blame] | 35 | /* fp state follows here */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | }; |
| 37 | |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 38 | struct rt_sigframe_ia32 { |
| 39 | u32 pretcode; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | int sig; |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 41 | u32 pinfo; |
| 42 | u32 puc; |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 43 | #ifdef CONFIG_IA32_EMULATION |
| 44 | compat_siginfo_t info; |
| 45 | #else /* !CONFIG_IA32_EMULATION */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | struct siginfo info; |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 47 | #endif /* CONFIG_IA32_EMULATION */ |
Hiroshi Shimamoto | a5c56eb | 2008-12-17 18:49:55 -0800 | [diff] [blame] | 48 | struct ucontext_ia32 uc; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | char retcode[8]; |
Suresh Siddha | 3c1c7f1 | 2008-07-29 10:29:21 -0700 | [diff] [blame] | 50 | /* fp state follows here */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | }; |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 52 | #endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */ |
| 53 | |
| 54 | #ifdef CONFIG_X86_64 |
Harvey Harrison | 123a634 | 2008-02-08 12:10:00 -0800 | [diff] [blame] | 55 | struct rt_sigframe { |
| 56 | char __user *pretcode; |
| 57 | struct ucontext uc; |
| 58 | struct siginfo info; |
Suresh Siddha | 3c1c7f1 | 2008-07-29 10:29:21 -0700 | [diff] [blame] | 59 | /* fp state follows here */ |
Harvey Harrison | 123a634 | 2008-02-08 12:10:00 -0800 | [diff] [blame] | 60 | }; |
Hiroshi Shimamoto | c85c2ff | 2008-12-17 18:51:08 -0800 | [diff] [blame^] | 61 | #endif /* CONFIG_X86_64 */ |