This name is actively confusing as well, because the simple text_poke*()
APIs use MM-switching based code patching, while text_poke_queue()
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_add() 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-17-mingo@kernel.org
 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 smp_text_poke_batch_add(void *addr, const void *opcode, size_t len, const void *emulate);
 extern void smp_text_poke_batch_finish(void);
 
 #define INT3_INSN_SIZE         1
 
        smp_text_poke_batch_flush(NULL);
 }
 
-void __ref text_poke_queue(void *addr, const void *opcode, size_t len, const void *emulate)
+void __ref smp_text_poke_batch_add(void *addr, const void *opcode, size_t len, const void *emulate)
 {
        struct text_poke_loc *tp;
 
 
 {
        /*
         * ftrace_make_{call,nop}() may be called during
-        * module load, and we need to finish the text_poke_queue()
+        * module load, and we need to finish the smp_text_poke_batch_add()
         * that they do, here.
         */
        smp_text_poke_batch_finish();
 
        /* replace the text with the new text */
        if (ftrace_poke_late)
-               text_poke_queue((void *)ip, new_code, MCOUNT_INSN_SIZE, NULL);
+               smp_text_poke_batch_add((void *)ip, new_code, MCOUNT_INSN_SIZE, NULL);
        else
                text_poke_early((void *)ip, new_code, MCOUNT_INSN_SIZE);
        return 0;
                        break;
                }
 
-               text_poke_queue((void *)rec->ip, new, MCOUNT_INSN_SIZE, NULL);
+               smp_text_poke_batch_add((void *)rec->ip, new, MCOUNT_INSN_SIZE, NULL);
                ftrace_update_record(rec, enable);
        }
        smp_text_poke_batch_finish();
 
 
        mutex_lock(&text_mutex);
        jlp = __jump_label_patch(entry, type);
-       text_poke_queue((void *)jump_entry_code(entry), jlp.code, jlp.size, NULL);
+       smp_text_poke_batch_add((void *)jump_entry_code(entry), jlp.code, jlp.size, NULL);
        mutex_unlock(&text_mutex);
        return true;
 }