Skip to content

Commit

Permalink
[PATCH] x86_64: Use cpu_relax in poll loop in GART IOMMU
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Mar 25, 2006
1 parent 77d910f commit 85f9eeb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/x86_64/kernel/pci-gart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 85f9eeb

Please sign in to comment.