]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/alternatives: Rename 'text_poke_finish()' to 'smp_text_poke_batch_finish()'
authorIngo Molnar <mingo@kernel.org>
Fri, 11 Apr 2025 05:40:27 +0000 (07:40 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 11 Apr 2025 09:01:33 +0000 (11:01 +0200)
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
arch/x86/include/asm/text-patching.h
arch/x86/kernel/alternative.c
arch/x86/kernel/ftrace.c
arch/x86/kernel/jump_label.c

index 7e35273857081796861ee6be788ccab54499a51e..f27d29042f8cfc04b248bb0ef39421ffc4dd251d 100644 (file)
@@ -42,7 +42,7 @@ extern int smp_text_poke_int3_handler(struct pt_regs *regs);
 extern void smp_text_poke_single(void *addr, const void *opcode, size_t len, const void *emulate);
 
 extern void text_poke_queue(void *addr, const void *opcode, size_t len, const void *emulate);
-extern void text_poke_finish(void);
+extern void smp_text_poke_batch_finish(void);
 
 #define INT3_INSN_SIZE         1
 #define INT3_INSN_OPCODE       0xCC
index 6c8bf2fd7a1ca6e57b6152a5daca769c338ffb86..0589c051fe83f920f98fa8a59de5c9f12c4bcaab 100644 (file)
@@ -2866,7 +2866,7 @@ static void smp_text_poke_batch_flush(void *addr)
        }
 }
 
-void text_poke_finish(void)
+void smp_text_poke_batch_finish(void)
 {
        smp_text_poke_batch_flush(NULL);
 }
index 7175a0404def38bcc160282998b04583863ddd6d..c35a928364b9d518181bd18982eaa992e8b3f7be 100644 (file)
@@ -58,7 +58,7 @@ void ftrace_arch_code_modify_post_process(void)
         * module load, and we need to finish the text_poke_queue()
         * that they do, here.
         */
-       text_poke_finish();
+       smp_text_poke_batch_finish();
        ftrace_poke_late = 0;
        mutex_unlock(&text_mutex);
 }
@@ -250,7 +250,7 @@ void ftrace_replace_code(int enable)
                text_poke_queue((void *)rec->ip, new, MCOUNT_INSN_SIZE, NULL);
                ftrace_update_record(rec, enable);
        }
-       text_poke_finish();
+       smp_text_poke_batch_finish();
 }
 
 void arch_ftrace_update_code(int command)
index 166e12037199d90f30d1ecaa706a38f5d2438500..28be6eb6cb3dd4ed5714904eb3917e740000384e 100644 (file)
@@ -143,6 +143,6 @@ bool arch_jump_label_transform_queue(struct jump_entry *entry,
 void arch_jump_label_transform_apply(void)
 {
        mutex_lock(&text_mutex);
-       text_poke_finish();
+       smp_text_poke_batch_finish();
        mutex_unlock(&text_mutex);
 }