* [PATCH 10/15] powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE [not found] <1280517456-1167-1-git-send-email-jason.wessel@windriver.com> @ 2010-07-30 19:17 ` Jason Wessel 2010-07-30 23:44 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 2+ messages in thread From: Jason Wessel @ 2010-07-30 19:17 UTC (permalink / raw) To: linux-kernel Cc: Michal Simek, kgdb-bugreport, Jason Wessel, linuxppc-dev, mingo 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. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> CC: 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; } -- 1.6.4.rc1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 10/15] powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE 2010-07-30 19:17 ` [PATCH 10/15] powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE Jason Wessel @ 2010-07-30 23:44 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 2+ messages in thread From: Benjamin Herrenschmidt @ 2010-07-30 23:44 UTC (permalink / raw) To: Jason Wessel Cc: linuxppc-dev, kgdb-bugreport, mingo, linux-kernel, Michal Simek 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; > } ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-30 23:44 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1280517456-1167-1-git-send-email-jason.wessel@windriver.com> 2010-07-30 19:17 ` [PATCH 10/15] powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE Jason Wessel 2010-07-30 23:44 ` 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).