Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120099
b: refs/heads/master
c: b5cfeac
h: refs/heads/master
i:
  120097: 3919170
  120095: 64bc050
v: v3
  • Loading branch information
Paul Mundt committed Dec 22, 2008
1 parent 34781f6 commit e0416bb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4bc3e7192cf9a47d9864c4e8259859be55a480b3
refs/heads/master: b5cfeac990cc164a3d3422aab88ac5b138fa822d
24 changes: 24 additions & 0 deletions trunk/arch/sh/kernel/ftrace.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008 Matt Fleming <mjf@gentoo.org>
* Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org>
*
* Code for replacing ftrace calls with jumps.
*
Expand Down Expand Up @@ -100,6 +101,29 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
return ftrace_modify_code(ip + MCOUNT_INSN_OFFSET, old, new);
}

int ftrace_make_nop(struct module *mod,
struct dyn_ftrace *rec, unsigned long addr)
{
unsigned char *new, *old;
unsigned long ip = rec->ip;

old = ftrace_call_replace(ip, addr);
new = ftrace_nop_replace();

return ftrace_modify_code(rec->ip, old, new);
}

int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
{
unsigned char *new, *old;
unsigned long ip = rec->ip;

old = ftrace_nop_replace();
new = ftrace_call_replace(ip, addr);

return ftrace_modify_code(rec->ip, old, new);
}

int __init ftrace_dyn_arch_init(void *data)
{
/* The return code is retured via data */
Expand Down

0 comments on commit e0416bb

Please sign in to comment.