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 [moved from arch/x86/kernel/sigframe_32.h with 66% similarity]
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 <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>
 #include <asm/pgtable.h>
 #include <asm/fixmap.h>
 #include <asm/processor.h>
similarity index 66%
rename from arch/x86/kernel/sigframe_32.h
rename to arch/x86/kernel/sigframe.h
index 0b2221711dadfbf61860def1eca35885e072041c..72bbb519d2dc1ed74e6f01d39842995871ed9e80 100644 (file)
@@ -1,5 +1,5 @@
-struct sigframe
-{
+#ifdef CONFIG_X86_32
+struct sigframe {
        char __user *pretcode;
        int sig;
        struct sigcontext sc;
        char __user *pretcode;
        int sig;
        struct sigcontext sc;
@@ -8,8 +8,7 @@ struct sigframe
        char retcode[8];
 };
 
        char retcode[8];
 };
 
-struct rt_sigframe
-{
+struct rt_sigframe {
        char __user *pretcode;
        int sig;
        struct siginfo __user *pinfo;
        char __user *pretcode;
        int sig;
        struct siginfo __user *pinfo;
@@ -19,3 +18,10 @@ struct rt_sigframe
        struct _fpstate fpstate;
        char retcode[8];
 };
        struct _fpstate fpstate;
        char retcode[8];
 };
+#else
+struct rt_sigframe {
+       char __user *pretcode;
+       struct ucontext uc;
+       struct siginfo info;
+};
+#endif
index 47c85e6b14bb00de13c2c3f8a9e11863beef81aa..5447fa5ec52c43264d634fad9807ff8051f2551e 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
 #include <asm/uaccess.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
-#include "sigframe_32.h"
+#include "sigframe.h"
 
 #define DEBUG_SIG 0
 
 
 #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 <asm/proto.h>
 #include <asm/ia32_unistd.h>
 #include <asm/mce.h>
+#include "sigframe.h"
 
 /* #define DEBUG_SIG 1 */
 
 
 /* #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.
  */
 /*
  * 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)
 {
 static int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, unsigned long *prax)
 {