powerpc/ftrace: Skip instruction patching if the instructions are the same
authorNaveen N Rao <naveen@kernel.org>
Wed, 30 Oct 2024 07:08:40 +0000 (12:38 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Oct 2024 00:00:53 +0000 (11:00 +1100)
commit1d59bd2fc07f0b2e643b2a07405cf0717b93984f
tree9ced53127b746a27c4734b72ed92b7616fd54096
parent8b0dc1305ea0bbb015b560193cdd76fd4100f062
powerpc/ftrace: Skip instruction patching if the instructions are the same

To simplify upcoming changes to ftrace, add a check to skip actual
instruction patching if the old and new instructions are the same. We
still validate that the instruction is what we expect, but don't
actually patch the same instruction again.

Signed-off-by: Naveen N Rao <naveen@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241030070850.1361304-8-hbathini@linux.ibm.com
arch/powerpc/kernel/trace/ftrace.c