Skip to content

Commit b5efb61

Browse files
rnavmpe
authored andcommitted
powerpc/ftrace: Use FTRACE_REGS_ADDR to identify the correct ftrace trampoline
Instead of keying off DYNAMIC_FTRACE_WITH_REGS, use FTRACE_REGS_ADDR to identify the proper ftrace trampoline address to use. Signed-off-by: Naveen N Rao <naveen@kernel.org> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/6045a280a57a7ea937a5bb13ccac747026dbfb07.1687166935.git.naveen@kernel.org
1 parent 96d7a13 commit b5efb61

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

arch/powerpc/kernel/trace/ftrace.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,14 +745,9 @@ int __init ftrace_dyn_arch_init(void)
745745
};
746746
#endif
747747

748-
unsigned long addr;
748+
unsigned long addr = FTRACE_REGS_ADDR;
749749
long reladdr;
750750

751-
if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE_WITH_REGS))
752-
addr = ppc_global_function_entry((void *)ftrace_regs_caller);
753-
else
754-
addr = ppc_global_function_entry((void *)ftrace_caller);
755-
756751
if (IS_ENABLED(CONFIG_PPC_KERNEL_PCREL)) {
757752
for (i = 0; i < 2; i++) {
758753
reladdr = addr - (unsigned long)tramp[i];

0 commit comments

Comments
 (0)