diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-03-22 18:40:20 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-05-11 16:06:39 +0300 |
commit | b033767848c4115e486b1a51946de3bee2ac0fa6 (patch) | |
tree | 92673a5723ab58269ac2e7d458fa8f4e45643796 /arch/powerpc/mm/mem.c | |
parent | cb3ac45214c03852430979a43180371a44b74596 (diff) | |
download | linux-b033767848c4115e486b1a51946de3bee2ac0fa6.tar.xz |
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
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r-- | arch/powerpc/mm/mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 4d221d033804..177fae5ea0d1 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -22,6 +22,7 @@ #include <asm/kasan.h> #include <asm/svm.h> #include <asm/mmzone.h> +#include <asm/code-patching.h> #include <mm/mmu_decl.h> @@ -311,6 +312,7 @@ void free_initmem(void) { ppc_md.progress = ppc_printk_progress; mark_initmem_nx(); + static_branch_enable(&init_mem_is_free); free_initmem_default(POISON_FREE_INITMEM); } |