summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-03-25 16:29:37 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 09:10:53 -0800
commit85f9eebccde51e24896f31383f5b70776362e1a6 (patch)
treede990ac5c7982fb05940d764b58f4ea20013c77d
parent77d910f557c44db0fa72ee856c41cdd56972cfca (diff)
downloadop-kernel-dev-85f9eebccde51e24896f31383f5b70776362e1a6.zip
op-kernel-dev-85f9eebccde51e24896f31383f5b70776362e1a6.tar.gz
[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>
-rw-r--r--arch/x86_64/kernel/pci-gart.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 0c3f052..ebd125e 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -148,9 +148,12 @@ static void flush_gart(struct device *dev)
if (!northbridges[i])
continue;
/* Make sure the hardware actually executed the flush. */
- do {
+ for (;;) {
pci_read_config_dword(northbridges[i], 0x9c, &w);
- } while (w & 1);
+ if (!(w & 1))
+ break;
+ cpu_relax();
+ }
}
if (!flushed)
printk("nothing to flush?\n");
OpenPOWER on IntegriCloud