This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][PATCH -tip 4/9] power: add kernel_trap_sp()


On Thu, 2009-03-19 at 17:10 -0400, Masami Hiramatsu wrote:
> Add kernel_trap_sp() on powerpc, based on systemtap's runtime/regs.h.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>

I haven't looked at the usage of it, but it's weird to have something
call "kernel_trap_sp" that returns the -user- stack pointer... is
this really what's expected here ?

> ---
>  arch/powerpc/include/asm/ptrace.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
> index c9c678f..0ac366c 100644
> --- a/arch/powerpc/include/asm/ptrace.h
> +++ b/arch/powerpc/include/asm/ptrace.h
> @@ -83,6 +83,7 @@ struct pt_regs {
> 
>  #define instruction_pointer(regs) ((regs)->nip)
>  #define user_stack_pointer(regs) ((regs)->gpr[1])
> +#define kernel_trap_sp(regs) (user_stack_pointer(regs))
>  #define regs_return_value(regs) ((regs)->gpr[3])
> 
>  #ifdef CONFIG_SMP


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]