Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138462
b: refs/heads/master
c: 17be5b3
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Benjamin Herrenschmidt committed Feb 22, 2009
1 parent 2c2fa16 commit 497c275
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 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: 44e1d064b919cb3a56ef67e0f7e244927be8369a
refs/heads/master: 17be5b3ddf71d980f67fc826e49b00cd2afd724d
16 changes: 15 additions & 1 deletion trunk/arch/powerpc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ static int test_24bit_addr(unsigned long ip, unsigned long addr)
return create_branch((unsigned int *)ip, addr, 0);
}

#ifdef CONFIG_MODULES

static int is_bl_op(unsigned int op)
{
return (op & 0xfc000003) == 0x48000001;
Expand Down Expand Up @@ -324,6 +326,7 @@ __ftrace_make_nop(struct module *mod,
return 0;
}
#endif /* PPC64 */
#endif /* CONFIG_MODULES */

int ftrace_make_nop(struct module *mod,
struct dyn_ftrace *rec, unsigned long addr)
Expand All @@ -343,6 +346,7 @@ int ftrace_make_nop(struct module *mod,
return ftrace_modify_code(ip, old, new);
}

#ifdef CONFIG_MODULES
/*
* Out of range jumps are called from modules.
* We should either already have a pointer to the module
Expand All @@ -367,9 +371,13 @@ int ftrace_make_nop(struct module *mod,
mod = rec->arch.mod;

return __ftrace_make_nop(mod, rec, addr);

#else
/* We should not get here without modules */
return -EINVAL;
#endif /* CONFIG_MODULES */
}

#ifdef CONFIG_MODULES
#ifdef CONFIG_PPC64
static int
__ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
Expand Down Expand Up @@ -458,6 +466,7 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
return 0;
}
#endif /* CONFIG_PPC64 */
#endif /* CONFIG_MODULES */

int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
{
Expand All @@ -476,6 +485,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
return ftrace_modify_code(ip, old, new);
}

#ifdef CONFIG_MODULES
/*
* Out of range jumps are called from modules.
* Being that we are converting from nop, it had better
Expand All @@ -487,6 +497,10 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
}

return __ftrace_make_call(rec, addr);
#else
/* We should not get here without modules */
return -EINVAL;
#endif /* CONFIG_MODULES */
}

int ftrace_update_ftrace_func(ftrace_func_t func)
Expand Down

0 comments on commit 497c275

Please sign in to comment.