diff options
author | Suzuki K. Poulose <suzuki@in.ibm.com> | 2012-12-03 10:07:42 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-20 02:55:09 -0400 |
commit | 85f395c5b0a26b3a80f9e2d35333981a2a75c0ae (patch) | |
tree | 016f687191178e44e41ca4e509c7266506084b64 | |
parent | e80034047bee9ceacfc1bfff873ebfdd049817ca (diff) |
powerpc/kprobes: Do not disable External interrupts during single step
External/Decrement exceptions have lower priority than the Debug Exception.
So, we don't have to disable the External interrupts before a single step.
However, on BookE, Critical Input Exception(CE) has higher priority than a
Debug Exception. Hence we mask them.
Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Ananth N Mavinakaynahalli <ananth@in.ibm.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 11f5b03a0b06..560f430da478 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -104,13 +104,13 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) | |||
104 | 104 | ||
105 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 105 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
106 | { | 106 | { |
107 | /* We turn off async exceptions to ensure that the single step will | ||
108 | * be for the instruction we have the kprobe on, if we dont its | ||
109 | * possible we'd get the single step reported for an exception handler | ||
110 | * like Decrementer or External Interrupt */ | ||
111 | regs->msr &= ~MSR_EE; | ||
112 | regs->msr |= MSR_SINGLESTEP; | 107 | regs->msr |= MSR_SINGLESTEP; |
113 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | 108 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS |
109 | /* | ||
110 | * We turn off Critical Input Exception(CE) to ensure that the single | ||
111 | * step will be for the instruction we have the probe on; if we don't, | ||
112 | * it is possible we'd get the single step reported for CE. | ||
113 | */ | ||
114 | regs->msr &= ~MSR_CE; | 114 | regs->msr &= ~MSR_CE; |
115 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); | 115 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); |
116 | #ifdef CONFIG_PPC_47x | 116 | #ifdef CONFIG_PPC_47x |