提交 5192d84e 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[PATCH] x86_64: Check for too many northbridges in IOMMU code

The IOMMU code can only deal with 8 northbridges. Error out when
more are found.
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 e0c1e9bf
......@@ -639,6 +639,14 @@ static int __init pci_iommu_init(void)
return -1;
}
i = 0;
for_all_nb(dev)
i++;
if (i > MAX_NB) {
printk(KERN_ERR "PCI-GART: Too many northbridges (%ld). Disabled\n", i);
return -1;
}
printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");
aper_size = info.aper_size * 1024 * 1024;
iommu_size = check_iommu_size(info.aper_base, aper_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册