Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/alternatives: Rename 'text_poke_finish()' to 'smp_text_poke_batch_finish()'

This name is actively confusing as well, because the simple text_poke*()
APIs use MM-switching based code patching, while text_poke_finish()
is part of the INT3 based text_poke_int3_*() machinery that is an
additional layer of functionality on top of regular text_poke*() functionality.

Rename it to smp_text_poke_batch_finish() to make it clear which layer
it belongs to.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250411054105.2341982-16-mingo@kernel.org

Ingo Molnar e8d7b8c2 aedb60c2

+5 -5
+1 -1
arch/x86/include/asm/text-patching.h
··· 42 42 extern void smp_text_poke_single(void *addr, const void *opcode, size_t len, const void *emulate); 43 43 44 44 extern void text_poke_queue(void *addr, const void *opcode, size_t len, const void *emulate); 45 - extern void text_poke_finish(void); 45 + extern void smp_text_poke_batch_finish(void); 46 46 47 47 #define INT3_INSN_SIZE 1 48 48 #define INT3_INSN_OPCODE 0xCC
+1 -1
arch/x86/kernel/alternative.c
··· 2866 2866 } 2867 2867 } 2868 2868 2869 - void text_poke_finish(void) 2869 + void smp_text_poke_batch_finish(void) 2870 2870 { 2871 2871 smp_text_poke_batch_flush(NULL); 2872 2872 }
+2 -2
arch/x86/kernel/ftrace.c
··· 58 58 * module load, and we need to finish the text_poke_queue() 59 59 * that they do, here. 60 60 */ 61 - text_poke_finish(); 61 + smp_text_poke_batch_finish(); 62 62 ftrace_poke_late = 0; 63 63 mutex_unlock(&text_mutex); 64 64 } ··· 250 250 text_poke_queue((void *)rec->ip, new, MCOUNT_INSN_SIZE, NULL); 251 251 ftrace_update_record(rec, enable); 252 252 } 253 - text_poke_finish(); 253 + smp_text_poke_batch_finish(); 254 254 } 255 255 256 256 void arch_ftrace_update_code(int command)
+1 -1
arch/x86/kernel/jump_label.c
··· 143 143 void arch_jump_label_transform_apply(void) 144 144 { 145 145 mutex_lock(&text_mutex); 146 - text_poke_finish(); 146 + smp_text_poke_batch_finish(); 147 147 mutex_unlock(&text_mutex); 148 148 }