diff options
Diffstat (limited to 'arch/x86_64/kernel/pci-gart.c')
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index a6c01e121266..82a7c9bfdfa0 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -112,10 +112,6 @@ static unsigned long alloc_iommu(int size) | |||
112 | static void free_iommu(unsigned long offset, int size) | 112 | static void free_iommu(unsigned long offset, int size) |
113 | { | 113 | { |
114 | unsigned long flags; | 114 | unsigned long flags; |
115 | if (size == 1) { | ||
116 | clear_bit(offset, iommu_gart_bitmap); | ||
117 | return; | ||
118 | } | ||
119 | spin_lock_irqsave(&iommu_bitmap_lock, flags); | 115 | spin_lock_irqsave(&iommu_bitmap_lock, flags); |
120 | __clear_bit_string(iommu_gart_bitmap, offset, size); | 116 | __clear_bit_string(iommu_gart_bitmap, offset, size); |
121 | spin_unlock_irqrestore(&iommu_bitmap_lock, flags); | 117 | spin_unlock_irqrestore(&iommu_bitmap_lock, flags); |
@@ -635,14 +631,20 @@ static int __init pci_iommu_init(void) | |||
635 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); | 631 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); |
636 | if (end_pfn > MAX_DMA32_PFN) { | 632 | if (end_pfn > MAX_DMA32_PFN) { |
637 | printk(KERN_ERR "WARNING more than 4GB of memory " | 633 | printk(KERN_ERR "WARNING more than 4GB of memory " |
638 | "but IOMMU not compiled in.\n" | 634 | "but IOMMU not available.\n" |
639 | KERN_ERR "WARNING 32bit PCI may malfunction.\n" | 635 | KERN_ERR "WARNING 32bit PCI may malfunction.\n"); |
640 | KERN_ERR "You might want to enable " | ||
641 | "CONFIG_GART_IOMMU\n"); | ||
642 | } | 636 | } |
643 | return -1; | 637 | return -1; |
644 | } | 638 | } |
645 | 639 | ||
640 | i = 0; | ||
641 | for_all_nb(dev) | ||
642 | i++; | ||
643 | if (i > MAX_NB) { | ||
644 | printk(KERN_ERR "PCI-GART: Too many northbridges (%ld). Disabled\n", i); | ||
645 | return -1; | ||
646 | } | ||
647 | |||
646 | printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n"); | 648 | printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n"); |
647 | aper_size = info.aper_size * 1024 * 1024; | 649 | aper_size = info.aper_size * 1024 * 1024; |
648 | iommu_size = check_iommu_size(info.aper_base, aper_size); | 650 | iommu_size = check_iommu_size(info.aper_base, aper_size); |