diff options
author | Andi Kleen <ak@suse.de> | 2006-03-25 10:29:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:10:53 -0500 |
commit | 85f9eebccde51e24896f31383f5b70776362e1a6 (patch) | |
tree | de990ac5c7982fb05940d764b58f4ea20013c77d /arch/x86_64/kernel/pci-gart.c | |
parent | 77d910f557c44db0fa72ee856c41cdd56972cfca (diff) |
[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>
Diffstat (limited to 'arch/x86_64/kernel/pci-gart.c')
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 7 |
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 0c3f052ba6ce..ebd125e968be 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) | |||
148 | if (!northbridges[i]) | 148 | if (!northbridges[i]) |
149 | continue; | 149 | continue; |
150 | /* Make sure the hardware actually executed the flush. */ | 150 | /* Make sure the hardware actually executed the flush. */ |
151 | do { | 151 | for (;;) { |
152 | pci_read_config_dword(northbridges[i], 0x9c, &w); | 152 | pci_read_config_dword(northbridges[i], 0x9c, &w); |
153 | } while (w & 1); | 153 | if (!(w & 1)) |
154 | break; | ||
155 | cpu_relax(); | ||
156 | } | ||
154 | } | 157 | } |
155 | if (!flushed) | 158 | if (!flushed) |
156 | printk("nothing to flush?\n"); | 159 | printk("nothing to flush?\n"); |