Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Kumar Gala and committed by
Paul Mackerras
663276b7 7a10174e

+2 -1
+1 -1
arch/powerpc/kernel/head_booke.h
··· 272 272 /* continue normal handling for a critical exception... */ \ 273 273 2: mfspr r4,SPRN_DBSR; \ 274 274 addi r3,r1,STACK_FRAME_OVERHEAD; \ 275 - EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) 275 + EXC_XFER_TEMPLATE(DebugException, 0x2008, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) 276 276 277 277 #define DEBUG_CRIT_EXCEPTION \ 278 278 START_EXCEPTION(DebugCrit); \
+1
include/asm-powerpc/ptrace.h
··· 119 119 #ifndef __powerpc64__ 120 120 #define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0) 121 121 #define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0) 122 + #define IS_DEBUG_EXC(regs) (((regs)->trap & 8) != 0) 122 123 #endif /* ! __powerpc64__ */ 123 124 #define TRAP(regs) ((regs)->trap & ~0xF) 124 125 #ifdef __powerpc64__