diff options
-rw-r--r-- | arch/x86_64/kernel/pci-swiotlb.c | 5 | ||||
-rw-r--r-- | include/asm-x86_64/swiotlb.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/pci-swiotlb.c b/arch/x86_64/kernel/pci-swiotlb.c index ebdb77fe2057..6a55f87ba97f 100644 --- a/arch/x86_64/kernel/pci-swiotlb.c +++ b/arch/x86_64/kernel/pci-swiotlb.c | |||
@@ -31,9 +31,10 @@ struct dma_mapping_ops swiotlb_dma_ops = { | |||
31 | void pci_swiotlb_init(void) | 31 | void pci_swiotlb_init(void) |
32 | { | 32 | { |
33 | /* don't initialize swiotlb if iommu=off (no_iommu=1) */ | 33 | /* don't initialize swiotlb if iommu=off (no_iommu=1) */ |
34 | if (!iommu_detected && !no_iommu && | 34 | if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN) |
35 | (end_pfn > MAX_DMA32_PFN || force_iommu)) | ||
36 | swiotlb = 1; | 35 | swiotlb = 1; |
36 | if (swiotlb_force) | ||
37 | swiotlb = 1; | ||
37 | if (swiotlb) { | 38 | if (swiotlb) { |
38 | printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); | 39 | printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); |
39 | swiotlb_init(); | 40 | swiotlb_init(); |
diff --git a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h index 5f9a01805821..ba94ab3d2673 100644 --- a/include/asm-x86_64/swiotlb.h +++ b/include/asm-x86_64/swiotlb.h | |||
@@ -42,6 +42,8 @@ extern void swiotlb_free_coherent (struct device *hwdev, size_t size, | |||
42 | extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); | 42 | extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); |
43 | extern void swiotlb_init(void); | 43 | extern void swiotlb_init(void); |
44 | 44 | ||
45 | extern int swiotlb_force; | ||
46 | |||
45 | #ifdef CONFIG_SWIOTLB | 47 | #ifdef CONFIG_SWIOTLB |
46 | extern int swiotlb; | 48 | extern int swiotlb; |
47 | #else | 49 | #else |