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