diff options
author | Andi Kleen <ak@suse.de> | 2006-05-08 17:17:19 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-08 20:34:56 +0400 |
commit | 5192d84e4c32cd335fd572e5ff0712041f45f7e7 (patch) | |
tree | cff2adc01b146cb240c6e9e8662374d969a50284 /arch/x86_64 | |
parent | e0c1e9bf81badc7ba59e120d6218101903d5d103 (diff) | |
download | linux-5192d84e4c32cd335fd572e5ff0712041f45f7e7.tar.xz |
[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/x86_64')
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 8 |
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) 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); |