History

[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.

Andi Kleen committed 20 years ago

Commit f2016111 parent 6ebcc001 file · +3 −3Browse files

Unified · Split

arch/x86_64/kernel/pci-gart.c+3−3
@@ -581,7 +581,7 @@ static int __init pci_iommu_init(void) · 580 unmodified lines
581581
582582 if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
583583 printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n");
584− return -1;
584+ return -ENODEV;
585585 }
586586
587587 #ifndef CONFIG_AGP_AMD64
@@ -595,7 +595,7 @@ static int __init pci_iommu_init(void) · 7 unmodified lines
595595 #endif
596596
597597 if (swiotlb)
598− return -1;
598+ return -ENODEV;
599599
600600 if (no_iommu ||
601601 (!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
@@ -607,7 +607,7 @@ static int __init pci_iommu_init(void) · 5 unmodified lines
607607 "but IOMMU not available.\n"
608608 KERN_ERR "WARNING 32bit PCI may malfunction.\n");
609609 }
610− return -1;
610+ return -ENODEV;
611611 }
612612
613613 printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t