powerpc/lib/code-patching: Don't use struct 'ppc_inst' for runnable code in tests.
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 20 May 2021 13:50:44 +0000 (13:50 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Jun 2021 14:07:51 +0000 (00:07 +1000)
commite90a21ea801d1776d9a786ad02354fd3fe23ce09
treef3f4a7d9ef97e6af31911508e818859321fc3153
parent6c0d181daabcba286db9711eef8800b566fb1cce
powerpc/lib/code-patching: Don't use struct 'ppc_inst' for runnable code in tests.

'struct ppc_inst' is meant to represent an instruction internally, it
is not meant to dereference code in memory.

For testing code patching, use patch_instruction() to properly
write into memory the code to be tested.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/d8425fb42a4adebc35b7509f121817eeb02fac31.1621516826.git.christophe.leroy@csgroup.eu
arch/powerpc/lib/code-patching.c