OSDN Git Service

powerpc/code-patching: Move code patching selftests in its own file
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 2 Dec 2021 12:00:26 +0000 (13:00 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Dec 2021 11:36:58 +0000 (22:36 +1100)
commitf30a578d7653f7dbb253a20daad4bcd9f881d6c9
tree5d101c3e2c787447d9d98932781351cf527035ea
parent31acc599564120fa41f9df2c567842d003728dab
powerpc/code-patching: Move code patching selftests in its own file

Code patching selftests are half of code-patching.c.
As they are guarded by CONFIG_CODE_PATCHING_SELFTESTS,
they'd be better in their own file.

Also add a missing __init for instr_is_branch_to_addr()

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/c0c30504f04eb546a48ff77127a8bccd12a3d809.1638446239.git.christophe.leroy@csgroup.eu
arch/powerpc/lib/Makefile
arch/powerpc/lib/code-patching.c
arch/powerpc/lib/test-code-patching.c [new file with mode: 0644]