Răsfoiți Sursa

[PATCH] x86_64: Use -ENODEV in IOMMU initialization

Fix

initcall at 0xffffffff806c5b89: pci_iommu_init+0x0/0x53c(): returned with error code -1

Return -ENODEV instead when the IOMMU is not used.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen 19 ani în urmă
părinte
comite
f201611fce
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      arch/x86_64/kernel/pci-gart.c

+ 3 - 3
arch/x86_64/kernel/pci-gart.c

@@ -581,7 +581,7 @@ static int __init pci_iommu_init(void)
 
 
 	if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
 	if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
 		printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n");
 		printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n");
-		return -1;
+		return -ENODEV;
 	}
 	}
 
 
 #ifndef CONFIG_AGP_AMD64
 #ifndef CONFIG_AGP_AMD64
@@ -595,7 +595,7 @@ static int __init pci_iommu_init(void)
 #endif	
 #endif	
 
 
 	if (swiotlb)
 	if (swiotlb)
-		return -1; 
+		return -ENODEV;
 
 
 	if (no_iommu ||
 	if (no_iommu ||
 	    (!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
 	    (!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
@@ -607,7 +607,7 @@ static int __init pci_iommu_init(void)
 					"but IOMMU not available.\n"
 					"but IOMMU not available.\n"
 			       KERN_ERR "WARNING 32bit PCI may malfunction.\n");
 			       KERN_ERR "WARNING 32bit PCI may malfunction.\n");
 		}
 		}
-		return -1;
+		return -ENODEV;
 	}
 	}
 
 
 	printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");
 	printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");