From: Muli Ben-Yehuda Date: Wed, 2 Aug 2006 20:37:31 +0000 (+0200) Subject: [PATCH] x86_64: Fix CONFIG_IOMMU_DEBUG X-Git-Tag: upstream/snapshot3+hdmi~38636 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a166222cde740b34d97fe49dca70348197f4534e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [PATCH] x86_64: Fix CONFIG_IOMMU_DEBUG If CONFIG_IOMMU_DEBUG is set force_iommu defaults to 1. In the case where no HW IOMMU is present in the machine and we end up using nommu, leaving force_iommu set to 1 causes dma_alloc_coherent to do the wrong thing. Therefore, if we end up using nommu, make sure force_iommu is 0. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c index c4c3cc3..aad7609 100644 --- a/arch/x86_64/kernel/pci-nommu.c +++ b/arch/x86_64/kernel/pci-nommu.c @@ -92,5 +92,7 @@ void __init no_iommu_init(void) { if (dma_ops) return; + + force_iommu = 0; /* no HW IOMMU */ dma_ops = &nommu_dma_ops; }