Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-drm-fsl-dcu.git] / arch / parisc / kernel / ptrace.c
index 413292f1a4a36401fda3cc03129574b68e648f09..8a0db376e91e3e17f290b4db7ad3eddb0089789e 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
@@ -36,7 +35,7 @@
 #define DBG(x...)
 #endif
 
-#ifdef __LP64__
+#ifdef CONFIG_64BIT
 
 /* This function is needed to translate 32 bit pt_regs offsets in to
  * 64 bit pt_regs offsets.  For example, a 32 bit gdb under a 64 bit kernel
@@ -90,8 +89,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        case PTRACE_PEEKDATA: {
                int copied;
 
-#ifdef __LP64__
-               if (personality(child->personality) == PER_LINUX32) {
+#ifdef CONFIG_64BIT
+               if (__is_compat_task(child)) {
                        unsigned int tmp;
 
                        addr &= 0xffffffffL;
@@ -122,8 +121,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        case PTRACE_POKETEXT: /* write the word at location addr. */
        case PTRACE_POKEDATA:
                ret = 0;
-#ifdef __LP64__
-               if (personality(child->personality) == PER_LINUX32) {
+#ifdef CONFIG_64BIT
+               if (__is_compat_task(child)) {
                        unsigned int tmp = (unsigned int)data;
                        DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
                                request == PTRACE_POKETEXT ? "TEXT" : "DATA",
@@ -145,8 +144,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
           processes, the kernel saves all regs on a syscall. */
        case PTRACE_PEEKUSR: {
                ret = -EIO;
-#ifdef __LP64__
-               if (personality(child->personality) == PER_LINUX32) {
+#ifdef CONFIG_64BIT
+               if (__is_compat_task(child)) {
                        unsigned int tmp;
 
                        if (addr & (sizeof(int)-1))
@@ -204,8 +203,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        ret = 0;
                        goto out_tsk;
                }
-#ifdef __LP64__
-               if (personality(child->personality) == PER_LINUX32) {
+#ifdef CONFIG_64BIT
+               if (__is_compat_task(child)) {
                        if (addr & (sizeof(int)-1))
                                goto out_tsk;
                        if ((addr = translate_usr_offset(addr)) < 0)