summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ping Fan <kernelfans@gmail.com>2014-02-26 10:23:01 +0800
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-02-28 18:06:25 +1100
commita95fc58549e8f462e560868a16b1fa97b12d5db6 (patch)
treeba75bfff830656fef1b4647ab2dc4663320896f1
parentf5295bd8ea8a65dc5eac608b151386314cb978f1 (diff)
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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 9b27b293a92..b0ded97ee4e 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);