Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65f87d8a authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds
Browse files

[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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 355540f3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@ struct dma_mapping_ops swiotlb_dma_ops = {
void pci_swiotlb_init(void)
{
	/* don't initialize swiotlb if iommu=off (no_iommu=1) */
	if (!iommu_detected && !no_iommu &&
	    (end_pfn > MAX_DMA32_PFN || force_iommu))
	if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN)
	       swiotlb = 1;
	if (swiotlb_force)
		swiotlb = 1;
	if (swiotlb) {
		printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n");
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ extern void swiotlb_free_coherent (struct device *hwdev, size_t size,
extern int swiotlb_dma_supported(struct device *hwdev, u64 mask);
extern void swiotlb_init(void);

extern int swiotlb_force;

#ifdef CONFIG_SWIOTLB
extern int swiotlb;
#else