[PATCH 06/15] x86/headers: Unify register type definitions between 32-bit compat and i386

From: Ingo Molnar
Date: Sat Sep 05 2015 - 03:34:37 EST


The following sigcontext related types were duplicated across native 32-bit and
compat 32-bit headers:

struct _fpreg;
struct _fpxreg;
struct _xmmreg;

X86_FXSR_MAGIC

Unify them.

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/uapi/asm/sigcontext.h | 3 ++-
arch/x86/include/uapi/asm/sigcontext32.h | 22 ----------------------
2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/arch/x86/include/uapi/asm/sigcontext.h b/arch/x86/include/uapi/asm/sigcontext.h
index 07b0e32a1d23..9df4df3e40ef 100644
--- a/arch/x86/include/uapi/asm/sigcontext.h
+++ b/arch/x86/include/uapi/asm/sigcontext.h
@@ -63,7 +63,6 @@ struct _fpx_sw_bytes {
__u32 padding[7];
};

-#ifdef __i386__
/*
* As documented in the iBCS2 standard:
*
@@ -96,6 +95,8 @@ struct _xmmreg {

#define X86_FXSR_MAGIC 0x0000

+#ifdef __i386__
+
struct _fpstate {
/* Legacy FPU environment: */
__u32 cw;
diff --git a/arch/x86/include/uapi/asm/sigcontext32.h b/arch/x86/include/uapi/asm/sigcontext32.h
index 939a84885673..356caab997e7 100644
--- a/arch/x86/include/uapi/asm/sigcontext32.h
+++ b/arch/x86/include/uapi/asm/sigcontext32.h
@@ -3,30 +3,8 @@

/* Signal context definitions for compat 32-bit programs: */

-#include <linux/types.h>
-
#include <asm/sigcontext.h>

-/* 10-byte legacy floating point register: */
-struct _fpreg {
- __u16 significand[4];
- __u16 exponent;
-};
-
-/* 16-byte floating point register: */
-struct _fpxreg {
- __u16 significand[4];
- __u16 exponent;
- __u16 padding[3];
-};
-
-/* 16-byte XMM vector register: */
-struct _xmmreg {
- __u32 element[4];
-};
-
-#define X86_FXSR_MAGIC 0x0000
-
/* FXSAVE frame: FSAVE frame with extensions */
struct _fpstate_ia32 {
/* Regular FPU environment: */
--
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/