]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdb8fa9cd874da2b4bfd2095878dc9f662a919670
treef3f4a7d9ef97e6af31911508e818859321fc3153
parentfb88cc39ae6e3b1e7a8488556aec4eac99b4b2d9
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