[PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
authorAndreas Mohr <andi@rhlx01.fht-esslingen.de>
Mon, 26 Jun 2006 11:59:29 +0000 (13:59 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 17:48:21 +0000 (10:48 -0700)
This one is adding a cpu_relax() that already existed in the i386 version.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-x86_64/apic.h

index 9d43ac8519bffa5b2408cfd00b968ac25fccad9a..9c96a0a8d1bd3c07f4e600e180135e7c7e12e8a4 100644 (file)
@@ -49,7 +49,8 @@ static __inline unsigned int apic_read(unsigned long reg)
 
 static __inline__ void apic_wait_icr_idle(void)
 {
-       while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY );
+       while (apic_read( APIC_ICR ) & APIC_ICR_BUSY)
+               cpu_relax();
 }
 
 static inline void ack_APIC_irq(void)