aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-05-08 09:17:19 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-08 12:34:56 -0400
commit5192d84e4c32cd335fd572e5ff0712041f45f7e7 (patch)
treecff2adc01b146cb240c6e9e8662374d969a50284 /arch
parente0c1e9bf81badc7ba59e120d6218101903d5d103 (diff)
[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: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/pci-gart.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 9d3d76c85ae7..2480d3f08a47 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -639,6 +639,14 @@ static int __init pci_iommu_init(void)
639 return -1; 639 return -1;
640 } 640 }
641 641
642 i = 0;
643 for_all_nb(dev)
644 i++;
645 if (i > MAX_NB) {
646 printk(KERN_ERR "PCI-GART: Too many northbridges (%ld). Disabled\n", i);
647 return -1;
648 }
649
642 printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n"); 650 printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");
643 aper_size = info.aper_size * 1024 * 1024; 651 aper_size = info.aper_size * 1024 * 1024;
644 iommu_size = check_iommu_size(info.aper_base, aper_size); 652 iommu_size = check_iommu_size(info.aper_base, aper_size);