powerpc/ftrace: Simplify ftrace_make_nop()
authorNaveen N Rao <naveen@kernel.org>
Mon, 19 Jun 2023 09:47:29 +0000 (15:17 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 21 Aug 2023 14:09:06 +0000 (00:09 +1000)
commit562bde0bfc968d212d10ba6bf921a0774feebbac
tree90e757a7557dd876cd5eca0a3366616fd7bd9c0f
parentcc93b9233230312a8a905fabd590c405d60f9edd
powerpc/ftrace: Simplify ftrace_make_nop()

Now that we validate the ftrace location during initialization in
ftrace_init_nop(), we can simplify ftrace_make_nop() to patch-in the nop
without worrying about the instructions surrounding the ftrace location.
Note that we continue to ensure that we have a bl to
ftrace_[regs_]caller at the ftrace location before nop-ing it out.

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/e12ccbf28c50c3a07fb614f4d392e55f7098a729.1687166935.git.naveen@kernel.org
arch/powerpc/kernel/trace/ftrace.c