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

x86/alternatives: Remove 'smp_text_poke_batch_flush()'

It only has a single user left, merge it into smp_text_poke_batch_add()
and remove the helper function.

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-50-mingo@kernel.org

Ingo Molnar 2c373ca0 b1bb3918

+2 -9
+2 -9
arch/x86/kernel/alternative.c
··· 2831 2831 smp_text_poke_batch_process(); 2832 2832 } 2833 2833 2834 - static void smp_text_poke_batch_flush(void *addr) 2835 - { 2836 - lockdep_assert_held(&text_mutex); 2837 - 2838 - if (text_poke_array.nr_entries == TEXT_POKE_ARRAY_MAX || !text_poke_addr_ordered(addr)) 2839 - smp_text_poke_batch_process(); 2840 - } 2841 - 2842 2834 /** 2843 2835 * smp_text_poke_batch_add() -- update instruction on live kernel on SMP, batched 2844 2836 * @addr: address to patch ··· 2846 2854 */ 2847 2855 void __ref smp_text_poke_batch_add(void *addr, const void *opcode, size_t len, const void *emulate) 2848 2856 { 2849 - smp_text_poke_batch_flush(addr); 2857 + if (text_poke_array.nr_entries == TEXT_POKE_ARRAY_MAX || !text_poke_addr_ordered(addr)) 2858 + smp_text_poke_batch_process(); 2850 2859 __smp_text_poke_batch_add(addr, opcode, len, emulate); 2851 2860 } 2852 2861