lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/15] powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE
From
Date
On Fri, 2010-07-30 at 14:17 -0500, Jason Wessel wrote:
> From: Michal Simek <monstr@monstr.eu>
>
> kgdb_handle_breakpoint checks the first arch_kgdb_breakpoint
> which is not known by gdb that's why is necessary jump over
> it. The jump lenght is equal to BREAK_INSTR_SIZE that's
> why is cleaner to use defined macro instead of hardcoded
> non-described offset.

Yeah well, all powerpc instructions are 4 bytes :-) But the
patch is fine.

> Signed-off-by: Michal Simek <monstr@monstr.eu>
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: linuxppc-dev@ozlabs.org
> ---
> arch/powerpc/kernel/kgdb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 82a7b22..7f61a3a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -129,7 +129,7 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs)
> return 0;
>
> if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr))
> - regs->nip += 4;
> + regs->nip += BREAK_INSTR_SIZE;
>
> return 1;
> }




\
 
 \ /
  Last update: 2010-07-31 01:47    [W:0.103 / U:4.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site