Skip to content

Commit

Permalink
[PATCH] x86_64: Use -ENODEV in IOMMU initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jun 26, 2006
1 parent 6ebcc00 commit f201611
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86_64/kernel/pci-gart.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ static int __init pci_iommu_init(void)

if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n");
return -1;
return -ENODEV;
}

#ifndef CONFIG_AGP_AMD64
Expand All @@ -595,7 +595,7 @@ static int __init pci_iommu_init(void)
#endif

if (swiotlb)
return -1;
return -ENODEV;

if (no_iommu ||
(!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
Expand All @@ -607,7 +607,7 @@ static int __init pci_iommu_init(void)
"but IOMMU not available.\n"
KERN_ERR "WARNING 32bit PCI may malfunction.\n");
}
return -1;
return -ENODEV;
}

printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");
Expand Down

0 comments on commit f201611

Please sign in to comment.