diff options
author | Liu Ping Fan <kernelfans@gmail.com> | 2014-03-18 17:10:05 +1100 |
---|---|---|
committer | Eli Qiao <taget@linux.vnet.ibm.com> | 2014-03-19 10:23:07 +0800 |
commit | 2e73930093bf4597e11e9ef40d3c41d65d9ed2b5 (patch) | |
tree | aa80384fb9066ec7ef37e0fff45b28bb6a539974 | |
parent | ee428a2ac3592e73990ac69596f217427c77b91d (diff) | |
download | powerpc-2e73930093bf4597e11e9ef40d3c41d65d9ed2b5.tar.gz |
powerpc/ftrace: bugfix for test_24bit_addr
The branch target should be the func addr, not the addr of func_descr_t.
So using ppc_function_entry() to generate the right target addr.
Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/kernel/ftrace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 1fb78561096acc..7295dd5090c840 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c @@ -74,6 +74,7 @@ ftrace_modify_code(unsigned long ip, unsigned int old, unsigned int new) */ static int test_24bit_addr(unsigned long ip, unsigned long addr) { + addr = ppc_function_entry((void *)addr); /* use the create_branch to verify that this offset can be branched */ return create_branch((unsigned int *)ip, addr, 0); |