]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix x86-64 VIA systems with IOMMU debug
authorAndi Kleen <ak@suse.de>
Mon, 14 Jun 2004 06:06:51 +0000 (23:06 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 14 Jun 2004 06:06:51 +0000 (23:06 -0700)
VIA chipsets are broken and don't work with IOMMU enabled. For some mysterious
reason (the IOMMU logic is actually in the CPU) they manage to corrupt all
data going through the aperture to PCI devices.

There was a workaround previously that enabled the slower softmmu when VIA is
detected on the normal IOMMU path (when there is more than 3GB of memory). But
CONFIG_IOMMU_DEBUG took a short cut that was not handled, which ended up with
VIA systems not booting when this option is enabled.

This patch enables the workaround with CONFIG_IOMMU_DEBUG/iommu=force too

arch/x86_64/kernel/io_apic.c

index f7625f3ee14565fd51686faf2ea37b86eafa0942..718504a3274161d07feb4dd42449c447f42e7fa2 100644 (file)
@@ -252,7 +252,8 @@ void __init check_ioapic(void)
                                switch (vendor) { 
                                case PCI_VENDOR_ID_VIA:
 #ifdef CONFIG_GART_IOMMU
-                                       if (end_pfn >= (0xffffffff>>PAGE_SHIFT) &&
+                                       if ((end_pfn >= (0xffffffff>>PAGE_SHIFT) ||
+                                            force_iommu) &&
                                            !iommu_aperture_allowed) {
                                                printk(KERN_INFO
     "Looks like a VIA chipset. Disabling IOMMU. Overwrite with \"iommu=allowed\"\n");