Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199746
b: refs/heads/master
c: db97bc7
h: refs/heads/master
v: v3
  • Loading branch information
Ananth N Mavinakayanahalli authored and Benjamin Herrenschmidt committed Jun 2, 2010
1 parent c224119 commit 1db9bff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83aea945c21c646184a494a32ad5524248b60226
refs/heads/master: db97bc7f9997fef41b24c91f61c2f776d32d7ce3
14 changes: 2 additions & 12 deletions trunk/arch/powerpc/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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. */
Expand Down

0 comments on commit 1db9bff

Please sign in to comment.