aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-11-24 18:46:28 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-25 04:12:51 -0500
commit273bee27fa9f79d94b78c83506016f2e41e78983 (patch)
tree3325e405145be3518dec479f90a812539cc504ae /arch/x86
parentbe831297716036de5b24308447ecb69f1706a846 (diff)
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: 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>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/pci-swiotlb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index e36e71daa44c..e3c0a66b9e77 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -50,6 +50,8 @@ static struct dma_map_ops swiotlb_dma_ops = {
50 */ 50 */
51int __init pci_swiotlb_init(void) 51int __init pci_swiotlb_init(void)
52{ 52{
53 int use_swiotlb = swiotlb | swiotlb_force;
54
53 /* don't initialize swiotlb if iommu=off (no_iommu=1) */ 55 /* don't initialize swiotlb if iommu=off (no_iommu=1) */
54#ifdef CONFIG_X86_64 56#ifdef CONFIG_X86_64
55 if (!no_iommu && max_pfn > MAX_DMA32_PFN) 57 if (!no_iommu && max_pfn > MAX_DMA32_PFN)
@@ -63,5 +65,5 @@ int __init pci_swiotlb_init(void)
63 dma_ops = &swiotlb_dma_ops; 65 dma_ops = &swiotlb_dma_ops;
64 } 66 }
65 67
66 return swiotlb_force; 68 return use_swiotlb;
67} 69}