Re: cpu_relax(), rep: nop, and PAUSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-02-19 13:20, David Shwatrz wrote:
> We have:
> #define cpu_relax()	asm volatile("rep; nop")
> in arch/x86/boot/boot.h.
> 
> Why don't we use the PAUSE assembler instruction here ?

If you dig further into the Intel x86 manual, the machine instructions
'pause' and 'rep;nop' actually use the exact same encoding. As some
older assembler might not know the 'pause' mnemonic, using 'rep;nop'
here is most probably for backwards compatibility.

Rainer


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux