]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/alternatives: Rename 'POKE_MAX_OPCODE_SIZE' to 'TEXT_POKE_MAX_OPCODE_SIZE'
authorIngo Molnar <mingo@kernel.org>
Fri, 11 Apr 2025 05:40:58 +0000 (07:40 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 11 Apr 2025 09:01:35 +0000 (11:01 +0200)
Join the TEXT_POKE_ namespace.

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-47-mingo@kernel.org
arch/x86/include/asm/text-patching.h
arch/x86/kernel/alternative.c

index d9dbbe9d9667976b97632522ce12153afb6f527d..a45ac8a223f3c1e8abe4c88743fd4110c010bb4d 100644 (file)
@@ -11,7 +11,7 @@
  * JUMP_LABEL_NOP_SIZE/RELATIVEJUMP_SIZE, which are 5.
  * Raise it if needed.
  */
-#define POKE_MAX_OPCODE_SIZE   5
+#define TEXT_POKE_MAX_OPCODE_SIZE      5
 
 extern void text_poke_early(void *addr, const void *opcode, size_t len);
 
@@ -82,7 +82,7 @@ static __always_inline int text_opcode_size(u8 opcode)
 }
 
 union text_poke_insn {
-       u8 text[POKE_MAX_OPCODE_SIZE];
+       u8 text[TEXT_POKE_MAX_OPCODE_SIZE];
        struct {
                u8 opcode;
                s32 disp;
index 4b460dea4f4e7b7e07a9330b9d77f7dd44f58931..b8e0b1b2383fafc0ad0b2b2e0bbde90876d6316a 100644 (file)
@@ -2461,7 +2461,7 @@ struct smp_text_poke_loc {
        s32 disp;
        u8 len;
        u8 opcode;
-       const u8 text[POKE_MAX_OPCODE_SIZE];
+       const u8 text[TEXT_POKE_MAX_OPCODE_SIZE];
        /* see smp_text_poke_batch_process() */
        u8 old;
 };
@@ -2653,8 +2653,8 @@ static void smp_text_poke_batch_process(void)
         * Second step: update all but the first byte of the patched range.
         */
        for (do_sync = 0, i = 0; i < text_poke_array.nr_entries; i++) {
-               u8 old[POKE_MAX_OPCODE_SIZE+1] = { text_poke_array.vec[i].old, };
-               u8 _new[POKE_MAX_OPCODE_SIZE+1];
+               u8 old[TEXT_POKE_MAX_OPCODE_SIZE+1] = { text_poke_array.vec[i].old, };
+               u8 _new[TEXT_POKE_MAX_OPCODE_SIZE+1];
                const u8 *new = text_poke_array.vec[i].text;
                int len = text_poke_array.vec[i].len;