提交 85f9eebc 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[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: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 77d910f5
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册