提交 273bee27 编写于 作者: F FUJITA Tomonori 提交者: Ingo Molnar

x86: Fix iommu=soft boot option

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: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: yinghai@kernel.org
LKML-Reference: <20091125084611O.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 be831297
......@@ -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)
......@@ -63,5 +65,5 @@ int __init pci_swiotlb_init(void)
dma_ops = &swiotlb_dma_ops;
}
return swiotlb_force;
return use_swiotlb;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册