aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/pci-dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index afcc58b69c7c..fcc2f2bfa39c 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -120,11 +120,14 @@ static void __init dma32_free_bootmem(void)
120 120
121void __init pci_iommu_alloc(void) 121void __init pci_iommu_alloc(void)
122{ 122{
123 int use_swiotlb;
124
125 use_swiotlb = pci_swiotlb_init();
123#ifdef CONFIG_X86_64 126#ifdef CONFIG_X86_64
124 /* free the range so iommu could get some range less than 4G */ 127 /* free the range so iommu could get some range less than 4G */
125 dma32_free_bootmem(); 128 dma32_free_bootmem();
126#endif 129#endif
127 if (pci_swiotlb_init()) 130 if (use_swiotlb)
128 return; 131 return;
129 132
130 gart_iommu_hole_init(); 133 gart_iommu_hole_init();