* [RFC/PATCH 2/4] powerpc: ptrace can set DABR on both 32 and 64 bits
@ 2007-05-30 8:05 Benjamin Herrenschmidt
2007-05-30 12:44 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2007-05-30 8:05 UTC (permalink / raw)
To: linuxppc-dev; +Cc: ulrich.weigand, Paul Mackerras, Anton Blanchard
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>
---
arch/powerpc/kernel/ptrace.c | 4 ----
1 file changed, 4 deletions(-)
Index: linux-cell/arch/powerpc/kernel/ptrace.c
===================================================================
--- linux-cell.orig/arch/powerpc/kernel/ptrace.c 2007-05-30 16:21:12.000000000 +1000
+++ linux-cell/arch/powerpc/kernel/ptrace.c 2007-05-30 16:21:22.000000000 +1000
@@ -286,7 +286,6 @@ static void clear_single_step(struct tas
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 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 *chi
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 *chi
case PTRACE_SET_DEBUGREG:
ret = ptrace_set_debugreg(child, addr, data);
break;
-#endif
case PTRACE_DETACH:
ret = ptrace_detach(child, data);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC/PATCH 2/4] powerpc: ptrace can set DABR on both 32 and 64 bits
2007-05-30 8:05 [RFC/PATCH 2/4] powerpc: ptrace can set DABR on both 32 and 64 bits Benjamin Herrenschmidt
@ 2007-05-30 12:44 ` Kumar Gala
2007-05-30 12:56 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2007-05-30 12:44 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linuxppc-dev, Paul Mackerras, Anton Blanchard, ulrich.weigand
On May 30, 2007, at 3:05 AM, Benjamin Herrenschmidt wrote:
> 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>
Can you make these -EIO for CONFIG_BOOKE for now.
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC/PATCH 2/4] powerpc: ptrace can set DABR on both 32 and 64 bits
2007-05-30 12:44 ` Kumar Gala
@ 2007-05-30 12:56 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2007-05-30 12:56 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras, Anton Blanchard, ulrich.weigand
On Wed, 2007-05-30 at 07:44 -0500, Kumar Gala wrote:
> On May 30, 2007, at 3:05 AM, Benjamin Herrenschmidt wrote:
>
> > 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>
>
> Can you make these -EIO for CONFIG_BOOKE for 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-30 12:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-30 8:05 [RFC/PATCH 2/4] powerpc: ptrace can set DABR on both 32 and 64 bits Benjamin Herrenschmidt
2007-05-30 12:44 ` Kumar Gala
2007-05-30 12:56 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).