diff options
author | Andi Kleen <ak@suse.de> | 2006-05-08 15:17:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-08 09:34:56 -0700 |
commit | 5192d84e4c32cd335fd572e5ff0712041f45f7e7 (patch) | |
tree | cff2adc01b146cb240c6e9e8662374d969a50284 /arch/x86_64 | |
parent | e0c1e9bf81badc7ba59e120d6218101903d5d103 (diff) | |
download | op-kernel-dev-5192d84e4c32cd335fd572e5ff0712041f45f7e7.zip op-kernel-dev-5192d84e4c32cd335fd572e5ff0712041f45f7e7.tar.gz |
[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 9d3d76c..2480d3f 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); |