Skip to content

Commit

Permalink
x86: Fix iommu=soft boot option
Browse files Browse the repository at this point in the history
iommu=soft boot option forces the kernel to use swiotlb.

( This has the side-effect of enabling the swiotlb over the
  GART if this boot option is provided. This is the desired
  behavior of the swiotlb boot option and works like that
  for all other hw-IOMMU drivers. )

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: yinghai@kernel.org
LKML-Reference: <20091125084611O.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Nov 25, 2009
1 parent be83129 commit 273bee2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/kernel/pci-swiotlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static struct dma_map_ops swiotlb_dma_ops = {
*/
int __init pci_swiotlb_init(void)
{
int use_swiotlb = swiotlb | swiotlb_force;

/* don't initialize swiotlb if iommu=off (no_iommu=1) */
#ifdef CONFIG_X86_64
if (!no_iommu && max_pfn > MAX_DMA32_PFN)
Expand All @@ -63,5 +65,5 @@ int __init pci_swiotlb_init(void)
dma_ops = &swiotlb_dma_ops;
}

return swiotlb_force;
return use_swiotlb;
}

0 comments on commit 273bee2

Please sign in to comment.