Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / include / asm-x86 / sigcontext.h
index c047f9d..2f9c884 100644 (file)
@@ -58,6 +58,35 @@ struct _fpstate {
 
 #define X86_FXSR_MAGIC         0x0000
 
+#ifdef __KERNEL__
+struct sigcontext {
+       unsigned short gs, __gsh;
+       unsigned short fs, __fsh;
+       unsigned short es, __esh;
+       unsigned short ds, __dsh;
+       unsigned long di;
+       unsigned long si;
+       unsigned long bp;
+       unsigned long sp;
+       unsigned long bx;
+       unsigned long dx;
+       unsigned long cx;
+       unsigned long ax;
+       unsigned long trapno;
+       unsigned long err;
+       unsigned long ip;
+       unsigned short cs, __csh;
+       unsigned long flags;
+       unsigned long sp_at_signal;
+       unsigned short ss, __ssh;
+       struct _fpstate __user *fpstate;
+       unsigned long oldmask;
+       unsigned long cr2;
+};
+#else /* __KERNEL__ */
+/*
+ * User-space might still rely on the old definition:
+ */
 struct sigcontext {
        unsigned short gs, __gsh;
        unsigned short fs, __fsh;
@@ -78,10 +107,11 @@ struct sigcontext {
        unsigned long eflags;
        unsigned long esp_at_signal;
        unsigned short ss, __ssh;
-       struct _fpstate __user * fpstate;
+       struct _fpstate __user *fpstate;
        unsigned long oldmask;
        unsigned long cr2;
 };
+#endif /* !__KERNEL__ */
 
 #else /* __i386__ */
 
@@ -91,7 +121,8 @@ struct sigcontext {
 struct _fpstate {
        __u16   cwd;
        __u16   swd;
-       __u16   twd;    /* Note this is not the same as the 32bit/x87/FSAVE twd */
+       __u16   twd;            /* Note this is not the same as the
+                                  32bit/x87/FSAVE twd */
        __u16   fop;
        __u64   rip;
        __u64   rdp;
@@ -102,6 +133,41 @@ struct _fpstate {
        __u32   reserved2[24];
 };
 
+#ifdef __KERNEL__
+struct sigcontext {
+       unsigned long r8;
+       unsigned long r9;
+       unsigned long r10;
+       unsigned long r11;
+       unsigned long r12;
+       unsigned long r13;
+       unsigned long r14;
+       unsigned long r15;
+       unsigned long di;
+       unsigned long si;
+       unsigned long bp;
+       unsigned long bx;
+       unsigned long dx;
+       unsigned long ax;
+       unsigned long cx;
+       unsigned long sp;
+       unsigned long ip;
+       unsigned long flags;
+       unsigned short cs;
+       unsigned short gs;
+       unsigned short fs;
+       unsigned short __pad0;
+       unsigned long err;
+       unsigned long trapno;
+       unsigned long oldmask;
+       unsigned long cr2;
+       struct _fpstate __user *fpstate;        /* zero when no FPU context */
+       unsigned long reserved1[8];
+};
+#else /* __KERNEL__ */
+/*
+ * User-space might still rely on the old definition:
+ */
 struct sigcontext {
        unsigned long r8;
        unsigned long r9;
@@ -132,6 +198,7 @@ struct sigcontext {
        struct _fpstate __user *fpstate;        /* zero when no FPU context */
        unsigned long reserved1[8];
 };
+#endif /* !__KERNEL__ */
 
 #endif /* !__i386__ */