ChangeSet 1.2231.1.86, 2005/03/28 19:40:26-08:00, [EMAIL PROTECTED] [PATCH] x86_64: Clean up the IOMMU initialisation a bit Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
pci-gart.c | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c --- a/arch/x86_64/kernel/pci-gart.c 2005-03-28 21:25:23 -08:00 +++ b/arch/x86_64/kernel/pci-gart.c 2005-03-28 21:25:23 -08:00 @@ -720,6 +720,7 @@ unsigned aper_base, new_aper_base; unsigned aper_size, gatt_size, new_aper_size; + printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); aper_size = aper_base = info->aper_size = 0; for_all_nb(dev) { new_aper_base = read_aperture(dev, &new_aper_size); @@ -798,25 +799,14 @@ return -1; } - if (no_iommu || (!force_iommu && end_pfn < 0xffffffff>>PAGE_SHIFT) || - !iommu_aperture) { + if (no_iommu || + (!force_iommu && end_pfn < 0xffffffff>>PAGE_SHIFT) || + !iommu_aperture || + (no_agp && init_k8_gatt(&info) < 0)) { printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); no_iommu = 1; return -1; } - - if (no_agp) { - int err = -1; - printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); - no_agp = 1; - if (force_iommu || end_pfn >= 0xffffffff>>PAGE_SHIFT) - err = init_k8_gatt(&info); - if (err < 0) { - printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); - no_iommu = 1; - return -1; - } - } aper_size = info.aper_size * 1024 * 1024; iommu_size = check_iommu_size(info.aper_base, aper_size); - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html