Commit 663276b7 authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras

[POWERPC] Set lower flag bits in regs->trap to indicate debug level exception

We use the low bits of regs->trap as flag bits.  We already indicate
critical and machine check level exceptions via this mechanism.  Extend it
to indicate debug level exceptions.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7a10174e
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
/* continue normal handling for a critical exception... */ \ /* continue normal handling for a critical exception... */ \
2: mfspr r4,SPRN_DBSR; \ 2: mfspr r4,SPRN_DBSR; \
addi r3,r1,STACK_FRAME_OVERHEAD; \ addi r3,r1,STACK_FRAME_OVERHEAD; \
EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) EXC_XFER_TEMPLATE(DebugException, 0x2008, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
#define DEBUG_CRIT_EXCEPTION \ #define DEBUG_CRIT_EXCEPTION \
START_EXCEPTION(DebugCrit); \ START_EXCEPTION(DebugCrit); \
......
...@@ -119,6 +119,7 @@ extern int ptrace_put_reg(struct task_struct *task, int regno, ...@@ -119,6 +119,7 @@ extern int ptrace_put_reg(struct task_struct *task, int regno,
#ifndef __powerpc64__ #ifndef __powerpc64__
#define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0) #define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0)
#define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0) #define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0)
#define IS_DEBUG_EXC(regs) (((regs)->trap & 8) != 0)
#endif /* ! __powerpc64__ */ #endif /* ! __powerpc64__ */
#define TRAP(regs) ((regs)->trap & ~0xF) #define TRAP(regs) ((regs)->trap & ~0xF)
#ifdef __powerpc64__ #ifdef __powerpc64__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment