]> err.no Git - linux-2.6/commitdiff
[POWERPC] Set lower flag bits in regs->trap to indicate debug level exception
authorKumar Gala <galak@kernel.crashing.org>
Wed, 30 Apr 2008 10:44:53 +0000 (20:44 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 14 May 2008 12:31:37 +0000 (22:31 +1000)
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: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/head_booke.h
include/asm-powerpc/ptrace.h

index aefafc6330c9497be4d7c8c8b2cf9f5e63b51749..721faef870954459ac2cafafa10397c835a95d48 100644 (file)
@@ -272,7 +272,7 @@ label:
        /* continue normal handling for a critical exception... */            \
 2:     mfspr   r4,SPRN_DBSR;                                                 \
        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                                                 \
        START_EXCEPTION(DebugCrit);                                           \
index 39023dde1cc4c869ed9d7f4ed9b8baa623206ad7..38d87e5e569d5edb79d384e6916e833e936a69eb 100644 (file)
@@ -119,6 +119,7 @@ extern int ptrace_put_reg(struct task_struct *task, int regno,
 #ifndef __powerpc64__
 #define IS_CRITICAL_EXC(regs)  (((regs)->trap & 2) != 0)
 #define IS_MCHECK_EXC(regs)    (((regs)->trap & 4) != 0)
+#define IS_DEBUG_EXC(regs)     (((regs)->trap & 8) != 0)
 #endif /* ! __powerpc64__ */
 #define TRAP(regs)             ((regs)->trap & ~0xF)
 #ifdef __powerpc64__