[PATCH] x86_64: Use cpu_relax in poll loop in GART IOMMU

The code waits for the GART to clear the TLB flush bit. Use cpu_relax
in this time to allow hypervisors to yield the CPU in this time.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Andi Kleen 2006-03-25 16:29:37 +01:00 committed by Linus Torvalds
parent 77d910f557
commit 85f9eebccd
1 changed files with 5 additions and 2 deletions

View File

@ -148,9 +148,12 @@ static void flush_gart(struct device *dev)
if (!northbridges[i]) if (!northbridges[i])
continue; continue;
/* Make sure the hardware actually executed the flush. */ /* Make sure the hardware actually executed the flush. */
do { for (;;) {
pci_read_config_dword(northbridges[i], 0x9c, &w); pci_read_config_dword(northbridges[i], 0x9c, &w);
} while (w & 1); if (!(w & 1))
break;
cpu_relax();
}
} }
if (!flushed) if (!flushed)
printk("nothing to flush?\n"); printk("nothing to flush?\n");