]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86: Fix iommu=soft boot option
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tue, 24 Nov 2009 23:46:28 +0000 (08:46 +0900)
committerIngo Molnar <mingo@elte.hu>
Wed, 25 Nov 2009 09:12:51 +0000 (10:12 +0100)
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>
arch/x86/kernel/pci-swiotlb.c

index e36e71daa44c644abbc29f69aa1b2c02dda13a66..e3c0a66b9e7785a1eee6637d9ddedef18fb7bf48 100644 (file)
@@ -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;
 }