powerpc/64s: Use symbolic macros for function entry encoding
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Mar 2021 06:53:15 +0000 (17:53 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Mar 2021 20:58:04 +0000 (07:58 +1100)
commit7aed41cff35a9aaf3431b8c0c23daa7d8bb77cd3
tree3c17ec7fad5d0ab7612be5a6c52e003db61e32a8
parentcea15316ceee2d4a51dfdecd79e08a438135416c
powerpc/64s: Use symbolic macros for function entry encoding

In ppc_function_entry() we look for a specific set of instructions by
masking the instructions and comparing with a known value. Currently
those known values are just literal hex values, and we recently
discovered one of them was wrong.

Instead construct the values using the existing constants we have for
defining various fields of instructions.

Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20210309071544.515303-1-mpe@ellerman.id.au
arch/powerpc/include/asm/code-patching.h