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

x86/asm: Rename rep_nop() to native_pause()

Rename rep_nop() function to what it really does.

No functional change intended.

Suggested-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Link: https://lore.kernel.org/r/20250418080805.83679-1-ubizjak@gmail.com

authored by

Uros Bizjak and committed by
Ingo Molnar
3ce4b1f1 d109ff4f

+4 -4
+2 -2
arch/x86/include/asm/vdso/processor.h
··· 8 8 #ifndef __ASSEMBLER__ 9 9 10 10 /* PAUSE is a good thing to insert into busy-wait loops. */ 11 - static __always_inline void rep_nop(void) 11 + static __always_inline void native_pause(void) 12 12 { 13 13 asm volatile("pause" ::: "memory"); 14 14 } 15 15 16 16 static __always_inline void cpu_relax(void) 17 17 { 18 - rep_nop(); 18 + native_pause(); 19 19 } 20 20 21 21 struct getcpu_cache;
+1 -1
arch/x86/kernel/apic/io_apic.c
··· 1486 1486 * 1 GHz == 40 jiffies 1487 1487 */ 1488 1488 do { 1489 - rep_nop(); 1489 + native_pause(); 1490 1490 now = rdtsc(); 1491 1491 } while ((now - start) < 40000000000ULL / HZ && time_before_eq(jiffies, end)); 1492 1492 }
+1 -1
arch/x86/lib/delay.c
··· 75 75 76 76 /* Allow RT tasks to run */ 77 77 preempt_enable(); 78 - rep_nop(); 78 + native_pause(); 79 79 preempt_disable(); 80 80 81 81 /*