Commit 92e02a51 authored by Michael Ellerman's avatar Michael Ellerman Committed by Benjamin Herrenschmidt

powerpc/ftrace: Use PPC_INST_NOP directly

There's no need to wrap PPC_INST_NOP in a static inline.
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 898b160f
...@@ -25,11 +25,6 @@ ...@@ -25,11 +25,6 @@
#ifdef CONFIG_DYNAMIC_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE
static unsigned int ftrace_nop_replace(void)
{
return PPC_INST_NOP;
}
static unsigned int static unsigned int
ftrace_call_replace(unsigned long ip, unsigned long addr, int link) ftrace_call_replace(unsigned long ip, unsigned long addr, int link)
{ {
...@@ -314,7 +309,7 @@ int ftrace_make_nop(struct module *mod, ...@@ -314,7 +309,7 @@ int ftrace_make_nop(struct module *mod,
if (test_24bit_addr(ip, addr)) { if (test_24bit_addr(ip, addr)) {
/* within range */ /* within range */
old = ftrace_call_replace(ip, addr, 1); old = ftrace_call_replace(ip, addr, 1);
new = ftrace_nop_replace(); new = PPC_INST_NOP;
return ftrace_modify_code(ip, old, new); return ftrace_modify_code(ip, old, new);
} }
...@@ -452,7 +447,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) ...@@ -452,7 +447,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
*/ */
if (test_24bit_addr(ip, addr)) { if (test_24bit_addr(ip, addr)) {
/* within range */ /* within range */
old = ftrace_nop_replace(); old = PPC_INST_NOP;
new = ftrace_call_replace(ip, addr, 1); new = ftrace_call_replace(ip, addr, 1);
return ftrace_modify_code(ip, old, new); return ftrace_modify_code(ip, old, new);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment