]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] powerpc: ptrace can set DABR on both 32 and 64 bits
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 4 Jun 2007 05:15:47 +0000 (15:15 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 14 Jun 2007 12:29:57 +0000 (22:29 +1000)
Allow ptrace to set dabr in the thread structure for both 32 and 64 bits,
though only 64 bits actually uses that field, it's actually defined in both.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/ptrace.c

index 75bc744a621779de7406592ee73e071635a180a9..0fb53950da439fb4ba1bd669a5e3f0111d09bc98 100644 (file)
@@ -286,7 +286,6 @@ static void clear_single_step(struct task_struct *task)
        clear_tsk_thread_flag(task, TIF_SINGLESTEP);
 }
 
-#ifdef CONFIG_PPC64
 static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
                               unsigned long data)
 {
@@ -305,7 +304,6 @@ static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
        task->thread.dabr = data;
        return 0;
 }
-#endif
 
 /*
  * Called by kernel/ptrace.c when detaching..
@@ -503,7 +501,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
        }
 
-#ifdef CONFIG_PPC64
        case PTRACE_GET_DEBUGREG: {
                ret = -EINVAL;
                /* We only support one DABR and no IABRS at the moment */
@@ -517,7 +514,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        case PTRACE_SET_DEBUGREG:
                ret = ptrace_set_debugreg(child, addr, data);
                break;
-#endif
 
        case PTRACE_DETACH:
                ret = ptrace_detach(child, data);