MIPS: SPRAM: Clean up support code a little
[safe/jmp/linux-2.6] / arch / mips / include / asm / ptrace.h
index c00cca2..ce47118 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef _ASM_PTRACE_H
 #define _ASM_PTRACE_H
 
-#ifdef CONFIG_64BIT
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
-#endif
-
 /* 0 - 31 are integer registers, 32 - 63 are fp registers.  */
 #define FPR_BASE       32
 #define PC             64
@@ -52,6 +48,10 @@ struct pt_regs {
 #ifdef CONFIG_MIPS_MT_SMTC
        unsigned long cp0_tcstatus;
 #endif /* CONFIG_MIPS_MT_SMTC */
+#ifdef CONFIG_CPU_CAVIUM_OCTEON
+       unsigned long long mpl[3];        /* MTM{0,1,2} */
+       unsigned long long mtp[3];        /* MTP{0,1,2} */
+#endif
 } __attribute__ ((aligned (8)));
 
 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
@@ -74,11 +74,64 @@ struct pt_regs {
 #define PTRACE_POKEDATA_3264   0xc3
 #define PTRACE_GET_THREAD_AREA_3264    0xc4
 
+/* Read and write watchpoint registers.  */
+enum pt_watch_style {
+       pt_watch_style_mips32,
+       pt_watch_style_mips64
+};
+struct mips32_watch_regs {
+       unsigned int watchlo[8];
+       /* Lower 16 bits of watchhi. */
+       unsigned short watchhi[8];
+       /* Valid mask and I R W bits.
+        * bit 0 -- 1 if W bit is usable.
+        * bit 1 -- 1 if R bit is usable.
+        * bit 2 -- 1 if I bit is usable.
+        * bits 3 - 11 -- Valid watchhi mask bits.
+        */
+       unsigned short watch_masks[8];
+       /* The number of valid watch register pairs.  */
+       unsigned int num_valid;
+} __attribute__((aligned(8)));
+
+struct mips64_watch_regs {
+       unsigned long long watchlo[8];
+       unsigned short watchhi[8];
+       unsigned short watch_masks[8];
+       unsigned int num_valid;
+} __attribute__((aligned(8)));
+
+struct pt_watch_regs {
+       enum pt_watch_style style;
+       union {
+               struct mips32_watch_regs mips32;
+               struct mips64_watch_regs mips64;
+       };
+};
+
+#define PTRACE_GET_WATCH_REGS  0xd0
+#define PTRACE_SET_WATCH_REGS  0xd1
+
 #ifdef __KERNEL__
 
+#include <linux/compiler.h>
 #include <linux/linkage.h>
+#include <linux/types.h>
 #include <asm/isadep.h>
 
+struct task_struct;
+
+extern int ptrace_getregs(struct task_struct *child, __s64 __user *data);
+extern int ptrace_setregs(struct task_struct *child, __s64 __user *data);
+
+extern int ptrace_getfpregs(struct task_struct *child, __u32 __user *data);
+extern int ptrace_setfpregs(struct task_struct *child, __u32 __user *data);
+
+extern int ptrace_get_watch_regs(struct task_struct *child,
+       struct pt_watch_regs __user *addr);
+extern int ptrace_set_watch_regs(struct task_struct *child,
+       struct pt_watch_regs __user *addr);
+
 /*
  * Does the process account for user or for system time?
  */