mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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
This commit is contained in:
parent
96d7a13610
commit
b5efb61c70
1 changed files with 1 additions and 6 deletions
|
@ -745,14 +745,9 @@ int __init ftrace_dyn_arch_init(void)
|
|||
};
|
||||
#endif
|
||||
|
||||
unsigned long addr;
|
||||
unsigned long addr = FTRACE_REGS_ADDR;
|
||||
long reladdr;
|
||||
|
||||
if (IS_ENABLED(CONFIG_DYNAMIC_FTRACE_WITH_REGS))
|
||||
addr = ppc_global_function_entry((void *)ftrace_regs_caller);
|
||||
else
|
||||
addr = ppc_global_function_entry((void *)ftrace_caller);
|
||||
|
||||
if (IS_ENABLED(CONFIG_PPC_KERNEL_PCREL)) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
reladdr = addr - (unsigned long)tramp[i];
|
||||
|
|
Loading…
Add table
Reference in a new issue