powerpc: ptrace can set DABR on both 32 and 64 bits
Subsystems (2)
PATCH 2/4 powerpc: ptrace can set DABR on both 32 and 64 bits
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.
---
arch/powerpc/kernel/ptrace.c | 4 ---- 1 file changed, 4 deletions(-)
arch/powerpc/kernel/ptrace.c +0 -4
@@ -286,7 +286,6 @@ static void clear_single_step(struct tasclear_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 ta task->thread.dabr = data;return 0 ; } -#endif /* * Called by kernel/ptrace.c when detaching..
@@ -503,7 +501,6 @@ long arch_ptrace(struct task_struct *chibreak ; } -#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 *chicase PTRACE_SET_DEBUGREG : ret =ptrace_set_debugreg (child, addr, data);break ; -#endif case PTRACE_DETACH : ret =ptrace_detach (child, data);
Quoted 4 lines · Benjamin Herrenschmidt
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 <[email protected]>
Can you make these -EIO for CONFIG_BOOKE for now.
- k
Quoted 10 lines · Kumar Gala
Quoted 6 lines · Benjamin Herrenschmidt
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 <[email protected]>Can you make these
-EIOforCONFIG_BOOKEfor now.
I suppose best is to define set_dabr to have a result code...
The std DABR format is good enough to carry a generic setting whatever the HW implementation is I think.
Ben.