]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/code-patching: Use jump_label for testing freed initmem
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 22 Mar 2022 15:40:20 +0000 (16:40 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 May 2022 13:06:39 +0000 (23:06 +1000)
commit0aecaa2d31f025392ceddf056ef2ab93048d0c3c
tree92673a5723ab58269ac2e7d458fa8f4e45643796
parenta5974c9528cbfd25c1df8a605517140afbd5c68d
powerpc/code-patching: Use jump_label for testing freed initmem

Once init is done, initmem is freed forever so no need to
test system_state at every call to patch_instruction().

Use jump_label.

This reduces by 2% the time needed to activate ftrace on an 8xx.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/0aee964721cab7316cffde21a2ca223cee14d373.1647962456.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/code-patching.h
arch/powerpc/lib/code-patching.c
arch/powerpc/mm/mem.c