Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] x86_64: Fix swiotlb=force

It was broken before. But having it is important as possible hardware
bug workaround.

And previously there was no way to force swiotlb if there is another IOMMU.
Side effect is that iommu=force won't force swiotlb anymore even if there
isn't another IOMMU.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andi Kleen and committed by
Linus Torvalds
65f87d8a 355540f3

+5 -2
+3 -2
arch/x86_64/kernel/pci-swiotlb.c
··· 31 31 void pci_swiotlb_init(void) 32 32 { 33 33 /* don't initialize swiotlb if iommu=off (no_iommu=1) */ 34 - if (!iommu_detected && !no_iommu && 35 - (end_pfn > MAX_DMA32_PFN || force_iommu)) 34 + if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN) 36 35 swiotlb = 1; 36 + if (swiotlb_force) 37 + swiotlb = 1; 37 38 if (swiotlb) { 38 39 printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); 39 40 swiotlb_init();
+2
include/asm-x86_64/swiotlb.h
··· 42 42 extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); 43 43 extern void swiotlb_init(void); 44 44 45 + extern int swiotlb_force; 46 + 45 47 #ifdef CONFIG_SWIOTLB 46 48 extern int swiotlb; 47 49 #else