From: Uros Bizjak Date: Fri, 18 Apr 2025 08:07:43 +0000 (+0200) Subject: x86/asm: Rename rep_nop() to native_pause() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3ce4b1f1f24bbd9f1c349ecb6641dfa038bd0b5a;p=users%2Fdwmw2%2Flinux.git 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 Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Link: https://lore.kernel.org/r/20250418080805.83679-1-ubizjak@gmail.com --- diff --git a/arch/x86/include/asm/vdso/processor.h b/arch/x86/include/asm/vdso/processor.h index 240d761b8ce41..7000aeb59aa28 100644 --- a/arch/x86/include/asm/vdso/processor.h +++ b/arch/x86/include/asm/vdso/processor.h @@ -8,14 +8,14 @@ #ifndef __ASSEMBLER__ /* PAUSE is a good thing to insert into busy-wait loops. */ -static __always_inline void rep_nop(void) +static __always_inline void native_pause(void) { asm volatile("pause" ::: "memory"); } static __always_inline void cpu_relax(void) { - rep_nop(); + native_pause(); } struct getcpu_cache; diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index eebc360ed1bbf..ba5a4ccda37a5 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1486,7 +1486,7 @@ static void __init delay_with_tsc(void) * 1 GHz == 40 jiffies */ do { - rep_nop(); + native_pause(); now = rdtsc(); } while ((now - start) < 40000000000ULL / HZ && time_before_eq(jiffies, end)); } diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c index e86eda2c0b040..eb2d2e1cbddd4 100644 --- a/arch/x86/lib/delay.c +++ b/arch/x86/lib/delay.c @@ -75,7 +75,7 @@ static void delay_tsc(u64 cycles) /* Allow RT tasks to run */ preempt_enable(); - rep_nop(); + native_pause(); preempt_disable(); /*