aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-09-05 03:32:33 -0400
committerIngo Molnar <mingo@kernel.org>2015-09-08 04:03:56 -0400
commit3f623a5b27c150451387e358774131780dbd2407 (patch)
treec59d769cd685f16c3f7eccffcbc06e456d90b02b
parent128f8257a17a47b9a40f550cc2f36458cd8c07b0 (diff)
x86/headers: Use ABI types consistently in sigcontext*.h
Use the __u16/32/64 types we standardized on in ABI definitions - and which most of this header was already using. This will allow us to more obviously unify the compat header into the main header. No change in functionality. 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-6-git-send-email-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/include/uapi/asm/sigcontext.h82
-rw-r--r--arch/x86/include/uapi/asm/sigcontext32.h58
2 files changed, 70 insertions, 70 deletions
diff --git a/arch/x86/include/uapi/asm/sigcontext.h b/arch/x86/include/uapi/asm/sigcontext.h
index 40d6cbac08c6..07b0e32a1d23 100644
--- a/arch/x86/include/uapi/asm/sigcontext.h
+++ b/arch/x86/include/uapi/asm/sigcontext.h
@@ -78,48 +78,48 @@ struct _fpx_sw_bytes {
78 78
79/* 10-byte legacy floating point register: */ 79/* 10-byte legacy floating point register: */
80struct _fpreg { 80struct _fpreg {
81 unsigned short significand[4]; 81 __u16 significand[4];
82 unsigned short exponent; 82 __u16 exponent;
83}; 83};
84 84
85/* 16-byte floating point register: */ 85/* 16-byte floating point register: */
86struct _fpxreg { 86struct _fpxreg {
87 unsigned short significand[4]; 87 __u16 significand[4];
88 unsigned short exponent; 88 __u16 exponent;
89 unsigned short padding[3]; 89 __u16 padding[3];
90}; 90};
91 91
92/* 16-byte XMM register: */ 92/* 16-byte XMM register: */
93struct _xmmreg { 93struct _xmmreg {
94 unsigned long element[4]; 94 __u32 element[4];
95}; 95};
96 96
97#define X86_FXSR_MAGIC 0x0000 97#define X86_FXSR_MAGIC 0x0000
98 98
99struct _fpstate { 99struct _fpstate {
100 /* Legacy FPU environment: */ 100 /* Legacy FPU environment: */
101 unsigned long cw; 101 __u32 cw;
102 unsigned long sw; 102 __u32 sw;
103 unsigned long tag; 103 __u32 tag;
104 unsigned long ipoff; 104 __u32 ipoff;
105 unsigned long cssel; 105 __u32 cssel;
106 unsigned long dataoff; 106 __u32 dataoff;
107 unsigned long datasel; 107 __u32 datasel;
108 struct _fpreg _st[8]; 108 struct _fpreg _st[8];
109 unsigned short status; 109 __u16 status;
110 unsigned short magic; /* 0xffff: regular FPU data only */ 110 __u16 magic; /* 0xffff: regular FPU data only */
111 /* 0x0000: FXSR FPU data */ 111 /* 0x0000: FXSR FPU data */
112 112
113 /* FXSR FPU environment */ 113 /* FXSR FPU environment */
114 unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */ 114 __u32 _fxsr_env[6]; /* FXSR FPU env is ignored */
115 unsigned long mxcsr; 115 __u32 mxcsr;
116 unsigned long reserved; 116 __u32 reserved;
117 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ 117 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
118 struct _xmmreg _xmm[8]; /* First 8 XMM registers */ 118 struct _xmmreg _xmm[8]; /* First 8 XMM registers */
119 unsigned long padding1[44]; /* Second 8 XMM registers plus padding */ 119 __u32 padding1[44]; /* Second 8 XMM registers plus padding */
120 120
121 union { 121 union {
122 unsigned long padding2[12]; 122 __u32 padding2[12];
123 struct _fpx_sw_bytes sw_reserved; /* Potential extended state is encoded here */ 123 struct _fpx_sw_bytes sw_reserved; /* Potential extended state is encoded here */
124 }; 124 };
125}; 125};
@@ -191,28 +191,28 @@ struct _xstate {
191#ifndef __KERNEL__ 191#ifndef __KERNEL__
192# ifdef __i386__ 192# ifdef __i386__
193struct sigcontext { 193struct sigcontext {
194 unsigned short gs, __gsh; 194 __u16 gs, __gsh;
195 unsigned short fs, __fsh; 195 __u16 fs, __fsh;
196 unsigned short es, __esh; 196 __u16 es, __esh;
197 unsigned short ds, __dsh; 197 __u16 ds, __dsh;
198 unsigned long edi; 198 __u32 edi;
199 unsigned long esi; 199 __u32 esi;
200 unsigned long ebp; 200 __u32 ebp;
201 unsigned long esp; 201 __u32 esp;
202 unsigned long ebx; 202 __u32 ebx;
203 unsigned long edx; 203 __u32 edx;
204 unsigned long ecx; 204 __u32 ecx;
205 unsigned long eax; 205 __u32 eax;
206 unsigned long trapno; 206 __u32 trapno;
207 unsigned long err; 207 __u32 err;
208 unsigned long eip; 208 __u32 eip;
209 unsigned short cs, __csh; 209 __u16 cs, __csh;
210 unsigned long eflags; 210 __u32 eflags;
211 unsigned long esp_at_signal; 211 __u32 esp_at_signal;
212 unsigned short ss, __ssh; 212 __u16 ss, __ssh;
213 struct _fpstate __user *fpstate; 213 struct _fpstate __user *fpstate;
214 unsigned long oldmask; 214 __u32 oldmask;
215 unsigned long cr2; 215 __u32 cr2;
216}; 216};
217# else /* __x86_64__: */ 217# else /* __x86_64__: */
218struct sigcontext { 218struct sigcontext {
diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
index 6ff4fbab650e..939a84885673 100644
--- a/arch/x86/include/uapi/asm/sigcontext32.h
+++ b/arch/x86/include/uapi/asm/sigcontext32.h
@@ -9,15 +9,15 @@
9 9
10/* 10-byte legacy floating point register: */ 10/* 10-byte legacy floating point register: */
11struct _fpreg { 11struct _fpreg {
12 unsigned short significand[4]; 12 __u16 significand[4];
13 unsigned short exponent; 13 __u16 exponent;
14}; 14};
15 15
16/* 16-byte floating point register: */ 16/* 16-byte floating point register: */
17struct _fpxreg { 17struct _fpxreg {
18 unsigned short significand[4]; 18 __u16 significand[4];
19 unsigned short exponent; 19 __u16 exponent;
20 unsigned short padding[3]; 20 __u16 padding[3];
21}; 21};
22 22
23/* 16-byte XMM vector register: */ 23/* 16-byte XMM vector register: */
@@ -38,8 +38,8 @@ struct _fpstate_ia32 {
38 __u32 dataoff; 38 __u32 dataoff;
39 __u32 datasel; 39 __u32 datasel;
40 struct _fpreg _st[8]; 40 struct _fpreg _st[8];
41 unsigned short status; 41 __u16 status;
42 unsigned short magic; /* 0xffff: regular FPU data only */ 42 __u16 magic; /* 0xffff: regular FPU data only */
43 /* 0x0000: FXSR data */ 43 /* 0x0000: FXSR data */
44 44
45 /* Extended FXSR FPU environment: */ 45 /* Extended FXSR FPU environment: */
@@ -58,28 +58,28 @@ struct _fpstate_ia32 {
58 58
59/* 32-bit compat sigcontext: */ 59/* 32-bit compat sigcontext: */
60struct sigcontext_ia32 { 60struct sigcontext_ia32 {
61 unsigned short gs, __gsh; 61 __u16 gs, __gsh;
62 unsigned short fs, __fsh; 62 __u16 fs, __fsh;
63 unsigned short es, __esh; 63 __u16 es, __esh;
64 unsigned short ds, __dsh; 64 __u16 ds, __dsh;
65 unsigned int di; 65 __u32 di;
66 unsigned int si; 66 __u32 si;
67 unsigned int bp; 67 __u32 bp;
68 unsigned int sp; 68 __u32 sp;
69 unsigned int bx; 69 __u32 bx;
70 unsigned int dx; 70 __u32 dx;
71 unsigned int cx; 71 __u32 cx;
72 unsigned int ax; 72 __u32 ax;
73 unsigned int trapno; 73 __u32 trapno;
74 unsigned int err; 74 __u32 err;
75 unsigned int ip; 75 __u32 ip;
76 unsigned short cs, __csh; 76 __u16 cs, __csh;
77 unsigned int flags; 77 __u32 flags;
78 unsigned int sp_at_signal; 78 __u32 sp_at_signal;
79 unsigned short ss, __ssh; 79 __u16 ss, __ssh;
80 unsigned int fpstate; /* Pointer to 'struct _fpstate_ia32' */ 80 __u32 fpstate; /* Pointer to 'struct _fpstate_ia32' */
81 unsigned int oldmask; 81 __u32 oldmask;
82 unsigned int cr2; 82 __u32 cr2;
83}; 83};
84 84
85#endif /* _ASM_X86_SIGCONTEXT32_H */ 85#endif /* _ASM_X86_SIGCONTEXT32_H */