summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/kprobes.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-06-23 16:07:34 +0200
committerTakashi Iwai <tiwai@suse.de>2010-06-23 16:07:34 +0200
commit1240e6b5532358257c52351639a8d2382fe58f84 (patch)
tree43d374ce976a41c6dcd12a70a51e0289093f8d07 /arch/powerpc/kernel/kprobes.c
parentc9ff921abecda352e987a6aae169118a3fc9aa5d (diff)
parenta5c7d797dcce3be5e77cd6ea62cc4920ededc32b (diff)
downloadop-kernel-dev-1240e6b5532358257c52351639a8d2382fe58f84.zip
op-kernel-dev-1240e6b5532358257c52351639a8d2382fe58f84.tar.gz
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r--arch/powerpc/kernel/kprobes.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index c533525..bc47352 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -378,17 +378,6 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
* single-stepped a copy of the instruction. The address of this
* copy is p->ainsn.insn.
*/
-static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
-{
- int ret;
- unsigned int insn = *p->ainsn.insn;
-
- regs->nip = (unsigned long)p->addr;
- ret = emulate_step(regs, insn);
- if (ret == 0)
- regs->nip = (unsigned long)p->addr + 4;
-}
-
static int __kprobes post_kprobe_handler(struct pt_regs *regs)
{
struct kprobe *cur = kprobe_running();
@@ -406,7 +395,8 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
cur->post_handler(cur, regs, 0);
}
- resume_execution(cur, regs);
+ /* Adjust nip to after the single-stepped instruction */
+ regs->nip = (unsigned long)cur->addr + 4;
regs->msr |= kcb->kprobe_saved_msr;
/*Restore back the original saved kprobes variables and continue. */
OpenPOWER on IntegriCloud