[PATCH 12/15] x86/headers: Unify 'struct sigcontext_ia32' and 'struct sigcontext_32'

From: Ingo Molnar
Date: Sat Sep 05 2015 - 03:36:32 EST


The two structures are identical - merge them and keep the legacy name
as a define.

Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Mikko Rapeli <mikko.rapeli@xxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/include/asm/sigframe.h | 1 -
arch/x86/include/uapi/asm/sigcontext.h | 2 ++
arch/x86/include/uapi/asm/sigcontext32.h | 26 --------------------------
3 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/arch/x86/include/asm/sigframe.h b/arch/x86/include/asm/sigframe.h
index 38ade7255a21..cfb22e3105f1 100644
--- a/arch/x86/include/asm/sigframe.h
+++ b/arch/x86/include/asm/sigframe.h
@@ -8,7 +8,6 @@
#ifdef CONFIG_X86_32
#define sigframe_ia32 sigframe
#define rt_sigframe_ia32 rt_sigframe
-#define sigcontext_ia32 sigcontext
#define ucontext_ia32 ucontext
#else /* !CONFIG_X86_32 */

diff --git a/arch/x86/include/uapi/asm/sigcontext.h b/arch/x86/include/uapi/asm/sigcontext.h
index d0def259d545..592bfafd5cb2 100644
--- a/arch/x86/include/uapi/asm/sigcontext.h
+++ b/arch/x86/include/uapi/asm/sigcontext.h
@@ -223,6 +223,8 @@ struct sigcontext_32 {
__u32 cr2;
};

+#define sigcontext_ia32 sigcontext_32
+
struct sigcontext_64 {
__u64 r8;
__u64 r9;
diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
index 06c749b40263..257fbb3baaa7 100644
--- a/arch/x86/include/uapi/asm/sigcontext32.h
+++ b/arch/x86/include/uapi/asm/sigcontext32.h
@@ -5,30 +5,4 @@

#include <asm/sigcontext.h>

-/* 32-bit compat sigcontext: */
-struct sigcontext_ia32 {
- __u16 gs, __gsh;
- __u16 fs, __fsh;
- __u16 es, __esh;
- __u16 ds, __dsh;
- __u32 di;
- __u32 si;
- __u32 bp;
- __u32 sp;
- __u32 bx;
- __u32 dx;
- __u32 cx;
- __u32 ax;
- __u32 trapno;
- __u32 err;
- __u32 ip;
- __u16 cs, __csh;
- __u32 flags;
- __u32 sp_at_signal;
- __u16 ss, __ssh;
- __u32 fpstate; /* Pointer to 'struct _fpstate_32' */
- __u32 oldmask;
- __u32 cr2;
-};
-
#endif /* _ASM_X86_SIGCONTEXT32_H */
--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/