diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-09-05 03:32:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-08 04:03:55 -0400 |
commit | c3f4986fb0774bb13feb4bade1276bed2ba8a3db (patch) | |
tree | e3ddb1569795ec92efa15a3d2a0cc2545f7b159d /arch/x86/include | |
parent | b76cb6c869b966b4c991251136b45b3e1babc4e8 (diff) |
x86/headers: Clean up uapi/asm/sigcontext32.h
Clean up sigcontext32.h a bit:
- use consistent and readable vertical spacing
- fix, harmonize and extend comments
No field name has been changed, user-space might be relying on
them.
Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/1441438363-9999-3-git-send-email-mingo@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/uapi/asm/sigcontext32.h | 110 |
1 files changed, 58 insertions, 52 deletions
diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h index ff7826c41a1c..6ff4fbab650e 100644 --- a/arch/x86/include/uapi/asm/sigcontext32.h +++ b/arch/x86/include/uapi/asm/sigcontext32.h | |||
@@ -1,79 +1,85 @@ | |||
1 | #ifndef _ASM_X86_SIGCONTEXT32_H | 1 | #ifndef _ASM_X86_SIGCONTEXT32_H |
2 | #define _ASM_X86_SIGCONTEXT32_H | 2 | #define _ASM_X86_SIGCONTEXT32_H |
3 | 3 | ||
4 | /* Signal context definitions for compat 32-bit programs: */ | ||
5 | |||
4 | #include <linux/types.h> | 6 | #include <linux/types.h> |
5 | 7 | ||
6 | #include <asm/sigcontext.h> | 8 | #include <asm/sigcontext.h> |
7 | 9 | ||
8 | /* signal context for 32bit programs. */ | 10 | /* 10-byte legacy floating point register: */ |
9 | |||
10 | #define X86_FXSR_MAGIC 0x0000 | ||
11 | |||
12 | struct _fpreg { | 11 | struct _fpreg { |
13 | unsigned short significand[4]; | 12 | unsigned short significand[4]; |
14 | unsigned short exponent; | 13 | unsigned short exponent; |
15 | }; | 14 | }; |
16 | 15 | ||
16 | /* 16-byte floating point register: */ | ||
17 | struct _fpxreg { | 17 | struct _fpxreg { |
18 | unsigned short significand[4]; | 18 | unsigned short significand[4]; |
19 | unsigned short exponent; | 19 | unsigned short exponent; |
20 | unsigned short padding[3]; | 20 | unsigned short padding[3]; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | /* 16-byte XMM vector register: */ | ||
23 | struct _xmmreg { | 24 | struct _xmmreg { |
24 | __u32 element[4]; | 25 | __u32 element[4]; |
25 | }; | 26 | }; |
26 | 27 | ||
27 | /* FSAVE frame with extensions */ | 28 | #define X86_FXSR_MAGIC 0x0000 |
29 | |||
30 | /* FXSAVE frame: FSAVE frame with extensions */ | ||
28 | struct _fpstate_ia32 { | 31 | struct _fpstate_ia32 { |
29 | /* Regular FPU environment */ | 32 | /* Regular FPU environment: */ |
30 | __u32 cw; | 33 | __u32 cw; |
31 | __u32 sw; | 34 | __u32 sw; |
32 | __u32 tag; /* not compatible to 64bit twd */ | 35 | __u32 tag; /* Not compatible with the 64-bit frame */ |
33 | __u32 ipoff; | 36 | __u32 ipoff; |
34 | __u32 cssel; | 37 | __u32 cssel; |
35 | __u32 dataoff; | 38 | __u32 dataoff; |
36 | __u32 datasel; | 39 | __u32 datasel; |
37 | struct _fpreg _st[8]; | 40 | struct _fpreg _st[8]; |
38 | unsigned short status; | 41 | unsigned short status; |
39 | unsigned short magic; /* 0xffff = regular FPU data only */ | 42 | unsigned short magic; /* 0xffff: regular FPU data only */ |
43 | /* 0x0000: FXSR data */ | ||
40 | 44 | ||
41 | /* FXSR FPU environment */ | 45 | /* Extended FXSR FPU environment: */ |
42 | __u32 _fxsr_env[6]; | 46 | __u32 _fxsr_env[6]; |
43 | __u32 mxcsr; | 47 | __u32 mxcsr; |
44 | __u32 reserved; | 48 | __u32 reserved; |
45 | struct _fpxreg _fxsr_st[8]; | 49 | struct _fpxreg _fxsr_st[8]; |
46 | struct _xmmreg _xmm[8]; /* It's actually 16 */ | 50 | struct _xmmreg _xmm[8]; /* The first 8 XMM registers */ |
47 | __u32 padding[44]; | 51 | __u32 padding[44]; /* The second 8 XMM registers plus padding */ |
48 | union { | 52 | union { |
49 | __u32 padding2[12]; | 53 | __u32 padding2[12]; |
50 | struct _fpx_sw_bytes sw_reserved; | 54 | /* Might encode xstate extensions, see asm/sigcontext.h: */ |
55 | struct _fpx_sw_bytes sw_reserved; | ||
51 | }; | 56 | }; |
52 | }; | 57 | }; |
53 | 58 | ||
59 | /* 32-bit compat sigcontext: */ | ||
54 | struct sigcontext_ia32 { | 60 | struct sigcontext_ia32 { |
55 | unsigned short gs, __gsh; | 61 | unsigned short gs, __gsh; |
56 | unsigned short fs, __fsh; | 62 | unsigned short fs, __fsh; |
57 | unsigned short es, __esh; | 63 | unsigned short es, __esh; |
58 | unsigned short ds, __dsh; | 64 | unsigned short ds, __dsh; |
59 | unsigned int di; | 65 | unsigned int di; |
60 | unsigned int si; | 66 | unsigned int si; |
61 | unsigned int bp; | 67 | unsigned int bp; |
62 | unsigned int sp; | 68 | unsigned int sp; |
63 | unsigned int bx; | 69 | unsigned int bx; |
64 | unsigned int dx; | 70 | unsigned int dx; |
65 | unsigned int cx; | 71 | unsigned int cx; |
66 | unsigned int ax; | 72 | unsigned int ax; |
67 | unsigned int trapno; | 73 | unsigned int trapno; |
68 | unsigned int err; | 74 | unsigned int err; |
69 | unsigned int ip; | 75 | unsigned int ip; |
70 | unsigned short cs, __csh; | 76 | unsigned short cs, __csh; |
71 | unsigned int flags; | 77 | unsigned int flags; |
72 | unsigned int sp_at_signal; | 78 | unsigned int sp_at_signal; |
73 | unsigned short ss, __ssh; | 79 | unsigned short ss, __ssh; |
74 | unsigned int fpstate; /* really (struct _fpstate_ia32 *) */ | 80 | unsigned int fpstate; /* Pointer to 'struct _fpstate_ia32' */ |
75 | unsigned int oldmask; | 81 | unsigned int oldmask; |
76 | unsigned int cr2; | 82 | unsigned int cr2; |
77 | }; | 83 | }; |
78 | 84 | ||
79 | #endif /* _ASM_X86_SIGCONTEXT32_H */ | 85 | #endif /* _ASM_X86_SIGCONTEXT32_H */ |