Message ID | 20100301191301.20987.70132.sendpatchset@norville.austin.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Josh Boyer |
Headers | show |
On Mar 1, 2010, at 1:13 PM, Dave Kleikamp wrote: > powerpc/booke: Add Stack Marking support to Booke Exception Prolog > > From: Torez Smith <lnxtorez@linux.vnet.ibm.com> > > Signed-off-by: Torez Smith <lnxtorez@linux.vnet.ibm.com> > Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> > --- > > arch/powerpc/kernel/head_booke.h | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) Can this be explained further as to what this gets us or does. - k
On Tue, 2010-03-02 at 08:50 -0600, Kumar Gala wrote: > On Mar 1, 2010, at 1:13 PM, Dave Kleikamp wrote: > > > powerpc/booke: Add Stack Marking support to Booke Exception Prolog > > > > From: Torez Smith <lnxtorez@linux.vnet.ibm.com> > > > > Signed-off-by: Torez Smith <lnxtorez@linux.vnet.ibm.com> > > Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> > > --- > > > > arch/powerpc/kernel/head_booke.h | 5 +++++ > > 1 files changed, 5 insertions(+), 0 deletions(-) > > Can this be explained further as to what this gets us or does. Yeah. Sorry about that. This is a debugging aid that identifies an exception on the stack. xmon recognizes the marker and identifies the exception frame in the stack trace. Other sub-architectures have it, but bookE is currently missing it. Ben, Torez, Is there any reason this patch is re-defining STACK_FRAME_REGS_MARKER rather than including asm/ptrace.h? Thanks, Shaggy
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index 50504ae..80d47f4 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -1,6 +1,8 @@ #ifndef __HEAD_BOOKE_H__ #define __HEAD_BOOKE_H__ +#define STACK_FRAME_REGS_MARKER ASM_CONST(0x72656773) + /* * Macros used for common Book-e exception handling */ @@ -48,6 +50,9 @@ stw r10,0(r11); \ rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ stw r0,GPR0(r11); \ + lis r10, STACK_FRAME_REGS_MARKER@ha;/* exception frame marker */ \ + addi r10, r10, STACK_FRAME_REGS_MARKER@l; \ + stw r10, 8(r11); \ SAVE_4GPRS(3, r11); \ SAVE_2GPRS(7, r11)