* [PATCH] [POWERPC] Set lower flag bits in regs->trap to indicate debug level exception
@ 2008-04-30 10:44 Kumar Gala
2008-04-30 21:43 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2008-04-30 10:44 UTC (permalink / raw)
To: linuxppc-dev
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>
---
arch/powerpc/kernel/head_booke.h | 2 +-
include/asm-powerpc/ptrace.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index 5f5429f..24cc6b8 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -278,7 +278,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); \
diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h
index 39023dd..38d87e5 100644
--- a/include/asm-powerpc/ptrace.h
+++ b/include/asm-powerpc/ptrace.h
@@ -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__
--
1.5.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWERPC] Set lower flag bits in regs->trap to indicate debug level exception
2008-04-30 10:44 [PATCH] [POWERPC] Set lower flag bits in regs->trap to indicate debug level exception Kumar Gala
@ 2008-04-30 21:43 ` Benjamin Herrenschmidt
2008-04-30 21:49 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-30 21:43 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
On Wed, 2008-04-30 at 05:44 -0500, Kumar Gala wrote:
> 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>
Ack.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWERPC] Set lower flag bits in regs->trap to indicate debug level exception
2008-04-30 21:43 ` Benjamin Herrenschmidt
@ 2008-04-30 21:49 ` Kumar Gala
0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2008-04-30 21:49 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
On Apr 30, 2008, at 4:43 PM, Benjamin Herrenschmidt wrote:
>
> On Wed, 2008-04-30 at 05:44 -0500, Kumar Gala wrote:
>> 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>
>
> Ack.
that was the easy one :)
- k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-30 21:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 10:44 [PATCH] [POWERPC] Set lower flag bits in regs->trap to indicate debug level exception Kumar Gala
2008-04-30 21:43 ` Benjamin Herrenschmidt
2008-04-30 21:49 ` Kumar Gala
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).