Skip to content

Commit

Permalink
x86/vdso: Use lfence instead of rep and nop
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
fenrus75 authored and xanmod committed Jan 8, 2024
1 parent 79291a5 commit 3da8a0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/vdso/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static __always_inline void rep_nop(void)
{
asm volatile("rep; nop" ::: "memory");
asm volatile("lfence" ::: "memory");
}

static __always_inline void cpu_relax(void)
Expand Down

0 comments on commit 3da8a0b

Please sign in to comment.