]> err.no Git - linux-2.6/blobdiff - include/asm-x86/ptrace.h
Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6] / include / asm-x86 / ptrace.h
index bc442461ac64437bf5e7a510bdf811627f56914f..8a71db803da6666bf030223503e0dcebf2778efd 100644 (file)
@@ -3,7 +3,12 @@
 
 #include <linux/compiler.h>    /* For __user */
 #include <asm/ptrace-abi.h>
+#include <asm/processor-flags.h>
 
+#ifdef __KERNEL__
+#include <asm/ds.h>            /* the DS BTS struct is used for ptrace too */
+#include <asm/segment.h>
+#endif
 
 #ifndef __ASSEMBLY__
 
@@ -55,9 +60,6 @@ struct pt_regs {
        unsigned long ss;
 };
 
-#include <asm/vm86.h>
-#include <asm/segment.h>
-
 #endif /* __KERNEL__ */
 
 #else /* __i386__ */
@@ -140,7 +142,8 @@ extern unsigned long
 convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
 
 #ifdef CONFIG_X86_32
-extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
+extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
+                        int error_code);
 #else
 void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
 #endif
@@ -169,8 +172,8 @@ static inline int user_mode(struct pt_regs *regs)
 static inline int user_mode_vm(struct pt_regs *regs)
 {
 #ifdef CONFIG_X86_32
-       return ((regs->cs & SEGMENT_RPL_MASK) |
-               (regs->flags & VM_MASK)) >= USER_RPL;
+       return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >=
+               USER_RPL;
 #else
        return user_mode(regs);
 #endif
@@ -179,7 +182,7 @@ static inline int user_mode_vm(struct pt_regs *regs)
 static inline int v8086_mode(struct pt_regs *regs)
 {
 #ifdef CONFIG_X86_32
-       return (regs->flags & VM_MASK);
+       return (regs->flags & X86_VM_MASK);
 #else
        return 0;       /* No V86 mode support in long mode */
 #endif
@@ -230,6 +233,8 @@ extern int do_get_thread_area(struct task_struct *p, int idx,
 extern int do_set_thread_area(struct task_struct *p, int idx,
                              struct user_desc __user *info, int can_allocate);
 
+#define __ARCH_WANT_COMPAT_SYS_PTRACE
+
 #endif /* __KERNEL__ */
 
 #endif /* !__ASSEMBLY__ */