diff options
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 11f5b03a0b06..2156ea90eb54 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -36,12 +36,6 @@ | |||
36 | #include <asm/sstep.h> | 36 | #include <asm/sstep.h> |
37 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
38 | 38 | ||
39 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | ||
40 | #define MSR_SINGLESTEP (MSR_DE) | ||
41 | #else | ||
42 | #define MSR_SINGLESTEP (MSR_SE) | ||
43 | #endif | ||
44 | |||
45 | DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; | 39 | DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; |
46 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 40 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
47 | 41 | ||
@@ -104,19 +98,7 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) | |||
104 | 98 | ||
105 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 99 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
106 | { | 100 | { |
107 | /* We turn off async exceptions to ensure that the single step will | 101 | enable_single_step(regs); |
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; | ||
113 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | ||
114 | regs->msr &= ~MSR_CE; | ||
115 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); | ||
116 | #ifdef CONFIG_PPC_47x | ||
117 | isync(); | ||
118 | #endif | ||
119 | #endif | ||
120 | 102 | ||
121 | /* | 103 | /* |
122 | * On powerpc we should single step on the original | 104 | * On powerpc we should single step on the original |