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

x86/alternatives: Rename 'text_poke_flush()' to 'smp_text_poke_batch_flush()'

This name is actually actively confusing, because the simple text_poke*()
APIs use MM-switching based code patching, while text_poke_flush()
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_flush() 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-15-mingo@kernel.org

Ingo Molnar aedb60c2 f5afa2e8

+3 -3
+3 -3
arch/x86/kernel/alternative.c
··· 2858 2858 return false; 2859 2859 } 2860 2860 2861 - static void text_poke_flush(void *addr) 2861 + static void smp_text_poke_batch_flush(void *addr) 2862 2862 { 2863 2863 if (tp_vec_nr == TP_VEC_MAX || tp_order_fail(addr)) { 2864 2864 smp_text_poke_batch_process(tp_vec, tp_vec_nr); ··· 2868 2868 2869 2869 void text_poke_finish(void) 2870 2870 { 2871 - text_poke_flush(NULL); 2871 + smp_text_poke_batch_flush(NULL); 2872 2872 } 2873 2873 2874 2874 void __ref text_poke_queue(void *addr, const void *opcode, size_t len, const void *emulate) 2875 2875 { 2876 2876 struct text_poke_loc *tp; 2877 2877 2878 - text_poke_flush(addr); 2878 + smp_text_poke_batch_flush(addr); 2879 2879 2880 2880 tp = &tp_vec[tp_vec_nr++]; 2881 2881 text_poke_loc_init(tp, addr, opcode, len, emulate);