aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/pci-swiotlb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index e36e71daa44c..e3c0a66b9e77 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -50,6 +50,8 @@ static struct dma_map_ops swiotlb_dma_ops = {
50 */ 50 */
51int __init pci_swiotlb_init(void) 51int __init pci_swiotlb_init(void)
52{ 52{
53 int use_swiotlb = swiotlb | swiotlb_force;
54
53 /* don't initialize swiotlb if iommu=off (no_iommu=1) */ 55 /* don't initialize swiotlb if iommu=off (no_iommu=1) */
54#ifdef CONFIG_X86_64 56#ifdef CONFIG_X86_64
55 if (!no_iommu && max_pfn > MAX_DMA32_PFN) 57 if (!no_iommu && max_pfn > MAX_DMA32_PFN)
@@ -63,5 +65,5 @@ int __init pci_swiotlb_init(void)
63 dma_ops = &swiotlb_dma_ops; 65 dma_ops = &swiotlb_dma_ops;
64 } 66 }
65 67
66 return swiotlb_force; 68 return use_swiotlb;
67} 69}