提交 3f623a5b 编写于 作者: I Ingo Molnar

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: NMikko 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.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 128f8257
...@@ -78,48 +78,48 @@ struct _fpx_sw_bytes { ...@@ -78,48 +78,48 @@ struct _fpx_sw_bytes {
/* 10-byte legacy floating point register: */ /* 10-byte legacy floating point register: */
struct _fpreg { struct _fpreg {
unsigned short significand[4]; __u16 significand[4];
unsigned short exponent; __u16 exponent;
}; };
/* 16-byte floating point register: */ /* 16-byte floating point register: */
struct _fpxreg { struct _fpxreg {
unsigned short significand[4]; __u16 significand[4];
unsigned short exponent; __u16 exponent;
unsigned short padding[3]; __u16 padding[3];
}; };
/* 16-byte XMM register: */ /* 16-byte XMM register: */
struct _xmmreg { struct _xmmreg {
unsigned long element[4]; __u32 element[4];
}; };
#define X86_FXSR_MAGIC 0x0000 #define X86_FXSR_MAGIC 0x0000
struct _fpstate { struct _fpstate {
/* Legacy FPU environment: */ /* Legacy FPU environment: */
unsigned long cw; __u32 cw;
unsigned long sw; __u32 sw;
unsigned long tag; __u32 tag;
unsigned long ipoff; __u32 ipoff;
unsigned long cssel; __u32 cssel;
unsigned long dataoff; __u32 dataoff;
unsigned long datasel; __u32 datasel;
struct _fpreg _st[8]; struct _fpreg _st[8];
unsigned short status; __u16 status;
unsigned short magic; /* 0xffff: regular FPU data only */ __u16 magic; /* 0xffff: regular FPU data only */
/* 0x0000: FXSR FPU data */ /* 0x0000: FXSR FPU data */
/* FXSR FPU environment */ /* FXSR FPU environment */
unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */ __u32 _fxsr_env[6]; /* FXSR FPU env is ignored */
unsigned long mxcsr; __u32 mxcsr;
unsigned long reserved; __u32 reserved;
struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
struct _xmmreg _xmm[8]; /* First 8 XMM registers */ struct _xmmreg _xmm[8]; /* First 8 XMM registers */
unsigned long padding1[44]; /* Second 8 XMM registers plus padding */ __u32 padding1[44]; /* Second 8 XMM registers plus padding */
union { union {
unsigned long padding2[12]; __u32 padding2[12];
struct _fpx_sw_bytes sw_reserved; /* Potential extended state is encoded here */ struct _fpx_sw_bytes sw_reserved; /* Potential extended state is encoded here */
}; };
}; };
...@@ -191,28 +191,28 @@ struct _xstate { ...@@ -191,28 +191,28 @@ struct _xstate {
#ifndef __KERNEL__ #ifndef __KERNEL__
# ifdef __i386__ # ifdef __i386__
struct sigcontext { struct sigcontext {
unsigned short gs, __gsh; __u16 gs, __gsh;
unsigned short fs, __fsh; __u16 fs, __fsh;
unsigned short es, __esh; __u16 es, __esh;
unsigned short ds, __dsh; __u16 ds, __dsh;
unsigned long edi; __u32 edi;
unsigned long esi; __u32 esi;
unsigned long ebp; __u32 ebp;
unsigned long esp; __u32 esp;
unsigned long ebx; __u32 ebx;
unsigned long edx; __u32 edx;
unsigned long ecx; __u32 ecx;
unsigned long eax; __u32 eax;
unsigned long trapno; __u32 trapno;
unsigned long err; __u32 err;
unsigned long eip; __u32 eip;
unsigned short cs, __csh; __u16 cs, __csh;
unsigned long eflags; __u32 eflags;
unsigned long esp_at_signal; __u32 esp_at_signal;
unsigned short ss, __ssh; __u16 ss, __ssh;
struct _fpstate __user *fpstate; struct _fpstate __user *fpstate;
unsigned long oldmask; __u32 oldmask;
unsigned long cr2; __u32 cr2;
}; };
# else /* __x86_64__: */ # else /* __x86_64__: */
struct sigcontext { struct sigcontext {
......
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
/* 10-byte legacy floating point register: */ /* 10-byte legacy floating point register: */
struct _fpreg { struct _fpreg {
unsigned short significand[4]; __u16 significand[4];
unsigned short exponent; __u16 exponent;
}; };
/* 16-byte floating point register: */ /* 16-byte floating point register: */
struct _fpxreg { struct _fpxreg {
unsigned short significand[4]; __u16 significand[4];
unsigned short exponent; __u16 exponent;
unsigned short padding[3]; __u16 padding[3];
}; };
/* 16-byte XMM vector register: */ /* 16-byte XMM vector register: */
...@@ -38,8 +38,8 @@ struct _fpstate_ia32 { ...@@ -38,8 +38,8 @@ struct _fpstate_ia32 {
__u32 dataoff; __u32 dataoff;
__u32 datasel; __u32 datasel;
struct _fpreg _st[8]; struct _fpreg _st[8];
unsigned short status; __u16 status;
unsigned short magic; /* 0xffff: regular FPU data only */ __u16 magic; /* 0xffff: regular FPU data only */
/* 0x0000: FXSR data */ /* 0x0000: FXSR data */
/* Extended FXSR FPU environment: */ /* Extended FXSR FPU environment: */
...@@ -58,28 +58,28 @@ struct _fpstate_ia32 { ...@@ -58,28 +58,28 @@ struct _fpstate_ia32 {
/* 32-bit compat sigcontext: */ /* 32-bit compat sigcontext: */
struct sigcontext_ia32 { struct sigcontext_ia32 {
unsigned short gs, __gsh; __u16 gs, __gsh;
unsigned short fs, __fsh; __u16 fs, __fsh;
unsigned short es, __esh; __u16 es, __esh;
unsigned short ds, __dsh; __u16 ds, __dsh;
unsigned int di; __u32 di;
unsigned int si; __u32 si;
unsigned int bp; __u32 bp;
unsigned int sp; __u32 sp;
unsigned int bx; __u32 bx;
unsigned int dx; __u32 dx;
unsigned int cx; __u32 cx;
unsigned int ax; __u32 ax;
unsigned int trapno; __u32 trapno;
unsigned int err; __u32 err;
unsigned int ip; __u32 ip;
unsigned short cs, __csh; __u16 cs, __csh;
unsigned int flags; __u32 flags;
unsigned int sp_at_signal; __u32 sp_at_signal;
unsigned short ss, __ssh; __u16 ss, __ssh;
unsigned int fpstate; /* Pointer to 'struct _fpstate_ia32' */ __u32 fpstate; /* Pointer to 'struct _fpstate_ia32' */
unsigned int oldmask; __u32 oldmask;
unsigned int cr2; __u32 cr2;
}; };
#endif /* _ASM_X86_SIGCONTEXT32_H */ #endif /* _ASM_X86_SIGCONTEXT32_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册