From 9c093cee11563cfa782f43038ca69c38fa3858ab Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Fri, 28 Apr 2006 17:38:42 +0530 Subject: [PATCH] --- yaml --- r: 26510 b: refs/heads/master c: 0ccde0a290b44b8296b82a7683b4c299eb51ba6b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/kprobes.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index c6d6d6fe861b..83b5258e5e13 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 054d8ff37710efaebd1998ce94d366df315a354f +refs/heads/master: 0ccde0a290b44b8296b82a7683b4c299eb51ba6b diff --git a/trunk/arch/powerpc/kernel/kprobes.c b/trunk/arch/powerpc/kernel/kprobes.c index 856ef1a832b9..f78866367b70 100644 --- a/trunk/arch/powerpc/kernel/kprobes.c +++ b/trunk/arch/powerpc/kernel/kprobes.c @@ -90,15 +90,15 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) { - kprobe_opcode_t insn = *p->ainsn.insn; - regs->msr |= MSR_SE; - /* single step inline if it is a trap variant */ - if (is_trap(insn)) - regs->nip = (unsigned long)p->addr; - else - regs->nip = (unsigned long)p->ainsn.insn; + /* + * On powerpc we should single step on the original + * instruction even if the probed insn is a trap + * variant as values in regs could play a part in + * if the trap is taken or not + */ + regs->nip = (unsigned long)p->ainsn.insn; } static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)