x86: move struct definitions to unifed sigframe.h
authorHarvey Harrison <harvey.harrison@gmail.com>
Fri, 8 Feb 2008 20:10:00 +0000 (12:10 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:46 +0000 (17:40 +0200)
[ tglx@linutronix.de: cleanup the other structs as well ]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/asm-offsets_32.c
arch/x86/kernel/sigframe.h [new file with mode: 0644]
arch/x86/kernel/sigframe_32.h [deleted file]
arch/x86/kernel/signal_32.c
arch/x86/kernel/signal_64.c

index 8ea040124f7dc930de83225dbe45d9c642e7f196..670c3c311289b185cd3fc3a2f12c64bc31a3cc4c 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/personality.h>
 #include <linux/suspend.h>
 #include <asm/ucontext.h>
-#include "sigframe_32.h"
+#include "sigframe.h"
 #include <asm/pgtable.h>
 #include <asm/fixmap.h>
 #include <asm/processor.h>
diff --git a/arch/x86/kernel/sigframe.h b/arch/x86/kernel/sigframe.h
new file mode 100644 (file)
index 0000000..72bbb51
--- /dev/null
@@ -0,0 +1,27 @@
+#ifdef CONFIG_X86_32
+struct sigframe {
+       char __user *pretcode;
+       int sig;
+       struct sigcontext sc;
+       struct _fpstate fpstate;
+       unsigned long extramask[_NSIG_WORDS-1];
+       char retcode[8];
+};
+
+struct rt_sigframe {
+       char __user *pretcode;
+       int sig;
+       struct siginfo __user *pinfo;
+       void __user *puc;
+       struct siginfo info;
+       struct ucontext uc;
+       struct _fpstate fpstate;
+       char retcode[8];
+};
+#else
+struct rt_sigframe {
+       char __user *pretcode;
+       struct ucontext uc;
+       struct siginfo info;
+};
+#endif
diff --git a/arch/x86/kernel/sigframe_32.h b/arch/x86/kernel/sigframe_32.h
deleted file mode 100644 (file)
index 0b22217..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-struct sigframe
-{
-       char __user *pretcode;
-       int sig;
-       struct sigcontext sc;
-       struct _fpstate fpstate;
-       unsigned long extramask[_NSIG_WORDS-1];
-       char retcode[8];
-};
-
-struct rt_sigframe
-{
-       char __user *pretcode;
-       int sig;
-       struct siginfo __user *pinfo;
-       void __user *puc;
-       struct siginfo info;
-       struct ucontext uc;
-       struct _fpstate fpstate;
-       char retcode[8];
-};
index 47c85e6b14bb00de13c2c3f8a9e11863beef81aa..5447fa5ec52c43264d634fad9807ff8051f2551e 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
-#include "sigframe_32.h"
+#include "sigframe.h"
 
 #define DEBUG_SIG 0
 
index 1045a07eeaec44e62b86499a3304af8a2d198f4d..8bb1013eb62b720ab7f059131b1106981530b0f4 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/proto.h>
 #include <asm/ia32_unistd.h>
 #include <asm/mce.h>
+#include "sigframe.h"
 
 /* #define DEBUG_SIG 1 */
 
@@ -58,14 +59,6 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
 /*
  * Do a signal return; undo the signal stack.
  */
-
-struct rt_sigframe
-{
-       char __user *pretcode;
-       struct ucontext uc;
-       struct siginfo info;
-};
-
 static int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, unsigned long *prax)
 {